lw-cdp-ui 1.3.15 → 1.3.17
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.
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-cascader v-model="value" :options="item.options" :props="item.props" :filterable="item.filterable" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
emits: ["update:modelValue", "change"],
|
|
8
|
+
name: "Input",
|
|
9
|
+
props: {
|
|
10
|
+
disabled: { // 是否禁止操作
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
},
|
|
14
|
+
modelValue: { // 绑定的结果
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
item: { // 配置项
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => ({})
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
value: this.modelValue
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
watch: {
|
|
29
|
+
modelValue(newVal) {
|
|
30
|
+
this.value = newVal;
|
|
31
|
+
},
|
|
32
|
+
value(newVal) {
|
|
33
|
+
const filter = this.item.filter ?? false;
|
|
34
|
+
if (filter) {
|
|
35
|
+
newVal = newVal.replace(/ /g, ',').replace(/\,/g, ',').replace(/\,/g, ',').replace(/\n/g, ',');
|
|
36
|
+
}
|
|
37
|
+
console.log('%c [ newVal ]-36', 'font-size:13px; background:pink; color:#bf2c9f;', newVal)
|
|
38
|
+
|
|
39
|
+
this.$emit('update:modelValue', newVal);
|
|
40
|
+
this.$emit('change', newVal);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
</script>
|
|
@@ -79,6 +79,7 @@ import SearchSelect from "./select/select.vue";
|
|
|
79
79
|
import SearchDate from "./date/date.vue";
|
|
80
80
|
import SearchDates from "./dates/dates.vue";
|
|
81
81
|
import SearchDateRange from "./dateRange/dateRange.vue";
|
|
82
|
+
import SearchCascader from "./cascader/cascader.vue";
|
|
82
83
|
import dayjs from "dayjs";
|
|
83
84
|
|
|
84
85
|
export default {
|
|
@@ -88,6 +89,7 @@ export default {
|
|
|
88
89
|
SearchDate,
|
|
89
90
|
SearchDates,
|
|
90
91
|
SearchDateRange,
|
|
92
|
+
SearchCascader
|
|
91
93
|
},
|
|
92
94
|
name: "lwSearch",
|
|
93
95
|
props: {
|
|
@@ -203,7 +205,7 @@ export default {
|
|
|
203
205
|
const remainder = spans % 24;
|
|
204
206
|
|
|
205
207
|
if (spans > 18) {
|
|
206
|
-
return !this.isExpandStatus || remainder === 0 || (remainder >
|
|
208
|
+
return !this.isExpandStatus || remainder === 0 || (remainder > 18 && remainder < 24);
|
|
207
209
|
}
|
|
208
210
|
|
|
209
211
|
return false
|
|
@@ -236,6 +238,7 @@ export default {
|
|
|
236
238
|
date: "SearchDate",
|
|
237
239
|
dates: "SearchDates",
|
|
238
240
|
dateRange: "SearchDateRange",
|
|
241
|
+
cascader: "SearchCascader",
|
|
239
242
|
};
|
|
240
243
|
return typeList[type] || "SearchInput";
|
|
241
244
|
},
|
|
@@ -417,7 +420,7 @@ export default {
|
|
|
417
420
|
}
|
|
418
421
|
|
|
419
422
|
.expand-row {
|
|
420
|
-
padding-bottom:
|
|
423
|
+
padding-bottom: 42px;
|
|
421
424
|
}
|
|
422
425
|
|
|
423
426
|
.control {
|