@vipl520/dk-ui 1.0.57 → 1.0.58

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/dist/index.js +33 -16
  2. package/dist/index.min.js +3 -3
  3. package/dist/index.min.js.map +1 -1
  4. package/dist/index.min.mjs +4 -4
  5. package/dist/index.min.mjs.map +1 -1
  6. package/dist/index.mjs +33 -16
  7. package/dist/web-types.json +1 -1
  8. package/es/table/index.d.ts +15 -0
  9. package/es/table/src/props.d.ts +4 -0
  10. package/es/table/src/props.mjs +6 -0
  11. package/es/table/src/props.mjs.map +1 -1
  12. package/es/table/src/table.vue.d.ts +9 -0
  13. package/es/table/src/table.vue2.mjs +1 -1
  14. package/es/table/src/table.vue2.mjs.map +1 -1
  15. package/es/table/utils/dkTable.d.ts +1 -1
  16. package/es/table/utils/dkTable.mjs +2 -2
  17. package/es/table/utils/dkTable.mjs.map +1 -1
  18. package/es/table/utils/dkTableApi.d.ts +3 -1
  19. package/es/table/utils/dkTableApi.mjs +21 -12
  20. package/es/table/utils/dkTableApi.mjs.map +1 -1
  21. package/es/url-input/src/url-input-table.vue2.mjs +3 -1
  22. package/es/url-input/src/url-input-table.vue2.mjs.map +1 -1
  23. package/lib/table/index.d.ts +15 -0
  24. package/lib/table/src/props.d.ts +4 -0
  25. package/lib/table/src/props.js +6 -0
  26. package/lib/table/src/props.js.map +1 -1
  27. package/lib/table/src/table.vue.d.ts +9 -0
  28. package/lib/table/src/table.vue2.js +1 -1
  29. package/lib/table/src/table.vue2.js.map +1 -1
  30. package/lib/table/utils/dkTable.d.ts +1 -1
  31. package/lib/table/utils/dkTable.js +2 -2
  32. package/lib/table/utils/dkTable.js.map +1 -1
  33. package/lib/table/utils/dkTableApi.d.ts +3 -1
  34. package/lib/table/utils/dkTableApi.js +21 -12
  35. package/lib/table/utils/dkTableApi.js.map +1 -1
  36. package/lib/url-input/src/url-input-table.vue2.js +3 -1
  37. package/lib/url-input/src/url-input-table.vue2.js.map +1 -1
  38. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dkTableApi.js","sources":["../../../src/table/utils/dkTableApi.ts"],"sourcesContent":["import { request } from '@vipl520/utils'\n\nexport class dkTableApi {\n private controllerUrl: string\n public actionUrl\n private requestConfig: anyObj = {} // 新增:用于存储配置的request参数\n\n constructor(controllerUrl: string) {\n if (!controllerUrl.endsWith('/')) {\n controllerUrl += '/'\n }\n this.controllerUrl = controllerUrl\n this.actionUrl = new Map([\n ['index', controllerUrl + 'index'],\n ['add', controllerUrl + 'add'],\n ['edit', controllerUrl + 'edit'],\n ['del', controllerUrl + 'del'],\n ['sortable', controllerUrl + 'sortable'],\n ['table', controllerUrl + 'table'], // 获取表格数据\n ['form', controllerUrl + 'form'], // 获取表单\n ['recycle', controllerUrl + 'recycle'], // 回收站\n ['recycleTable', controllerUrl + 'recycleTable'], // 回收站表格\n ['destroy', controllerUrl + 'destroy'], // 回收站销毁\n ['restore', controllerUrl + 'restore'], // 回收站还原\n ])\n }\n\n /**\n * 配置request参数\n * @param config 包含HTTP方法、请求头等额外参数的对象\n */\n configureRequest(config: anyObj) {\n this.requestConfig = { ...config } // 将传入的配置对象浅拷贝到requestConfig\n }\n\n /**\n * 获取表格配置\n */\n table() {\n return request(\n {\n url: this.actionUrl.get('table'),\n method: 'post',\n ...this.requestConfig, // 将requestConfig的内容展开到request的参数中\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格配置\n */\n recycleTable() {\n return request(\n {\n url: this.actionUrl.get('recycleTable'),\n method: 'post',\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表单\n */\n form(id?: number) {\n return request(\n {\n url: this.actionUrl.get('form'),\n method: 'post',\n data: { id },\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格列表\n * @param filter\n */\n index(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('index'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 回收站列表\n * @param filter\n */\n recycle(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('recycle'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 编辑\n * @param params\n */\n edit(params: anyObj) {\n return request(\n {\n url: this.actionUrl.get('edit'),\n method: 'get',\n params,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 删除\n * @param ids\n */\n del(ids: number[]) {\n return request(\n {\n url: this.actionUrl.get('del'),\n method: 'DELETE',\n params: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 销毁\n * @param ids\n */\n destroy(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('destroy'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 还原\n * @param ids\n */\n restore(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('restore'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 自定义\n * @param action\n * @param data\n */\n postData(action: string, data: anyObj) {\n return request(\n {\n url: this.actionUrl.has(action) ? this.actionUrl.get(action) : this.controllerUrl + action,\n method: 'post',\n data,\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 排序\n * @param id\n * @param targetId\n */\n sortableApi(id: number, targetId: number) {\n return request(\n {\n url: this.actionUrl.get('sortable'),\n method: 'post',\n data: {\n id,\n targetId,\n },\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n}\n"],"names":["request"],"mappings":";;;;AAEO,MAAM,UAAW,CAAA;AAAA,EACd,aAAA,CAAA;AAAA,EACD,SAAA,CAAA;AAAA,EACC,gBAAwB,E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aAAA;AAAA,MACL;AAAA,QACE,GAAK,EAAA,IAAA,CAAK,SAAU,CAAA,GAAA,CAAI,UAAU,CAAA;AAAA,QAClC,MAAQ,EAAA,MAAA;AAAA,QACR,IAAM,EAAA;AAAA,UACJ,EAAA;AAAA,UACA,QAAA;AAAA,SACF;AAAA,QACA,GAAG,IAAK,CAAA,aAAA;AAAA,OACV;AAAA,MACA;AAAA,QACE,eAAiB,EAAA,IAAA;AAAA,OACnB;AAAA,KACF,CAAA;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"dkTableApi.js","sources":["../../../src/table/utils/dkTableApi.ts"],"sourcesContent":["import { request } from '@vipl520/utils'\n\nexport class dkTableApi {\n private controllerUrl: string\n public actionUrl\n private requestConfig: anyObj = {} // 新增:用于存储配置的request参数\n\n constructor(controllerUrl: string, query: Object) {\n const qStr = this.objectToQuery(query)\n console.log('queryStr', qStr)\n\n if (!controllerUrl.endsWith('/')) {\n controllerUrl += '/'\n }\n\n this.controllerUrl = controllerUrl\n\n // 构建带有或不带有查询字符串的完整URL\n this.actionUrl = new Map([\n ['index', this.buildFullUrl(controllerUrl + 'index', qStr)],\n ['add', this.buildFullUrl(controllerUrl + 'add', qStr)],\n ['edit', this.buildFullUrl(controllerUrl + 'edit', qStr)],\n ['del', this.buildFullUrl(controllerUrl + 'del', qStr)],\n ['sortable', this.buildFullUrl(controllerUrl + 'sortable', qStr)],\n ['table', this.buildFullUrl(controllerUrl + 'table', qStr)], // 获取表格数据\n ['form', this.buildFullUrl(controllerUrl + 'form', qStr)], // 获取表单\n ['recycle', this.buildFullUrl(controllerUrl + 'recycle', qStr)], // 回收站\n ['recycleTable', this.buildFullUrl(controllerUrl + 'recycleTable', qStr)], // 回收站表格\n ['destroy', this.buildFullUrl(controllerUrl + 'destroy', qStr)], // 回收站销毁\n ['restore', this.buildFullUrl(controllerUrl + 'restore', qStr)], // 回收站还原\n ])\n }\n\n // 新增方法用于构建完整的URL\n private buildFullUrl(baseUrl: string, queryStr: string): string {\n return queryStr ? `${baseUrl}?${queryStr}` : baseUrl\n }\n\n objectToQuery(obj: any) {\n return Object.keys(obj)\n .map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]))\n .join('&')\n }\n\n /**\n * 配置request参数\n * @param config 包含HTTP方法、请求头等额外参数的对象\n */\n configureRequest(config: anyObj) {\n this.requestConfig = { ...config } // 将传入的配置对象浅拷贝到requestConfig\n }\n\n /**\n * 获取表格配置\n */\n table() {\n return request(\n {\n url: this.actionUrl.get('table'),\n method: 'post',\n ...this.requestConfig, // 将requestConfig的内容展开到request的参数中\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格配置\n */\n recycleTable() {\n return request(\n {\n url: this.actionUrl.get('recycleTable'),\n method: 'post',\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表单\n */\n form(id?: number) {\n return request(\n {\n url: this.actionUrl.get('form'),\n method: 'post',\n data: { id },\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格列表\n * @param filter\n */\n index(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('index'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 回收站列表\n * @param filter\n */\n recycle(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('recycle'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 编辑\n * @param params\n */\n edit(params: anyObj) {\n return request(\n {\n url: this.actionUrl.get('edit'),\n method: 'get',\n params,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 删除\n * @param ids\n */\n del(ids: number[]) {\n return request(\n {\n url: this.actionUrl.get('del'),\n method: 'DELETE',\n params: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 销毁\n * @param ids\n */\n destroy(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('destroy'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 还原\n * @param ids\n */\n restore(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('restore'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 自定义\n * @param action\n * @param data\n */\n postData(action: string, data: anyObj) {\n return request(\n {\n url: this.actionUrl.has(action) ? this.actionUrl.get(action) : this.controllerUrl + action,\n method: 'post',\n data,\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 排序\n * @param id\n * @param targetId\n */\n sortableApi(id: number, targetId: number) {\n return request(\n {\n url: this.actionUrl.get('sortable'),\n method: 'post',\n data: {\n id,\n targetId,\n },\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n}\n"],"names":["request"],"mappings":";;;;AAEO,MAAM,UAAW,CAAA;AAAA,EACd,aAAA,CAAA;AAAA,EACD,SAAA,CAAA;AAAA,EACC,gBAAwB,EAAC,CAAA;AAAA;AAAA,EAEjC,WAAA,CAAY,eAAuB,KAAe,EAAA;AAChD,IAAM,MAAA,IAAA,GAAO,IAAK,CAAA,aAAA,CAAc,KAAK,CAAA,CAAA;AACrC,IAAQ,OAAA,CAAA,GAAA,CAAI,YAAY,IAAI,CAAA,CAAA;AAE5B,IAAA,IAAI,CAAC,aAAA,CAAc,QAAS,CAAA,GAAG,CAAG,EAAA;AAChC,MAAiB,aAAA,IAAA,GAAA,CAAA;AAAA,KACnB;AAEA,IAAA,IAAA,CAAK,aAAgB,GAAA,aAAA,CAAA;AAGrB,IAAK,IAAA,CAAA,SAAA,uBAAgB,GAAI,CAAA;AAAA,MACvB,CAAC,OAAS,EAAA,IAAA,CAAK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;AACrC,IAAO,OAAAA,aAAA;AAAA,MACL;AAAA,QACE,GAAK,EAAA,IAAA,CAAK,SAAU,CAAA,GAAA,CAAI,MAAM,CAAA,GAAI,IAAK,CAAA,SAAA,CAAU,GAAI,CAAA,MAAM,CAAI,GAAA,IAAA,CAAK,aAAgB,GAAA,MAAA;AAAA,QACpF,MAAQ,EAAA,MAAA;AAAA,QACR,IAAA;AAAA,QACA,GAAG,IAAK,CAAA,aAAA;AAAA,OACV;AAAA,MACA;AAAA,QACE,iBAAmB,EAAA,IAAA;AAAA,QACnB,eAAiB,EAAA,IAAA;AAAA,OACnB;AAAA,KACF,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,WAAA,CAAY,IAAY,QAAkB,EAAA;AACxC,IAAO,OAAAA,aAAA;AAAA,MACL;AAAA,QACE,GAAK,EAAA,IAAA,CAAK,SAAU,CAAA,GAAA,CAAI,UAAU,CAAA;AAAA,QAClC,MAAQ,EAAA,MAAA;AAAA,QACR,IAAM,EAAA;AAAA,UACJ,EAAA;AAAA,UACA,QAAA;AAAA,SACF;AAAA,QACA,GAAG,IAAK,CAAA,aAAA;AAAA,OACV;AAAA,MACA;AAAA,QACE,eAAiB,EAAA,IAAA;AAAA,OACnB;AAAA,KACF,CAAA;AAAA,GACF;AACF;;;;"}
@@ -47,7 +47,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
47
47
  ref: DkTableRef,
48
48
  "table-api": __props.item.tableUrl,
49
49
  "cache-table": __props.item.cacheTable,
50
- height: "300px"
50
+ height: "300px",
51
+ query: { _form: "url_input" },
52
+ buttons: ["refresh", "add", "export_csv", "edit", "delete", "comSearch", "quickSearch", "columnDisplay"]
51
53
  }, {
52
54
  cate_id_slot: vue.withCtx(({ row }) => [
53
55
  vue.createTextVNode(
@@ -1 +1 @@
1
- {"version":3,"file":"url-input-table.vue2.js","sources":["../../../src/url-input/src/url-input-table.vue"],"sourcesContent":["<template>\n <dk-table ref=\"DkTableRef\" :table-api=\"item.tableUrl\" :cache-table=\"item.cacheTable\" height=\"300px\">\n <template #cate_id_slot=\"{ row }\">{{ row.category?.name }}</template>\n </dk-table>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, defineComponent, onMounted, ref, watch } from 'vue'\nimport { ElMessage } from 'element-plus'\ndefineComponent({\n name: 'DkUrlInputTable',\n})\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n})\n\nconst DkTableRef = ref()\nconst selection = computed(() => DkTableRef?.value?.DkTable?.table?.selection || [])\nconst emit = defineEmits(['onChooseUrl'])\n\nwatch(\n () => selection.value.length,\n () => {\n console.log(selection)\n if (selection.value.length > 1) {\n ElMessage({\n message: '选择多个只有最后一个生效',\n type: 'warning',\n })\n }\n const val = selection.value[selection.value.length - 1]\n if (val) {\n const url = val[props.item.urlField] || props.item.urlRule.replace('{pkField}', val[props.item.pkField])\n emit('onChooseUrl', url)\n }\n }\n)\n</script>\n\n<style scoped></style>\n"],"names":["defineComponent","ref","computed","watch","ElMessage"],"mappings":";;;;;;;;;;;;;;;;;;;;AAQA,IAAgBA,mBAAA,CAAA;AAAA,MACd,IAAM,EAAA,iBAAA;AAAA,KACP,CAAA,CAAA;AAUD,IAAA,MAAM,aAAaC,OAAI,EAAA,CAAA;AACvB,IAAM,MAAA,SAAA,GAAYC,aAAS,MAAM,UAAA,EAAY,OAAO,OAAS,EAAA,KAAA,EAAO,SAAa,IAAA,EAAE,CAAA,CAAA;AAGnF,IAAAC,SAAA;AAAA,MACE,MAAM,UAAU,KAAM,CAAA,MAAA;AAAA,MACtB,MAAM;AACJ,QAAA,OAAA,CAAQ,IAAI,SAAS,CAAA,CAAA;AACrB,QAAI,IAAA,SAAA,CAAU,KAAM,CAAA,MAAA,GAAS,CAAG,EAAA;AAC9B,UAAUC,qBAAA,CAAA;AAAA,YACR,OAAS,EAAA,0EAAA;AAAA,YACT,IAAM,EAAA,SAAA;AAAA,WACP,CAAA,CAAA;AAAA,SACH;AACA,QAAA,MAAM,MAAM,SAAU,CAAA,KAAA,CAAM,SAAU,CAAA,KAAA,CAAM,SAAS,CAAC,CAAA,CAAA;AACtD,QAAA,IAAI,GAAK,EAAA;AACP,UAAA,MAAM,GAAM,GAAA,GAAA,CAAI,KAAM,CAAA,IAAA,CAAK,QAAQ,CAAK,IAAA,KAAA,CAAM,IAAK,CAAA,OAAA,CAAQ,QAAQ,WAAa,EAAA,GAAA,CAAI,KAAM,CAAA,IAAA,CAAK,OAAO,CAAC,CAAA,CAAA;AACvG,UAAA,IAAA,CAAK,eAAe,GAAG,CAAA,CAAA;AAAA,SACzB;AAAA,OACF;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"url-input-table.vue2.js","sources":["../../../src/url-input/src/url-input-table.vue"],"sourcesContent":["<template>\n <dk-table\n ref=\"DkTableRef\"\n :table-api=\"item.tableUrl\"\n :cache-table=\"item.cacheTable\"\n height=\"300px\"\n :query=\"{ _form: 'url_input' }\"\n :buttons=\"['refresh', 'add', 'export_csv', 'edit', 'delete', 'comSearch', 'quickSearch', 'columnDisplay']\"\n >\n <template #cate_id_slot=\"{ row }\">{{ row.category?.name }}</template>\n </dk-table>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, defineComponent, onMounted, ref, watch } from 'vue'\nimport { ElMessage } from 'element-plus'\ndefineComponent({\n name: 'DkUrlInputTable',\n})\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n})\n\nconst DkTableRef = ref()\nconst selection = computed(() => DkTableRef?.value?.DkTable?.table?.selection || [])\nconst emit = defineEmits(['onChooseUrl'])\n\nwatch(\n () => selection.value.length,\n () => {\n console.log(selection)\n if (selection.value.length > 1) {\n ElMessage({\n message: '选择多个只有最后一个生效',\n type: 'warning',\n })\n }\n const val = selection.value[selection.value.length - 1]\n if (val) {\n const url = val[props.item.urlField] || props.item.urlRule.replace('{pkField}', val[props.item.pkField])\n emit('onChooseUrl', url)\n }\n }\n)\n</script>\n\n<style scoped></style>\n"],"names":["defineComponent","ref","computed","watch","ElMessage"],"mappings":";;;;;;;;;;;;;;;;;;;;AAeA,IAAgBA,mBAAA,CAAA;AAAA,MACd,IAAM,EAAA,iBAAA;AAAA,KACP,CAAA,CAAA;AAUD,IAAA,MAAM,aAAaC,OAAI,EAAA,CAAA;AACvB,IAAM,MAAA,SAAA,GAAYC,aAAS,MAAM,UAAA,EAAY,OAAO,OAAS,EAAA,KAAA,EAAO,SAAa,IAAA,EAAE,CAAA,CAAA;AAGnF,IAAAC,SAAA;AAAA,MACE,MAAM,UAAU,KAAM,CAAA,MAAA;AAAA,MACtB,MAAM;AACJ,QAAA,OAAA,CAAQ,IAAI,SAAS,CAAA,CAAA;AACrB,QAAI,IAAA,SAAA,CAAU,KAAM,CAAA,MAAA,GAAS,CAAG,EAAA;AAC9B,UAAUC,qBAAA,CAAA;AAAA,YACR,OAAS,EAAA,0EAAA;AAAA,YACT,IAAM,EAAA,SAAA;AAAA,WACP,CAAA,CAAA;AAAA,SACH;AACA,QAAA,MAAM,MAAM,SAAU,CAAA,KAAA,CAAM,SAAU,CAAA,KAAA,CAAM,SAAS,CAAC,CAAA,CAAA;AACtD,QAAA,IAAI,GAAK,EAAA;AACP,UAAA,MAAM,GAAM,GAAA,GAAA,CAAI,KAAM,CAAA,IAAA,CAAK,QAAQ,CAAK,IAAA,KAAA,CAAM,IAAK,CAAA,OAAA,CAAQ,QAAQ,WAAa,EAAA,GAAA,CAAI,KAAM,CAAA,IAAA,CAAK,OAAO,CAAC,CAAA,CAAA;AACvG,UAAA,IAAA,CAAK,eAAe,GAAG,CAAA,CAAA;AAAA,SACzB;AAAA,OACF;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vipl520/dk-ui",
3
- "version": "1.0.57",
3
+ "version": "1.0.58",
4
4
  "description": "多客怪兽框架核心组件,支持diy、crud动态表格、上传组件等",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.mjs",