Browse Source

feat: 设计器拓展 dayjs

yanglzh 5 tháng trước cách đây
mục cha
commit
4c6015dafa
2 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 0 0
      src/views/designer/form-create.es.js
  2. 6 0
      src/views/designer/view.vue

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/views/designer/form-create.es.js


+ 6 - 0
src/views/designer/view.vue

@@ -11,6 +11,7 @@ import formCreate from './form-create.es.js'
 import api from '/@/api/modules/designer'
 import { useRoute } from 'vue-router'
 import { ElMessage } from 'element-plus'
+import dayjs from "dayjs";
 
 // 设计器中的拓展需要同步写在这里才能生效
 formCreate.extendApi((api) => {
@@ -25,6 +26,11 @@ formCreate.extendApi((api) => {
       type: type, // 默认为 'info'
     });
   };
+
+  /**
+   * 扩展一个 dayjs 方法用于日期格式化
+   */
+  api.dayjs = dayjs
 });
 
 const route = useRoute()

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác