widget.qw 1.0.58 → 1.0.60
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 +3 -3
- package/build/widget.qw.es.js +156 -128
- package/build/widget.qw.umd.js +156 -128
- package/package.json +1 -1
- package/src/components/ObjsEditor.vue +71 -51
- package/src/env.d.ts +8 -8
- package/src/views/objseditor/index.vue +1 -1
- package/tsconfig.json +19 -19
- package/tsconfig.node.json +8 -8
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-
|
|
843
|
+
}.widget[data-v-b711cbee] {
|
|
844
844
|
background: #fff;
|
|
845
845
|
box-sizing: border-box;
|
|
846
846
|
height: 100%;
|
|
847
847
|
text-align: left;
|
|
848
848
|
}
|
|
849
|
-
.widget .option[data-v-
|
|
849
|
+
.widget .option[data-v-b711cbee] {
|
|
850
850
|
margin: 0 8px 8px 0;
|
|
851
851
|
padding: 5px 5px;
|
|
852
852
|
border-radius: 4px;
|
|
@@ -855,6 +855,6 @@
|
|
|
855
855
|
display: inline-block;
|
|
856
856
|
position: relative;
|
|
857
857
|
}
|
|
858
|
-
[data-v-
|
|
858
|
+
[data-v-b711cbee] .van-field__label {
|
|
859
859
|
margin: auto;
|
|
860
860
|
}
|
package/build/widget.qw.es.js
CHANGED
|
@@ -17187,7 +17187,7 @@ const _hoisted_5$8 = {
|
|
|
17187
17187
|
class: "select-all-container"
|
|
17188
17188
|
};
|
|
17189
17189
|
const _hoisted_6$7 = /* @__PURE__ */ createTextVNode("\u5168\u9009");
|
|
17190
|
-
const _hoisted_7$
|
|
17190
|
+
const _hoisted_7$6 = {
|
|
17191
17191
|
class: "checkbox-style"
|
|
17192
17192
|
};
|
|
17193
17193
|
const _sfc_main$n = {
|
|
@@ -17430,7 +17430,7 @@ const _sfc_main$n = {
|
|
|
17430
17430
|
}, {
|
|
17431
17431
|
default: withCtx(() => [_hoisted_6$7]),
|
|
17432
17432
|
_: 1
|
|
17433
|
-
}, 8, ["modelValue"])])) : createCommentVNode("", true), createElementVNode("div", _hoisted_7$
|
|
17433
|
+
}, 8, ["modelValue"])])) : createCommentVNode("", true), createElementVNode("div", _hoisted_7$6, [props.multiple ? (openBlock(), createBlock(_component_van_checkbox_group, {
|
|
17434
17434
|
key: 0,
|
|
17435
17435
|
modelValue: checkedValue.value,
|
|
17436
17436
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => checkedValue.value = $event)
|
|
@@ -17577,7 +17577,7 @@ const _hoisted_5$7 = {
|
|
|
17577
17577
|
class: "action-buttons"
|
|
17578
17578
|
};
|
|
17579
17579
|
const _hoisted_6$6 = /* @__PURE__ */ createTextVNode(" \u53D6\u6D88 ");
|
|
17580
|
-
const _hoisted_7$
|
|
17580
|
+
const _hoisted_7$5 = /* @__PURE__ */ createTextVNode(" \u786E\u5B9A ");
|
|
17581
17581
|
const _hoisted_8$4 = {
|
|
17582
17582
|
class: "scroll-container"
|
|
17583
17583
|
};
|
|
@@ -17871,7 +17871,7 @@ const _sfc_main$l = {
|
|
|
17871
17871
|
disabled: !tempSelectedDepartment.value,
|
|
17872
17872
|
class: "confirm-btn"
|
|
17873
17873
|
}, {
|
|
17874
|
-
default: withCtx(() => [_hoisted_7$
|
|
17874
|
+
default: withCtx(() => [_hoisted_7$5]),
|
|
17875
17875
|
_: 1
|
|
17876
17876
|
}, 8, ["disabled"])])]), createVNode(_component_van_field, {
|
|
17877
17877
|
"left-icon": "search",
|
|
@@ -17939,7 +17939,7 @@ const _hoisted_5$6 = {
|
|
|
17939
17939
|
const _hoisted_6$5 = {
|
|
17940
17940
|
class: "header-right"
|
|
17941
17941
|
};
|
|
17942
|
-
const _hoisted_7$
|
|
17942
|
+
const _hoisted_7$4 = /* @__PURE__ */ createTextVNode("\u6E05\u7A7A");
|
|
17943
17943
|
const _hoisted_8$3 = /* @__PURE__ */ createTextVNode("\u786E\u5B9A");
|
|
17944
17944
|
const _hoisted_9$1 = {
|
|
17945
17945
|
key: 0,
|
|
@@ -18334,7 +18334,7 @@ const _sfc_main$k = {
|
|
|
18334
18334
|
onClick: handleClear,
|
|
18335
18335
|
class: "cancel-btn"
|
|
18336
18336
|
}, {
|
|
18337
|
-
default: withCtx(() => [_hoisted_7$
|
|
18337
|
+
default: withCtx(() => [_hoisted_7$4]),
|
|
18338
18338
|
_: 1
|
|
18339
18339
|
}), createVNode(_component_van_button, {
|
|
18340
18340
|
type: "primary",
|
|
@@ -18861,7 +18861,7 @@ const _hoisted_5$5 = {
|
|
|
18861
18861
|
class: "header-right"
|
|
18862
18862
|
};
|
|
18863
18863
|
const _hoisted_6$4 = /* @__PURE__ */ createTextVNode("\u6E05\u7A7A");
|
|
18864
|
-
const _hoisted_7$
|
|
18864
|
+
const _hoisted_7$3 = /* @__PURE__ */ createTextVNode("\u786E\u5B9A");
|
|
18865
18865
|
const _hoisted_8$2 = {
|
|
18866
18866
|
class: "scroll-container"
|
|
18867
18867
|
};
|
|
@@ -19149,7 +19149,7 @@ const _sfc_main$g = {
|
|
|
19149
19149
|
onClick: confirmSelection,
|
|
19150
19150
|
class: "confirm-btn"
|
|
19151
19151
|
}, {
|
|
19152
|
-
default: withCtx(() => [_hoisted_7$
|
|
19152
|
+
default: withCtx(() => [_hoisted_7$3]),
|
|
19153
19153
|
_: 1
|
|
19154
19154
|
})])]), createVNode(_component_van_search, {
|
|
19155
19155
|
modelValue: searchValue.value,
|
|
@@ -19217,7 +19217,7 @@ const _hoisted_5$4 = {
|
|
|
19217
19217
|
class: "header-right"
|
|
19218
19218
|
};
|
|
19219
19219
|
const _hoisted_6$3 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
|
|
19220
|
-
const _hoisted_7$
|
|
19220
|
+
const _hoisted_7$2 = /* @__PURE__ */ createTextVNode("\u786E\u5B9A");
|
|
19221
19221
|
const _hoisted_8$1 = {
|
|
19222
19222
|
class: "scroll-container"
|
|
19223
19223
|
};
|
|
@@ -19421,7 +19421,7 @@ const _sfc_main$f = {
|
|
|
19421
19421
|
onClick: onSubmit,
|
|
19422
19422
|
class: "confirm-btn"
|
|
19423
19423
|
}, {
|
|
19424
|
-
default: withCtx(() => [_hoisted_7$
|
|
19424
|
+
default: withCtx(() => [_hoisted_7$2]),
|
|
19425
19425
|
_: 1
|
|
19426
19426
|
})])]), createVNode(_component_van_search, {
|
|
19427
19427
|
modelValue: data2.keyword,
|
|
@@ -19734,7 +19734,7 @@ const _hoisted_5$3 = {
|
|
|
19734
19734
|
const _hoisted_6$2 = {
|
|
19735
19735
|
class: "user-jobs"
|
|
19736
19736
|
};
|
|
19737
|
-
const _hoisted_7$
|
|
19737
|
+
const _hoisted_7$1 = /* @__PURE__ */ createTextVNode(" \u6CE8\u9500 ");
|
|
19738
19738
|
const _sfc_main$c = {
|
|
19739
19739
|
__name: "UserProfile",
|
|
19740
19740
|
props: {
|
|
@@ -19788,7 +19788,7 @@ const _sfc_main$c = {
|
|
|
19788
19788
|
class: "logout-button",
|
|
19789
19789
|
onClick: onLogout
|
|
19790
19790
|
}, {
|
|
19791
|
-
default: withCtx(() => [_hoisted_7$
|
|
19791
|
+
default: withCtx(() => [_hoisted_7$1]),
|
|
19792
19792
|
_: 1
|
|
19793
19793
|
})]);
|
|
19794
19794
|
};
|
|
@@ -20457,7 +20457,7 @@ const _hoisted_5$1 = {
|
|
|
20457
20457
|
class: "header-right"
|
|
20458
20458
|
};
|
|
20459
20459
|
const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
|
|
20460
|
-
const _hoisted_7
|
|
20460
|
+
const _hoisted_7 = /* @__PURE__ */ createTextVNode("\u786E\u5B9A");
|
|
20461
20461
|
const _hoisted_8 = {
|
|
20462
20462
|
class: "scroll-container"
|
|
20463
20463
|
};
|
|
@@ -20622,7 +20622,7 @@ const _sfc_main$3 = {
|
|
|
20622
20622
|
onClick: onSubmit,
|
|
20623
20623
|
class: "confirm-btn"
|
|
20624
20624
|
}, {
|
|
20625
|
-
default: withCtx(() => [_hoisted_7
|
|
20625
|
+
default: withCtx(() => [_hoisted_7]),
|
|
20626
20626
|
_: 1
|
|
20627
20627
|
})])]), createVNode(_component_van_search, {
|
|
20628
20628
|
modelValue: data2.keyword,
|
|
@@ -20946,29 +20946,26 @@ 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-
|
|
20949
|
+
var ObjsEditor_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-b711cbee] {\n background: #fff;\n box-sizing: border-box;\n height: 100%;\n text-align: left;\n}\n.widget .option[data-v-b711cbee] {\n margin: 0 8px 8px 0;\n padding: 5px 5px;\n border-radius: 4px;\n background-color: rgb(217, 236, 255);\n color: #409eff;\n display: inline-block;\n position: relative;\n}\n[data-v-b711cbee] .van-field__label {\n margin: auto;\n}")();
|
|
20950
20950
|
const _hoisted_1 = {
|
|
20951
|
-
class: "widget"
|
|
20952
|
-
};
|
|
20953
|
-
const _hoisted_2 = {
|
|
20954
20951
|
style: {
|
|
20955
20952
|
"display": "flex",
|
|
20956
20953
|
"align-items": "center"
|
|
20957
20954
|
}
|
|
20958
20955
|
};
|
|
20959
|
-
const
|
|
20956
|
+
const _hoisted_2 = {
|
|
20960
20957
|
style: {
|
|
20961
20958
|
"padding": "5px 5px"
|
|
20962
20959
|
}
|
|
20963
20960
|
};
|
|
20964
|
-
const
|
|
20961
|
+
const _hoisted_3 = {
|
|
20965
20962
|
style: {
|
|
20966
20963
|
"display": "flex",
|
|
20967
20964
|
"flex-direction": "column",
|
|
20968
20965
|
"cursor": "pointer"
|
|
20969
20966
|
}
|
|
20970
20967
|
};
|
|
20971
|
-
const
|
|
20968
|
+
const _hoisted_4 = {
|
|
20972
20969
|
style: {
|
|
20973
20970
|
"margin": "16px",
|
|
20974
20971
|
"display": "flex",
|
|
@@ -20976,8 +20973,8 @@ const _hoisted_5 = {
|
|
|
20976
20973
|
"justify-content": "center"
|
|
20977
20974
|
}
|
|
20978
20975
|
};
|
|
20979
|
-
const
|
|
20980
|
-
const
|
|
20976
|
+
const _hoisted_5 = /* @__PURE__ */ createTextVNode("\u4FDD\u5B58");
|
|
20977
|
+
const _hoisted_6 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
|
|
20981
20978
|
const _sfc_main = {
|
|
20982
20979
|
__name: "ObjsEditor",
|
|
20983
20980
|
props: {
|
|
@@ -20985,10 +20982,26 @@ const _sfc_main = {
|
|
|
20985
20982
|
type: Array,
|
|
20986
20983
|
default: []
|
|
20987
20984
|
},
|
|
20988
|
-
|
|
20985
|
+
label: {
|
|
20986
|
+
type: String,
|
|
20987
|
+
default: ""
|
|
20988
|
+
},
|
|
20989
|
+
placeholder: {
|
|
20990
|
+
type: String,
|
|
20991
|
+
default: ""
|
|
20992
|
+
},
|
|
20993
|
+
readonly: {
|
|
20989
20994
|
type: Boolean,
|
|
20990
20995
|
default: true
|
|
20991
20996
|
},
|
|
20997
|
+
required: {
|
|
20998
|
+
type: Boolean,
|
|
20999
|
+
default: false
|
|
21000
|
+
},
|
|
21001
|
+
auth: {
|
|
21002
|
+
type: String,
|
|
21003
|
+
default: ""
|
|
21004
|
+
},
|
|
20992
21005
|
schema: {
|
|
20993
21006
|
type: Object,
|
|
20994
21007
|
default: {
|
|
@@ -21005,6 +21018,12 @@ const _sfc_main = {
|
|
|
21005
21018
|
}) {
|
|
21006
21019
|
const props = __props;
|
|
21007
21020
|
const modelValue = useVModel(props, "modelValue", emit);
|
|
21021
|
+
const {
|
|
21022
|
+
isRequired,
|
|
21023
|
+
isReadonly,
|
|
21024
|
+
isGone,
|
|
21025
|
+
isDisabled
|
|
21026
|
+
} = util.props2auth(props);
|
|
21008
21027
|
const data2 = reactive({
|
|
21009
21028
|
inputValue: {},
|
|
21010
21029
|
isShowInput: false,
|
|
@@ -21063,8 +21082,6 @@ const _sfc_main = {
|
|
|
21063
21082
|
else
|
|
21064
21083
|
formatValue = "";
|
|
21065
21084
|
}
|
|
21066
|
-
if (typeof formatValue === "boolean")
|
|
21067
|
-
formatValue = formatValue ? "\u662F" : "\u5426";
|
|
21068
21085
|
return `${label}:${formatValue}`;
|
|
21069
21086
|
});
|
|
21070
21087
|
return kvs.join(",");
|
|
@@ -21074,6 +21091,8 @@ const _sfc_main = {
|
|
|
21074
21091
|
let one = (_d = (_c = props.schema[key]) == null ? void 0 : _c.schema) == null ? void 0 : _d.options.find((item2) => item2[Object.keys(item2)[1]] === v);
|
|
21075
21092
|
return one ? one[Object.keys(one)[0]] : "";
|
|
21076
21093
|
} else {
|
|
21094
|
+
if (props.schema[key].type === "Boolean")
|
|
21095
|
+
v = v ? "\u662F" : "\u5426";
|
|
21077
21096
|
return v;
|
|
21078
21097
|
}
|
|
21079
21098
|
};
|
|
@@ -21128,119 +21147,128 @@ const _sfc_main = {
|
|
|
21128
21147
|
const _component_ObjsEditor = resolveComponent("ObjsEditor", true);
|
|
21129
21148
|
const _component_van_button = resolveComponent("van-button");
|
|
21130
21149
|
const _component_van_form = resolveComponent("van-form");
|
|
21131
|
-
return
|
|
21132
|
-
|
|
21133
|
-
|
|
21134
|
-
|
|
21135
|
-
|
|
21136
|
-
|
|
21137
|
-
|
|
21138
|
-
|
|
21150
|
+
return !unref(isGone) ? (openBlock(), createBlock(_component_van_field, {
|
|
21151
|
+
key: 0,
|
|
21152
|
+
label: props.label,
|
|
21153
|
+
disabled: unref(isDisabled),
|
|
21154
|
+
required: unref(isRequired),
|
|
21155
|
+
placeholder: props.placeholder
|
|
21156
|
+
}, {
|
|
21157
|
+
input: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(modelValue), (item, index) => {
|
|
21139
21158
|
return openBlock(), createElementBlock("div", {
|
|
21140
|
-
|
|
21159
|
+
class: "option",
|
|
21160
|
+
key: index
|
|
21161
|
+
}, [createElementVNode("div", _hoisted_1, [createVNode(_component_van_icon, {
|
|
21162
|
+
name: "arrow-left",
|
|
21163
|
+
onClick: withModifiers(($event) => onForward(index), ["stop"])
|
|
21164
|
+
}, null, 8, ["onClick"]), createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(visiableKeys), (k, j) => {
|
|
21165
|
+
return openBlock(), createElementBlock("div", {
|
|
21166
|
+
key: j,
|
|
21167
|
+
style: {
|
|
21168
|
+
"padding": "2px 2px"
|
|
21169
|
+
}
|
|
21170
|
+
}, toDisplayString(`${key2name(k)}:${key2value(k, item)}`), 1);
|
|
21171
|
+
}), 128))]), createElementVNode("div", _hoisted_3, [props.schema.auth != "readonly" && props.auth != "readonly" && props.auth != "disabled" ? (openBlock(), createBlock(_component_van_icon, {
|
|
21172
|
+
key: 0,
|
|
21173
|
+
name: "edit",
|
|
21174
|
+
onClick: withModifiers(($event) => onEdit(index), ["stop"])
|
|
21175
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true), createVNode(_component_van_icon, {
|
|
21176
|
+
name: "arrow",
|
|
21177
|
+
onClick: withModifiers(($event) => onBack(index), ["stop"]),
|
|
21141
21178
|
style: {
|
|
21142
|
-
"
|
|
21179
|
+
"margin": "8px 0"
|
|
21143
21180
|
}
|
|
21144
|
-
},
|
|
21145
|
-
|
|
21146
|
-
|
|
21147
|
-
|
|
21148
|
-
|
|
21149
|
-
},
|
|
21150
|
-
name: "arrow",
|
|
21151
|
-
onClick: withModifiers(($event) => onBack(index), ["stop"]),
|
|
21152
|
-
style: {
|
|
21153
|
-
"margin": "8px 0"
|
|
21154
|
-
}
|
|
21155
|
-
}, null, 8, ["onClick"]), props.schema.auth != "readonly" ? (openBlock(), createBlock(_component_van_icon, {
|
|
21156
|
-
key: 1,
|
|
21157
|
-
name: "cross",
|
|
21158
|
-
onClick: withModifiers(($event) => onDelete(index), ["stop"])
|
|
21159
|
-
}, null, 8, ["onClick"])) : createCommentVNode("", true)])])]);
|
|
21160
|
-
}), 128)), props.isShowAdd && !data2.isShowInput ? (openBlock(), createBlock(_component_van_icon, {
|
|
21161
|
-
key: 0,
|
|
21162
|
-
name: "plus",
|
|
21163
|
-
onClick: onNewOption
|
|
21164
|
-
})) : createCommentVNode("", true), data2.isShowInput ? (openBlock(), createBlock(_component_van_form, {
|
|
21165
|
-
key: 1,
|
|
21166
|
-
model: data2.inputValue
|
|
21167
|
-
}, {
|
|
21168
|
-
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(keys2), (key, i) => {
|
|
21169
|
-
return withDirectives((openBlock(), createBlock(_component_van_field, {
|
|
21170
|
-
key: i,
|
|
21171
|
-
label: props.schema[key].label,
|
|
21172
|
-
required: props.schema[key].auth === "required",
|
|
21173
|
-
disabled: props.schema[key].auth === "readonly"
|
|
21174
|
-
}, {
|
|
21175
|
-
input: withCtx(() => {
|
|
21176
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
21177
|
-
return [props.schema[key].type == "String" && !((_b = (_a = props.schema[key]) == null ? void 0 : _a.schema) == null ? void 0 : _b.options) ? (openBlock(), createBlock(_component_van_field, {
|
|
21178
|
-
key: 0,
|
|
21179
|
-
modelValue: data2.inputValue[key],
|
|
21180
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21181
|
-
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21182
|
-
type: "text"
|
|
21183
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : createCommentVNode("", true), props.schema[key].type == "Number" && !((_d = (_c = props.schema[key]) == null ? void 0 : _c.schema) == null ? void 0 : _d.options) ? (openBlock(), createBlock(_component_van_field, {
|
|
21184
|
-
key: 1,
|
|
21185
|
-
modelValue: data2.inputValue[key],
|
|
21186
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21187
|
-
modelModifiers: {
|
|
21188
|
-
number: true
|
|
21189
|
-
},
|
|
21190
|
-
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21191
|
-
type: "number"
|
|
21192
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : createCommentVNode("", true), props.schema[key].type == "Boolean" ? (openBlock(), createBlock(_component_van_switch, {
|
|
21193
|
-
key: 2,
|
|
21194
|
-
modelValue: data2.inputValue[key],
|
|
21195
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event
|
|
21196
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : createCommentVNode("", true), props.schema[key].type == "Datetime" ? (openBlock(), createBlock(_sfc_main$o, {
|
|
21197
|
-
key: 3,
|
|
21198
|
-
modelValue: data2.inputValue[key],
|
|
21199
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21200
|
-
placeholder: "\u9009\u62E9\u65F6\u95F4"
|
|
21201
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : createCommentVNode("", true), ((_f = (_e = props.schema[key]) == null ? void 0 : _e.schema) == null ? void 0 : _f.options) ? (openBlock(), createBlock(DataSelector, {
|
|
21202
|
-
key: 4,
|
|
21203
|
-
modelValue: data2.inputValue[key],
|
|
21204
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21205
|
-
options: (_h = (_g = props.schema[key]) == null ? void 0 : _g.schema) == null ? void 0 : _h.options,
|
|
21206
|
-
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21207
|
-
columnsFieldNames: {
|
|
21208
|
-
text: (((_j = (_i = props.schema[key]) == null ? void 0 : _i.schema) == null ? void 0 : _j.options) || []).length > 0 ? Object.keys(props.schema[key].schema.options[0])[0] : "",
|
|
21209
|
-
value: (((_l = (_k = props.schema[key]) == null ? void 0 : _k.schema) == null ? void 0 : _l.options) || []).length > 0 ? Object.keys(props.schema[key].schema.options[0])[1] : ""
|
|
21210
|
-
},
|
|
21211
|
-
onSelect: ($event) => onChangeOption(key)
|
|
21212
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder", "columnsFieldNames", "onSelect"])) : createCommentVNode("", true), props.schema[key].type == "Array" && props.schema[key].auth != "gone" ? (openBlock(), createBlock(_component_ObjsEditor, {
|
|
21213
|
-
key: 5,
|
|
21214
|
-
modelValue: data2.inputValue[key],
|
|
21215
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21216
|
-
schema: props.schema[key].schema
|
|
21217
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "schema"])) : createCommentVNode("", true)];
|
|
21218
|
-
}),
|
|
21219
|
-
_: 2
|
|
21220
|
-
}, 1032, ["label", "required", "disabled"])), [[vShow, props.schema[key].auth != "gone"]]);
|
|
21221
|
-
}), 128)), createElementVNode("div", _hoisted_5, [data2.isShowInput ? (openBlock(), createBlock(_component_van_button, {
|
|
21181
|
+
}, null, 8, ["onClick"]), props.schema.auth != "readonly" && props.auth != "readonly" && props.auth != "disabled" ? (openBlock(), createBlock(_component_van_icon, {
|
|
21182
|
+
key: 1,
|
|
21183
|
+
name: "cross",
|
|
21184
|
+
onClick: withModifiers(($event) => onDelete(index), ["stop"])
|
|
21185
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true)])])]);
|
|
21186
|
+
}), 128)), !data2.isShowInput && props.auth != "readonly" && props.auth != "disabled" ? (openBlock(), createBlock(_component_van_icon, {
|
|
21222
21187
|
key: 0,
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
|
|
21226
|
-
}, {
|
|
21227
|
-
default: withCtx(() => [_hoisted_6]),
|
|
21228
|
-
_: 1
|
|
21229
|
-
})) : createCommentVNode("", true), data2.isShowInput ? (openBlock(), createBlock(_component_van_button, {
|
|
21188
|
+
name: "plus",
|
|
21189
|
+
onClick: onNewOption
|
|
21190
|
+
})) : createCommentVNode("", true), data2.isShowInput ? (openBlock(), createBlock(_component_van_form, {
|
|
21230
21191
|
key: 1,
|
|
21231
|
-
|
|
21232
|
-
type: "primary",
|
|
21233
|
-
size: "mini"
|
|
21192
|
+
model: data2.inputValue
|
|
21234
21193
|
}, {
|
|
21235
|
-
default: withCtx(() => [
|
|
21194
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(keys2), (key, i) => {
|
|
21195
|
+
return withDirectives((openBlock(), createBlock(_component_van_field, {
|
|
21196
|
+
key: i,
|
|
21197
|
+
label: props.schema[key].label,
|
|
21198
|
+
required: props.schema[key].auth === "required",
|
|
21199
|
+
disabled: props.schema[key].auth === "readonly"
|
|
21200
|
+
}, {
|
|
21201
|
+
input: withCtx(() => {
|
|
21202
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
21203
|
+
return [props.schema[key].type == "String" && !((_b = (_a = props.schema[key]) == null ? void 0 : _a.schema) == null ? void 0 : _b.options) ? (openBlock(), createBlock(_component_van_field, {
|
|
21204
|
+
key: 0,
|
|
21205
|
+
modelValue: data2.inputValue[key],
|
|
21206
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21207
|
+
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21208
|
+
type: "text"
|
|
21209
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : createCommentVNode("", true), props.schema[key].type == "Number" && !((_d = (_c = props.schema[key]) == null ? void 0 : _c.schema) == null ? void 0 : _d.options) ? (openBlock(), createBlock(_component_van_field, {
|
|
21210
|
+
key: 1,
|
|
21211
|
+
modelValue: data2.inputValue[key],
|
|
21212
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21213
|
+
modelModifiers: {
|
|
21214
|
+
number: true
|
|
21215
|
+
},
|
|
21216
|
+
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21217
|
+
type: "number"
|
|
21218
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : createCommentVNode("", true), props.schema[key].type == "Boolean" ? (openBlock(), createBlock(_component_van_switch, {
|
|
21219
|
+
key: 2,
|
|
21220
|
+
modelValue: data2.inputValue[key],
|
|
21221
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event
|
|
21222
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : createCommentVNode("", true), props.schema[key].type == "Datetime" ? (openBlock(), createBlock(_sfc_main$o, {
|
|
21223
|
+
key: 3,
|
|
21224
|
+
modelValue: data2.inputValue[key],
|
|
21225
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21226
|
+
placeholder: "\u9009\u62E9\u65F6\u95F4"
|
|
21227
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : createCommentVNode("", true), ((_f = (_e = props.schema[key]) == null ? void 0 : _e.schema) == null ? void 0 : _f.options) ? (openBlock(), createBlock(DataSelector, {
|
|
21228
|
+
key: 4,
|
|
21229
|
+
modelValue: data2.inputValue[key],
|
|
21230
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21231
|
+
options: (_h = (_g = props.schema[key]) == null ? void 0 : _g.schema) == null ? void 0 : _h.options,
|
|
21232
|
+
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21233
|
+
columnsFieldNames: {
|
|
21234
|
+
text: (((_j = (_i = props.schema[key]) == null ? void 0 : _i.schema) == null ? void 0 : _j.options) || []).length > 0 ? Object.keys(props.schema[key].schema.options[0])[0] : "",
|
|
21235
|
+
value: (((_l = (_k = props.schema[key]) == null ? void 0 : _k.schema) == null ? void 0 : _l.options) || []).length > 0 ? Object.keys(props.schema[key].schema.options[0])[1] : ""
|
|
21236
|
+
},
|
|
21237
|
+
onSelect: ($event) => onChangeOption(key)
|
|
21238
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder", "columnsFieldNames", "onSelect"])) : createCommentVNode("", true), props.schema[key].type == "Array" && props.schema[key].auth != "gone" ? (openBlock(), createBlock(_component_ObjsEditor, {
|
|
21239
|
+
key: 5,
|
|
21240
|
+
modelValue: data2.inputValue[key],
|
|
21241
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21242
|
+
schema: props.schema[key].schema
|
|
21243
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "schema"])) : createCommentVNode("", true)];
|
|
21244
|
+
}),
|
|
21245
|
+
_: 2
|
|
21246
|
+
}, 1032, ["label", "required", "disabled"])), [[vShow, props.schema[key].auth != "gone"]]);
|
|
21247
|
+
}), 128)), createElementVNode("div", _hoisted_4, [data2.isShowInput ? (openBlock(), createBlock(_component_van_button, {
|
|
21248
|
+
key: 0,
|
|
21249
|
+
onClick: onInputConfirm,
|
|
21250
|
+
type: "primary",
|
|
21251
|
+
size: "mini"
|
|
21252
|
+
}, {
|
|
21253
|
+
default: withCtx(() => [_hoisted_5]),
|
|
21254
|
+
_: 1
|
|
21255
|
+
})) : createCommentVNode("", true), data2.isShowInput ? (openBlock(), createBlock(_component_van_button, {
|
|
21256
|
+
key: 1,
|
|
21257
|
+
onClick: onInputCancel,
|
|
21258
|
+
type: "primary",
|
|
21259
|
+
size: "mini"
|
|
21260
|
+
}, {
|
|
21261
|
+
default: withCtx(() => [_hoisted_6]),
|
|
21262
|
+
_: 1
|
|
21263
|
+
})) : createCommentVNode("", true)])]),
|
|
21236
21264
|
_: 1
|
|
21237
|
-
})) : createCommentVNode("", true)])
|
|
21265
|
+
}, 8, ["model"])) : createCommentVNode("", true)]),
|
|
21238
21266
|
_: 1
|
|
21239
|
-
}, 8, ["
|
|
21267
|
+
}, 8, ["label", "disabled", "required", "placeholder"])) : createCommentVNode("", true);
|
|
21240
21268
|
};
|
|
21241
21269
|
}
|
|
21242
21270
|
};
|
|
21243
|
-
var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
21271
|
+
var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b711cbee"]]);
|
|
21244
21272
|
const secret_notify = () => {
|
|
21245
21273
|
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 });
|
|
21246
21274
|
};
|
package/build/widget.qw.umd.js
CHANGED
|
@@ -17190,7 +17190,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17190
17190
|
class: "select-all-container"
|
|
17191
17191
|
};
|
|
17192
17192
|
const _hoisted_6$7 = /* @__PURE__ */ vue.createTextVNode("\u5168\u9009");
|
|
17193
|
-
const _hoisted_7$
|
|
17193
|
+
const _hoisted_7$6 = {
|
|
17194
17194
|
class: "checkbox-style"
|
|
17195
17195
|
};
|
|
17196
17196
|
const _sfc_main$n = {
|
|
@@ -17433,7 +17433,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17433
17433
|
}, {
|
|
17434
17434
|
default: vue.withCtx(() => [_hoisted_6$7]),
|
|
17435
17435
|
_: 1
|
|
17436
|
-
}, 8, ["modelValue"])])) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_7$
|
|
17436
|
+
}, 8, ["modelValue"])])) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_7$6, [props.multiple ? (vue.openBlock(), vue.createBlock(_component_van_checkbox_group, {
|
|
17437
17437
|
key: 0,
|
|
17438
17438
|
modelValue: checkedValue.value,
|
|
17439
17439
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => checkedValue.value = $event)
|
|
@@ -17580,7 +17580,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17580
17580
|
class: "action-buttons"
|
|
17581
17581
|
};
|
|
17582
17582
|
const _hoisted_6$6 = /* @__PURE__ */ vue.createTextVNode(" \u53D6\u6D88 ");
|
|
17583
|
-
const _hoisted_7$
|
|
17583
|
+
const _hoisted_7$5 = /* @__PURE__ */ vue.createTextVNode(" \u786E\u5B9A ");
|
|
17584
17584
|
const _hoisted_8$4 = {
|
|
17585
17585
|
class: "scroll-container"
|
|
17586
17586
|
};
|
|
@@ -17874,7 +17874,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17874
17874
|
disabled: !tempSelectedDepartment.value,
|
|
17875
17875
|
class: "confirm-btn"
|
|
17876
17876
|
}, {
|
|
17877
|
-
default: vue.withCtx(() => [_hoisted_7$
|
|
17877
|
+
default: vue.withCtx(() => [_hoisted_7$5]),
|
|
17878
17878
|
_: 1
|
|
17879
17879
|
}, 8, ["disabled"])])]), vue.createVNode(_component_van_field, {
|
|
17880
17880
|
"left-icon": "search",
|
|
@@ -17942,7 +17942,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17942
17942
|
const _hoisted_6$5 = {
|
|
17943
17943
|
class: "header-right"
|
|
17944
17944
|
};
|
|
17945
|
-
const _hoisted_7$
|
|
17945
|
+
const _hoisted_7$4 = /* @__PURE__ */ vue.createTextVNode("\u6E05\u7A7A");
|
|
17946
17946
|
const _hoisted_8$3 = /* @__PURE__ */ vue.createTextVNode("\u786E\u5B9A");
|
|
17947
17947
|
const _hoisted_9$1 = {
|
|
17948
17948
|
key: 0,
|
|
@@ -18337,7 +18337,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18337
18337
|
onClick: handleClear,
|
|
18338
18338
|
class: "cancel-btn"
|
|
18339
18339
|
}, {
|
|
18340
|
-
default: vue.withCtx(() => [_hoisted_7$
|
|
18340
|
+
default: vue.withCtx(() => [_hoisted_7$4]),
|
|
18341
18341
|
_: 1
|
|
18342
18342
|
}), vue.createVNode(_component_van_button, {
|
|
18343
18343
|
type: "primary",
|
|
@@ -18864,7 +18864,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18864
18864
|
class: "header-right"
|
|
18865
18865
|
};
|
|
18866
18866
|
const _hoisted_6$4 = /* @__PURE__ */ vue.createTextVNode("\u6E05\u7A7A");
|
|
18867
|
-
const _hoisted_7$
|
|
18867
|
+
const _hoisted_7$3 = /* @__PURE__ */ vue.createTextVNode("\u786E\u5B9A");
|
|
18868
18868
|
const _hoisted_8$2 = {
|
|
18869
18869
|
class: "scroll-container"
|
|
18870
18870
|
};
|
|
@@ -19152,7 +19152,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19152
19152
|
onClick: confirmSelection,
|
|
19153
19153
|
class: "confirm-btn"
|
|
19154
19154
|
}, {
|
|
19155
|
-
default: vue.withCtx(() => [_hoisted_7$
|
|
19155
|
+
default: vue.withCtx(() => [_hoisted_7$3]),
|
|
19156
19156
|
_: 1
|
|
19157
19157
|
})])]), vue.createVNode(_component_van_search, {
|
|
19158
19158
|
modelValue: searchValue.value,
|
|
@@ -19220,7 +19220,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19220
19220
|
class: "header-right"
|
|
19221
19221
|
};
|
|
19222
19222
|
const _hoisted_6$3 = /* @__PURE__ */ vue.createTextVNode("\u53D6\u6D88");
|
|
19223
|
-
const _hoisted_7$
|
|
19223
|
+
const _hoisted_7$2 = /* @__PURE__ */ vue.createTextVNode("\u786E\u5B9A");
|
|
19224
19224
|
const _hoisted_8$1 = {
|
|
19225
19225
|
class: "scroll-container"
|
|
19226
19226
|
};
|
|
@@ -19424,7 +19424,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19424
19424
|
onClick: onSubmit,
|
|
19425
19425
|
class: "confirm-btn"
|
|
19426
19426
|
}, {
|
|
19427
|
-
default: vue.withCtx(() => [_hoisted_7$
|
|
19427
|
+
default: vue.withCtx(() => [_hoisted_7$2]),
|
|
19428
19428
|
_: 1
|
|
19429
19429
|
})])]), vue.createVNode(_component_van_search, {
|
|
19430
19430
|
modelValue: data2.keyword,
|
|
@@ -19737,7 +19737,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19737
19737
|
const _hoisted_6$2 = {
|
|
19738
19738
|
class: "user-jobs"
|
|
19739
19739
|
};
|
|
19740
|
-
const _hoisted_7$
|
|
19740
|
+
const _hoisted_7$1 = /* @__PURE__ */ vue.createTextVNode(" \u6CE8\u9500 ");
|
|
19741
19741
|
const _sfc_main$c = {
|
|
19742
19742
|
__name: "UserProfile",
|
|
19743
19743
|
props: {
|
|
@@ -19791,7 +19791,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19791
19791
|
class: "logout-button",
|
|
19792
19792
|
onClick: onLogout
|
|
19793
19793
|
}, {
|
|
19794
|
-
default: vue.withCtx(() => [_hoisted_7$
|
|
19794
|
+
default: vue.withCtx(() => [_hoisted_7$1]),
|
|
19795
19795
|
_: 1
|
|
19796
19796
|
})]);
|
|
19797
19797
|
};
|
|
@@ -20460,7 +20460,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20460
20460
|
class: "header-right"
|
|
20461
20461
|
};
|
|
20462
20462
|
const _hoisted_6$1 = /* @__PURE__ */ vue.createTextVNode("\u53D6\u6D88");
|
|
20463
|
-
const _hoisted_7
|
|
20463
|
+
const _hoisted_7 = /* @__PURE__ */ vue.createTextVNode("\u786E\u5B9A");
|
|
20464
20464
|
const _hoisted_8 = {
|
|
20465
20465
|
class: "scroll-container"
|
|
20466
20466
|
};
|
|
@@ -20625,7 +20625,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20625
20625
|
onClick: onSubmit,
|
|
20626
20626
|
class: "confirm-btn"
|
|
20627
20627
|
}, {
|
|
20628
|
-
default: vue.withCtx(() => [_hoisted_7
|
|
20628
|
+
default: vue.withCtx(() => [_hoisted_7]),
|
|
20629
20629
|
_: 1
|
|
20630
20630
|
})])]), vue.createVNode(_component_van_search, {
|
|
20631
20631
|
modelValue: data2.keyword,
|
|
@@ -20949,29 +20949,26 @@ 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-
|
|
20952
|
+
var ObjsEditor_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-b711cbee] {\n background: #fff;\n box-sizing: border-box;\n height: 100%;\n text-align: left;\n}\n.widget .option[data-v-b711cbee] {\n margin: 0 8px 8px 0;\n padding: 5px 5px;\n border-radius: 4px;\n background-color: rgb(217, 236, 255);\n color: #409eff;\n display: inline-block;\n position: relative;\n}\n[data-v-b711cbee] .van-field__label {\n margin: auto;\n}")();
|
|
20953
20953
|
const _hoisted_1 = {
|
|
20954
|
-
class: "widget"
|
|
20955
|
-
};
|
|
20956
|
-
const _hoisted_2 = {
|
|
20957
20954
|
style: {
|
|
20958
20955
|
"display": "flex",
|
|
20959
20956
|
"align-items": "center"
|
|
20960
20957
|
}
|
|
20961
20958
|
};
|
|
20962
|
-
const
|
|
20959
|
+
const _hoisted_2 = {
|
|
20963
20960
|
style: {
|
|
20964
20961
|
"padding": "5px 5px"
|
|
20965
20962
|
}
|
|
20966
20963
|
};
|
|
20967
|
-
const
|
|
20964
|
+
const _hoisted_3 = {
|
|
20968
20965
|
style: {
|
|
20969
20966
|
"display": "flex",
|
|
20970
20967
|
"flex-direction": "column",
|
|
20971
20968
|
"cursor": "pointer"
|
|
20972
20969
|
}
|
|
20973
20970
|
};
|
|
20974
|
-
const
|
|
20971
|
+
const _hoisted_4 = {
|
|
20975
20972
|
style: {
|
|
20976
20973
|
"margin": "16px",
|
|
20977
20974
|
"display": "flex",
|
|
@@ -20979,8 +20976,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20979
20976
|
"justify-content": "center"
|
|
20980
20977
|
}
|
|
20981
20978
|
};
|
|
20982
|
-
const
|
|
20983
|
-
const
|
|
20979
|
+
const _hoisted_5 = /* @__PURE__ */ vue.createTextVNode("\u4FDD\u5B58");
|
|
20980
|
+
const _hoisted_6 = /* @__PURE__ */ vue.createTextVNode("\u53D6\u6D88");
|
|
20984
20981
|
const _sfc_main = {
|
|
20985
20982
|
__name: "ObjsEditor",
|
|
20986
20983
|
props: {
|
|
@@ -20988,10 +20985,26 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20988
20985
|
type: Array,
|
|
20989
20986
|
default: []
|
|
20990
20987
|
},
|
|
20991
|
-
|
|
20988
|
+
label: {
|
|
20989
|
+
type: String,
|
|
20990
|
+
default: ""
|
|
20991
|
+
},
|
|
20992
|
+
placeholder: {
|
|
20993
|
+
type: String,
|
|
20994
|
+
default: ""
|
|
20995
|
+
},
|
|
20996
|
+
readonly: {
|
|
20992
20997
|
type: Boolean,
|
|
20993
20998
|
default: true
|
|
20994
20999
|
},
|
|
21000
|
+
required: {
|
|
21001
|
+
type: Boolean,
|
|
21002
|
+
default: false
|
|
21003
|
+
},
|
|
21004
|
+
auth: {
|
|
21005
|
+
type: String,
|
|
21006
|
+
default: ""
|
|
21007
|
+
},
|
|
20995
21008
|
schema: {
|
|
20996
21009
|
type: Object,
|
|
20997
21010
|
default: {
|
|
@@ -21008,6 +21021,12 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21008
21021
|
}) {
|
|
21009
21022
|
const props = __props;
|
|
21010
21023
|
const modelValue = useVModel(props, "modelValue", emit);
|
|
21024
|
+
const {
|
|
21025
|
+
isRequired,
|
|
21026
|
+
isReadonly,
|
|
21027
|
+
isGone,
|
|
21028
|
+
isDisabled
|
|
21029
|
+
} = util.props2auth(props);
|
|
21011
21030
|
const data2 = vue.reactive({
|
|
21012
21031
|
inputValue: {},
|
|
21013
21032
|
isShowInput: false,
|
|
@@ -21066,8 +21085,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21066
21085
|
else
|
|
21067
21086
|
formatValue = "";
|
|
21068
21087
|
}
|
|
21069
|
-
if (typeof formatValue === "boolean")
|
|
21070
|
-
formatValue = formatValue ? "\u662F" : "\u5426";
|
|
21071
21088
|
return `${label}:${formatValue}`;
|
|
21072
21089
|
});
|
|
21073
21090
|
return kvs.join(",");
|
|
@@ -21077,6 +21094,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21077
21094
|
let one = (_d = (_c = props.schema[key]) == null ? void 0 : _c.schema) == null ? void 0 : _d.options.find((item2) => item2[Object.keys(item2)[1]] === v);
|
|
21078
21095
|
return one ? one[Object.keys(one)[0]] : "";
|
|
21079
21096
|
} else {
|
|
21097
|
+
if (props.schema[key].type === "Boolean")
|
|
21098
|
+
v = v ? "\u662F" : "\u5426";
|
|
21080
21099
|
return v;
|
|
21081
21100
|
}
|
|
21082
21101
|
};
|
|
@@ -21131,119 +21150,128 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21131
21150
|
const _component_ObjsEditor = vue.resolveComponent("ObjsEditor", true);
|
|
21132
21151
|
const _component_van_button = vue.resolveComponent("van-button");
|
|
21133
21152
|
const _component_van_form = vue.resolveComponent("van-form");
|
|
21134
|
-
return vue.
|
|
21135
|
-
|
|
21136
|
-
|
|
21137
|
-
|
|
21138
|
-
|
|
21139
|
-
|
|
21140
|
-
|
|
21141
|
-
|
|
21153
|
+
return !vue.unref(isGone) ? (vue.openBlock(), vue.createBlock(_component_van_field, {
|
|
21154
|
+
key: 0,
|
|
21155
|
+
label: props.label,
|
|
21156
|
+
disabled: vue.unref(isDisabled),
|
|
21157
|
+
required: vue.unref(isRequired),
|
|
21158
|
+
placeholder: props.placeholder
|
|
21159
|
+
}, {
|
|
21160
|
+
input: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(modelValue), (item, index) => {
|
|
21142
21161
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
21143
|
-
|
|
21162
|
+
class: "option",
|
|
21163
|
+
key: index
|
|
21164
|
+
}, [vue.createElementVNode("div", _hoisted_1, [vue.createVNode(_component_van_icon, {
|
|
21165
|
+
name: "arrow-left",
|
|
21166
|
+
onClick: vue.withModifiers(($event) => onForward(index), ["stop"])
|
|
21167
|
+
}, null, 8, ["onClick"]), vue.createElementVNode("div", _hoisted_2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(visiableKeys), (k, j) => {
|
|
21168
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
21169
|
+
key: j,
|
|
21170
|
+
style: {
|
|
21171
|
+
"padding": "2px 2px"
|
|
21172
|
+
}
|
|
21173
|
+
}, vue.toDisplayString(`${key2name(k)}:${key2value(k, item)}`), 1);
|
|
21174
|
+
}), 128))]), vue.createElementVNode("div", _hoisted_3, [props.schema.auth != "readonly" && props.auth != "readonly" && props.auth != "disabled" ? (vue.openBlock(), vue.createBlock(_component_van_icon, {
|
|
21175
|
+
key: 0,
|
|
21176
|
+
name: "edit",
|
|
21177
|
+
onClick: vue.withModifiers(($event) => onEdit(index), ["stop"])
|
|
21178
|
+
}, null, 8, ["onClick"])) : vue.createCommentVNode("", true), vue.createVNode(_component_van_icon, {
|
|
21179
|
+
name: "arrow",
|
|
21180
|
+
onClick: vue.withModifiers(($event) => onBack(index), ["stop"]),
|
|
21144
21181
|
style: {
|
|
21145
|
-
"
|
|
21182
|
+
"margin": "8px 0"
|
|
21146
21183
|
}
|
|
21147
|
-
}, vue.
|
|
21148
|
-
|
|
21149
|
-
|
|
21150
|
-
|
|
21151
|
-
onClick: vue.
|
|
21152
|
-
},
|
|
21153
|
-
name: "arrow",
|
|
21154
|
-
onClick: vue.withModifiers(($event) => onBack(index), ["stop"]),
|
|
21155
|
-
style: {
|
|
21156
|
-
"margin": "8px 0"
|
|
21157
|
-
}
|
|
21158
|
-
}, null, 8, ["onClick"]), props.schema.auth != "readonly" ? (vue.openBlock(), vue.createBlock(_component_van_icon, {
|
|
21159
|
-
key: 1,
|
|
21160
|
-
name: "cross",
|
|
21161
|
-
onClick: vue.withModifiers(($event) => onDelete(index), ["stop"])
|
|
21162
|
-
}, null, 8, ["onClick"])) : vue.createCommentVNode("", true)])])]);
|
|
21163
|
-
}), 128)), props.isShowAdd && !data2.isShowInput ? (vue.openBlock(), vue.createBlock(_component_van_icon, {
|
|
21164
|
-
key: 0,
|
|
21165
|
-
name: "plus",
|
|
21166
|
-
onClick: onNewOption
|
|
21167
|
-
})) : vue.createCommentVNode("", true), data2.isShowInput ? (vue.openBlock(), vue.createBlock(_component_van_form, {
|
|
21168
|
-
key: 1,
|
|
21169
|
-
model: data2.inputValue
|
|
21170
|
-
}, {
|
|
21171
|
-
default: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(keys2), (key, i) => {
|
|
21172
|
-
return vue.withDirectives((vue.openBlock(), vue.createBlock(_component_van_field, {
|
|
21173
|
-
key: i,
|
|
21174
|
-
label: props.schema[key].label,
|
|
21175
|
-
required: props.schema[key].auth === "required",
|
|
21176
|
-
disabled: props.schema[key].auth === "readonly"
|
|
21177
|
-
}, {
|
|
21178
|
-
input: vue.withCtx(() => {
|
|
21179
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
21180
|
-
return [props.schema[key].type == "String" && !((_b = (_a = props.schema[key]) == null ? void 0 : _a.schema) == null ? void 0 : _b.options) ? (vue.openBlock(), vue.createBlock(_component_van_field, {
|
|
21181
|
-
key: 0,
|
|
21182
|
-
modelValue: data2.inputValue[key],
|
|
21183
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21184
|
-
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21185
|
-
type: "text"
|
|
21186
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : vue.createCommentVNode("", true), props.schema[key].type == "Number" && !((_d = (_c = props.schema[key]) == null ? void 0 : _c.schema) == null ? void 0 : _d.options) ? (vue.openBlock(), vue.createBlock(_component_van_field, {
|
|
21187
|
-
key: 1,
|
|
21188
|
-
modelValue: data2.inputValue[key],
|
|
21189
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21190
|
-
modelModifiers: {
|
|
21191
|
-
number: true
|
|
21192
|
-
},
|
|
21193
|
-
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21194
|
-
type: "number"
|
|
21195
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : vue.createCommentVNode("", true), props.schema[key].type == "Boolean" ? (vue.openBlock(), vue.createBlock(_component_van_switch, {
|
|
21196
|
-
key: 2,
|
|
21197
|
-
modelValue: data2.inputValue[key],
|
|
21198
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event
|
|
21199
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("", true), props.schema[key].type == "Datetime" ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
21200
|
-
key: 3,
|
|
21201
|
-
modelValue: data2.inputValue[key],
|
|
21202
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21203
|
-
placeholder: "\u9009\u62E9\u65F6\u95F4"
|
|
21204
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("", true), ((_f = (_e = props.schema[key]) == null ? void 0 : _e.schema) == null ? void 0 : _f.options) ? (vue.openBlock(), vue.createBlock(DataSelector, {
|
|
21205
|
-
key: 4,
|
|
21206
|
-
modelValue: data2.inputValue[key],
|
|
21207
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21208
|
-
options: (_h = (_g = props.schema[key]) == null ? void 0 : _g.schema) == null ? void 0 : _h.options,
|
|
21209
|
-
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21210
|
-
columnsFieldNames: {
|
|
21211
|
-
text: (((_j = (_i = props.schema[key]) == null ? void 0 : _i.schema) == null ? void 0 : _j.options) || []).length > 0 ? Object.keys(props.schema[key].schema.options[0])[0] : "",
|
|
21212
|
-
value: (((_l = (_k = props.schema[key]) == null ? void 0 : _k.schema) == null ? void 0 : _l.options) || []).length > 0 ? Object.keys(props.schema[key].schema.options[0])[1] : ""
|
|
21213
|
-
},
|
|
21214
|
-
onSelect: ($event) => onChangeOption(key)
|
|
21215
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder", "columnsFieldNames", "onSelect"])) : vue.createCommentVNode("", true), props.schema[key].type == "Array" && props.schema[key].auth != "gone" ? (vue.openBlock(), vue.createBlock(_component_ObjsEditor, {
|
|
21216
|
-
key: 5,
|
|
21217
|
-
modelValue: data2.inputValue[key],
|
|
21218
|
-
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21219
|
-
schema: props.schema[key].schema
|
|
21220
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "schema"])) : vue.createCommentVNode("", true)];
|
|
21221
|
-
}),
|
|
21222
|
-
_: 2
|
|
21223
|
-
}, 1032, ["label", "required", "disabled"])), [[vue.vShow, props.schema[key].auth != "gone"]]);
|
|
21224
|
-
}), 128)), vue.createElementVNode("div", _hoisted_5, [data2.isShowInput ? (vue.openBlock(), vue.createBlock(_component_van_button, {
|
|
21184
|
+
}, null, 8, ["onClick"]), props.schema.auth != "readonly" && props.auth != "readonly" && props.auth != "disabled" ? (vue.openBlock(), vue.createBlock(_component_van_icon, {
|
|
21185
|
+
key: 1,
|
|
21186
|
+
name: "cross",
|
|
21187
|
+
onClick: vue.withModifiers(($event) => onDelete(index), ["stop"])
|
|
21188
|
+
}, null, 8, ["onClick"])) : vue.createCommentVNode("", true)])])]);
|
|
21189
|
+
}), 128)), !data2.isShowInput && props.auth != "readonly" && props.auth != "disabled" ? (vue.openBlock(), vue.createBlock(_component_van_icon, {
|
|
21225
21190
|
key: 0,
|
|
21226
|
-
|
|
21227
|
-
|
|
21228
|
-
|
|
21229
|
-
}, {
|
|
21230
|
-
default: vue.withCtx(() => [_hoisted_6]),
|
|
21231
|
-
_: 1
|
|
21232
|
-
})) : vue.createCommentVNode("", true), data2.isShowInput ? (vue.openBlock(), vue.createBlock(_component_van_button, {
|
|
21191
|
+
name: "plus",
|
|
21192
|
+
onClick: onNewOption
|
|
21193
|
+
})) : vue.createCommentVNode("", true), data2.isShowInput ? (vue.openBlock(), vue.createBlock(_component_van_form, {
|
|
21233
21194
|
key: 1,
|
|
21234
|
-
|
|
21235
|
-
type: "primary",
|
|
21236
|
-
size: "mini"
|
|
21195
|
+
model: data2.inputValue
|
|
21237
21196
|
}, {
|
|
21238
|
-
default: vue.withCtx(() => [
|
|
21197
|
+
default: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(keys2), (key, i) => {
|
|
21198
|
+
return vue.withDirectives((vue.openBlock(), vue.createBlock(_component_van_field, {
|
|
21199
|
+
key: i,
|
|
21200
|
+
label: props.schema[key].label,
|
|
21201
|
+
required: props.schema[key].auth === "required",
|
|
21202
|
+
disabled: props.schema[key].auth === "readonly"
|
|
21203
|
+
}, {
|
|
21204
|
+
input: vue.withCtx(() => {
|
|
21205
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
21206
|
+
return [props.schema[key].type == "String" && !((_b = (_a = props.schema[key]) == null ? void 0 : _a.schema) == null ? void 0 : _b.options) ? (vue.openBlock(), vue.createBlock(_component_van_field, {
|
|
21207
|
+
key: 0,
|
|
21208
|
+
modelValue: data2.inputValue[key],
|
|
21209
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21210
|
+
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21211
|
+
type: "text"
|
|
21212
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : vue.createCommentVNode("", true), props.schema[key].type == "Number" && !((_d = (_c = props.schema[key]) == null ? void 0 : _c.schema) == null ? void 0 : _d.options) ? (vue.openBlock(), vue.createBlock(_component_van_field, {
|
|
21213
|
+
key: 1,
|
|
21214
|
+
modelValue: data2.inputValue[key],
|
|
21215
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21216
|
+
modelModifiers: {
|
|
21217
|
+
number: true
|
|
21218
|
+
},
|
|
21219
|
+
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21220
|
+
type: "number"
|
|
21221
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : vue.createCommentVNode("", true), props.schema[key].type == "Boolean" ? (vue.openBlock(), vue.createBlock(_component_van_switch, {
|
|
21222
|
+
key: 2,
|
|
21223
|
+
modelValue: data2.inputValue[key],
|
|
21224
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event
|
|
21225
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("", true), props.schema[key].type == "Datetime" ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
21226
|
+
key: 3,
|
|
21227
|
+
modelValue: data2.inputValue[key],
|
|
21228
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21229
|
+
placeholder: "\u9009\u62E9\u65F6\u95F4"
|
|
21230
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : vue.createCommentVNode("", true), ((_f = (_e = props.schema[key]) == null ? void 0 : _e.schema) == null ? void 0 : _f.options) ? (vue.openBlock(), vue.createBlock(DataSelector, {
|
|
21231
|
+
key: 4,
|
|
21232
|
+
modelValue: data2.inputValue[key],
|
|
21233
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21234
|
+
options: (_h = (_g = props.schema[key]) == null ? void 0 : _g.schema) == null ? void 0 : _h.options,
|
|
21235
|
+
placeholder: `\u8BF7\u8F93\u5165${key2name(key)}`,
|
|
21236
|
+
columnsFieldNames: {
|
|
21237
|
+
text: (((_j = (_i = props.schema[key]) == null ? void 0 : _i.schema) == null ? void 0 : _j.options) || []).length > 0 ? Object.keys(props.schema[key].schema.options[0])[0] : "",
|
|
21238
|
+
value: (((_l = (_k = props.schema[key]) == null ? void 0 : _k.schema) == null ? void 0 : _l.options) || []).length > 0 ? Object.keys(props.schema[key].schema.options[0])[1] : ""
|
|
21239
|
+
},
|
|
21240
|
+
onSelect: ($event) => onChangeOption(key)
|
|
21241
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder", "columnsFieldNames", "onSelect"])) : vue.createCommentVNode("", true), props.schema[key].type == "Array" && props.schema[key].auth != "gone" ? (vue.openBlock(), vue.createBlock(_component_ObjsEditor, {
|
|
21242
|
+
key: 5,
|
|
21243
|
+
modelValue: data2.inputValue[key],
|
|
21244
|
+
"onUpdate:modelValue": ($event) => data2.inputValue[key] = $event,
|
|
21245
|
+
schema: props.schema[key].schema
|
|
21246
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "schema"])) : vue.createCommentVNode("", true)];
|
|
21247
|
+
}),
|
|
21248
|
+
_: 2
|
|
21249
|
+
}, 1032, ["label", "required", "disabled"])), [[vue.vShow, props.schema[key].auth != "gone"]]);
|
|
21250
|
+
}), 128)), vue.createElementVNode("div", _hoisted_4, [data2.isShowInput ? (vue.openBlock(), vue.createBlock(_component_van_button, {
|
|
21251
|
+
key: 0,
|
|
21252
|
+
onClick: onInputConfirm,
|
|
21253
|
+
type: "primary",
|
|
21254
|
+
size: "mini"
|
|
21255
|
+
}, {
|
|
21256
|
+
default: vue.withCtx(() => [_hoisted_5]),
|
|
21257
|
+
_: 1
|
|
21258
|
+
})) : vue.createCommentVNode("", true), data2.isShowInput ? (vue.openBlock(), vue.createBlock(_component_van_button, {
|
|
21259
|
+
key: 1,
|
|
21260
|
+
onClick: onInputCancel,
|
|
21261
|
+
type: "primary",
|
|
21262
|
+
size: "mini"
|
|
21263
|
+
}, {
|
|
21264
|
+
default: vue.withCtx(() => [_hoisted_6]),
|
|
21265
|
+
_: 1
|
|
21266
|
+
})) : vue.createCommentVNode("", true)])]),
|
|
21239
21267
|
_: 1
|
|
21240
|
-
})) : vue.createCommentVNode("", true)])
|
|
21268
|
+
}, 8, ["model"])) : vue.createCommentVNode("", true)]),
|
|
21241
21269
|
_: 1
|
|
21242
|
-
}, 8, ["
|
|
21270
|
+
}, 8, ["label", "disabled", "required", "placeholder"])) : vue.createCommentVNode("", true);
|
|
21243
21271
|
};
|
|
21244
21272
|
}
|
|
21245
21273
|
};
|
|
21246
|
-
var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
21274
|
+
var ObjsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b711cbee"]]);
|
|
21247
21275
|
const secret_notify = () => {
|
|
21248
21276
|
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 });
|
|
21249
21277
|
};
|
package/package.json
CHANGED
|
@@ -1,63 +1,66 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<div style="
|
|
7
|
-
<
|
|
8
|
-
|
|
2
|
+
<van-field :label="props.label" v-if="!isGone" :disabled="isDisabled" :required="isRequired"
|
|
3
|
+
:placeholder="props.placeholder">
|
|
4
|
+
<template #input>
|
|
5
|
+
<div class="option" v-for="(item, index) in modelValue" :key="index">
|
|
6
|
+
<div style=" display: flex;align-items: center;">
|
|
7
|
+
<van-icon name="arrow-left" @click.stop="onForward(index)" />
|
|
8
|
+
<div style="padding: 5px 5px;">
|
|
9
|
+
<div v-for="(k, j) in visiableKeys" :key="j" style="padding:2px 2px;">
|
|
10
|
+
{{ `${key2name(k)}:${key2value(k, item)}` }}
|
|
11
|
+
</div>
|
|
9
12
|
</div>
|
|
10
|
-
</div>
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
<div style="display: flex;flex-direction:column;cursor: pointer;">
|
|
15
|
+
<van-icon name="edit" v-if="props.schema.auth != 'readonly' && props.auth!='readonly' && props.auth!='disabled'" @click.stop="onEdit(index)" />
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
<van-icon name="arrow" @click.stop="onBack(index)" style="margin:8px 0" />
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
<van-icon name="cross" v-if="props.schema.auth != 'readonly' && props.auth!='readonly' && props.auth!='disabled'" @click.stop="onDelete(index)" />
|
|
20
|
+
</div>
|
|
18
21
|
</div>
|
|
19
22
|
</div>
|
|
20
|
-
</div>
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
<van-icon name="plus" v-if="!data.isShowInput && props.auth!='readonly' && props.auth!='disabled'" @click="onNewOption" />
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
<van-form v-if="data.isShowInput" :model="data.inputValue">
|
|
27
|
+
<van-field v-for="(key, i) in keys" :key="i" :label="props.schema[key].label"
|
|
28
|
+
v-show="props.schema[key].auth != 'gone'" :required="props.schema[key].auth === 'required'"
|
|
29
|
+
:disabled="props.schema[key].auth === 'readonly'">
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
<template #input>
|
|
32
|
+
<van-field v-if="props.schema[key].type == 'String' && !props.schema[key]?.schema?.options"
|
|
33
|
+
v-model="data.inputValue[key]" :placeholder="`请输入${key2name(key)}`" type="text" />
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
<van-field v-if="props.schema[key].type == 'Number' && !props.schema[key]?.schema?.options"
|
|
36
|
+
v-model.number="data.inputValue[key]" :placeholder="`请输入${key2name(key)}`" type="number" />
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
<van-switch v-if="props.schema[key].type == 'Boolean'" v-model="data.inputValue[key]" />
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
<DatetimePicker v-if="props.schema[key].type == 'Datetime'" v-model="data.inputValue[key]"
|
|
41
|
+
placeholder="选择时间" />
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}" @select="onChangeOption(key)" />
|
|
43
|
+
<DateSelector v-if="props.schema[key]?.schema?.options" v-model="data.inputValue[key]"
|
|
44
|
+
:options="props.schema[key]?.schema?.options" :placeholder="`请输入${key2name(key)}`"
|
|
45
|
+
:columnsFieldNames="{
|
|
46
|
+
text: (props.schema[key]?.schema?.options || []).length > 0 ? Object.keys(props.schema[key].schema.options[0])[0] : '',
|
|
47
|
+
value: (props.schema[key]?.schema?.options || []).length > 0 ? Object.keys(props.schema[key].schema.options[0])[1] : ''
|
|
48
|
+
}" @select="onChangeOption(key)" />
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<div style="margin: 16px; display: flex;align-items: center;justify-content: center;">
|
|
55
|
-
<van-button v-if="data.isShowInput" @click="onInputConfirm" type="primary" size="mini">保存</van-button>
|
|
56
|
-
<van-button v-if="data.isShowInput" @click="onInputCancel" type="primary" size="mini">取消</van-button>
|
|
57
|
-
</div>
|
|
58
|
-
</van-form>
|
|
50
|
+
<ObjsEditor v-if="props.schema[key].type == 'Array' && props.schema[key].auth != 'gone'"
|
|
51
|
+
v-model="data.inputValue[key]" :schema="props.schema[key].schema" />
|
|
52
|
+
</template>
|
|
53
|
+
</van-field>
|
|
59
54
|
|
|
60
|
-
|
|
55
|
+
<div style="margin: 16px; display: flex;align-items: center;justify-content: center;">
|
|
56
|
+
<van-button v-if="data.isShowInput" @click="onInputConfirm" type="primary"
|
|
57
|
+
size="mini">保存</van-button>
|
|
58
|
+
<van-button v-if="data.isShowInput" @click="onInputCancel" type="primary"
|
|
59
|
+
size="mini">取消</van-button>
|
|
60
|
+
</div>
|
|
61
|
+
</van-form>
|
|
62
|
+
</template>
|
|
63
|
+
</van-field>
|
|
61
64
|
</template>
|
|
62
65
|
|
|
63
66
|
<script setup>
|
|
@@ -72,10 +75,26 @@ const props = defineProps({
|
|
|
72
75
|
type: Array,
|
|
73
76
|
default: []
|
|
74
77
|
},
|
|
75
|
-
|
|
78
|
+
label: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: ''
|
|
81
|
+
},
|
|
82
|
+
placeholder: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: ''
|
|
85
|
+
},
|
|
86
|
+
readonly: {
|
|
76
87
|
type: Boolean,
|
|
77
88
|
default: true
|
|
78
89
|
},
|
|
90
|
+
required: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: false
|
|
93
|
+
},
|
|
94
|
+
auth: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: ''
|
|
97
|
+
},
|
|
79
98
|
schema: {
|
|
80
99
|
type: Object,
|
|
81
100
|
default: {
|
|
@@ -90,6 +109,7 @@ const props = defineProps({
|
|
|
90
109
|
|
|
91
110
|
const emit = defineEmits(['update:modelValue'])
|
|
92
111
|
const modelValue = useVModel(props, 'modelValue', emit)
|
|
112
|
+
const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props)
|
|
93
113
|
|
|
94
114
|
const data = reactive({
|
|
95
115
|
inputValue: {},
|
|
@@ -154,20 +174,17 @@ const key2value = (key, item) => {
|
|
|
154
174
|
|
|
155
175
|
let label = props.schema[key].schema[k].label
|
|
156
176
|
let formatValue = e[k]
|
|
157
|
-
|
|
177
|
+
|
|
158
178
|
//下拉框选项,用选项的第二个属性value找选中的选项
|
|
159
179
|
//再取选项的第一个属性name作为标题
|
|
160
180
|
if (props.schema[key].schema[k]?.schema?.options) {
|
|
161
181
|
let one = props.schema[key].schema[k]?.schema?.options.find(item => item[Object.keys(item)[1]] === formatValue)
|
|
162
|
-
if(one)
|
|
182
|
+
if (one)
|
|
163
183
|
formatValue = one[Object.keys(one)[0]]
|
|
164
184
|
else
|
|
165
185
|
formatValue = ''
|
|
166
186
|
}
|
|
167
187
|
|
|
168
|
-
if(typeof formatValue === 'boolean')
|
|
169
|
-
formatValue = formatValue ? '是' : '否'
|
|
170
|
-
|
|
171
188
|
return `${label}:${formatValue}`
|
|
172
189
|
})
|
|
173
190
|
return kvs.join(',')
|
|
@@ -182,6 +199,9 @@ const key2value = (key, item) => {
|
|
|
182
199
|
return one ? one[Object.keys(one)[0]] : ''
|
|
183
200
|
}
|
|
184
201
|
else {
|
|
202
|
+
if (props.schema[key].type === 'Boolean')
|
|
203
|
+
v = v ? '是' : '否'
|
|
204
|
+
|
|
185
205
|
return v
|
|
186
206
|
}
|
|
187
207
|
}
|
|
@@ -260,7 +280,7 @@ const onChangeOption = (key) => {
|
|
|
260
280
|
}
|
|
261
281
|
|
|
262
282
|
:deep(.van-field__label) {
|
|
263
|
-
margin:auto;
|
|
283
|
+
margin: auto;
|
|
264
284
|
|
|
265
285
|
}
|
|
266
286
|
</style>
|
package/src/env.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
declare module '*.vue' {
|
|
4
|
-
import type { DefineComponent } from 'vue'
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
6
|
-
const component: DefineComponent<{}, {}, any>
|
|
7
|
-
export default component
|
|
8
|
-
}
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.vue' {
|
|
4
|
+
import type { DefineComponent } from 'vue'
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
6
|
+
const component: DefineComponent<{}, {}, any>
|
|
7
|
+
export default component
|
|
8
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "esnext",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"module": "esnext",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"strict": true,
|
|
8
|
-
"jsx": "preserve",
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"resolveJsonModule": true,
|
|
11
|
-
"isolatedModules": true,
|
|
12
|
-
"esModuleInterop": true,
|
|
13
|
-
"lib": ["esnext", "dom"],
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"allowJs": true,
|
|
16
|
-
},
|
|
17
|
-
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
|
18
|
-
"references": [{ "path": "./tsconfig.node.json" }]
|
|
19
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"jsx": "preserve",
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"lib": ["esnext", "dom"],
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"allowJs": true,
|
|
16
|
+
},
|
|
17
|
+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
|
18
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
19
|
+
}
|
package/tsconfig.node.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"composite": true,
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"moduleResolution": "node"
|
|
6
|
-
},
|
|
7
|
-
"include": ["vite.config.ts"]
|
|
8
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"composite": true,
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "node"
|
|
6
|
+
},
|
|
7
|
+
"include": ["vite.config.ts"]
|
|
8
|
+
}
|