Commit f6925c9b6335881941e28d7b51bef12d54e86725

Authored by fengwotao
1 parent 774e906e

pref:调整公共接口管理

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