Commit f6925c9b6335881941e28d7b51bef12d54e86725

Authored by fengwotao
1 parent 774e906e

pref:调整公共接口管理

@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 import { Button } from 'ant-design-vue'; 14 import { Button } from 'ant-design-vue';
15 import { useMessage } from '/@/hooks/web/useMessage'; 15 import { useMessage } from '/@/hooks/web/useMessage';
16 16
17 - defineProps({ 17 + const props = defineProps({
18 showBtn: { 18 showBtn: {
19 type: Boolean, 19 type: Boolean,
20 default: false, 20 default: false,
@@ -37,11 +37,15 @@ @@ -37,11 +37,15 @@
37 mainMenuBar: false, 37 mainMenuBar: false,
38 statusBar: false, 38 statusBar: false,
39 onFocus: () => { 39 onFocus: () => {
40 - setJsonValue('测试结果为'); 40 + if (props.showBtn) {
  41 + setJsonValue('测试结果为');
  42 + }
41 }, 43 },
42 onBlur: () => {}, 44 onBlur: () => {},
43 onChangeText: (e) => { 45 onChangeText: (e) => {
44 - if (e.length) return setJsonValue('测试结果为'); 46 + if (props.showBtn) {
  47 + if (e.length) return setJsonValue('测试结果为');
  48 + }
45 }, 49 },
46 } as object; 50 } as object;
47 let editor = new jsoneditor(jsoneditorRef.value, options); 51 let editor = new jsoneditor(jsoneditorRef.value, options);