leisure-core 0.5.71 → 0.5.72
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-list/src/main.vue +7 -3
- package/package.json +1 -1
package/le-list/src/main.vue
CHANGED
|
@@ -223,7 +223,7 @@ export default {
|
|
|
223
223
|
value = column.formatter(scope.rows, scope.column, value);
|
|
224
224
|
}
|
|
225
225
|
if (column.type) {
|
|
226
|
-
value = this.format(column.type, value);
|
|
226
|
+
value = this.format(column.type, value, column.spec);
|
|
227
227
|
}
|
|
228
228
|
let ctype = this.componentMap[column.type];
|
|
229
229
|
let prop = ctype?.prop || "value";
|
|
@@ -285,10 +285,14 @@ export default {
|
|
|
285
285
|
handleSelectionChange(val) {
|
|
286
286
|
this.rowItems = val;
|
|
287
287
|
},
|
|
288
|
-
format(type, value) {
|
|
288
|
+
format(type, value, spec) {
|
|
289
289
|
const renderers = {
|
|
290
290
|
bool: () => (value == 1 ? "是" : "否"),
|
|
291
|
-
date: () =>
|
|
291
|
+
date: () => {
|
|
292
|
+
if (spec) {
|
|
293
|
+
this.parseTime(value, spec);
|
|
294
|
+
} else this.parseTime(value);
|
|
295
|
+
},
|
|
292
296
|
currency: () => `$${parseFloat(value).toFixed(2)}`,
|
|
293
297
|
};
|
|
294
298
|
let result = renderers[type]?.() || value;
|