leisure-core 0.4.46 → 0.4.48
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/le-common-page/src/main.vue +26 -3
- package/package.json +1 -1
|
@@ -27,6 +27,16 @@
|
|
|
27
27
|
:width="column.width"
|
|
28
28
|
:formatter="column.formatter"
|
|
29
29
|
>
|
|
30
|
+
<template #default="scope">
|
|
31
|
+
<span v-if="column.type && column.type === 'url'">
|
|
32
|
+
<a :href="scope.row[column.prop]" target="_blank">{{
|
|
33
|
+
scope.row[column.prop]
|
|
34
|
+
}}</a>
|
|
35
|
+
</span>
|
|
36
|
+
<span v-else>
|
|
37
|
+
{{ scope.row[column.prop] }}
|
|
38
|
+
</span>
|
|
39
|
+
</template>
|
|
30
40
|
</el-table-column>
|
|
31
41
|
<el-table-column fixed="right" label="操作" align="center">
|
|
32
42
|
<template slot-scope="scope">
|
|
@@ -87,6 +97,13 @@
|
|
|
87
97
|
v-if="!item.type || item.type === 'input'"
|
|
88
98
|
v-model="formPop[item.prop]"
|
|
89
99
|
/>
|
|
100
|
+
<el-input-number
|
|
101
|
+
v-else-if="item.type === 'number'"
|
|
102
|
+
v-model="formPop[item.prop]"
|
|
103
|
+
:min="item.min || 0"
|
|
104
|
+
:max="item.max || 9999999999"
|
|
105
|
+
label="item.label||''"
|
|
106
|
+
/>
|
|
90
107
|
<el-select
|
|
91
108
|
v-else-if="item.type === 'select'"
|
|
92
109
|
v-model="formPop[item.prop]"
|
|
@@ -184,7 +201,6 @@ export default {
|
|
|
184
201
|
data() {
|
|
185
202
|
return {
|
|
186
203
|
formPop: {},
|
|
187
|
-
|
|
188
204
|
searchData: {
|
|
189
205
|
pageNo: 1,
|
|
190
206
|
total: 1,
|
|
@@ -198,6 +214,12 @@ export default {
|
|
|
198
214
|
this.getList();
|
|
199
215
|
},
|
|
200
216
|
methods: {
|
|
217
|
+
initFormItem() {
|
|
218
|
+
this.formPop = this.formColumns.reduce((acc, item) => {
|
|
219
|
+
acc[item.prop] = item.default;
|
|
220
|
+
return acc;
|
|
221
|
+
}, {});
|
|
222
|
+
},
|
|
201
223
|
onClickQuery() {
|
|
202
224
|
this.searchData.pageNo = 1;
|
|
203
225
|
this.getList();
|
|
@@ -220,7 +242,7 @@ export default {
|
|
|
220
242
|
this.showDialog = true;
|
|
221
243
|
},
|
|
222
244
|
addItem() {
|
|
223
|
-
this.
|
|
245
|
+
this.initFormItem();
|
|
224
246
|
this.showDialog = true;
|
|
225
247
|
},
|
|
226
248
|
saveData() {
|
|
@@ -230,6 +252,7 @@ export default {
|
|
|
230
252
|
if (valid) {
|
|
231
253
|
this.$emit("saveForm", this.formPop, () => {
|
|
232
254
|
this.getList();
|
|
255
|
+
this.closeDialog();
|
|
233
256
|
});
|
|
234
257
|
} else {
|
|
235
258
|
return false;
|
|
@@ -237,7 +260,7 @@ export default {
|
|
|
237
260
|
});
|
|
238
261
|
},
|
|
239
262
|
closeDialog() {
|
|
240
|
-
this.
|
|
263
|
+
this.initFormItem();
|
|
241
264
|
this.showDialog = false;
|
|
242
265
|
},
|
|
243
266
|
getOptions(prop) {
|