tianheng-ui 0.1.20 → 0.1.22
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/package.json
CHANGED
@@ -198,7 +198,7 @@ export const basicComponents = [
|
|
198
198
|
width: "100%",
|
199
199
|
labelWidth: 100,
|
200
200
|
isLabelWidth: false,
|
201
|
-
defaultValue: "
|
201
|
+
defaultValue: "",
|
202
202
|
placeholder: "",
|
203
203
|
startPlaceholder: "",
|
204
204
|
endPlaceholder: "",
|
@@ -236,7 +236,9 @@ export const basicComponents = [
|
|
236
236
|
clearable: true,
|
237
237
|
placeholder: "",
|
238
238
|
startPlaceholder: "",
|
239
|
+
startField:'',
|
239
240
|
endPlaceholder: "",
|
241
|
+
endField:'',
|
240
242
|
type: "date",
|
241
243
|
format: "yyyy-MM-dd",
|
242
244
|
timestamp: false,
|
@@ -35,7 +35,7 @@
|
|
35
35
|
<el-form-item label="默认值">
|
36
36
|
<el-input
|
37
37
|
:value="
|
38
|
-
['datetimerange', 'daterange', 'monthrange'].includes(
|
38
|
+
['dates', 'datetimerange', 'daterange', 'monthrange'].includes(
|
39
39
|
widget.options.type
|
40
40
|
)
|
41
41
|
? JSON.stringify(widget.options.defaultValue || [])
|
@@ -51,40 +51,43 @@
|
|
51
51
|
</el-form-item>
|
52
52
|
|
53
53
|
<el-form-item label="显示类型">
|
54
|
-
<el-select v-model="widget.options.type">
|
55
|
-
<el-option value="year"></el-option>
|
56
|
-
<el-option value="month"></el-option>
|
57
|
-
<el-option value="date"></el-option>
|
58
|
-
<el-option value="dates"></el-option>
|
54
|
+
<el-select v-model="widget.options.type" @change="handleTypeChange">
|
55
|
+
<el-option value="year" label="年"></el-option>
|
56
|
+
<el-option value="month" label="年月"></el-option>
|
57
|
+
<el-option value="date" label="年月日"></el-option>
|
58
|
+
<el-option value="dates" label="年月日(多选)"></el-option>
|
59
59
|
<!-- <el-option value="week"></el-option> -->
|
60
|
-
<el-option value="datetime"></el-option>
|
61
|
-
<el-option value="monthrange"></el-option>
|
62
|
-
<el-option
|
63
|
-
|
60
|
+
<el-option value="datetime" label="年月日时分秒"></el-option>
|
61
|
+
<el-option value="monthrange" label="年月(范围)"></el-option>
|
62
|
+
<el-option
|
63
|
+
value="datetimerange"
|
64
|
+
label="年月日时分秒(范围)"
|
65
|
+
></el-option>
|
66
|
+
<el-option value="daterange" label="年月日(范围)"></el-option>
|
64
67
|
</el-select>
|
65
68
|
</el-form-item>
|
66
69
|
|
67
|
-
<
|
68
|
-
label="开始时间占位内容"
|
70
|
+
<template
|
69
71
|
v-if="
|
70
72
|
['datetimerange', 'daterange', 'monthrange'].includes(
|
71
73
|
widget.options.type
|
72
74
|
)
|
73
75
|
"
|
74
76
|
>
|
75
|
-
<el-
|
76
|
-
|
77
|
+
<el-form-item label="开始时间占位内容">
|
78
|
+
<el-input v-model="widget.options.startPlaceholder"></el-input>
|
79
|
+
</el-form-item>
|
80
|
+
<el-form-item label="开始时间字段标识">
|
81
|
+
<el-input v-model="widget.options.startField"></el-input>
|
82
|
+
</el-form-item>
|
77
83
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
>
|
86
|
-
<el-input v-model="widget.options.endPlaceholder"></el-input>
|
87
|
-
</el-form-item>
|
84
|
+
<el-form-item label="结束时间占位内容">
|
85
|
+
<el-input v-model="widget.options.endPlaceholder"></el-input>
|
86
|
+
</el-form-item>
|
87
|
+
<el-form-item label="结束时间字段标识">
|
88
|
+
<el-input v-model="widget.options.endField"></el-input>
|
89
|
+
</el-form-item>
|
90
|
+
</template>
|
88
91
|
</template>
|
89
92
|
|
90
93
|
<el-form-item label="操作属性">
|
@@ -151,7 +154,48 @@ export default {
|
|
151
154
|
props: {},
|
152
155
|
mixins: [configComponent],
|
153
156
|
mounted() {},
|
154
|
-
methods: {
|
157
|
+
methods: {
|
158
|
+
handleTypeChange(val) {
|
159
|
+
switch (val) {
|
160
|
+
case "year":
|
161
|
+
this.widget.options.format = "yyyy";
|
162
|
+
this.widget.options.defaultValue = "";
|
163
|
+
break;
|
164
|
+
case "month":
|
165
|
+
this.widget.options.format = "yyyy-MM";
|
166
|
+
this.widget.options.defaultValue = "";
|
167
|
+
break;
|
168
|
+
case "date":
|
169
|
+
this.widget.options.format = "yyyy-MM-dd";
|
170
|
+
this.widget.options.defaultValue = "";
|
171
|
+
break;
|
172
|
+
case "dates":
|
173
|
+
this.widget.options.format = "yyyy-MM-dd";
|
174
|
+
this.widget.options.defaultValue = [];
|
175
|
+
break;
|
176
|
+
case "datetime":
|
177
|
+
this.widget.options.format = "yyyy-MM-dd HH:mm:ss";
|
178
|
+
this.widget.options.defaultValue = "";
|
179
|
+
break;
|
180
|
+
case "monthrange":
|
181
|
+
this.widget.options.format = "yyyy-MM";
|
182
|
+
this.widget.options.defaultValue = [];
|
183
|
+
break;
|
184
|
+
case "datetimerange":
|
185
|
+
this.widget.options.format = "yyyy-MM-dd HH:mm:ss";
|
186
|
+
this.widget.options.defaultValue = [];
|
187
|
+
break;
|
188
|
+
case "daterange":
|
189
|
+
this.widget.options.format = "yyyy-MM-dd";
|
190
|
+
this.widget.options.defaultValue = [];
|
191
|
+
break;
|
192
|
+
default:
|
193
|
+
this.widget.options.format = "yyyy-MM-dd";
|
194
|
+
this.widget.options.defaultValue = "";
|
195
|
+
break;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
}
|
155
199
|
};
|
156
200
|
</script>
|
157
201
|
|