widget.qw 1.0.66 → 1.0.68
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 +13 -3
- package/build/widget.qw.es.js +2 -2
- package/build/widget.qw.umd.js +2 -2
- package/package.json +1 -1
- package/src/components/ObjsEditor.vue +28 -14
package/build/style.css
CHANGED
|
@@ -840,14 +840,14 @@
|
|
|
840
840
|
}
|
|
841
841
|
.widget .readonly-field[data-v-0c8e09c0] {
|
|
842
842
|
margin: 4px 0;
|
|
843
|
-
}.widget[data-v-
|
|
843
|
+
}.widget[data-v-7359377c] {
|
|
844
844
|
background: #fff;
|
|
845
845
|
box-sizing: border-box;
|
|
846
846
|
height: 100%;
|
|
847
847
|
text-align: left;
|
|
848
848
|
font-size: 12px;
|
|
849
849
|
}
|
|
850
|
-
.option[data-v-
|
|
850
|
+
.option[data-v-7359377c] {
|
|
851
851
|
margin: 0 8px 8px 0;
|
|
852
852
|
padding: 5px 10px;
|
|
853
853
|
border-radius: 6px;
|
|
@@ -857,6 +857,16 @@
|
|
|
857
857
|
display: inline-block;
|
|
858
858
|
position: relative;
|
|
859
859
|
}
|
|
860
|
-
[data-v-
|
|
860
|
+
[data-v-7359377c] .van-field__label {
|
|
861
861
|
margin: auto;
|
|
862
|
+
}
|
|
863
|
+
[data-v-7359377c] .van-cell {
|
|
864
|
+
font-size: 12px;
|
|
865
|
+
padding: 5px 5px;
|
|
866
|
+
}
|
|
867
|
+
[data-v-7359377c] .van-icon {
|
|
868
|
+
font-size: 12px;
|
|
869
|
+
}
|
|
870
|
+
[data-v-7359377c] .van-popup .van-cell {
|
|
871
|
+
padding: 5px 25px;
|
|
862
872
|
}
|
package/build/widget.qw.es.js
CHANGED
|
@@ -20959,7 +20959,7 @@ const _sfc_main$1 = {
|
|
|
20959
20959
|
}
|
|
20960
20960
|
};
|
|
20961
20961
|
var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-0c8e09c0"]]);
|
|
20962
|
-
var ObjsEditor_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-
|
|
20962
|
+
var ObjsEditor_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-7359377c] {\n background: #fff;\n box-sizing: border-box;\n height: 100%;\n text-align: left;\n font-size: 12px;\n}\n.option[data-v-7359377c] {\n margin: 0 8px 8px 0;\n padding: 5px 10px;\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-7359377c] .van-field__label {\n margin: auto;\n}\n[data-v-7359377c] .van-cell {\n font-size: 12px;\n padding: 5px 5px;\n}\n[data-v-7359377c] .van-icon {\n font-size: 12px;\n}\n[data-v-7359377c] .van-popup .van-cell {\n padding: 5px 25px;\n}")();
|
|
20963
20963
|
const _hoisted_1 = {
|
|
20964
20964
|
class: "widget-box"
|
|
20965
20965
|
};
|
|
@@ -21292,7 +21292,7 @@ const _sfc_main = {
|
|
|
21292
21292
|
};
|
|
21293
21293
|
}
|
|
21294
21294
|
};
|
|
21295
|
-
var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
21295
|
+
var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7359377c"]]);
|
|
21296
21296
|
const secret_notify = () => {
|
|
21297
21297
|
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 });
|
|
21298
21298
|
};
|
package/build/widget.qw.umd.js
CHANGED
|
@@ -20962,7 +20962,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20962
20962
|
}
|
|
20963
20963
|
};
|
|
20964
20964
|
var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-0c8e09c0"]]);
|
|
20965
|
-
var ObjsEditor_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-
|
|
20965
|
+
var ObjsEditor_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-7359377c] {\n background: #fff;\n box-sizing: border-box;\n height: 100%;\n text-align: left;\n font-size: 12px;\n}\n.option[data-v-7359377c] {\n margin: 0 8px 8px 0;\n padding: 5px 10px;\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-7359377c] .van-field__label {\n margin: auto;\n}\n[data-v-7359377c] .van-cell {\n font-size: 12px;\n padding: 5px 5px;\n}\n[data-v-7359377c] .van-icon {\n font-size: 12px;\n}\n[data-v-7359377c] .van-popup .van-cell {\n padding: 5px 25px;\n}")();
|
|
20966
20966
|
const _hoisted_1 = {
|
|
20967
20967
|
class: "widget-box"
|
|
20968
20968
|
};
|
|
@@ -21295,7 +21295,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21295
21295
|
};
|
|
21296
21296
|
}
|
|
21297
21297
|
};
|
|
21298
|
-
var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
21298
|
+
var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7359377c"]]);
|
|
21299
21299
|
const secret_notify = () => {
|
|
21300
21300
|
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 });
|
|
21301
21301
|
};
|
package/package.json
CHANGED
|
@@ -58,10 +58,8 @@
|
|
|
58
58
|
</van-field>
|
|
59
59
|
|
|
60
60
|
<div style="margin: 16px; display: flex;align-items: center;justify-content: center;">
|
|
61
|
-
<van-button v-if="data.isShowInput" @click="onInputConfirm" size="mini"
|
|
62
|
-
|
|
63
|
-
<van-button v-if="data.isShowInput" @click="onInputCancel" size="mini"
|
|
64
|
-
>取消</van-button>
|
|
61
|
+
<van-button v-if="data.isShowInput" @click="onInputConfirm" size="mini">保存</van-button>
|
|
62
|
+
<van-button v-if="data.isShowInput" @click="onInputCancel" size="mini">取消</van-button>
|
|
65
63
|
</div>
|
|
66
64
|
</van-form>
|
|
67
65
|
</div>
|
|
@@ -74,7 +72,7 @@
|
|
|
74
72
|
</template>
|
|
75
73
|
|
|
76
74
|
<script setup>
|
|
77
|
-
import { nextTick, ref, onMounted, defineProps, defineEmits, reactive, computed
|
|
75
|
+
import { nextTick, ref, onMounted, defineProps, defineEmits, reactive, computed, watch } from 'vue'
|
|
78
76
|
import { useVModel } from '@vueuse/core'
|
|
79
77
|
import util from '@/util'
|
|
80
78
|
import DatetimePicker from './DatetimePicker/index.vue'
|
|
@@ -125,20 +123,20 @@ const data = reactive({
|
|
|
125
123
|
inputValue: {},
|
|
126
124
|
isShowInput: false,
|
|
127
125
|
selectIndex: -1,
|
|
128
|
-
oldModelValue:[]
|
|
126
|
+
oldModelValue: []
|
|
129
127
|
})
|
|
130
128
|
const keys = Object.keys(props.schema)
|
|
131
129
|
const visiableKeys = keys.filter(k => props.schema[k].auth != 'gone')
|
|
132
130
|
|
|
133
|
-
watch(()=>JSON.stringify(modelValue.value),(n,o)=>{
|
|
134
|
-
if(!modelValue.value)
|
|
131
|
+
watch(() => JSON.stringify(modelValue.value), (n, o) => {
|
|
132
|
+
if (!modelValue.value)
|
|
135
133
|
modelValue.value = []
|
|
136
|
-
|
|
134
|
+
|
|
137
135
|
data.oldModelValue = JSON.parse(JSON.stringify(modelValue.value))
|
|
138
|
-
},{
|
|
139
|
-
immediate:true
|
|
140
|
-
},{
|
|
141
|
-
deep:true
|
|
136
|
+
}, {
|
|
137
|
+
immediate: true
|
|
138
|
+
}, {
|
|
139
|
+
deep: true
|
|
142
140
|
})
|
|
143
141
|
|
|
144
142
|
onMounted(() => {
|
|
@@ -229,7 +227,7 @@ const onEdit = (index) => {
|
|
|
229
227
|
const onNewOption = () => {
|
|
230
228
|
let oldModelValue = JSON.parse(JSON.stringify(modelValue.value))
|
|
231
229
|
modelValue.value = [...(modelValue.value || []), makeDefaultValue()]
|
|
232
|
-
nextTick(()=>{
|
|
230
|
+
nextTick(() => {
|
|
233
231
|
data.oldModelValue = oldModelValue
|
|
234
232
|
onEdit(modelValue.value.length - 1)
|
|
235
233
|
})
|
|
@@ -302,4 +300,20 @@ const onChangeOption = (key) => {
|
|
|
302
300
|
margin: auto;
|
|
303
301
|
|
|
304
302
|
}
|
|
303
|
+
|
|
304
|
+
:deep(.van-cell) {
|
|
305
|
+
font-size: 12px;
|
|
306
|
+
padding: 5px 5px;
|
|
307
|
+
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
:deep(.van-icon) {
|
|
311
|
+
font-size: 12px;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
:deep(.van-popup) {
|
|
315
|
+
.van-cell {
|
|
316
|
+
padding: 5px 25px;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
305
319
|
</style>
|