widget.qw 1.0.63 → 1.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/style.css CHANGED
@@ -840,13 +840,13 @@
840
840
  }
841
841
  .widget .readonly-field[data-v-0c8e09c0] {
842
842
  margin: 4px 0;
843
- }.widget[data-v-60c690c1] {
843
+ }.widget[data-v-9c2543e2] {
844
844
  background: #fff;
845
845
  box-sizing: border-box;
846
846
  height: 100%;
847
847
  text-align: left;
848
848
  }
849
- .option[data-v-60c690c1] {
849
+ .option[data-v-9c2543e2] {
850
850
  margin: 0 8px 8px 0;
851
851
  padding: 5px 5px;
852
852
  border-radius: 6px;
@@ -856,6 +856,6 @@
856
856
  display: inline-block;
857
857
  position: relative;
858
858
  }
859
- [data-v-60c690c1] .van-field__label {
859
+ [data-v-9c2543e2] .van-field__label {
860
860
  margin: auto;
861
861
  }
@@ -20946,7 +20946,7 @@ const _sfc_main$1 = {
20946
20946
  }
20947
20947
  };
20948
20948
  var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-0c8e09c0"]]);
20949
- var ObjsEditor_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-60c690c1] {\n background: #fff;\n box-sizing: border-box;\n height: 100%;\n text-align: left;\n}\n.option[data-v-60c690c1] {\n margin: 0 8px 8px 0;\n padding: 5px 5px;\n border-radius: 6px;\n border: 2px solid #e1e1e1;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n color: #666;\n display: inline-block;\n position: relative;\n}\n[data-v-60c690c1] .van-field__label {\n margin: auto;\n}")();
20949
+ var ObjsEditor_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-9c2543e2] {\n background: #fff;\n box-sizing: border-box;\n height: 100%;\n text-align: left;\n}\n.option[data-v-9c2543e2] {\n margin: 0 8px 8px 0;\n padding: 5px 5px;\n border-radius: 6px;\n border: 2px solid #e1e1e1;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n color: #666;\n display: inline-block;\n position: relative;\n}\n[data-v-9c2543e2] .van-field__label {\n margin: auto;\n}")();
20950
20950
  const _hoisted_1 = {
20951
20951
  class: "widget-box"
20952
20952
  };
@@ -21037,6 +21037,8 @@ const _sfc_main = {
21037
21037
  const keys2 = Object.keys(props.schema);
21038
21038
  const visiableKeys = keys2.filter((k) => props.schema[k].auth != "gone");
21039
21039
  watch(() => JSON.stringify(modelValue.value), (n, o) => {
21040
+ if (!modelValue.value)
21041
+ modelValue.value = [];
21040
21042
  data2.oldModelValue = JSON.parse(JSON.stringify(modelValue.value));
21041
21043
  }, {
21042
21044
  immediate: true
@@ -21044,13 +21046,7 @@ const _sfc_main = {
21044
21046
  deep: true
21045
21047
  });
21046
21048
  onMounted(() => {
21047
- init();
21048
21049
  });
21049
- const init = () => {
21050
- if (modelValue.value)
21051
- return;
21052
- modelValue.value = [];
21053
- };
21054
21050
  const makeDefaultValue = () => {
21055
21051
  let res = {};
21056
21052
  keys2.forEach((key) => {
@@ -21115,7 +21111,7 @@ const _sfc_main = {
21115
21111
  };
21116
21112
  const onNewOption = () => {
21117
21113
  let oldModelValue = JSON.parse(JSON.stringify(modelValue.value));
21118
- modelValue.value = [...modelValue.value, makeDefaultValue()];
21114
+ modelValue.value = [...modelValue.value || [], makeDefaultValue()];
21119
21115
  nextTick(() => {
21120
21116
  data2.oldModelValue = oldModelValue;
21121
21117
  onEdit(modelValue.value.length - 1);
@@ -21280,7 +21276,7 @@ const _sfc_main = {
21280
21276
  };
21281
21277
  }
21282
21278
  };
21283
- var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-60c690c1"]]);
21279
+ var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9c2543e2"]]);
21284
21280
  const secret_notify = () => {
21285
21281
  showNotify({ type: "danger", message: "\u4E25\u683C\u6267\u884C\u4FE1\u606F\u4FDD\u5BC6\u8981\u6C42\uFF0C\u5207\u5B9E\u9632\u8303\u4F01\u4E1A\u6CC4\u5BC6\u98CE\u9669", duration: 3e3 });
21286
21282
  };
@@ -20949,7 +20949,7 @@ var __async = (__this, __arguments, generator) => {
20949
20949
  }
20950
20950
  };
20951
20951
  var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-0c8e09c0"]]);
20952
- var ObjsEditor_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-60c690c1] {\n background: #fff;\n box-sizing: border-box;\n height: 100%;\n text-align: left;\n}\n.option[data-v-60c690c1] {\n margin: 0 8px 8px 0;\n padding: 5px 5px;\n border-radius: 6px;\n border: 2px solid #e1e1e1;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n color: #666;\n display: inline-block;\n position: relative;\n}\n[data-v-60c690c1] .van-field__label {\n margin: auto;\n}")();
20952
+ var ObjsEditor_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-9c2543e2] {\n background: #fff;\n box-sizing: border-box;\n height: 100%;\n text-align: left;\n}\n.option[data-v-9c2543e2] {\n margin: 0 8px 8px 0;\n padding: 5px 5px;\n border-radius: 6px;\n border: 2px solid #e1e1e1;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n color: #666;\n display: inline-block;\n position: relative;\n}\n[data-v-9c2543e2] .van-field__label {\n margin: auto;\n}")();
20953
20953
  const _hoisted_1 = {
20954
20954
  class: "widget-box"
20955
20955
  };
@@ -21040,6 +21040,8 @@ var __async = (__this, __arguments, generator) => {
21040
21040
  const keys2 = Object.keys(props.schema);
21041
21041
  const visiableKeys = keys2.filter((k) => props.schema[k].auth != "gone");
21042
21042
  vue.watch(() => JSON.stringify(modelValue.value), (n, o) => {
21043
+ if (!modelValue.value)
21044
+ modelValue.value = [];
21043
21045
  data2.oldModelValue = JSON.parse(JSON.stringify(modelValue.value));
21044
21046
  }, {
21045
21047
  immediate: true
@@ -21047,13 +21049,7 @@ var __async = (__this, __arguments, generator) => {
21047
21049
  deep: true
21048
21050
  });
21049
21051
  vue.onMounted(() => {
21050
- init();
21051
21052
  });
21052
- const init = () => {
21053
- if (modelValue.value)
21054
- return;
21055
- modelValue.value = [];
21056
- };
21057
21053
  const makeDefaultValue = () => {
21058
21054
  let res = {};
21059
21055
  keys2.forEach((key) => {
@@ -21118,7 +21114,7 @@ var __async = (__this, __arguments, generator) => {
21118
21114
  };
21119
21115
  const onNewOption = () => {
21120
21116
  let oldModelValue = JSON.parse(JSON.stringify(modelValue.value));
21121
- modelValue.value = [...modelValue.value, makeDefaultValue()];
21117
+ modelValue.value = [...modelValue.value || [], makeDefaultValue()];
21122
21118
  vue.nextTick(() => {
21123
21119
  data2.oldModelValue = oldModelValue;
21124
21120
  onEdit(modelValue.value.length - 1);
@@ -21283,7 +21279,7 @@ var __async = (__this, __arguments, generator) => {
21283
21279
  };
21284
21280
  }
21285
21281
  };
21286
- var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-60c690c1"]]);
21282
+ var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9c2543e2"]]);
21287
21283
  const secret_notify = () => {
21288
21284
  showNotify({ type: "danger", message: "\u4E25\u683C\u6267\u884C\u4FE1\u606F\u4FDD\u5BC6\u8981\u6C42\uFF0C\u5207\u5B9E\u9632\u8303\u4F01\u4E1A\u6CC4\u5BC6\u98CE\u9669", duration: 3e3 });
21289
21285
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "widget.qw",
3
3
  "private": false,
4
- "version": "1.0.63",
4
+ "version": "1.0.64",
5
5
  "description": "marqstree Vue3组件库",
6
6
  "main": "build/widget.qw.es.js",
7
7
  "keywords": [
@@ -131,6 +131,9 @@ const keys = Object.keys(props.schema)
131
131
  const visiableKeys = keys.filter(k => props.schema[k].auth != 'gone')
132
132
 
133
133
  watch(()=>JSON.stringify(modelValue.value),(n,o)=>{
134
+ if(!modelValue.value)
135
+ modelValue.value = []
136
+
134
137
  data.oldModelValue = JSON.parse(JSON.stringify(modelValue.value))
135
138
  },{
136
139
  immediate:true
@@ -139,16 +142,8 @@ watch(()=>JSON.stringify(modelValue.value),(n,o)=>{
139
142
  })
140
143
 
141
144
  onMounted(() => {
142
- init()
143
145
  })
144
146
 
145
- const init = () => {
146
- if (modelValue.value)
147
- return
148
-
149
- modelValue.value = []
150
- }
151
-
152
147
  const makeDefaultValue = () => {
153
148
  let res = {}
154
149
 
@@ -233,7 +228,7 @@ const onEdit = (index) => {
233
228
 
234
229
  const onNewOption = () => {
235
230
  let oldModelValue = JSON.parse(JSON.stringify(modelValue.value))
236
- modelValue.value = [...modelValue.value, makeDefaultValue()]
231
+ modelValue.value = [...(modelValue.value || []), makeDefaultValue()]
237
232
  nextTick(()=>{
238
233
  data.oldModelValue = oldModelValue
239
234
  onEdit(modelValue.value.length - 1)
@@ -247,7 +247,7 @@ const data = reactive({
247
247
  // }
248
248
  // }
249
249
  //},
250
- datas: [],
250
+ datas: null,
251
251
  })
252
252
 
253
253
  watch(() => data.datas, (n, o) => {