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.
@@ -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: () => this.parseTime(value),
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leisure-core",
3
- "version": "0.5.71",
3
+ "version": "0.5.72",
4
4
  "description": "leisure-core是京心数据基于vue2.x开发的一套后台管理系统桌面端组件库,封装了大量实用的UI控件模板,非常方便开发者快速搭建前端应用",
5
5
  "private": false,
6
6
  "author": "北方乐逍遥(zcx7878)",