@cmstops/pro-compo 3.9.2-alpha.5 → 3.9.2-alpha.6
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, nextTick, toRaw, openBlock, createElementBlock, Fragment, createElementVNode, withModifiers, createVNode, withCtx, renderList, createBlock, renderSlot, unref,
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, ref, computed, watch, nextTick, toRaw, openBlock, createElementBlock, Fragment, createElementVNode, withModifiers, createVNode, withCtx, renderList, createBlock, renderSlot, unref, createTextVNode, toDisplayString, normalizeStyle, createCommentVNode } from "vue";
|
|
2
|
+
import { InputGroup, Select, Option, Input, InputSearch, RangePicker, RadioGroup, Radio } from "@arco-design/web-vue";
|
|
3
3
|
import _sfc_main$2 from "./components/filterItem.js";
|
|
4
4
|
import _sfc_main$1 from "./components/FilterGroup.js";
|
|
5
5
|
const _sfc_main = defineComponent({
|
|
@@ -78,7 +78,10 @@ const _sfc_main = defineComponent({
|
|
|
78
78
|
_form[column.range] = rangeTemp[column.range];
|
|
79
79
|
} else if (column.component === "select") {
|
|
80
80
|
_form[column.key] = column.defaultValue || null;
|
|
81
|
-
} else {
|
|
81
|
+
} else if (column.component === "input-group") {
|
|
82
|
+
_form[column.selectKey] = column.selectDefaultValue || "";
|
|
83
|
+
_form[column.inputKey] = column.inputDefaultValue || "";
|
|
84
|
+
} else if (column.component) {
|
|
82
85
|
_form[column.key] = column.defaultValue || "";
|
|
83
86
|
}
|
|
84
87
|
});
|
|
@@ -180,8 +183,39 @@ const _sfc_main = defineComponent({
|
|
|
180
183
|
active: hasValue.value(item.key)
|
|
181
184
|
}, {
|
|
182
185
|
default: withCtx(() => [
|
|
183
|
-
item.slot ? renderSlot(_ctx.$slots, item.slot, { key: 0 }) : item.component === "input" ? (openBlock(), createBlock(unref(
|
|
184
|
-
|
|
186
|
+
item.slot ? renderSlot(_ctx.$slots, item.slot, { key: 0 }) : item.component === "input-group" ? (openBlock(), createBlock(unref(InputGroup), { key: 1 }, {
|
|
187
|
+
default: withCtx(() => [
|
|
188
|
+
createVNode(unref(Select), {
|
|
189
|
+
modelValue: form.value[item.selectKey],
|
|
190
|
+
"onUpdate:modelValue": ($event) => form.value[item.selectKey] = $event,
|
|
191
|
+
"default-active-first-option": "",
|
|
192
|
+
style: { "width": "100px" }
|
|
193
|
+
}, {
|
|
194
|
+
default: withCtx(() => [
|
|
195
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.selectOptions, (option, idx) => {
|
|
196
|
+
return openBlock(), createBlock(unref(Option), {
|
|
197
|
+
key: idx,
|
|
198
|
+
value: option.value
|
|
199
|
+
}, {
|
|
200
|
+
default: withCtx(() => [
|
|
201
|
+
createTextVNode(toDisplayString(option.label), 1)
|
|
202
|
+
]),
|
|
203
|
+
_: 2
|
|
204
|
+
}, 1032, ["value"]);
|
|
205
|
+
}), 128))
|
|
206
|
+
]),
|
|
207
|
+
_: 2
|
|
208
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
209
|
+
createVNode(unref(Input), {
|
|
210
|
+
modelValue: form.value[item.inputKey],
|
|
211
|
+
"onUpdate:modelValue": ($event) => form.value[item.inputKey] = $event,
|
|
212
|
+
placeholder: item.placeholder ? item.placeholder : `\u8BF7\u8F93\u5165${item.inputLabel}`,
|
|
213
|
+
style: { "width": "180px" }
|
|
214
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
215
|
+
]),
|
|
216
|
+
_: 2
|
|
217
|
+
}, 1024)) : item.component === "input" ? (openBlock(), createBlock(unref(InputSearch), {
|
|
218
|
+
key: 2,
|
|
185
219
|
modelValue: form.value[item.key],
|
|
186
220
|
"onUpdate:modelValue": ($event) => form.value[item.key] = $event,
|
|
187
221
|
style: normalizeStyle({ width: styleWidth(columnsMap.value[item.key]) }),
|
|
@@ -190,7 +224,7 @@ const _sfc_main = defineComponent({
|
|
|
190
224
|
placeholder: item.placeholder ? item.placeholder : `\u8BF7\u8F93\u5165${item.label}`
|
|
191
225
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder"])) : createCommentVNode("v-if", true),
|
|
192
226
|
item.component === "select" ? (openBlock(), createBlock(unref(Select), {
|
|
193
|
-
key:
|
|
227
|
+
key: 3,
|
|
194
228
|
modelValue: form.value[item.key],
|
|
195
229
|
"onUpdate:modelValue": ($event) => form.value[item.key] = $event,
|
|
196
230
|
"popup-container": "#base-filter-popup-container",
|
|
@@ -215,7 +249,7 @@ const _sfc_main = defineComponent({
|
|
|
215
249
|
_: 2
|
|
216
250
|
}, 1032, ["modelValue", "onUpdate:modelValue", "allow-search", "style", "placeholder", "onSearch", "onPopupVisibleChange", "onChange"])) : createCommentVNode("v-if", true),
|
|
217
251
|
item.component === "range-picker" ? (openBlock(), createBlock(unref(RangePicker), {
|
|
218
|
-
key:
|
|
252
|
+
key: 4,
|
|
219
253
|
modelValue: form.value[item.key].range,
|
|
220
254
|
"onUpdate:modelValue": ($event) => form.value[item.key].range = $event,
|
|
221
255
|
style: normalizeStyle({ width: styleWidth(form.value[item.key]) }),
|
|
@@ -228,7 +262,7 @@ const _sfc_main = defineComponent({
|
|
|
228
262
|
}, ["stop"]))
|
|
229
263
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style"])) : createCommentVNode("v-if", true),
|
|
230
264
|
item.component === "radio" ? (openBlock(), createBlock(unref(RadioGroup), {
|
|
231
|
-
key:
|
|
265
|
+
key: 5,
|
|
232
266
|
modelValue: form.value[item.key],
|
|
233
267
|
"onUpdate:modelValue": ($event) => form.value[item.key] = $event,
|
|
234
268
|
type: "button"
|
|
@@ -79,7 +79,10 @@ const _sfc_main = vue.defineComponent({
|
|
|
79
79
|
_form[column.range] = rangeTemp[column.range];
|
|
80
80
|
} else if (column.component === "select") {
|
|
81
81
|
_form[column.key] = column.defaultValue || null;
|
|
82
|
-
} else {
|
|
82
|
+
} else if (column.component === "input-group") {
|
|
83
|
+
_form[column.selectKey] = column.selectDefaultValue || "";
|
|
84
|
+
_form[column.inputKey] = column.inputDefaultValue || "";
|
|
85
|
+
} else if (column.component) {
|
|
83
86
|
_form[column.key] = column.defaultValue || "";
|
|
84
87
|
}
|
|
85
88
|
});
|
|
@@ -181,8 +184,39 @@ const _sfc_main = vue.defineComponent({
|
|
|
181
184
|
active: hasValue.value(item.key)
|
|
182
185
|
}, {
|
|
183
186
|
default: vue.withCtx(() => [
|
|
184
|
-
item.slot ? vue.renderSlot(_ctx.$slots, item.slot, { key: 0 }) : item.component === "input" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.
|
|
185
|
-
|
|
187
|
+
item.slot ? vue.renderSlot(_ctx.$slots, item.slot, { key: 0 }) : item.component === "input-group" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.InputGroup), { key: 1 }, {
|
|
188
|
+
default: vue.withCtx(() => [
|
|
189
|
+
vue.createVNode(vue.unref(webVue.Select), {
|
|
190
|
+
modelValue: form.value[item.selectKey],
|
|
191
|
+
"onUpdate:modelValue": ($event) => form.value[item.selectKey] = $event,
|
|
192
|
+
"default-active-first-option": "",
|
|
193
|
+
style: { "width": "100px" }
|
|
194
|
+
}, {
|
|
195
|
+
default: vue.withCtx(() => [
|
|
196
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.selectOptions, (option, idx) => {
|
|
197
|
+
return vue.openBlock(), vue.createBlock(vue.unref(webVue.Option), {
|
|
198
|
+
key: idx,
|
|
199
|
+
value: option.value
|
|
200
|
+
}, {
|
|
201
|
+
default: vue.withCtx(() => [
|
|
202
|
+
vue.createTextVNode(vue.toDisplayString(option.label), 1)
|
|
203
|
+
]),
|
|
204
|
+
_: 2
|
|
205
|
+
}, 1032, ["value"]);
|
|
206
|
+
}), 128))
|
|
207
|
+
]),
|
|
208
|
+
_: 2
|
|
209
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
210
|
+
vue.createVNode(vue.unref(webVue.Input), {
|
|
211
|
+
modelValue: form.value[item.inputKey],
|
|
212
|
+
"onUpdate:modelValue": ($event) => form.value[item.inputKey] = $event,
|
|
213
|
+
placeholder: item.placeholder ? item.placeholder : `\u8BF7\u8F93\u5165${item.inputLabel}`,
|
|
214
|
+
style: { "width": "180px" }
|
|
215
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
216
|
+
]),
|
|
217
|
+
_: 2
|
|
218
|
+
}, 1024)) : item.component === "input" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.InputSearch), {
|
|
219
|
+
key: 2,
|
|
186
220
|
modelValue: form.value[item.key],
|
|
187
221
|
"onUpdate:modelValue": ($event) => form.value[item.key] = $event,
|
|
188
222
|
style: vue.normalizeStyle({ width: styleWidth(columnsMap.value[item.key]) }),
|
|
@@ -191,7 +225,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
191
225
|
placeholder: item.placeholder ? item.placeholder : `\u8BF7\u8F93\u5165${item.label}`
|
|
192
226
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder"])) : vue.createCommentVNode("v-if", true),
|
|
193
227
|
item.component === "select" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Select), {
|
|
194
|
-
key:
|
|
228
|
+
key: 3,
|
|
195
229
|
modelValue: form.value[item.key],
|
|
196
230
|
"onUpdate:modelValue": ($event) => form.value[item.key] = $event,
|
|
197
231
|
"popup-container": "#base-filter-popup-container",
|
|
@@ -216,7 +250,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
216
250
|
_: 2
|
|
217
251
|
}, 1032, ["modelValue", "onUpdate:modelValue", "allow-search", "style", "placeholder", "onSearch", "onPopupVisibleChange", "onChange"])) : vue.createCommentVNode("v-if", true),
|
|
218
252
|
item.component === "range-picker" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.RangePicker), {
|
|
219
|
-
key:
|
|
253
|
+
key: 4,
|
|
220
254
|
modelValue: form.value[item.key].range,
|
|
221
255
|
"onUpdate:modelValue": ($event) => form.value[item.key].range = $event,
|
|
222
256
|
style: vue.normalizeStyle({ width: styleWidth(form.value[item.key]) }),
|
|
@@ -229,7 +263,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
229
263
|
}, ["stop"]))
|
|
230
264
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style"])) : vue.createCommentVNode("v-if", true),
|
|
231
265
|
item.component === "radio" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.RadioGroup), {
|
|
232
|
-
key:
|
|
266
|
+
key: 5,
|
|
233
267
|
modelValue: form.value[item.key],
|
|
234
268
|
"onUpdate:modelValue": ($event) => form.value[item.key] = $event,
|
|
235
269
|
type: "button"
|