@vipl520/dk-ui 1.0.57 → 1.0.59
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +39 -17
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +4 -4
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +39 -17
- package/dist/web-types.json +1 -1
- package/es/group/index.d.ts +9 -0
- package/es/group/src/group.vue.d.ts +9 -0
- package/es/group/src/group.vue2.mjs +2 -1
- package/es/group/src/group.vue2.mjs.map +1 -1
- package/es/group/src/props.d.ts +4 -0
- package/es/group/src/props.mjs +4 -0
- package/es/group/src/props.mjs.map +1 -1
- package/es/table/index.d.ts +15 -0
- package/es/table/src/props.d.ts +4 -0
- package/es/table/src/props.mjs +6 -0
- package/es/table/src/props.mjs.map +1 -1
- package/es/table/src/table.vue.d.ts +9 -0
- package/es/table/src/table.vue2.mjs +1 -1
- package/es/table/src/table.vue2.mjs.map +1 -1
- package/es/table/utils/dkTable.d.ts +1 -1
- package/es/table/utils/dkTable.mjs +2 -2
- package/es/table/utils/dkTable.mjs.map +1 -1
- package/es/table/utils/dkTableApi.d.ts +3 -1
- package/es/table/utils/dkTableApi.mjs +21 -12
- package/es/table/utils/dkTableApi.mjs.map +1 -1
- package/es/url-input/src/url-input-table.vue2.mjs +3 -1
- package/es/url-input/src/url-input-table.vue2.mjs.map +1 -1
- package/lib/group/index.d.ts +9 -0
- package/lib/group/src/group.vue.d.ts +9 -0
- package/lib/group/src/group.vue2.js +2 -1
- package/lib/group/src/group.vue2.js.map +1 -1
- package/lib/group/src/props.d.ts +4 -0
- package/lib/group/src/props.js +4 -0
- package/lib/group/src/props.js.map +1 -1
- package/lib/table/index.d.ts +15 -0
- package/lib/table/src/props.d.ts +4 -0
- package/lib/table/src/props.js +6 -0
- package/lib/table/src/props.js.map +1 -1
- package/lib/table/src/table.vue.d.ts +9 -0
- package/lib/table/src/table.vue2.js +1 -1
- package/lib/table/src/table.vue2.js.map +1 -1
- package/lib/table/utils/dkTable.d.ts +1 -1
- package/lib/table/utils/dkTable.js +2 -2
- package/lib/table/utils/dkTable.js.map +1 -1
- package/lib/table/utils/dkTableApi.d.ts +3 -1
- package/lib/table/utils/dkTableApi.js +21 -12
- package/lib/table/utils/dkTableApi.js.map +1 -1
- package/lib/url-input/src/url-input-table.vue2.js +3 -1
- package/lib/url-input/src/url-input-table.vue2.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dkTable.mjs","sources":["../../../src/table/utils/dkTable.ts"],"sourcesContent":["import { findIndexRow, getArrayKey, storage } from '@vipl520/utils'\nimport { reactive } from 'vue'\nimport Sortable from 'sortablejs'\nimport { ElNotification } from 'element-plus'\nimport type { TableColumnCtx } from 'element-plus'\nimport { dkTableApi } from './dkTableApi'\n// import { DkTable } from '../../../types/table'\nexport default class dkTable {\n public url\n\n public api: dkTableApi\n\n public buttonCallback: (event: string, data: any) => void\n\n public table: DkTable = reactive({\n ref: undefined,\n pk: 'id',\n data: [],\n remark: null,\n loading: true,\n columnLoading: true,\n selection: [],\n column: [],\n total: 0,\n filter: {},\n dragSortLimitField: 'pid',\n acceptQuery: true,\n showComSearch: false,\n dblClickNotEditColumn: [undefined],\n expandAll: false,\n extend: {},\n })\n\n // BaTable前置处理函数列表(前置埋点)\n public before: BaTableBefore\n\n // BaTable后置处理函数列表(后置埋点)\n public after: BaTableAfter\n\n public form: DkForm = reactive({\n ref: undefined,\n operateIds: [], // 被编辑的IDs\n edit_id: 0,\n })\n\n public recycleTable: RecycleTable = reactive({\n ref: undefined,\n pk: 'id',\n data: [],\n loading: true,\n columnLoading: true,\n selection: [],\n column: [],\n total: 0,\n filter: {},\n showDialog: false,\n showDialogLoading: false,\n dragSortLimitField: 'pid',\n acceptQuery: true,\n showComSearch: false,\n dblClickNotEditColumn: [undefined],\n expandAll: false,\n extend: {},\n })\n\n // 通用搜索数据\n public comSearch: ComSearch = reactive({\n form: {},\n fieldData: new Map(),\n })\n\n constructor(url: string, before: BaTableBefore = {}, after: BaTableAfter = {}) {\n this.url = url\n // eslint-disable-next-line new-cap\n this.api = new dkTableApi(url)\n this.before = before\n this.after = after\n this.buttonCallback = (event, data) => {\n console.warn('请调用onClickButton((event,data)=>{})', event, data)\n }\n }\n\n /**\n * 表格内部鉴权方法\n * 此方法在表头或表行组件内部自动调用,传递权限节点名,如:add、edit\n * 若需自定义表格内部鉴权,重写此方法即可\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n auth(node: string) {\n // return auth(node)\n // TODO\n return true\n }\n\n /**\n * 运行前置函数\n * @param funName 函数名\n * @param args 参数\n */\n runBefore(funName: string, args: any = {}) {\n if (this.before && this.before[funName] && typeof this.before[funName] === 'function') {\n return this.before[funName]!({ ...args }) !== false\n }\n return true\n }\n\n /**\n * 运行后置函数\n * @param funName 函数名\n * @param args 参数\n */\n runAfter(funName: string, args: any = {}) {\n if (this.after && this.after[funName] && typeof this.after[funName] === 'function') {\n return this.after[funName]!({ ...args }) !== false\n }\n return true\n }\n\n getIndex = () => {\n if (!this.runBefore('api', { name: 'getIndex' })) return\n if (!this.runBefore('getIndex')) return\n this.table.loading = true\n return this.api\n .index(this.table.filter)\n .then((res) => {\n this.table.data = res.data.list\n this.table.total = res.data.total\n this.runAfter('getIndex', { res })\n })\n .finally(() => {\n this.table.loading = false\n })\n .catch(() => {})\n }\n\n getTable = (cache = false) => {\n if (!this.runBefore('api', { name: 'getTable' })) return\n if (!this.runBefore('getTable')) return\n\n this.table.columnLoading = true\n // 如果允许使用缓存\n if (cache) {\n // 尝试从 localStorage 获取缓存数据\n const cachedData = storage.get(this.api.actionUrl.get('table') + '_table')\n\n // 如果缓存存在且有效,使用缓存数据\n if (cachedData) {\n const cachedTableData = JSON.parse(cachedData)\n this.table.column = cachedTableData.column\n this.table.columnLoading = false // 加载完成\n this.runAfter('getTable', { res: cachedTableData }) // 使用缓存数据作为响应\n return Promise.resolve(cachedTableData) // 返回一个已解决的 Promise\n }\n }\n // 缓存不存在或不使用缓存时,调用 API\n return this.api\n .table()\n .then((res) => {\n this.table.column = res.data.column\n if (res.data.pk) {\n this.table.pk = res.data.pk\n }\n // 如果允许缓存,将数据存储到 localStorage\n storage.set(this.api.actionUrl.get('table') + '_table', JSON.stringify(res.data))\n this.runAfter('getTable', { res })\n })\n .finally(() => {\n this.table.columnLoading = false\n })\n .catch(() => {})\n }\n\n /**\n * 显示回收站\n */\n async showRecycle() {\n if (!this.runBefore('showRecycleTable')) return\n this.recycleTable.showDialogLoading = true\n if (this.recycleTable.column.length <= 0) {\n await this.getRecycleTable()\n }\n await this.getRecycleIndex()\n this.recycleTable.showDialog = true\n this.recycleTable.showDialogLoading = false\n }\n\n /**\n * 获取回收站列表\n */\n getRecycleIndex = () => {\n if (!this.runBefore('api', { name: 'getRecycleIndex' })) return\n if (!this.runBefore('getRecycleIndex')) return\n this.recycleTable.loading = true\n return this.api\n .recycle(this.recycleTable.filter)\n .then((res) => {\n this.recycleTable.data = res.data.list\n this.recycleTable.total = res.data.total\n })\n .finally(() => {\n this.recycleTable.loading = false\n })\n }\n\n /**\n * 获取回收站表格\n * @param cache\n */\n getRecycleTable = (cache = false) => {\n if (!this.runBefore('api', { name: 'getRecycleTable' })) return\n if (!this.runBefore('getRecycleTable')) return\n\n this.recycleTable.columnLoading = true\n\n // 如果允许使用缓存\n if (cache) {\n // 尝试从 localStorage 获取缓存数据\n const cachedData = storage.get(this.url + '_recycleTable')\n\n // 如果缓存存在且有效,使用缓存数据\n if (cachedData) {\n const cachedTableData = JSON.parse(cachedData)\n this.recycleTable.column = cachedTableData.column\n this.recycleTable.columnLoading = false // 加载完成\n return Promise.resolve(cachedTableData) // 返回一个已解决的 Promise\n }\n } else {\n // 缓存不存在或不使用缓存时,调用 API\n return this.api\n .recycleTable()\n .then((res) => {\n this.recycleTable.column = res.data.column\n // 如果允许缓存,将数据存储到 localStorage\n // if (cache) {\n storage.set(this.url + '_recycleTable', JSON.stringify(res.data))\n // }\n })\n .finally(() => {\n this.recycleTable.columnLoading = false\n })\n }\n }\n\n /**\n * 获取表格选择项的id数组\n */\n getSelectionIds(): number[] {\n const ids: number[] = []\n this.table.selection?.forEach((item) => {\n ids.push(item[this.table.pk!])\n })\n return ids\n }\n\n onClickButton(callback: (event: string, data: any) => void) {\n this.buttonCallback = callback\n }\n\n /**\n * 表格内的事件统一响应\n * @param event 事件:selection-change=选中项改变,page-size-change=每页数量改变,current-page-change=翻页,sort-change=排序,edit=编辑,delete=删除,field-change=单元格值改变,com-search=公共搜索\n * @param data 携带数据\n */\n onTableAction = (event: string, data: anyObj) => {\n if (!this.runBefore('onTableAction', { event, data })) return\n const actionFun = new Map([\n [\n 'selection-change',\n () => {\n this.table.selection = data as TableRow[]\n },\n ],\n [\n 'selection-recycle-change',\n () => {\n this.recycleTable.selection = data as TableRow[]\n },\n ],\n [\n 'page-size-change',\n () => {\n this.table.filter!.limit = data.size\n this.onTableHeaderAction('refresh', {\n event: 'page-size-change',\n ...data,\n })\n },\n ],\n [\n 'current-page-change',\n () => {\n this.table.filter!.page = data.page\n this.onTableHeaderAction('refresh', {\n event: 'current-page-change',\n ...data,\n })\n },\n ],\n [\n 'sort-change',\n () => {\n let newOrder: string | undefined\n if (data.prop && data.order) {\n newOrder = data.prop + ',' + data.order\n }\n if (newOrder != this.table.filter!.order) {\n this.table.filter!.order = newOrder\n this.onTableHeaderAction('refresh', {\n event: 'sort-change',\n ...data,\n })\n }\n },\n ],\n [\n 'edit',\n () => {\n this.toggleForm('Edit', [data.row[this.table.pk!]])\n },\n ],\n [\n 'delete',\n () => {\n this.postDel([data.row[this.table.pk!]])\n },\n ],\n [\n 'field-change',\n () => {\n if (data.field.render == 'switch') {\n if (!data.row || !data.field.prop) return\n if (Object.keys(data.row).length === 0) {\n // return\n }\n if (!this.runBefore('api', { name: 'fieldChange' })) return\n data.row.loading = true\n this.api\n .postData('edit', {\n [this.table.pk!]: data.row[this.table.pk!],\n [data.field.prop]: data.value,\n })\n .then(() => {\n data.row.loading = false\n data.row[data.field.prop] = data.value\n })\n .catch(() => {\n data.row.loading = false\n })\n }\n },\n ],\n [\n 'com-search',\n () => {\n this.table.filter!.search = data as comSearchData[]\n this.onTableHeaderAction('refresh', {\n event: 'com-search',\n data,\n })\n },\n ],\n [\n 'default',\n () => {\n this.buttonCallback(event, data)\n },\n ],\n ])\n\n const action = actionFun.get(event) || actionFun.get('default')\n action!.call(this)\n return this.runAfter('onTableAction', { event, data })\n }\n\n // 删除\n postDel = (ids: number[]) => {\n if (!this.runBefore('api', { name: 'postDel' })) return\n if (!this.runBefore('postDel', { ids })) return\n this.api.del(ids).then((res) => {\n this.onTableHeaderAction('refresh', {})\n this.runAfter('postDel', { res })\n })\n }\n\n /**\n * 双击表格\n * @param row 行数据\n * @param column 列上下文数据\n */\n onTableDblclick = (row: TableRow, column: TableColumnCtx<TableRow>) => {\n if (\n !this.table.dblClickNotEditColumn!.includes('all') &&\n !this.table.dblClickNotEditColumn!.includes(column.property)\n ) {\n if (!this.runBefore('onTableDblclick', { row, column })) return\n this.toggleForm('Edit', [row[this.table.pk!]])\n this.runAfter('onTableDblclick', { row, column })\n }\n }\n\n exportCsv = () => {\n const header = this.table.column\n const headerMap = new Map(\n header\n .filter((item) => item !== undefined && item.label !== undefined && item.export)\n .map((item) => [item.label, item.prop])\n )\n const headerLabels = Array.from(headerMap.keys())\n function jsonToCsv(data: any) {\n let csvContent = headerLabels.join(',') + '\\n'\n data.forEach((row: any) => {\n const line: string[] = []\n headerLabels.forEach((label: string) => {\n const prop: any = headerMap.get(label)\n let value = ''\n if (prop && prop.indexOf('.') > -1) {\n const fieldNameArr = prop.split('.')\n value = row[fieldNameArr[0]] || {}\n for (let index = 1; index < fieldNameArr.length; index++) {\n value = value ? value[fieldNameArr[index]] ?? '' : ''\n }\n } else {\n value = String(row[prop])\n }\n line.push(`\"${value.replace(/\"/g, '\"\"').replace(/[\\n\\r]/g, ' ')}\"`)\n })\n csvContent += line.join(',') + '\\n'\n })\n return csvContent\n }\n\n function downloadCsv(csvContent: string, fileName: string) {\n const link = document.createElement('a')\n link.setAttribute('href', 'data:text/csv;charset=utf-8,' + encodeURIComponent(csvContent))\n link.setAttribute('download', fileName + '.csv')\n document.body.appendChild(link)\n link.click()\n document.body.removeChild(link)\n }\n const csvStr = jsonToCsv(this.table.selection)\n downloadCsv(csvStr, 'export_data')\n }\n\n /**\n * 打开表单\n * @param operate 操作:Add=添加,Edit=编辑\n * @param operateIds 被操作项的数组:Add=[],Edit=[1,2,...]\n */\n toggleForm = (operate = '', operateIds: number[] = []) => {\n if (operate === 'Edit') {\n this.form.edit_id = operateIds[0]\n operateIds.splice(0, 1)\n this.form.operateIds = operateIds\n } else {\n this.form.edit_id = 0\n }\n if (!this.runBefore('api', { name: 'toggleForm' })) return\n this.api\n .form(this.form.edit_id)\n .then((res) => {\n this.form.ref.setFormData(res.data)\n this.form.ref.show()\n })\n .catch((res) => {\n console.log('catch', res)\n })\n }\n\n onSubmit = () => {\n if (this.form.operateIds!.length > 0) {\n this.toggleForm('Edit', this.form.operateIds)\n }\n this.getIndex()\n }\n\n /**\n * 排序\n */\n dragSort = () => {\n const buttonsKey = getArrayKey(this.table.column, 'render', 'buttons')\n if (buttonsKey === false) return\n const moveButton = getArrayKey(this.table.column[buttonsKey]?.buttons, 'render', 'moveButton')\n if (moveButton === false) return\n\n if (!this.table.ref) {\n console.warn(\n 'Failed to initialize drag sort because table ref is not defined. Please assign table ref when onMounted'\n )\n return\n }\n const el = this.table.ref.$el.querySelector('.el-table__body-wrapper .el-table__body tbody')\n const disabledTip = this.table.column[buttonsKey].buttons![moveButton].disabledTip\n Sortable.create(el, {\n animation: 200,\n handle: '.table-row-weigh-sort',\n ghostClass: 'ba-table-row',\n onStart: () => {\n this.table.column[buttonsKey].buttons![moveButton].disabledTip = true\n },\n onEnd: (evt: Sortable.SortableEvent) => {\n this.table.column[buttonsKey].buttons![moveButton].disabledTip = disabledTip\n // 找到对应行id\n const moveRow = findIndexRow(this.table.data!, evt.oldIndex!) as TableRow\n const replaceRow = findIndexRow(this.table.data!, evt.newIndex!) as TableRow\n if (\n this.table.dragSortLimitField &&\n moveRow[this.table.dragSortLimitField] != replaceRow[this.table.dragSortLimitField]\n ) {\n this.onTableHeaderAction('refresh', {})\n ElNotification({\n type: 'error',\n message: 'utils.The moving position is beyond the movable range!',\n })\n return\n }\n\n this.api.sortableApi(moveRow[this.table.pk!], replaceRow[this.table.pk!]).finally(() => {\n this.onTableHeaderAction('refresh', {})\n })\n },\n })\n }\n\n /**\n * 表格顶栏按钮事件统一响应\n * @param event 事件:refresh=刷新,edit=编辑,delete=删除,quick-search=快速查询,unfold=折叠/展开,change-show-column=调整列显示状态\n * @param data 携带数据\n */\n onTableHeaderAction = (event: string, data?: anyObj) => {\n if (!this.runBefore('onTableHeaderAction', { event, data })) return\n const actionFun = new Map([\n [\n 'refresh',\n () => {\n // 刷新表格在大多数情况下无需置空 data,但任需防范表格列组件的 :key 不会被更新的问题,比如关联表的数据列\n this.table.data = []\n this.getIndex()\n },\n ],\n [\n 'add',\n () => {\n this.toggleForm('Add')\n },\n ],\n [\n 'export_csv',\n () => {\n this.exportCsv()\n },\n ],\n [\n 'edit',\n () => {\n this.toggleForm('Edit', this.getSelectionIds())\n },\n ],\n [\n 'delete',\n () => {\n this.postDel(this.getSelectionIds())\n },\n ],\n [\n 'unfold',\n () => {\n if (!this.table.ref) {\n console.warn(\n 'Collapse/expand failed because table ref is not defined. Please assign table ref when onMounted'\n )\n return\n }\n this.table.expandAll = data!.unfold\n this.table.ref.unFoldAll(data!.unfold)\n },\n ],\n [\n 'quick-search',\n () => {\n this.onTableHeaderAction('refresh', {\n event: 'quick-search',\n ...data,\n })\n },\n ],\n [\n 'change-show-column',\n () => {\n const columnKey = getArrayKey(this.table.column, 'prop', data!.field)\n this.table.column[columnKey].show = data!.value\n if (this.url) {\n const key = this.url + 'show_column'\n const cachedData = storage.get(key) || '{}'\n const cachedTableData = JSON.parse(cachedData)\n cachedTableData[data!.field] = data!.value\n storage.set(key, JSON.stringify(cachedTableData))\n }\n },\n ],\n [\n 'default',\n () => {\n console.warn('No action defined')\n },\n ],\n [\n 'recycle',\n () => {\n this.showRecycle()\n },\n ],\n [\n 'quick-recycle-search',\n () => {\n this.onTableHeaderAction('refreshRecycle', {\n event: 'refreshRecycle',\n ...data,\n })\n },\n ],\n [\n 'refreshRecycle',\n () => {\n // 刷新表格在大多数情况下无需置空 data,但任需防范表格列组件的 :key 不会被更新的问题,比如关联表的数据列\n this.recycleTable.data = []\n this.getRecycleIndex()\n },\n ],\n ])\n\n const action = actionFun.get(event) || actionFun.get('default')\n action!.call(this)\n return this.runAfter('onTableHeaderAction', { event, data })\n }\n\n /**\n * 通用搜索初始化\n * @param query 要搜索的数据\n */\n initComSearch = (query: anyObj = {}) => {\n const form: anyObj = {}\n const field = this.table.column\n\n if (field.length <= 0) {\n return\n }\n\n for (const key in field) {\n if (field[key].operator === false) {\n continue\n }\n const prop = field[key].prop\n if (typeof field[key].operator === 'undefined') {\n field[key].operator = 'eq'\n }\n if (prop) {\n if (field[key].operator == 'RANGE' || field[key].operator == 'NOT RANGE') {\n form[prop] = ''\n form[prop + '-start'] = ''\n form[prop + '-end'] = ''\n } else if (field[key].operator == 'NULL' || field[key].operator == 'NOT NULL') {\n form[prop] = false\n } else {\n form[prop] = ''\n }\n\n // 初始化来自query中的默认值\n if (this.table.acceptQuery && typeof query[prop] !== 'undefined') {\n const queryProp = (query[prop] as string) ?? ''\n if (field[key].operator == 'RANGE' || field[key].operator == 'NOT RANGE') {\n const range = queryProp.split(',')\n if (field[key].render == 'datetime') {\n if (range && range.length >= 2) {\n form[prop + '-default'] = [new Date(range[0]), new Date(range[1])]\n }\n } else {\n form[prop + '-start'] = range[0] ?? ''\n form[prop + '-end'] = range[1] ?? ''\n }\n } else if (field[key].operator == 'NULL' || field[key].operator == 'NOT NULL') {\n form[prop] = !!queryProp\n } else if (field[key].render == 'datetime') {\n form[prop + '-default'] = new Date(queryProp)\n } else {\n form[prop] = queryProp\n }\n }\n\n this.comSearch.fieldData.set(prop, {\n operator: field[key].operator,\n render: field[key].render,\n comSearchRender: field[key].comSearchRender,\n })\n }\n }\n\n // 接受query再搜索\n if (this.table.acceptQuery) {\n const comSearchData: comSearchData[] = []\n for (const key in query) {\n const fieldDataTemp = this.comSearch.fieldData.get(key)\n if (fieldDataTemp) {\n comSearchData.push({\n field: key,\n val: query[key] as string,\n operator: fieldDataTemp.operator,\n render: fieldDataTemp.render,\n })\n }\n }\n this.table.filter!.search = comSearchData\n }\n\n this.comSearch.form = Object.assign(this.comSearch.form, form)\n }\n}\n"],"names":[],"mappings":";;;;;;AAOA,MAAqB,OAAQ,CAAA;AAAA,EACpB,GAAA,CAAA;AAAA,EAEA,GAAA,CAAA;AAAA,EAEA,cAAA,CAAA;AAAA,EAEA,QAAiB,QAAS,CAAA;AAAA,IAC/B,GAAK,EAAA,KAAA,CAAA;AAAA,IACL,EAAI,EAAA,IAAA;AAAA,IACJ,MAAM,EAAC;AAAA,IACP,MAAQ,EAAA,IAAA;AAAA,IACR,OAAS,EAAA,IAAA;AAAA,IACT,aAAe,EAAA,IAAA;AAAA,IACf,WAAW,EAAC;AAAA,IACZ,QAAQ,EAAC;AAAA,IACT,KAAO,EAAA,CAAA;AAAA,IACP,QAAQ,EAAC;AAAA,IACT,kBAAoB,EAAA,KAAA;AAAA,IACpB,WAAa,EAAA,IAAA;AAAA,IACb,aAAe,EAAA,KAAA;AAAA,IACf,qBAAA,EAAuB,CAAC,KAAS,CAAA,CAAA;AAAA,IACjC,SAAW,EAAA,KAAA;AAAA,IACX,QAAQ,EAAC;AAAA,GACV,CAAA,CAAA;AAAA;AAAA,EAGM,MAAA,CAAA;AAAA;AAAA,EAGA,KAAA,CAAA;AAAA,EAEA,OAAe,QAAS,CAAA;AAAA,IAC7B,GAAK,EAAA,KAAA,CAAA;AAAA,IACL,YAAY,EAAC;AAAA;AAAA,IACb,OAAS,EAAA,CAAA;AAAA,GACV,CAAA,CA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AG,CAAE,CAAA,MAAA;AAAA,UACnB,eAAA,EAAiB,KAAM,CAAA,GAAG,CAAE,CAAA,eAAA;AAAA,SAC7B,CAAA,CAAA;AAAA,OACH;AAAA,KACF;AAGA,IAAI,IAAA,IAAA,CAAK,MAAM,WAAa,EAAA;AAC1B,MAAA,MAAM,gBAAiC,EAAC,CAAA;AACxC,MAAA,KAAA,MAAW,OAAO,KAAO,EAAA;AACvB,QAAA,MAAM,aAAgB,GAAA,IAAA,CAAK,SAAU,CAAA,SAAA,CAAU,IAAI,GAAG,CAAA,CAAA;AACtD,QAAA,IAAI,aAAe,EAAA;AACjB,UAAA,aAAA,CAAc,IAAK,CAAA;AAAA,YACjB,KAAO,EAAA,GAAA;AAAA,YACP,GAAA,EAAK,MAAM,GAAG,CAAA;AAAA,YACd,UAAU,aAAc,CAAA,QAAA;AAAA,YACxB,QAAQ,aAAc,CAAA,MAAA;AAAA,WACvB,CAAA,CAAA;AAAA,SACH;AAAA,OACF;AACA,MAAK,IAAA,CAAA,KAAA,CAAM,OAAQ,MAAS,GAAA,aAAA,CAAA;AAAA,KAC9B;AAEA,IAAA,IAAA,CAAK,UAAU,IAAO,GAAA,MAAA,CAAO,OAAO,IAAK,CAAA,SAAA,CAAU,MAAM,IAAI,CAAA,CAAA;AAAA,GAC/D,CAAA;AACF;;;;"}
|
1
|
+
{"version":3,"file":"dkTable.mjs","sources":["../../../src/table/utils/dkTable.ts"],"sourcesContent":["import { findIndexRow, getArrayKey, storage } from '@vipl520/utils'\nimport { reactive } from 'vue'\nimport Sortable from 'sortablejs'\nimport { ElNotification } from 'element-plus'\nimport type { TableColumnCtx } from 'element-plus'\nimport { dkTableApi } from './dkTableApi'\n// import { DkTable } from '../../../types/table'\nexport default class dkTable {\n public url\n\n public api: dkTableApi\n\n public buttonCallback: (event: string, data: any) => void\n\n public table: DkTable = reactive({\n ref: undefined,\n pk: 'id',\n data: [],\n remark: null,\n loading: true,\n columnLoading: true,\n selection: [],\n column: [],\n total: 0,\n filter: {},\n dragSortLimitField: 'pid',\n acceptQuery: true,\n showComSearch: false,\n dblClickNotEditColumn: [undefined],\n expandAll: false,\n extend: {},\n })\n\n // BaTable前置处理函数列表(前置埋点)\n public before: BaTableBefore\n\n // BaTable后置处理函数列表(后置埋点)\n public after: BaTableAfter\n\n public form: DkForm = reactive({\n ref: undefined,\n operateIds: [], // 被编辑的IDs\n edit_id: 0,\n })\n\n public recycleTable: RecycleTable = reactive({\n ref: undefined,\n pk: 'id',\n data: [],\n loading: true,\n columnLoading: true,\n selection: [],\n column: [],\n total: 0,\n filter: {},\n showDialog: false,\n showDialogLoading: false,\n dragSortLimitField: 'pid',\n acceptQuery: true,\n showComSearch: false,\n dblClickNotEditColumn: [undefined],\n expandAll: false,\n extend: {},\n })\n\n // 通用搜索数据\n public comSearch: ComSearch = reactive({\n form: {},\n fieldData: new Map(),\n })\n\n constructor(url: string, before: BaTableBefore = {}, after: BaTableAfter = {}, query: Object) {\n this.url = url\n // eslint-disable-next-line new-cap\n this.api = new dkTableApi(url, query)\n this.before = before\n this.after = after\n this.buttonCallback = (event, data) => {\n console.warn('请调用onClickButton((event,data)=>{})', event, data)\n }\n }\n\n /**\n * 表格内部鉴权方法\n * 此方法在表头或表行组件内部自动调用,传递权限节点名,如:add、edit\n * 若需自定义表格内部鉴权,重写此方法即可\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n auth(node: string) {\n // return auth(node)\n // TODO\n return true\n }\n\n /**\n * 运行前置函数\n * @param funName 函数名\n * @param args 参数\n */\n runBefore(funName: string, args: any = {}) {\n if (this.before && this.before[funName] && typeof this.before[funName] === 'function') {\n return this.before[funName]!({ ...args }) !== false\n }\n return true\n }\n\n /**\n * 运行后置函数\n * @param funName 函数名\n * @param args 参数\n */\n runAfter(funName: string, args: any = {}) {\n if (this.after && this.after[funName] && typeof this.after[funName] === 'function') {\n return this.after[funName]!({ ...args }) !== false\n }\n return true\n }\n\n getIndex = () => {\n if (!this.runBefore('api', { name: 'getIndex' })) return\n if (!this.runBefore('getIndex')) return\n this.table.loading = true\n return this.api\n .index(this.table.filter)\n .then((res) => {\n this.table.data = res.data.list\n this.table.total = res.data.total\n this.runAfter('getIndex', { res })\n })\n .finally(() => {\n this.table.loading = false\n })\n .catch(() => {})\n }\n\n getTable = (cache = false) => {\n if (!this.runBefore('api', { name: 'getTable' })) return\n if (!this.runBefore('getTable')) return\n\n this.table.columnLoading = true\n // 如果允许使用缓存\n if (cache) {\n // 尝试从 localStorage 获取缓存数据\n const cachedData = storage.get(this.api.actionUrl.get('table') + '_table')\n\n // 如果缓存存在且有效,使用缓存数据\n if (cachedData) {\n const cachedTableData = JSON.parse(cachedData)\n this.table.column = cachedTableData.column\n this.table.columnLoading = false // 加载完成\n this.runAfter('getTable', { res: cachedTableData }) // 使用缓存数据作为响应\n return Promise.resolve(cachedTableData) // 返回一个已解决的 Promise\n }\n }\n // 缓存不存在或不使用缓存时,调用 API\n return this.api\n .table()\n .then((res) => {\n this.table.column = res.data.column\n if (res.data.pk) {\n this.table.pk = res.data.pk\n }\n // 如果允许缓存,将数据存储到 localStorage\n storage.set(this.api.actionUrl.get('table') + '_table', JSON.stringify(res.data))\n this.runAfter('getTable', { res })\n })\n .finally(() => {\n this.table.columnLoading = false\n })\n .catch(() => {})\n }\n\n /**\n * 显示回收站\n */\n async showRecycle() {\n if (!this.runBefore('showRecycleTable')) return\n this.recycleTable.showDialogLoading = true\n if (this.recycleTable.column.length <= 0) {\n await this.getRecycleTable()\n }\n await this.getRecycleIndex()\n this.recycleTable.showDialog = true\n this.recycleTable.showDialogLoading = false\n }\n\n /**\n * 获取回收站列表\n */\n getRecycleIndex = () => {\n if (!this.runBefore('api', { name: 'getRecycleIndex' })) return\n if (!this.runBefore('getRecycleIndex')) return\n this.recycleTable.loading = true\n return this.api\n .recycle(this.recycleTable.filter)\n .then((res) => {\n this.recycleTable.data = res.data.list\n this.recycleTable.total = res.data.total\n })\n .finally(() => {\n this.recycleTable.loading = false\n })\n }\n\n /**\n * 获取回收站表格\n * @param cache\n */\n getRecycleTable = (cache = false) => {\n if (!this.runBefore('api', { name: 'getRecycleTable' })) return\n if (!this.runBefore('getRecycleTable')) return\n\n this.recycleTable.columnLoading = true\n\n // 如果允许使用缓存\n if (cache) {\n // 尝试从 localStorage 获取缓存数据\n const cachedData = storage.get(this.url + '_recycleTable')\n\n // 如果缓存存在且有效,使用缓存数据\n if (cachedData) {\n const cachedTableData = JSON.parse(cachedData)\n this.recycleTable.column = cachedTableData.column\n this.recycleTable.columnLoading = false // 加载完成\n return Promise.resolve(cachedTableData) // 返回一个已解决的 Promise\n }\n } else {\n // 缓存不存在或不使用缓存时,调用 API\n return this.api\n .recycleTable()\n .then((res) => {\n this.recycleTable.column = res.data.column\n // 如果允许缓存,将数据存储到 localStorage\n // if (cache) {\n storage.set(this.url + '_recycleTable', JSON.stringify(res.data))\n // }\n })\n .finally(() => {\n this.recycleTable.columnLoading = false\n })\n }\n }\n\n /**\n * 获取表格选择项的id数组\n */\n getSelectionIds(): number[] {\n const ids: number[] = []\n this.table.selection?.forEach((item) => {\n ids.push(item[this.table.pk!])\n })\n return ids\n }\n\n onClickButton(callback: (event: string, data: any) => void) {\n this.buttonCallback = callback\n }\n\n /**\n * 表格内的事件统一响应\n * @param event 事件:selection-change=选中项改变,page-size-change=每页数量改变,current-page-change=翻页,sort-change=排序,edit=编辑,delete=删除,field-change=单元格值改变,com-search=公共搜索\n * @param data 携带数据\n */\n onTableAction = (event: string, data: anyObj) => {\n if (!this.runBefore('onTableAction', { event, data })) return\n const actionFun = new Map([\n [\n 'selection-change',\n () => {\n this.table.selection = data as TableRow[]\n },\n ],\n [\n 'selection-recycle-change',\n () => {\n this.recycleTable.selection = data as TableRow[]\n },\n ],\n [\n 'page-size-change',\n () => {\n this.table.filter!.limit = data.size\n this.onTableHeaderAction('refresh', {\n event: 'page-size-change',\n ...data,\n })\n },\n ],\n [\n 'current-page-change',\n () => {\n this.table.filter!.page = data.page\n this.onTableHeaderAction('refresh', {\n event: 'current-page-change',\n ...data,\n })\n },\n ],\n [\n 'sort-change',\n () => {\n let newOrder: string | undefined\n if (data.prop && data.order) {\n newOrder = data.prop + ',' + data.order\n }\n if (newOrder != this.table.filter!.order) {\n this.table.filter!.order = newOrder\n this.onTableHeaderAction('refresh', {\n event: 'sort-change',\n ...data,\n })\n }\n },\n ],\n [\n 'edit',\n () => {\n this.toggleForm('Edit', [data.row[this.table.pk!]])\n },\n ],\n [\n 'delete',\n () => {\n this.postDel([data.row[this.table.pk!]])\n },\n ],\n [\n 'field-change',\n () => {\n if (data.field.render == 'switch') {\n if (!data.row || !data.field.prop) return\n if (Object.keys(data.row).length === 0) {\n // return\n }\n if (!this.runBefore('api', { name: 'fieldChange' })) return\n data.row.loading = true\n this.api\n .postData('edit', {\n [this.table.pk!]: data.row[this.table.pk!],\n [data.field.prop]: data.value,\n })\n .then(() => {\n data.row.loading = false\n data.row[data.field.prop] = data.value\n })\n .catch(() => {\n data.row.loading = false\n })\n }\n },\n ],\n [\n 'com-search',\n () => {\n this.table.filter!.search = data as comSearchData[]\n this.onTableHeaderAction('refresh', {\n event: 'com-search',\n data,\n })\n },\n ],\n [\n 'default',\n () => {\n this.buttonCallback(event, data)\n },\n ],\n ])\n\n const action = actionFun.get(event) || actionFun.get('default')\n action!.call(this)\n return this.runAfter('onTableAction', { event, data })\n }\n\n // 删除\n postDel = (ids: number[]) => {\n if (!this.runBefore('api', { name: 'postDel' })) return\n if (!this.runBefore('postDel', { ids })) return\n this.api.del(ids).then((res) => {\n this.onTableHeaderAction('refresh', {})\n this.runAfter('postDel', { res })\n })\n }\n\n /**\n * 双击表格\n * @param row 行数据\n * @param column 列上下文数据\n */\n onTableDblclick = (row: TableRow, column: TableColumnCtx<TableRow>) => {\n if (\n !this.table.dblClickNotEditColumn!.includes('all') &&\n !this.table.dblClickNotEditColumn!.includes(column.property)\n ) {\n if (!this.runBefore('onTableDblclick', { row, column })) return\n this.toggleForm('Edit', [row[this.table.pk!]])\n this.runAfter('onTableDblclick', { row, column })\n }\n }\n\n exportCsv = () => {\n const header = this.table.column\n const headerMap = new Map(\n header\n .filter((item) => item !== undefined && item.label !== undefined && item.export)\n .map((item) => [item.label, item.prop])\n )\n const headerLabels = Array.from(headerMap.keys())\n function jsonToCsv(data: any) {\n let csvContent = headerLabels.join(',') + '\\n'\n data.forEach((row: any) => {\n const line: string[] = []\n headerLabels.forEach((label: string) => {\n const prop: any = headerMap.get(label)\n let value = ''\n if (prop && prop.indexOf('.') > -1) {\n const fieldNameArr = prop.split('.')\n value = row[fieldNameArr[0]] || {}\n for (let index = 1; index < fieldNameArr.length; index++) {\n value = value ? value[fieldNameArr[index]] ?? '' : ''\n }\n } else {\n value = String(row[prop])\n }\n line.push(`\"${value.replace(/\"/g, '\"\"').replace(/[\\n\\r]/g, ' ')}\"`)\n })\n csvContent += line.join(',') + '\\n'\n })\n return csvContent\n }\n\n function downloadCsv(csvContent: string, fileName: string) {\n const link = document.createElement('a')\n link.setAttribute('href', 'data:text/csv;charset=utf-8,' + encodeURIComponent(csvContent))\n link.setAttribute('download', fileName + '.csv')\n document.body.appendChild(link)\n link.click()\n document.body.removeChild(link)\n }\n const csvStr = jsonToCsv(this.table.selection)\n downloadCsv(csvStr, 'export_data')\n }\n\n /**\n * 打开表单\n * @param operate 操作:Add=添加,Edit=编辑\n * @param operateIds 被操作项的数组:Add=[],Edit=[1,2,...]\n */\n toggleForm = (operate = '', operateIds: number[] = []) => {\n if (operate === 'Edit') {\n this.form.edit_id = operateIds[0]\n operateIds.splice(0, 1)\n this.form.operateIds = operateIds\n } else {\n this.form.edit_id = 0\n }\n if (!this.runBefore('api', { name: 'toggleForm' })) return\n this.api\n .form(this.form.edit_id)\n .then((res) => {\n this.form.ref.setFormData(res.data)\n this.form.ref.show()\n })\n .catch((res) => {\n console.log('catch', res)\n })\n }\n\n onSubmit = () => {\n if (this.form.operateIds!.length > 0) {\n this.toggleForm('Edit', this.form.operateIds)\n }\n this.getIndex()\n }\n\n /**\n * 排序\n */\n dragSort = () => {\n const buttonsKey = getArrayKey(this.table.column, 'render', 'buttons')\n if (buttonsKey === false) return\n const moveButton = getArrayKey(this.table.column[buttonsKey]?.buttons, 'render', 'moveButton')\n if (moveButton === false) return\n\n if (!this.table.ref) {\n console.warn(\n 'Failed to initialize drag sort because table ref is not defined. Please assign table ref when onMounted'\n )\n return\n }\n const el = this.table.ref.$el.querySelector('.el-table__body-wrapper .el-table__body tbody')\n const disabledTip = this.table.column[buttonsKey].buttons![moveButton].disabledTip\n Sortable.create(el, {\n animation: 200,\n handle: '.table-row-weigh-sort',\n ghostClass: 'ba-table-row',\n onStart: () => {\n this.table.column[buttonsKey].buttons![moveButton].disabledTip = true\n },\n onEnd: (evt: Sortable.SortableEvent) => {\n this.table.column[buttonsKey].buttons![moveButton].disabledTip = disabledTip\n // 找到对应行id\n const moveRow = findIndexRow(this.table.data!, evt.oldIndex!) as TableRow\n const replaceRow = findIndexRow(this.table.data!, evt.newIndex!) as TableRow\n if (\n this.table.dragSortLimitField &&\n moveRow[this.table.dragSortLimitField] != replaceRow[this.table.dragSortLimitField]\n ) {\n this.onTableHeaderAction('refresh', {})\n ElNotification({\n type: 'error',\n message: 'utils.The moving position is beyond the movable range!',\n })\n return\n }\n\n this.api.sortableApi(moveRow[this.table.pk!], replaceRow[this.table.pk!]).finally(() => {\n this.onTableHeaderAction('refresh', {})\n })\n },\n })\n }\n\n /**\n * 表格顶栏按钮事件统一响应\n * @param event 事件:refresh=刷新,edit=编辑,delete=删除,quick-search=快速查询,unfold=折叠/展开,change-show-column=调整列显示状态\n * @param data 携带数据\n */\n onTableHeaderAction = (event: string, data?: anyObj) => {\n if (!this.runBefore('onTableHeaderAction', { event, data })) return\n const actionFun = new Map([\n [\n 'refresh',\n () => {\n // 刷新表格在大多数情况下无需置空 data,但任需防范表格列组件的 :key 不会被更新的问题,比如关联表的数据列\n this.table.data = []\n this.getIndex()\n },\n ],\n [\n 'add',\n () => {\n this.toggleForm('Add')\n },\n ],\n [\n 'export_csv',\n () => {\n this.exportCsv()\n },\n ],\n [\n 'edit',\n () => {\n this.toggleForm('Edit', this.getSelectionIds())\n },\n ],\n [\n 'delete',\n () => {\n this.postDel(this.getSelectionIds())\n },\n ],\n [\n 'unfold',\n () => {\n if (!this.table.ref) {\n console.warn(\n 'Collapse/expand failed because table ref is not defined. Please assign table ref when onMounted'\n )\n return\n }\n this.table.expandAll = data!.unfold\n this.table.ref.unFoldAll(data!.unfold)\n },\n ],\n [\n 'quick-search',\n () => {\n this.onTableHeaderAction('refresh', {\n event: 'quick-search',\n ...data,\n })\n },\n ],\n [\n 'change-show-column',\n () => {\n const columnKey = getArrayKey(this.table.column, 'prop', data!.field)\n this.table.column[columnKey].show = data!.value\n if (this.url) {\n const key = this.url + 'show_column'\n const cachedData = storage.get(key) || '{}'\n const cachedTableData = JSON.parse(cachedData)\n cachedTableData[data!.field] = data!.value\n storage.set(key, JSON.stringify(cachedTableData))\n }\n },\n ],\n [\n 'default',\n () => {\n console.warn('No action defined')\n },\n ],\n [\n 'recycle',\n () => {\n this.showRecycle()\n },\n ],\n [\n 'quick-recycle-search',\n () => {\n this.onTableHeaderAction('refreshRecycle', {\n event: 'refreshRecycle',\n ...data,\n })\n },\n ],\n [\n 'refreshRecycle',\n () => {\n // 刷新表格在大多数情况下无需置空 data,但任需防范表格列组件的 :key 不会被更新的问题,比如关联表的数据列\n this.recycleTable.data = []\n this.getRecycleIndex()\n },\n ],\n ])\n\n const action = actionFun.get(event) || actionFun.get('default')\n action!.call(this)\n return this.runAfter('onTableHeaderAction', { event, data })\n }\n\n /**\n * 通用搜索初始化\n * @param query 要搜索的数据\n */\n initComSearch = (query: anyObj = {}) => {\n const form: anyObj = {}\n const field = this.table.column\n\n if (field.length <= 0) {\n return\n }\n\n for (const key in field) {\n if (field[key].operator === false) {\n continue\n }\n const prop = field[key].prop\n if (typeof field[key].operator === 'undefined') {\n field[key].operator = 'eq'\n }\n if (prop) {\n if (field[key].operator == 'RANGE' || field[key].operator == 'NOT RANGE') {\n form[prop] = ''\n form[prop + '-start'] = ''\n form[prop + '-end'] = ''\n } else if (field[key].operator == 'NULL' || field[key].operator == 'NOT NULL') {\n form[prop] = false\n } else {\n form[prop] = ''\n }\n\n // 初始化来自query中的默认值\n if (this.table.acceptQuery && typeof query[prop] !== 'undefined') {\n const queryProp = (query[prop] as string) ?? ''\n if (field[key].operator == 'RANGE' || field[key].operator == 'NOT RANGE') {\n const range = queryProp.split(',')\n if (field[key].render == 'datetime') {\n if (range && range.length >= 2) {\n form[prop + '-default'] = [new Date(range[0]), new Date(range[1])]\n }\n } else {\n form[prop + '-start'] = range[0] ?? ''\n form[prop + '-end'] = range[1] ?? ''\n }\n } else if (field[key].operator == 'NULL' || field[key].operator == 'NOT NULL') {\n form[prop] = !!queryProp\n } else if (field[key].render == 'datetime') {\n form[prop + '-default'] = new Date(queryProp)\n } else {\n form[prop] = queryProp\n }\n }\n\n this.comSearch.fieldData.set(prop, {\n operator: field[key].operator,\n render: field[key].render,\n comSearchRender: field[key].comSearchRender,\n })\n }\n }\n\n // 接受query再搜索\n if (this.table.acceptQuery) {\n const comSearchData: comSearchData[] = []\n for (const key in query) {\n const fieldDataTemp = this.comSearch.fieldData.get(key)\n if (fieldDataTemp) {\n comSearchData.push({\n field: key,\n val: query[key] as string,\n operator: fieldDataTemp.operator,\n render: fieldDataTemp.render,\n })\n }\n }\n this.table.filter!.search = comSearchData\n }\n\n this.comSearch.form = Object.assign(this.comSearch.form, form)\n }\n}\n"],"names":[],"mappings":";;;;;;AAOA,MAAqB,OAAQ,CAAA;AAAA,EACpB,GAAA,CAAA;AAAA,EAEA,GAAA,CAAA;AAAA,EAEA,cAAA,CAAA;AAAA,EAEA,QAAiB,QAAS,CAAA;AAAA,IAC/B,GAAK,EAAA,KAAA,CAAA;AAAA,IACL,EAAI,EAAA,IAAA;AAAA,IACJ,MAAM,EAAC;AAAA,IACP,MAAQ,EAAA,IAAA;AAAA,IACR,OAAS,EAAA,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A,CAAA;AAAA,KAC9B;AAEA,IAAA,IAAA,CAAK,UAAU,IAAO,GAAA,MAAA,CAAO,OAAO,IAAK,CAAA,SAAA,CAAU,MAAM,IAAI,CAAA,CAAA;AAAA,GAC/D,CAAA;AACF;;;;"}
|
@@ -2,7 +2,9 @@ export declare class dkTableApi {
|
|
2
2
|
private controllerUrl;
|
3
3
|
actionUrl: Map<string, string>;
|
4
4
|
private requestConfig;
|
5
|
-
constructor(controllerUrl: string);
|
5
|
+
constructor(controllerUrl: string, query: Object);
|
6
|
+
private buildFullUrl;
|
7
|
+
objectToQuery(obj: any): string;
|
6
8
|
/**
|
7
9
|
* 配置request参数
|
8
10
|
* @param config 包含HTTP方法、请求头等额外参数的对象
|
@@ -5,31 +5,40 @@ class dkTableApi {
|
|
5
5
|
actionUrl;
|
6
6
|
requestConfig = {};
|
7
7
|
// 新增:用于存储配置的request参数
|
8
|
-
constructor(controllerUrl) {
|
8
|
+
constructor(controllerUrl, query) {
|
9
|
+
const qStr = this.objectToQuery(query);
|
10
|
+
console.log("queryStr", qStr);
|
9
11
|
if (!controllerUrl.endsWith("/")) {
|
10
12
|
controllerUrl += "/";
|
11
13
|
}
|
12
14
|
this.controllerUrl = controllerUrl;
|
13
15
|
this.actionUrl = /* @__PURE__ */ new Map([
|
14
|
-
["index", controllerUrl + "index"],
|
15
|
-
["add", controllerUrl + "add"],
|
16
|
-
["edit", controllerUrl + "edit"],
|
17
|
-
["del", controllerUrl + "del"],
|
18
|
-
["sortable", controllerUrl + "sortable"],
|
19
|
-
["table", controllerUrl + "table"],
|
16
|
+
["index", this.buildFullUrl(controllerUrl + "index", qStr)],
|
17
|
+
["add", this.buildFullUrl(controllerUrl + "add", qStr)],
|
18
|
+
["edit", this.buildFullUrl(controllerUrl + "edit", qStr)],
|
19
|
+
["del", this.buildFullUrl(controllerUrl + "del", qStr)],
|
20
|
+
["sortable", this.buildFullUrl(controllerUrl + "sortable", qStr)],
|
21
|
+
["table", this.buildFullUrl(controllerUrl + "table", qStr)],
|
20
22
|
// 获取表格数据
|
21
|
-
["form", controllerUrl + "form"],
|
23
|
+
["form", this.buildFullUrl(controllerUrl + "form", qStr)],
|
22
24
|
// 获取表单
|
23
|
-
["recycle", controllerUrl + "recycle"],
|
25
|
+
["recycle", this.buildFullUrl(controllerUrl + "recycle", qStr)],
|
24
26
|
// 回收站
|
25
|
-
["recycleTable", controllerUrl + "recycleTable"],
|
27
|
+
["recycleTable", this.buildFullUrl(controllerUrl + "recycleTable", qStr)],
|
26
28
|
// 回收站表格
|
27
|
-
["destroy", controllerUrl + "destroy"],
|
29
|
+
["destroy", this.buildFullUrl(controllerUrl + "destroy", qStr)],
|
28
30
|
// 回收站销毁
|
29
|
-
["restore", controllerUrl + "restore"]
|
31
|
+
["restore", this.buildFullUrl(controllerUrl + "restore", qStr)]
|
30
32
|
// 回收站还原
|
31
33
|
]);
|
32
34
|
}
|
35
|
+
// 新增方法用于构建完整的URL
|
36
|
+
buildFullUrl(baseUrl, queryStr) {
|
37
|
+
return queryStr ? `${baseUrl}?${queryStr}` : baseUrl;
|
38
|
+
}
|
39
|
+
objectToQuery(obj) {
|
40
|
+
return Object.keys(obj).map((key) => encodeURIComponent(key) + "=" + encodeURIComponent(obj[key])).join("&");
|
41
|
+
}
|
33
42
|
/**
|
34
43
|
* 配置request参数
|
35
44
|
* @param config 包含HTTP方法、请求头等额外参数的对象
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dkTableApi.mjs","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":[],"mappings":";;AAEO,MAAM,UAAW,CAAA;AAAA,EACd,aAAA,CAAA;AAAA,EACD,SAAA,CAAA;AAAA,EACC,gBAAwB,EAAC,CAAA;AAAA;AAAA,EAEjC,YAAY,aAAuB,EAAA;AACjC,IAAA,IAAI,CAAC,aAAA,CAAc,QAAS,CAAA,GAAG,CAAG,EAAA;AAChC,MAAiB,aAAA,IAAA,GAAA,CAAA;AAAA,KACnB;AACA,IAAA,IAAA,CAAK,aAAgB,GAAA,aAAA,CAAA;AACrB,IAAK,IAAA,CAAA,SAAA,uBAAgB,GAAI,CAAA;AAAA,MACvB,CAAC,OAAS,EAAA,aAAA,GAAgB,OAAO,CAAA;AAAA,MACjC,CAAC,KAAO,EAAA,aAAA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../../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":[],"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,aAAa,aAAgB,GAAA,OAAA,EAAS,IAAI,CAAC,CAAA;AAAA,MAC1D,CAAC,KAAO,EAAA,IAAA,CAAK,aAAa,aAAgB,GAAA,KAAA,EAAO,IAAI,CAAC,CAAA;AAAA,MACtD,CAAC,MAAQ,EAAA,IAAA,CAAK,aAAa,aAAgB,GAAA,MAAA,EAAQ,IAAI,CAAC,CAAA;AAAA,MACxD,CAAC,KAAO,EAAA,IAAA,CAAK,aAAa,aAAgB,GAAA,KAAA,EAAO,IAAI,CAAC,CAAA;AAAA,MACtD,CAAC,UAAY,EAAA,IAAA,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B;AAAA,KACF,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,WAAA,CAAY,IAAY,QAAkB,EAAA;AACxC,IAAO,OAAA,OAAA;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;;;;"}
|
@@ -43,7 +43,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
43
43
|
ref: DkTableRef,
|
44
44
|
"table-api": __props.item.tableUrl,
|
45
45
|
"cache-table": __props.item.cacheTable,
|
46
|
-
height: "300px"
|
46
|
+
height: "300px",
|
47
|
+
query: { _form: "url_input" },
|
48
|
+
buttons: ["refresh", "add", "export_csv", "edit", "delete", "comSearch", "quickSearch", "columnDisplay"]
|
47
49
|
}, {
|
48
50
|
cate_id_slot: withCtx(({ row }) => [
|
49
51
|
createTextVNode(
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"url-input-table.vue2.mjs","sources":["../../../src/url-input/src/url-input-table.vue"],"sourcesContent":["<template>\n <dk-table
|
1
|
+
{"version":3,"file":"url-input-table.vue2.mjs","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":[],"mappings":";;;;;;;;;;;;;;;;AAeA,IAAgB,eAAA,CAAA;AAAA,MACd,IAAM,EAAA,iBAAA;AAAA,KACP,CAAA,CAAA;AAUD,IAAA,MAAM,aAAa,GAAI,EAAA,CAAA;AACvB,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM,UAAA,EAAY,OAAO,OAAS,EAAA,KAAA,EAAO,SAAa,IAAA,EAAE,CAAA,CAAA;AAGnF,IAAA,KAAA;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,UAAU,SAAA,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/lib/group/index.d.ts
CHANGED
@@ -71,6 +71,10 @@ export declare const Group: import("@vipl520/utils").WithInstall<import("vue").D
|
|
71
71
|
default: string;
|
72
72
|
type: StringConstructor;
|
73
73
|
};
|
74
|
+
accordion: {
|
75
|
+
type: BooleanConstructor;
|
76
|
+
default: boolean;
|
77
|
+
};
|
74
78
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "itemMounted" | "remove" | "add")[], "update:modelValue" | "change" | "itemMounted" | "remove" | "add", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
75
79
|
field: {
|
76
80
|
type: StringConstructor;
|
@@ -144,6 +148,10 @@ export declare const Group: import("@vipl520/utils").WithInstall<import("vue").D
|
|
144
148
|
default: string;
|
145
149
|
type: StringConstructor;
|
146
150
|
};
|
151
|
+
accordion: {
|
152
|
+
type: BooleanConstructor;
|
153
|
+
default: boolean;
|
154
|
+
};
|
147
155
|
}>> & {
|
148
156
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
149
157
|
onChange?: ((...args: any[]) => any) | undefined;
|
@@ -169,6 +177,7 @@ export declare const Group: import("@vipl520/utils").WithInstall<import("vue").D
|
|
169
177
|
onBeforeAdd: Function;
|
170
178
|
formCreateInject: Record<string, any>;
|
171
179
|
parse: Function;
|
180
|
+
accordion: boolean;
|
172
181
|
}, {}>>;
|
173
182
|
export default Group;
|
174
183
|
export * from './src/props';
|
@@ -71,6 +71,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
71
71
|
default: string;
|
72
72
|
type: StringConstructor;
|
73
73
|
};
|
74
|
+
accordion: {
|
75
|
+
type: BooleanConstructor;
|
76
|
+
default: boolean;
|
77
|
+
};
|
74
78
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "itemMounted" | "remove" | "add")[], "update:modelValue" | "change" | "itemMounted" | "remove" | "add", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
75
79
|
field: {
|
76
80
|
type: StringConstructor;
|
@@ -144,6 +148,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
144
148
|
default: string;
|
145
149
|
type: StringConstructor;
|
146
150
|
};
|
151
|
+
accordion: {
|
152
|
+
type: BooleanConstructor;
|
153
|
+
default: boolean;
|
154
|
+
};
|
147
155
|
}>> & {
|
148
156
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
149
157
|
onChange?: ((...args: any[]) => any) | undefined;
|
@@ -169,5 +177,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
169
177
|
onBeforeAdd: Function;
|
170
178
|
formCreateInject: Record<string, any>;
|
171
179
|
parse: Function;
|
180
|
+
accordion: boolean;
|
172
181
|
}, {}>;
|
173
182
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"group.vue2.js","sources":["../../../src/group/src/group.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkGroup',\n});\n</script>\n<template>\n <div :class=\"'dk-group _fc-group ' + (disabled ? '_fc-group-disabled' : '')\">\n <el-divider v-if=\"props.title\">{{ props.title }}</el-divider>\n <div v-if=\"data.sort.length === 0\">\n <el-button :key=\"'a_def'\" style=\"width: 100%\" type=\"primary\" @click=\"add\"> 添加数据 </el-button>\n </div>\n <draggable\n tag=\"el-collapse\"\n :list=\"props.modelValue\"\n :component-data=\"collapseComponentData\"\n item-key=\"id\"\n handle=\".collapse-title-rank\"\n >\n <template #item=\"{ element, index }\">\n <el-collapse-item :title=\"element.title\" :name=\"index\">\n <template #title>\n <div class=\"collapse-title\">\n <dk-icon icon=\"Rank\" class=\"collapse-title-rank\"></dk-icon>\n <span>{{ getTitle(index) }}</span>\n </div>\n </template>\n <template #default>\n <div :key=\"index\" class=\"_dk-group-container\">\n <Type\n :key=\"index\"\n :in-for=\"true\"\n :model-value=\"getFieldValue(index)\"\n :rule=\"data.cacheRule[index].rule\"\n :option=\"data.cacheRule[index].options\"\n :extend-option=\"true\"\n @update:modelValue=\"formData(index, $event)\"\n @emit-event=\"(name: any, ...args: any) => emitEvent(name, args, index)\"\n @update:api=\"($f: any) => add$f(index, $f)\"\n />\n <div class=\"_dk-group-handle\">\n <el-button-group>\n <el-button icon=\"Plus\" plain @click=\"add\">增加</el-button>\n <el-button icon=\"Delete\" plain @click=\"del(index, index + 1)\">删除</el-button>\n </el-button-group>\n </div>\n </div>\n </template>\n </el-collapse-item>\n </template>\n </draggable>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { markRaw, nextTick, reactive, watch, onMounted } from 'vue'\nimport { deepCopy, deepExtend, hasProperty } from '../utils/utils'\nimport extend from '../utils/extend'\n// import draggable from 'vuedraggable'\nimport { groupProps } from './props'\n\n\n\nconst props = defineProps(groupProps)\nconst emit = defineEmits(['update:modelValue', 'change', 'itemMounted', 'remove', 'add'])\nconst data: any = reactive({\n len: 0,\n cacheRule: {},\n cacheValue: {},\n sort: [],\n form: markRaw(props.formCreateInject.form.$form()),\n loading: true,\n})\n\nconst collapseComponentData = reactive({\n modelValue: [0],\n})\n\nconst Type = data.form\n\nwatch(\n () => props.rule, // 侦听 rule 属性\n (n, o) => {\n // 您原来的 handler 逻辑\n Object.keys(data.cacheRule).forEach((v) => {\n const item = data.cacheRule[v]\n if (item.$f) {\n const val = item.$f.formData()\n if (n === o) {\n item.$f.deferSyncValue(() => {\n deepExtend(item.rule, n, false)\n item.$f.setValue(val)\n }, true)\n } else {\n const val = item.$f.formData()\n item.$f.once('reloading', () => {\n item.$f.setValue(val)\n })\n item.rule = deepCopy(n)\n }\n }\n })\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => props.disabled, // 侦听 disabled 属性\n (n) => {\n // 您原来的 disabled 逻辑\n if (props.syncDisabled) {\n const lst = data.cacheRule\n Object.keys(lst).forEach((k) => {\n lst[k].$f.disabled(n)\n })\n }\n }\n)\n\nwatch(\n () => props.expand, // 侦听 expand 属性\n (n) => {\n // 您原来的 expand 逻辑\n const d = n - props.modelValue.length\n if (d > 0) {\n expandRule(d)\n }\n }\n)\n\nwatch(\n () => props.modelValue, // 侦听 modelValue 属性\n (n) => {\n // 您原来的 modelValue 逻辑\n n = n || []\n const keys = Object.keys(data.cacheRule)\n const total = keys.length // 缓存数\n const len = total - n.length // 缓存数-value数\n if (len < 0) {\n for (let i = len; i < 0; i++) {\n addRule(n.length - 1, true)\n }\n for (let i = 0; i < total; i++) {\n setValue(keys[i], n[i])\n }\n } else {\n if (len > 0) {\n for (let i = 0; i < len; i++) {\n console.log('keys[total - i - 1]', keys[total - i - 1])\n removeRule(keys[total - i - 1])\n }\n }\n n.forEach((val, i) => {\n setValue(keys[i], n[i])\n })\n }\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => ({ ...data.cacheRule }),\n (n) => {\n data.sort = Object.keys(n)\n },\n { immediate: true }\n)\n\nconst getFieldValue = (index: number) => {\n if (props.field) {\n return { [props.field]: _value(props.modelValue[index]) }\n } else {\n return props.modelValue[index]\n }\n}\n\nconst getTitle = (index: number) => {\n if (data.cacheRule[index]) {\n const { rule } = data.cacheRule[index]\n const defaultField = props.titleField ? props.titleField : rule[0]?.field\n return data.cacheRule[index].$f?.getValue(defaultField) || '点击展开'\n } else {\n return '点击展开'\n }\n}\nconst _value = (v: any) => {\n return v && hasProperty(v, props.field) ? v[props.field] : v\n}\nconst cache = (k: any, val: any) => {\n data.cacheValue[k] = JSON.stringify(val)\n}\nconst input = (value: any) => {\n emit('update:modelValue', value)\n emit('change', value)\n}\nconst formData = (index: any, formData: any) => {\n nextTick(() => {\n const keys = Object.keys(data.cacheRule)\n const value = keys.map((k: any) => {\n const _data = index === k ? formData : { ...data.cacheRule[k].$f.form }\n const value = props.field ? _data[props.field] || null : _data\n cache(k, value)\n return value\n })\n input(value)\n })\n}\n\nconst add$f = (index: any, $f: any) => {\n data.cacheRule[index].$f = $f\n nextTick(() => {\n if (props.syncDisabled) {\n $f.disabled(props.disabled)\n }\n emit('itemMounted', $f, Object.keys(data.cacheRule).indexOf(index))\n })\n}\n\nonMounted(() => {\n data.loading = false\n})\n\nconst setValue = (key: any, value: any) => {\n const field = props.field\n if (field) {\n value = { [field]: _value(value) }\n }\n if (data.cacheValue[key] === JSON.stringify(field ? value[field] : value)) {\n return\n }\n cache(key, value)\n}\nconst addRule = (index: any, isEmit = false) => {\n const rule = props.formCreateInject.form.copyRules(props.rule || [])\n const options: any = props.options\n ? { ...props.options }\n : {\n submitBtn: false,\n resetBtn: false,\n }\n if (props.defaultValue) {\n if (!options.formData) options.formData = {}\n const defVal = deepCopy(props.defaultValue)\n extend(options.formData, props.field ? { [props.field]: defVal } : defVal)\n }\n props.parse && props.parse({ rule, options, index: data.sort.length })\n data.cacheRule[index] = { rule, options }\n if (isEmit) {\n nextTick(() => emit('add', rule, Object.keys(data.cacheRule).length - 1))\n }\n}\n\nconst removeRule = (index: any, isEmit = false) => {\n delete data.cacheRule[index]\n delete data.cacheValue[index]\n if (isEmit) {\n nextTick(() => emit('remove', index))\n }\n}\nconst add = () => {\n if (props.disabled || props.onBeforeAdd(props.modelValue) === false) {\n return\n }\n const value = [...props.modelValue]\n value.push(props.defaultValue ? deepCopy(props.defaultValue) : props.field ? null : {})\n input(value)\n collapseComponentData.modelValue = [value.length - 1]\n}\nconst del = (index: number, key: number) => {\n if (props.disabled || props.onBeforeRemove(props.modelValue, index) === false) {\n return\n }\n const value = [...props.modelValue]\n value.splice(index, 1)\n input(value)\n}\n\nconst emitEvent = (name: any, args: any, index: any) => {\n emit(name, ...args, data.cacheRule[index].$f, index)\n}\n\nconst expandRule = (n: any) => {\n for (let i = 0; i < n; i++) {\n // eslint-disable-next-line vue/no-mutating-props\n props.modelValue.push(props.field ? null : {})\n }\n}\n\nconst d = (props.expand || 0) - props.modelValue.length\nfor (let i = 0; i < props.modelValue.length; i++) {\n addRule(i)\n}\nif (d > 0) {\n expandRule(d)\n}\n</script>\n"],"names":["__MACROS_defineComponent","reactive","markRaw","watch","deepExtend","val","deepCopy","d","hasProperty","formData","nextTick","value","onMounted","extend"],"mappings":";;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,SAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA6DD,IAAA,MAAM,OAAYC,YAAS,CAAA;AAAA,MACzB,GAAK,EAAA,CAAA;AAAA,MACL,WAAW,EAAC;AAAA,MACZ,YAAY,EAAC;AAAA,MACb,MAAM,EAAC;AAAA,MACP,MAAMC,WAAQ,CAAA,KAAA,CAAM,gBAAiB,CAAA,IAAA,CAAK,OAAO,CAAA;AAAA,MACjD,OAAS,EAAA,IAAA;AAAA,KACV,CAAA,CAAA;AAED,IAAA,MAAM,wBAAwBD,YAAS,CAAA;AAAA,MACrC,UAAA,EAAY,CAAC,CAAC,CAAA;AAAA,KACf,CAAA,CAAA;AAED,IAAA,MAAM,OAAO,IAAK,CAAA,IAAA,CAAA;AAElB,IAAAE,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,IAAA;AAAA;AAAA,MACZ,CAAC,GAAG,CAAM,KAAA;AAER,QAAA,MAAA,CAAO,KAAK,IAAK,CAAA,SAAS,CAAE,CAAA,OAAA,CAAQ,CAAC,CAAM,KAAA;AACzC,UAAM,MAA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,KAAe,KAAA;AACtD,MAAK,IAAA,CAAA,IAAA,EAAM,GAAG,IAAM,EAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAE,IAAI,KAAK,CAAA,CAAA;AAAA,KACrD,CAAA;AAEA,IAAM,MAAA,UAAA,GAAa,CAAC,CAAW,KAAA;AAC7B,MAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,CAAA,EAAG,CAAK,EAAA,EAAA;AAE1B,QAAA,KAAA,CAAM,WAAW,IAAK,CAAA,KAAA,CAAM,KAAQ,GAAA,IAAA,GAAO,EAAE,CAAA,CAAA;AAAA,OAC/C;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,CAAK,GAAA,CAAA,KAAA,CAAM,MAAU,IAAA,CAAA,IAAK,MAAM,UAAW,CAAA,MAAA,CAAA;AACjD,IAAA,KAAA,IAAS,IAAI,CAAG,EAAA,CAAA,GAAI,KAAM,CAAA,UAAA,CAAW,QAAQ,CAAK,EAAA,EAAA;AAChD,MAAA,OAAA,CAAQ,CAAC,CAAA,CAAA;AAAA,KACX;AACA,IAAA,IAAI,IAAI,CAAG,EAAA;AACT,MAAA,UAAA,CAAW,CAAC,CAAA,CAAA;AAAA,KACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"group.vue2.js","sources":["../../../src/group/src/group.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkGroup',\n});\n</script>\n<template>\n <div :class=\"'dk-group _fc-group ' + (disabled ? '_fc-group-disabled' : '')\">\n <el-divider v-if=\"props.title\">{{ props.title }}</el-divider>\n <div v-if=\"data.sort.length === 0\">\n <el-button :key=\"'a_def'\" style=\"width: 100%\" type=\"primary\" @click=\"add\"> 添加数据 </el-button>\n </div>\n <draggable\n tag=\"el-collapse\"\n :list=\"props.modelValue\"\n :component-data=\"collapseComponentData\"\n item-key=\"id\"\n handle=\".collapse-title-rank\"\n >\n <template #item=\"{ element, index }\">\n <el-collapse-item :title=\"element.title\" :name=\"index\">\n <template #title>\n <div class=\"collapse-title\">\n <dk-icon icon=\"Rank\" class=\"collapse-title-rank\"></dk-icon>\n <span>{{ getTitle(index) }}</span>\n </div>\n </template>\n <template #default>\n <div :key=\"index\" class=\"_dk-group-container\">\n <Type\n :key=\"index\"\n :in-for=\"true\"\n :model-value=\"getFieldValue(index)\"\n :rule=\"data.cacheRule[index].rule\"\n :option=\"data.cacheRule[index].options\"\n :extend-option=\"true\"\n @update:modelValue=\"formData(index, $event)\"\n @emit-event=\"(name: any, ...args: any) => emitEvent(name, args, index)\"\n @update:api=\"($f: any) => add$f(index, $f)\"\n />\n <div class=\"_dk-group-handle\">\n <el-button-group>\n <el-button icon=\"Plus\" plain @click=\"add\">增加</el-button>\n <el-button icon=\"Delete\" plain @click=\"del(index, index + 1)\">删除</el-button>\n </el-button-group>\n </div>\n </div>\n </template>\n </el-collapse-item>\n </template>\n </draggable>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { markRaw, nextTick, reactive, watch, onMounted } from 'vue'\nimport { deepCopy, deepExtend, hasProperty } from '../utils/utils'\nimport extend from '../utils/extend'\n// import draggable from 'vuedraggable'\nimport { groupProps } from './props'\n\n\n\nconst props = defineProps(groupProps)\nconst emit = defineEmits(['update:modelValue', 'change', 'itemMounted', 'remove', 'add'])\nconst data: any = reactive({\n len: 0,\n cacheRule: {},\n cacheValue: {},\n sort: [],\n form: markRaw(props.formCreateInject.form.$form()),\n loading: true,\n})\n\nconst collapseComponentData = reactive({\n modelValue: [0],\n accordion: props.accordion,\n})\n\nconst Type = data.form\n\nwatch(\n () => props.rule, // 侦听 rule 属性\n (n, o) => {\n // 您原来的 handler 逻辑\n Object.keys(data.cacheRule).forEach((v) => {\n const item = data.cacheRule[v]\n if (item.$f) {\n const val = item.$f.formData()\n if (n === o) {\n item.$f.deferSyncValue(() => {\n deepExtend(item.rule, n, false)\n item.$f.setValue(val)\n }, true)\n } else {\n const val = item.$f.formData()\n item.$f.once('reloading', () => {\n item.$f.setValue(val)\n })\n item.rule = deepCopy(n)\n }\n }\n })\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => props.disabled, // 侦听 disabled 属性\n (n) => {\n // 您原来的 disabled 逻辑\n if (props.syncDisabled) {\n const lst = data.cacheRule\n Object.keys(lst).forEach((k) => {\n lst[k].$f.disabled(n)\n })\n }\n }\n)\n\nwatch(\n () => props.expand, // 侦听 expand 属性\n (n) => {\n // 您原来的 expand 逻辑\n const d = n - props.modelValue.length\n if (d > 0) {\n expandRule(d)\n }\n }\n)\n\nwatch(\n () => props.modelValue, // 侦听 modelValue 属性\n (n) => {\n // 您原来的 modelValue 逻辑\n n = n || []\n const keys = Object.keys(data.cacheRule)\n const total = keys.length // 缓存数\n const len = total - n.length // 缓存数-value数\n if (len < 0) {\n for (let i = len; i < 0; i++) {\n addRule(n.length - 1, true)\n }\n for (let i = 0; i < total; i++) {\n setValue(keys[i], n[i])\n }\n } else {\n if (len > 0) {\n for (let i = 0; i < len; i++) {\n console.log('keys[total - i - 1]', keys[total - i - 1])\n removeRule(keys[total - i - 1])\n }\n }\n n.forEach((val, i) => {\n setValue(keys[i], n[i])\n })\n }\n },\n { deep: true } // 深度侦听\n)\n\nwatch(\n () => ({ ...data.cacheRule }),\n (n) => {\n data.sort = Object.keys(n)\n },\n { immediate: true }\n)\n\nconst getFieldValue = (index: number) => {\n if (props.field) {\n return { [props.field]: _value(props.modelValue[index]) }\n } else {\n return props.modelValue[index]\n }\n}\n\nconst getTitle = (index: number) => {\n if (data.cacheRule[index]) {\n const { rule } = data.cacheRule[index]\n const defaultField = props.titleField ? props.titleField : rule[0]?.field\n return data.cacheRule[index].$f?.getValue(defaultField) || '点击展开'\n } else {\n return '点击展开'\n }\n}\nconst _value = (v: any) => {\n return v && hasProperty(v, props.field) ? v[props.field] : v\n}\nconst cache = (k: any, val: any) => {\n data.cacheValue[k] = JSON.stringify(val)\n}\nconst input = (value: any) => {\n emit('update:modelValue', value)\n emit('change', value)\n}\nconst formData = (index: any, formData: any) => {\n nextTick(() => {\n const keys = Object.keys(data.cacheRule)\n const value = keys.map((k: any) => {\n const _data = index === k ? formData : { ...data.cacheRule[k].$f.form }\n const value = props.field ? _data[props.field] || null : _data\n cache(k, value)\n return value\n })\n input(value)\n })\n}\n\nconst add$f = (index: any, $f: any) => {\n data.cacheRule[index].$f = $f\n nextTick(() => {\n if (props.syncDisabled) {\n $f.disabled(props.disabled)\n }\n emit('itemMounted', $f, Object.keys(data.cacheRule).indexOf(index))\n })\n}\n\nonMounted(() => {\n data.loading = false\n})\n\nconst setValue = (key: any, value: any) => {\n const field = props.field\n if (field) {\n value = { [field]: _value(value) }\n }\n if (data.cacheValue[key] === JSON.stringify(field ? value[field] : value)) {\n return\n }\n cache(key, value)\n}\nconst addRule = (index: any, isEmit = false) => {\n const rule = props.formCreateInject.form.copyRules(props.rule || [])\n const options: any = props.options\n ? { ...props.options }\n : {\n submitBtn: false,\n resetBtn: false,\n }\n if (props.defaultValue) {\n if (!options.formData) options.formData = {}\n const defVal = deepCopy(props.defaultValue)\n extend(options.formData, props.field ? { [props.field]: defVal } : defVal)\n }\n props.parse && props.parse({ rule, options, index: data.sort.length })\n data.cacheRule[index] = { rule, options }\n if (isEmit) {\n nextTick(() => emit('add', rule, Object.keys(data.cacheRule).length - 1))\n }\n}\n\nconst removeRule = (index: any, isEmit = false) => {\n delete data.cacheRule[index]\n delete data.cacheValue[index]\n if (isEmit) {\n nextTick(() => emit('remove', index))\n }\n}\nconst add = () => {\n if (props.disabled || props.onBeforeAdd(props.modelValue) === false) {\n return\n }\n const value = [...props.modelValue]\n value.push(props.defaultValue ? deepCopy(props.defaultValue) : props.field ? null : {})\n input(value)\n collapseComponentData.modelValue = [value.length - 1]\n}\nconst del = (index: number, key: number) => {\n if (props.disabled || props.onBeforeRemove(props.modelValue, index) === false) {\n return\n }\n const value = [...props.modelValue]\n value.splice(index, 1)\n input(value)\n}\n\nconst emitEvent = (name: any, args: any, index: any) => {\n emit(name, ...args, data.cacheRule[index].$f, index)\n}\n\nconst expandRule = (n: any) => {\n for (let i = 0; i < n; i++) {\n // eslint-disable-next-line vue/no-mutating-props\n props.modelValue.push(props.field ? null : {})\n }\n}\n\nconst d = (props.expand || 0) - props.modelValue.length\nfor (let i = 0; i < props.modelValue.length; i++) {\n addRule(i)\n}\nif (d > 0) {\n expandRule(d)\n}\n</script>\n"],"names":["__MACROS_defineComponent","reactive","markRaw","watch","deepExtend","val","deepCopy","d","hasProperty","formData","nextTick","value","onMounted","extend"],"mappings":";;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,SAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA6DD,IAAA,MAAM,OAAYC,YAAS,CAAA;AAAA,MACzB,GAAK,EAAA,CAAA;AAAA,MACL,WAAW,EAAC;AAAA,MACZ,YAAY,EAAC;AAAA,MACb,MAAM,EAAC;AAAA,MACP,MAAMC,WAAQ,CAAA,KAAA,CAAM,gBAAiB,CAAA,IAAA,CAAK,OAAO,CAAA;AAAA,MACjD,OAAS,EAAA,IAAA;AAAA,KACV,CAAA,CAAA;AAED,IAAA,MAAM,wBAAwBD,YAAS,CAAA;AAAA,MACrC,UAAA,EAAY,CAAC,CAAC,CAAA;AAAA,MACd,WAAW,KAAM,CAAA,SAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAA,MAAM,OAAO,IAAK,CAAA,IAAA,CAAA;AAElB,IAAAE,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,IAAA;AAAA;AAAA,MACZ,CAAC,GAAG,CAAM,KAAA;AAER,QAAA,MAAA,CAAO,KAAK,IAA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AA,KACb,CAAA;AAEA,IAAA,MAAM,SAAY,GAAA,CAAC,IAAW,EAAA,IAAA,EAAW,KAAe,KAAA;AACtD,MAAK,IAAA,CAAA,IAAA,EAAM,GAAG,IAAM,EAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAE,IAAI,KAAK,CAAA,CAAA;AAAA,KACrD,CAAA;AAEA,IAAM,MAAA,UAAA,GAAa,CAAC,CAAW,KAAA;AAC7B,MAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,CAAA,EAAG,CAAK,EAAA,EAAA;AAE1B,QAAA,KAAA,CAAM,WAAW,IAAK,CAAA,KAAA,CAAM,KAAQ,GAAA,IAAA,GAAO,EAAE,CAAA,CAAA;AAAA,OAC/C;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,CAAK,GAAA,CAAA,KAAA,CAAM,MAAU,IAAA,CAAA,IAAK,MAAM,UAAW,CAAA,MAAA,CAAA;AACjD,IAAA,KAAA,IAAS,IAAI,CAAG,EAAA,CAAA,GAAI,KAAM,CAAA,UAAA,CAAW,QAAQ,CAAK,EAAA,EAAA;AAChD,MAAA,OAAA,CAAQ,CAAC,CAAA,CAAA;AAAA,KACX;AACA,IAAA,IAAI,IAAI,CAAG,EAAA;AACT,MAAA,UAAA,CAAW,CAAC,CAAA,CAAA;AAAA,KACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/group/src/props.d.ts
CHANGED
package/lib/group/src/props.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../src/group/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const groupProps = {\n field: {\n type: String,\n default: '',\n },\n titleField: {\n type: String,\n default: '',\n },\n rule: {\n type: Array,\n default: () => [],\n },\n expand: {\n type: Number,\n default: 0,\n },\n options: {\n type: Object,\n default: () => {},\n },\n button: {\n type: Boolean,\n default: true,\n },\n max: {\n type: Number,\n default: 0,\n },\n min: {\n type: Number,\n default: 0,\n },\n modelValue: {\n type: Array,\n default: () => [],\n },\n defaultValue: {\n type: Object,\n default: () => {},\n },\n sortBtn: {\n type: Boolean,\n default: true,\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n syncDisabled: {\n type: Boolean,\n default: true,\n },\n onBeforeRemove: {\n type: Function,\n default: () => {},\n },\n onBeforeAdd: {\n type: Function,\n default: () => {},\n },\n formCreateInject: {\n type: Object,\n default: () => {},\n },\n parse: {\n type: Function,\n default: () => {},\n },\n title: {\n default: '',\n type: String,\n },\n}\n\nexport type GroupProps = ExtractPropTypes<typeof groupProps>\n"],"names":[],"mappings":";;AAEO,MAAM,UAAa,GAAA;AAAA,EACxB,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,KAAA;AAAA,IACN,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EACA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,MAAM;AAAA,KAAC;AAAA,GAClB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EACA,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EACA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,KAAA;AAAA,IACN,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,MAAM;AAAA,KAAC;AAAA,GAClB;AAAA,EACA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,IAAM,EAAA,QAAA;AAAA,IACN,SAAS,MAAM;AAAA,KAAC;AAAA,GAClB;AAAA,EACA,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,QAAA;AAAA,IACN,SAAS,MAAM;AAAA,KAAC;AAAA,GAClB;AAAA,EACA,gBAAkB,EAAA;AAAA,IAChB,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,MAAM;AAAA,KAAC;AAAA,GAClB;AAAA,EACA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,QAAA;AAAA,IACN,SAAS,MAAM;AAAA,KAAC;AAAA,GAClB;AAAA,EACA,KAAO,EAAA;AAAA,IACL,OAAS,EAAA,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,GACR;AACF;;;;"}
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../src/group/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const groupProps = {\n field: {\n type: String,\n default: '',\n },\n titleField: {\n type: String,\n default: '',\n },\n rule: {\n type: Array,\n default: () => [],\n },\n expand: {\n type: Number,\n default: 0,\n },\n options: {\n type: Object,\n default: () => {},\n },\n button: {\n type: Boolean,\n default: true,\n },\n max: {\n type: Number,\n default: 0,\n },\n min: {\n type: Number,\n default: 0,\n },\n modelValue: {\n type: Array,\n default: () => [],\n },\n defaultValue: {\n type: Object,\n default: () => {},\n },\n sortBtn: {\n type: Boolean,\n default: true,\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n syncDisabled: {\n type: Boolean,\n default: true,\n },\n onBeforeRemove: {\n type: Function,\n default: () => {},\n },\n onBeforeAdd: {\n type: Function,\n default: () => {},\n },\n formCreateInject: {\n type: Object,\n default: () => {},\n },\n parse: {\n type: Function,\n default: () => {},\n },\n title: {\n default: '',\n type: String,\n },\n accordion: {\n type: Boolean,\n default: true,\n },\n}\n\nexport type GroupProps = ExtractPropTypes<typeof groupProps>\n"],"names":[],"mappings":";;AAEO,MAAM,UAAa,GAAA;AAAA,EACxB,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,KAAA;AAAA,IACN,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EACA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,MAAM;AAAA,KAAC;AAAA,GAClB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,E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