@dinert/element-plus 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/element-plus.umd.js +2 -0
- package/dist/element-plus.umd.js.map +1 -0
- package/dist/style.css +1 -0
- package/es/node_modules/@element-plus/icons-vue/dist/index.mjs +95 -0
- package/es/node_modules/@element-plus/icons-vue/dist/index.mjs.map +1 -0
- package/es/packages/assets/scss/dinert-form.scss.mjs +5 -0
- package/es/packages/assets/scss/dinert-form.scss.mjs.map +1 -0
- package/es/packages/assets/scss/dinert-table-page.scss.mjs +5 -0
- package/es/packages/assets/scss/dinert-table-page.scss.mjs.map +1 -0
- package/es/packages/assets/scss/dinert-table.scss.mjs +5 -0
- package/es/packages/assets/scss/dinert-table.scss.mjs.map +1 -0
- package/es/packages/assets/scss/dinert-tooltip.scss.mjs +5 -0
- package/es/packages/assets/scss/dinert-tooltip.scss.mjs.map +1 -0
- package/es/packages/components/form/index.mjs +10 -0
- package/es/packages/components/form/index.mjs.map +1 -0
- package/es/packages/components/form/src/cascader.mjs +49 -0
- package/es/packages/components/form/src/cascader.mjs.map +1 -0
- package/es/packages/components/form/src/checkbox.mjs +44 -0
- package/es/packages/components/form/src/checkbox.mjs.map +1 -0
- package/es/packages/components/form/src/date.mjs +46 -0
- package/es/packages/components/form/src/date.mjs.map +1 -0
- package/es/packages/components/form/src/index.mjs +229 -0
- package/es/packages/components/form/src/index.mjs.map +1 -0
- package/es/packages/components/form/src/input-autocomplete.mjs +35 -0
- package/es/packages/components/form/src/input-autocomplete.mjs.map +1 -0
- package/es/packages/components/form/src/input-number.mjs +39 -0
- package/es/packages/components/form/src/input-number.mjs.map +1 -0
- package/es/packages/components/form/src/input.mjs +43 -0
- package/es/packages/components/form/src/input.mjs.map +1 -0
- package/es/packages/components/form/src/radio.mjs +43 -0
- package/es/packages/components/form/src/radio.mjs.map +1 -0
- package/es/packages/components/form/src/rate.mjs +35 -0
- package/es/packages/components/form/src/rate.mjs.map +1 -0
- package/es/packages/components/form/src/select.mjs +45 -0
- package/es/packages/components/form/src/select.mjs.map +1 -0
- package/es/packages/components/form/src/switch.mjs +36 -0
- package/es/packages/components/form/src/switch.mjs.map +1 -0
- package/es/packages/components/form/src/tree-select.mjs +43 -0
- package/es/packages/components/form/src/tree-select.mjs.map +1 -0
- package/es/packages/components/form/utils/index.mjs +44 -0
- package/es/packages/components/form/utils/index.mjs.map +1 -0
- package/es/packages/components/index.mjs +11 -0
- package/es/packages/components/index.mjs.map +1 -0
- package/es/packages/components/table/hooks/index.mjs +30 -0
- package/es/packages/components/table/hooks/index.mjs.map +1 -0
- package/es/packages/components/table/index.mjs +10 -0
- package/es/packages/components/table/index.mjs.map +1 -0
- package/es/packages/components/table/src/index.mjs +177 -0
- package/es/packages/components/table/src/index.mjs.map +1 -0
- package/es/packages/components/table/src/recuve-table-column.mjs +235 -0
- package/es/packages/components/table/src/recuve-table-column.mjs.map +1 -0
- package/es/packages/components/table-page/index.mjs +10 -0
- package/es/packages/components/table-page/index.mjs.map +1 -0
- package/es/packages/components/table-page/src/index.mjs +76 -0
- package/es/packages/components/table-page/src/index.mjs.map +1 -0
- package/es/packages/components/tooltip/index.mjs +10 -0
- package/es/packages/components/tooltip/index.mjs.map +1 -0
- package/es/packages/components/tooltip/src/index.mjs +56 -0
- package/es/packages/components/tooltip/src/index.mjs.map +1 -0
- package/es/packages/hooks/useTablePage/index.mjs +111 -0
- package/es/packages/hooks/useTablePage/index.mjs.map +1 -0
- package/es/packages/hooks/useWindowResize.mjs +16 -0
- package/es/packages/hooks/useWindowResize.mjs.map +1 -0
- package/es/packages/index.mjs +21 -0
- package/es/packages/index.mjs.map +1 -0
- package/es/packages/utils/tools.mjs +54 -0
- package/es/packages/utils/tools.mjs.map +1 -0
- package/es/src/components/form/index.d.ts +32 -0
- package/es/src/components/form/src/checkbox.d.ts +28 -0
- package/es/src/components/form/src/date.d.ts +28 -0
- package/es/src/components/form/src/index.d.ts +32 -0
- package/es/src/components/form/src/input-autocomplete.d.ts +28 -0
- package/es/src/components/form/src/input-number.d.ts +28 -0
- package/es/src/components/form/src/input.d.ts +28 -0
- package/es/src/components/form/src/radio.d.ts +28 -0
- package/es/src/components/form/src/rate.d.ts +28 -0
- package/es/src/components/form/src/switch.d.ts +28 -0
- package/es/src/components/form/src/tree-select.d.ts +39 -0
- package/es/src/components/form/types/index.d.ts +41 -0
- package/es/src/components/form/utils/index.d.ts +5 -0
- package/es/src/components/index.d.ts +7 -0
- package/es/src/components/table/hooks/index.d.ts +14 -0
- package/es/src/components/table/index.d.ts +709 -0
- package/es/src/components/table/src/index.d.ts +711 -0
- package/es/src/components/table/src/recuve-table-column.d.ts +43 -0
- package/es/src/components/table/types/index.d.ts +81 -0
- package/es/src/components/table-page/index.d.ts +1604 -0
- package/es/src/components/table-page/src/index.d.ts +1605 -0
- package/es/src/components/tooltip/index.d.ts +60 -0
- package/es/src/components/tooltip/src/index.d.ts +59 -0
- package/es/src/components/tooltip/types/index.d.ts +10 -0
- package/es/src/hooks/useTablePage/index.d.ts +47 -0
- package/es/src/hooks/useTablePage/types/index.d.ts +29 -0
- package/es/src/hooks/useWindowResize.d.ts +2 -0
- package/es/src/index.d.ts +6 -0
- package/es/src/utils/tools.d.ts +19 -0
- package/es/src/views/test-table/data.d.ts +21 -0
- package/es/src/views/test-table/tableColumns.d.ts +9 -0
- package/es/src/views/test-table-page/data.d.ts +2 -0
- package/es/src/views/test-table-page/formItem.d.ts +1 -0
- package/es/src/views/test-table-page/tableColumns.d.ts +27 -0
- package/es/src/views/test-table-page/types/index.d.ts +23 -0
- package/es/style.css +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/src/components/form/index.d.ts +32 -0
- package/lib/src/components/form/src/checkbox.d.ts +28 -0
- package/lib/src/components/form/src/date.d.ts +28 -0
- package/lib/src/components/form/src/index.d.ts +32 -0
- package/lib/src/components/form/src/input-autocomplete.d.ts +28 -0
- package/lib/src/components/form/src/input-number.d.ts +28 -0
- package/lib/src/components/form/src/input.d.ts +28 -0
- package/lib/src/components/form/src/radio.d.ts +28 -0
- package/lib/src/components/form/src/rate.d.ts +28 -0
- package/lib/src/components/form/src/switch.d.ts +28 -0
- package/lib/src/components/form/src/tree-select.d.ts +39 -0
- package/lib/src/components/form/types/index.d.ts +41 -0
- package/lib/src/components/form/utils/index.d.ts +5 -0
- package/lib/src/components/index.d.ts +7 -0
- package/lib/src/components/table/hooks/index.d.ts +14 -0
- package/lib/src/components/table/index.d.ts +709 -0
- package/lib/src/components/table/src/index.d.ts +711 -0
- package/lib/src/components/table/src/recuve-table-column.d.ts +43 -0
- package/lib/src/components/table/types/index.d.ts +81 -0
- package/lib/src/components/table-page/index.d.ts +1604 -0
- package/lib/src/components/table-page/src/index.d.ts +1605 -0
- package/lib/src/components/tooltip/index.d.ts +60 -0
- package/lib/src/components/tooltip/src/index.d.ts +59 -0
- package/lib/src/components/tooltip/types/index.d.ts +10 -0
- package/lib/src/hooks/useTablePage/index.d.ts +47 -0
- package/lib/src/hooks/useTablePage/types/index.d.ts +29 -0
- package/lib/src/hooks/useWindowResize.d.ts +2 -0
- package/lib/src/index.d.ts +6 -0
- package/lib/src/utils/tools.d.ts +19 -0
- package/lib/src/views/test-table/data.d.ts +21 -0
- package/lib/src/views/test-table/tableColumns.d.ts +9 -0
- package/lib/src/views/test-table-page/data.d.ts +2 -0
- package/lib/src/views/test-table-page/formItem.d.ts +1 -0
- package/lib/src/views/test-table-page/tableColumns.d.ts +27 -0
- package/lib/src/views/test-table-page/types/index.d.ts +23 -0
- package/lib/style.css +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../packages/hooks/useTablePage/index.ts"],"sourcesContent":["\r\nimport {Ref, ref} from 'vue'\r\n\r\nimport type {RewriteFormProps} from '@/components/form/types'\r\nimport type {RewriteTableProps} from '@/components/table/types'\r\n\r\nimport type {DinertTablePageProps, AjaxTableProps, ScopeFn} from '@/hooks/useTablePage/types'\r\n\r\nimport TablePageCom from '@/components/table-page/index'\r\nimport {getUuid} from '@/utils/tools'\r\nimport lodash from 'lodash'\r\n\r\n/**\r\n * T 表格data数据格式\r\n * D 表单model的数据格式\r\n * P 发起请求的数据格式\r\n * R 请求回来的数据格式\r\n */\r\n\r\nclass TablePage<T = any, D = any, P = any, R = any> {\r\n showSearch: Ref<DinertTablePageProps['search']>\r\n table: Ref<RewriteTableProps<T>>\r\n form: Ref<RewriteFormProps<D>>\r\n footer: Ref<DinertTablePageProps['footer']>\r\n\r\n selecTableDatas: Ref<T[]> = ref([])\r\n lastSelectDatas: Ref<T[]> = ref([])\r\n\r\n options: DinertTablePageProps<T, D>\r\n\r\n ids: Ref<string[]> = ref([])\r\n\r\n params: P | any\r\n oldParams: P | any\r\n\r\n tablePageRef: Ref<InstanceType<typeof TablePageCom> | null> = ref(null)\r\n\r\n private readonly defaultOptions: DinertTablePageProps<T, D> = {\r\n table: {\r\n rowKey: 'id',\r\n className: 'table_page' + getUuid(),\r\n tableColumns: [],\r\n data: [],\r\n key: true,\r\n border: true,\r\n tableSlot: true,\r\n pagination: {\r\n total: 0,\r\n currentPage: 1,\r\n pageSize: 10,\r\n pageSizes: [10, 20, 30, 50, 100],\r\n },\r\n on: {\r\n }\r\n },\r\n form: {\r\n model: {},\r\n formItem: {}\r\n },\r\n footer: false,\r\n search: false\r\n }\r\n\r\n\r\n private readonly firstOptions: DinertTablePageProps<T, D> = {\r\n table: {\r\n tableColumns: [],\r\n data: [],\r\n key: true,\r\n pagination: {}\r\n },\r\n form: {model: {}, formItem: {}}\r\n }\r\n\r\n\r\n constructor(options: DinertTablePageProps<T, D>) {\r\n\r\n this.options = lodash.defaultsDeep(lodash.cloneDeep(options), this.defaultOptions)\r\n\r\n this.firstOptions = lodash.cloneDeep(this.options)\r\n\r\n this.table = ref<DinertTablePageProps['table'] | any>(this.options.table)\r\n\r\n this.form = ref<RewriteFormProps<D | any>>(this.options.form)\r\n\r\n this.footer = ref<DinertTablePageProps['footer']>(this.options.footer)\r\n\r\n this.showSearch = ref<DinertTablePageProps['search']>(this.options.search)\r\n\r\n this.params = {}\r\n this.oldParams = {}\r\n }\r\n\r\n getTableParams: (params: P) => (Partial<P>) = () => ({} as any)\r\n ajaxTableDataAfter: (res: R) => void = () => ({})\r\n\r\n lookOperations: ScopeFn<T> = () => ({}) // 查看\r\n editOperations: ScopeFn<T> = () => ({}) // 编辑\r\n addOperations: ScopeFn<T> = () => ({}) // 添加\r\n deleteOperations: ScopeFn<T> = () => ({}) // 删除\r\n importOperations: ScopeFn<T> = () => ({}) // 导入\r\n\r\n sizeChange(size: number) {\r\n\r\n const pageSize = this.table.value.pagination.pageSize\r\n this.table.value.pagination.pageSize = size\r\n const pagination = this.table.value.pagination\r\n if ((pageSize as any) > size\r\n || (pagination.currentPage as any) <= Math.ceil((pagination.total as any) / (pagination.pageSize as any))) {\r\n this.search({name: 'size', pageSize: size})\r\n }\r\n\r\n }\r\n\r\n currentChange(currentPage: number) {\r\n this.table.value.pagination.currentPage = currentPage\r\n this.search({name: 'current', currentPage})\r\n }\r\n\r\n async getTableData(options: (P & AjaxTableProps) | any) {\r\n const res = await this.ajaxTableData(options)\r\n this.changeTableData(res.data)\r\n\r\n typeof this.ajaxTableDataAfter === 'function' && this.ajaxTableDataAfter(res)\r\n\r\n this.table.value.key = !this.table.value.key\r\n return res\r\n }\r\n\r\n changeTableData(res: R | any) {\r\n if (res && res.data && res.data.length) {\r\n for (let i = 0; i < res.data.length; i++) {\r\n res.data[i].index = i + 1 + (res.pageNum as number) * (res.pageSize as number)\r\n }\r\n }\r\n this.table.value.data = res.data\r\n this.table.value.pagination.total = res.total\r\n }\r\n\r\n getAjaxTableDataParams(options: (P & AjaxTableProps) | any) {\r\n this.params = this.getTableParams(options)\r\n\r\n const isSame = lodash.isEqual(this.params, this.oldParams) // 判断当前提交的参数和上一次提交的参数是否相同\r\n\r\n if (options.name === 'search') {\r\n if (!isSame) {\r\n this.table.value.pagination.currentPage = 1\r\n this.params = this.getTableParams(options)\r\n }\r\n\r\n this.oldParams = lodash.cloneDeep(this.params)\r\n } else if (options.name === 'reset') {\r\n this.resetPagination()\r\n this.params = this.getTableParams(options)\r\n\r\n this.oldParams = lodash.cloneDeep(this.params)\r\n } else if (options.name === 'delete') {\r\n if (this.table.value.data && this.table.value.data.length) {\r\n if (this.table.value.data.length === 1 && (this.table.value as any).pagination.currentPage > 1) {\r\n this.table.value.pagination.currentPage = 2\r\n\r\n this.params = this.getTableParams(options)\r\n }\r\n }\r\n } else if (options.name === 'current') {\r\n if (this.oldParams.data && this.oldParams.data.pageNum) {\r\n this.oldParams.data.pageNum = options.currentPage\r\n } else if (this.oldParams.data && this.oldParams.data.page) {\r\n this.oldParams.data.page = options.currentPage\r\n } else if (this.oldParams.params && this.oldParams.params.page) {\r\n this.oldParams.params.page = options.currentPage\r\n } else if (this.oldParams.params && this.oldParams.params.pageNum) {\r\n this.oldParams.params.pageNum = options.currentPage\r\n }\r\n\r\n if (this.oldParams.data && this.oldParams.data.pageSize) {\r\n this.oldParams.data.pageSize = this.table.value.pagination.pageSize\r\n } else if (this.oldParams.params && this.oldParams.params.pageSize) {\r\n this.oldParams.params.pageSize = this.table.value.pagination.pageSize\r\n }\r\n\r\n this.params = lodash.cloneDeep(this.oldParams)\r\n } else if (options.name === 'size') {\r\n if (this.oldParams.data && this.oldParams.data.pageSize) {\r\n this.oldParams.data.pageSize = options.pageSize\r\n } else if (this.oldParams.params && this.oldParams.params.pageSize) {\r\n this.oldParams.params.pageSize = options.pageSize\r\n }\r\n\r\n this.params = lodash.cloneDeep(this.oldParams)\r\n }\r\n if (!['size', 'current'].includes(options.name || '') || !this.table.value.rowKey) {\r\n this.selecTableDatas.value = []\r\n }\r\n\r\n return this.params\r\n }\r\n\r\n ajaxTableData(options: (P & AjaxTableProps)): Promise<R | any> {\r\n return new Promise(resolve => {\r\n resolve(this.getAjaxTableDataParams(options))\r\n })\r\n }\r\n\r\n\r\n // 查询\r\n search(options: (P & AjaxTableProps) | any = {name: 'search'}) {\r\n\r\n for (const prop in this.form.value?.model) {\r\n if ([null, undefined, ''].includes((this.form.value.model as any)[prop])) {\r\n delete this.form.value?.model[prop]\r\n }\r\n }\r\n return this.getTableData(options)\r\n }\r\n\r\n // 重置查询\r\n resetSearch(options: (P & AjaxTableProps) | any = {name: 'reset'}) {\r\n this.resetParams()\r\n this.search(options)\r\n }\r\n\r\n\r\n // 重置分页参数\r\n resetPagination() {\r\n this.table.value.pagination = this.defaultOptions.table.pagination\r\n }\r\n\r\n // 重置表格请求参数\r\n resetParams() {\r\n if (lodash.isEmpty(this.firstOptions.form?.model)) { // 判断查询的默认参数是否为空\r\n for (const prop in this.form.value?.model) {\r\n delete this.form.value?.model[prop]\r\n }\r\n } else {\r\n for (const prop in this.form.value?.model) {\r\n delete this.form.value?.model[prop]\r\n }\r\n for (const prop in this.firstOptions.form?.model) {\r\n this.form.value.model[prop] = this.firstOptions.form?.model[prop]\r\n }\r\n }\r\n }\r\n\r\n // 清空参数\r\n clearParams() {\r\n for (const prop in this.form.value?.model) {\r\n delete this.form.value.model[prop]\r\n }\r\n }\r\n\r\n // 根据key获取表格中的数据\r\n getTableDataKeys(key: string = 'id') {\r\n this.ids.value = lodash.map(this.table.value.data || [], key)\r\n }\r\n\r\n}\r\n\r\n\r\nexport default TablePage\r\n"],"names":["TablePage","options","ref","getUuid","lodash","size","pageSize","pagination","currentPage","res","i","isSame","resolve","prop","_a","_b","_c","_d","_e","_f","_g","key"],"mappings":";;;AAmBA,MAAMA,EAA8C;AAAA,EAwDhD,YAAYC,GAAqC;AAlDrB,SAAA,kBAAAC,EAAI,CAAA,CAAE,GACN,KAAA,kBAAAA,EAAI,CAAA,CAAE,GAIb,KAAA,MAAAA,EAAI,CAAA,CAAE,GAK3B,KAAA,eAA8DA,EAAI,IAAI,GAEtE,KAAiB,iBAA6C;AAAA,MAC1D,OAAO;AAAA,QACH,QA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;AAAA;AAAA,EAGA,cAAc;;AACV,eAAWA,MAAQC,IAAA,KAAK,KAAK,UAAV,gBAAAA,EAAiB;AAChC,aAAO,KAAK,KAAK,MAAM,MAAMD,CAAI;AAAA,EAEzC;AAAA;AAAA,EAGA,iBAAiBQ,IAAc,MAAM;AAC5B,SAAA,IAAI,QAAQjB,EAAO,IAAI,KAAK,MAAM,MAAM,QAAQ,CAAC,GAAGiB,CAAG;AAAA,EAChE;AAEJ;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import t from "lodash";
|
|
2
|
+
import { onMounted as i, onUnmounted as d } from "vue";
|
|
3
|
+
const f = (e, n = 0, s = !1) => {
|
|
4
|
+
const o = t.debounce(() => {
|
|
5
|
+
e();
|
|
6
|
+
}, n);
|
|
7
|
+
i(() => {
|
|
8
|
+
s && e(), window.addEventListener("resize", o, !1);
|
|
9
|
+
}), d(() => {
|
|
10
|
+
window.removeEventListener("resize", o, !1);
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
f as default
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=useWindowResize.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowResize.mjs","sources":["../../../packages/hooks/useWindowResize.ts"],"sourcesContent":["/**\r\n * 监听浏览器缩放,使用防抖函数做触发次数太多的处理\r\n */\r\nimport lodash from 'lodash'\r\nimport {onMounted, onUnmounted} from 'vue'\r\n\r\nconst useWindowResize = (resize: () => void, delay: number = 0, immediate: boolean = false) => {\r\n const onResize = lodash.debounce(() => {\r\n resize()\r\n }, delay)\r\n onMounted(() => {\r\n if (immediate) {\r\n resize() // 手动触发一次\r\n }\r\n window.addEventListener('resize', onResize, false)\r\n })\r\n\r\n onUnmounted(() => {\r\n window.removeEventListener('resize', onResize, false)\r\n })\r\n}\r\n\r\nexport default useWindowResize\r\n"],"names":["useWindowResize","resize","delay","immediate","onResize","lodash","onMounted","onUnmounted"],"mappings":";;AAMA,MAAMA,IAAkB,CAACC,GAAoBC,IAAgB,GAAGC,IAAqB,OAAU;AACrF,QAAAC,IAAWC,EAAO,SAAS,MAAM;AAC5B,IAAAJ;KACRC,CAAK;AACR,EAAAI,EAAU,MAAM;AACZ,IAAIH,KACOF,KAEJ,OAAA,iBAAiB,UAAUG,GAAU,EAAK;AAAA,EAAA,CACpD,GAEDG,EAAY,MAAM;AACP,WAAA,oBAAoB,UAAUH,GAAU,EAAK;AAAA,EAAA,CACvD;AACL;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as o from "./components/index.mjs";
|
|
2
|
+
import t from "./hooks/useTablePage/index.mjs";
|
|
3
|
+
import { Table as p } from "./components/table/index.mjs";
|
|
4
|
+
import { TablePage as i } from "./components/table-page/index.mjs";
|
|
5
|
+
import { Form as T } from "./components/form/index.mjs";
|
|
6
|
+
import { Tooltip as g } from "./components/tooltip/index.mjs";
|
|
7
|
+
const m = t, l = {
|
|
8
|
+
install: (e) => {
|
|
9
|
+
for (const r in o)
|
|
10
|
+
e.use(o[r]);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
T as Form,
|
|
15
|
+
p as Table,
|
|
16
|
+
i as TablePage,
|
|
17
|
+
g as Tooltip,
|
|
18
|
+
m as UseTablePage,
|
|
19
|
+
l as default
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../packages/index.ts"],"sourcesContent":["import {Plugin, App} from 'vue'\r\nimport * as components from './components/index'\r\nimport TablePage from './hooks/useTablePage/index'\r\n\r\nexport * from './components/index'\r\nexport const UseTablePage: typeof TablePage = TablePage\r\n\r\nconst myPlugin: Plugin = {\r\n install: (app: App) => {\r\n for (const name in components) {\r\n app.use((components as any)[name])\r\n }\r\n }\r\n}\r\n\r\nexport default myPlugin\r\n"],"names":["UseTablePage","TablePage","myPlugin","app","name","components"],"mappings":";;;;;;AAKO,MAAMA,IAAiCC,GAExCC,IAAmB;AAAA,EACrB,SAAS,CAACC,MAAa;AACnB,eAAWC,KAAQC;AACX,MAAAF,EAAA,IAAKE,EAAmBD,CAAI,CAAC;AAAA,EAEzC;AACJ;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const c = () => {
|
|
2
|
+
const e = [], n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
3
|
+
for (let t = 0; t < 36; t++)
|
|
4
|
+
e[t] = n.substr(Math.floor(Math.random() * 16), 1);
|
|
5
|
+
return e[14] = "4", e[19] = n.substr(+e[19] & 3 | 8, 1), e[8] = e[13] = e[18] = e[23] = "-", e.join("");
|
|
6
|
+
}, d = (e, n) => {
|
|
7
|
+
let o = e;
|
|
8
|
+
n = n.replace(/\[(\w+)\]/g, ".$1"), n = n.replace(/^\./, "");
|
|
9
|
+
const t = n.split(".");
|
|
10
|
+
let r = 0;
|
|
11
|
+
for (let u = t.length; r < u - 1 && o; ++r) {
|
|
12
|
+
const s = t[r];
|
|
13
|
+
if (s in o)
|
|
14
|
+
o = o[s];
|
|
15
|
+
else
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
return o ? o[t[r]] : null;
|
|
19
|
+
}, f = (e, n = "-") => [null, void 0, ""].includes(e) ? n : e, g = (e, n, o, t) => {
|
|
20
|
+
const r = [], u = (s) => {
|
|
21
|
+
for (let l = 0; l < s.length; l++)
|
|
22
|
+
o.includes(s[l][n]) && r.push(s[l][t]), s[l].children && s[l].children.length && u(s[l].children);
|
|
23
|
+
};
|
|
24
|
+
return u(e), r;
|
|
25
|
+
};
|
|
26
|
+
function i(e, n = "children", o = null) {
|
|
27
|
+
return e.reduce((t, r) => (t.push({ ...r, parentId: o }), r[n] && r[n].length && (t = t.concat(i(r[n], n, r.id))), t), []);
|
|
28
|
+
}
|
|
29
|
+
const p = (e) => String(e).replace(/[<>& "]/g, (n) => {
|
|
30
|
+
switch (n) {
|
|
31
|
+
case "<":
|
|
32
|
+
return "<";
|
|
33
|
+
case ">":
|
|
34
|
+
return ">";
|
|
35
|
+
case "&":
|
|
36
|
+
return "&";
|
|
37
|
+
case " ":
|
|
38
|
+
return " ";
|
|
39
|
+
case '"':
|
|
40
|
+
return """;
|
|
41
|
+
default:
|
|
42
|
+
return "";
|
|
43
|
+
}
|
|
44
|
+
}), h = (e) => "column_" + e.split(".").join("_");
|
|
45
|
+
export {
|
|
46
|
+
h as columnProp,
|
|
47
|
+
i as convertToFlat,
|
|
48
|
+
f as dataTransformRod,
|
|
49
|
+
p as escapeHTML,
|
|
50
|
+
d as getPropByPath,
|
|
51
|
+
g as getTreeNode,
|
|
52
|
+
c as getUuid
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=tools.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.mjs","sources":["../../../packages/utils/tools.ts"],"sourcesContent":["\r\n// 浏览器的各种存储\r\nexport const storage = (name: 'localStorage' | 'sessionStorage', key: string, value?: any) => {\r\n if (key === 'remove') {\r\n return (window as any)[name].removeItem(`dinert-zhdd-${value}`)\r\n } else if (key === 'clear') {\r\n return (window as any)[name].clear()\r\n } else if (value) {\r\n return (window as any)[name].setItem(`dinert-zhdd-${key}`, JSON.stringify(value))\r\n } else {\r\n return JSON.parse((window as any)[name].getItem(`dinert-zhdd-${key}`))\r\n }\r\n}\r\n\r\n// 首字母大写\r\nexport const firstUpperCase = (str: string) => {\r\n str = String(str)\r\n return str.replace(/^\\S/, s => s.toUpperCase())\r\n}\r\n\r\n// 重写判断类型\r\nexport const type = (type: any) => {\r\n return Object.prototype.toString\r\n .call(type)\r\n .split(' ')[1]\r\n .split(']')[0]\r\n .toLocaleLowerCase()\r\n}\r\n\r\n// 生成唯一ID\r\nexport const getUuid = (): string => {\r\n const s = []\r\n const hexDigits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'\r\n for (let i = 0; i < 36; i++) {\r\n s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1)\r\n }\r\n s[14] = '4'\r\n s[19] = hexDigits.substr((+s[19] & 0x3) | 0x8, 1)\r\n s[8] = s[13] = s[18] = s[23] = '-'\r\n const uuid = s.join('')\r\n return uuid\r\n}\r\n\r\n\r\n/**\r\n *\r\n * @param {Object} obj\r\n * @param {String} path\r\n * @returns\r\n */\r\nexport const getPropByPath = (obj: any, path: string) => {\r\n let tempObj = obj\r\n path = path.replace(/\\[(\\w+)\\]/g, '.$1')\r\n path = path.replace(/^\\./, '')\r\n\r\n const keyArr = path.split('.')\r\n let i = 0\r\n for (let len = keyArr.length; i < len - 1; ++i) {\r\n // eslint-disable-next-line max-statements-per-line\r\n if (!tempObj) {break}\r\n const key = keyArr[i]\r\n if (key in tempObj) {\r\n tempObj = tempObj[key]\r\n } else {\r\n return null\r\n // break;\r\n }\r\n }\r\n return tempObj ? tempObj[keyArr[i]] : null\r\n}\r\n\r\nexport const dataTransformRod = (data: any, errData: any = '-') => {\r\n return [null, undefined, ''].includes(data) ? errData : data\r\n}\r\n\r\n// 获取树指定的所有节点\r\nexport const getTreeNode = <T = any>(treeData: any, name: string, value: any, key: string): T[] => {\r\n const result: T[] = []\r\n // eslint-disable-next-line consistent-return\r\n const treeNode = (treeData2: any) => {\r\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\r\n for (let i = 0; i < treeData2.length; i++) {\r\n if (value.includes(treeData2[i][name])) {\r\n result.push(treeData2[i][key])\r\n }\r\n if (treeData2[i].children && treeData2[i].children.length) {\r\n treeNode(treeData2[i].children)\r\n }\r\n }\r\n\r\n }\r\n treeNode(treeData)\r\n return result\r\n}\r\n\r\n// 树转扁平\r\nexport function convertToFlat<T = any>(data: T[], children: string = 'children', parentId: any = null): T[] {\r\n return data.reduce((acc: any, curr: any) => {\r\n acc.push({...curr, parentId})\r\n if (curr[children] && curr[children].length) {\r\n acc = acc.concat(convertToFlat(curr[children], children, curr.id))\r\n }\r\n return acc\r\n }, [])\r\n}\r\n\r\n// 格式化手机号\r\nexport function formatPhone(value: string): string {\r\n if (!/^1[3|4|5|7|8|9][0-9]\\d{4,8}$/.test(value)\r\n || value.length !== 11) {\r\n return value\r\n } else {\r\n const mobile = value.replace(/^(.{3})(.*)(.{4})/, '$1-$2-$3')\r\n return mobile\r\n }\r\n}\r\n\r\n// 下载文件\r\nexport const downFile = (response: any): any => {\r\n const content = response.data\r\n // blob内容是json,不下载\r\n if (response.headers['content-type'] === 'application/json;charset=UTF-8') {\r\n return response\r\n }\r\n const data = new Blob([content], {\r\n type: response.headers['content-type']\r\n })\r\n const downloadUrl = window.URL.createObjectURL(data)\r\n\r\n if (response.config.headers.prohibitDownload) {\r\n return downloadUrl\r\n }\r\n const anchor = document.createElement('a')\r\n anchor.href = downloadUrl\r\n let filename = response.headers['content-disposition'].split('=')[1]\r\n filename = filename.split(';')[0]\r\n anchor.download = decodeURIComponent(filename)\r\n anchor.target = '_blank'\r\n anchor.click()\r\n window.URL.revokeObjectURL((data as any))\r\n return true\r\n}\r\n\r\n// 转化数组为字符串\r\nexport const formatterArray = (cellValue: any) => {\r\n if (cellValue instanceof Array) {\r\n const joinValue = cellValue.join(',')\r\n return joinValue || '-'\r\n } else if (cellValue) {\r\n return cellValue\r\n } else {\r\n return '-'\r\n }\r\n}\r\n\r\n\r\n// 预防xss攻击\r\nexport const escapeHTML = (str: any) => {\r\n // eslint-disable-next-line consistent-return\r\n return String(str).replace(/[<>& \"]/g, (match: any) => {\r\n switch (match) {\r\n case '<':\r\n return '<'\r\n case '>':\r\n return '>'\r\n case '&':\r\n return '&'\r\n case ' ':\r\n return ' '\r\n case '\"':\r\n return '"'\r\n default:\r\n return ''\r\n }\r\n })\r\n}\r\n\r\nexport const columnProp = (prop: string) => {\r\n return 'column_' + prop.split('.').join('_')\r\n}\r\n"],"names":["getUuid","s","hexDigits","i","getPropByPath","obj","path","tempObj","keyArr","len","key","dataTransformRod","data","errData","getTreeNode","treeData","name","value","result","tre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AAEa,CAAI,CAAC,KACjCE,EAAO,KAAKE,EAAUjB,CAAC,EAAEO,CAAG,CAAC,GAE7BU,EAAUjB,CAAC,EAAE,YAAYiB,EAAUjB,CAAC,EAAE,SAAS,UACtCgB,EAAAC,EAAUjB,CAAC,EAAE,QAAQ;AAAA,EAEtC;AAGJ,SAAAgB,EAASJ,CAAQ,GACVG;AACX;AAGO,SAASG,EAAuBT,GAAWU,IAAmB,YAAYC,IAAgB,MAAW;AACxG,SAAOX,EAAK,OAAO,CAACY,GAAUC,OAC1BD,EAAI,KAAK,EAAC,GAAGC,GAAM,UAAAF,EAAS,CAAA,GACxBE,EAAKH,CAAQ,KAAKG,EAAKH,CAAQ,EAAE,WAC3BE,IAAAA,EAAI,OAAOH,EAAcI,EAAKH,CAAQ,GAAGA,GAAUG,EAAK,EAAE,CAAC,IAE9DD,IACR,CAAE,CAAA;AACT;AAqDa,MAAAE,IAAa,CAACC,MAEhB,OAAOA,CAAG,EAAE,QAAQ,YAAY,CAACC,MAAe;AACnD,UAAQA,GAAO;AAAA,IACX,KAAK;AACM,aAAA;AAAA,IACX,KAAK;AACM,aAAA;AAAA,IACX,KAAK;AACM,aAAA;AAAA,IACX,KAAK;AACM,aAAA;AAAA,IACX,KAAK;AACM,aAAA;AAAA,IACX;AACW,aAAA;AAAA,EACf;AAAA,CACH,GAGQC,IAAa,CAACC,MAChB,YAAYA,EAAK,MAAM,GAAG,EAAE,KAAK,GAAG;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Plugin } from 'vue';
|
|
2
|
+
type SFCWithInstall<T> = T & Plugin;
|
|
3
|
+
export declare const Form: SFCWithInstall<import("vue").DefineComponent<{
|
|
4
|
+
form: {
|
|
5
|
+
type: import("vue").PropType<import("./types").RewriteFormProps<any>>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
search: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
}, {
|
|
13
|
+
formItemMap: import("vue").ComputedRef<any>;
|
|
14
|
+
unfold: () => void;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("UnFold" | "Search" | "Reset")[], "UnFold" | "Search" | "Reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: import("vue").PropType<import("./types").RewriteFormProps<any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
search: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
}>> & {
|
|
25
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
26
|
+
onUnFold?: ((...args: any[]) => any) | undefined;
|
|
27
|
+
onSearch?: ((...args: any[]) => any) | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
form: import("./types").RewriteFormProps<any>;
|
|
30
|
+
search: boolean;
|
|
31
|
+
}, {}>>;
|
|
32
|
+
export default Form;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RewriteFormProps, CustomFormItemProps } from '../../../components/form/types';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { CheckboxGroupProps } from 'element-plus';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
form: {
|
|
6
|
+
type: PropType<RewriteFormProps<any>>;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
formItem: {
|
|
10
|
+
type: PropType<CustomFormItemProps<Partial<CheckboxGroupProps>, any[]>>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
options: import("vue").ComputedRef<import('../../../components/form/types').RewriteFormItemProps<any[]>>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
formItem: {
|
|
21
|
+
type: PropType<CustomFormItemProps<Partial<CheckboxGroupProps>, any[]>>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
form: RewriteFormProps<any>;
|
|
26
|
+
formItem: CustomFormItemProps<Partial<CheckboxGroupProps>, any[]>;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DatePickerProps } from 'element-plus';
|
|
2
|
+
import type { RewriteFormProps, CustomFormItemProps } from '../../../components/form/types';
|
|
3
|
+
import type { PropType } from 'vue';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
form: {
|
|
6
|
+
type: PropType<RewriteFormProps<any>>;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
formItem: {
|
|
10
|
+
type: PropType<CustomFormItemProps<Partial<DatePickerProps>, any[]>>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
options: import("vue").ComputedRef<import('../../../components/form/types').RewriteFormItemProps<any[]>>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
formItem: {
|
|
21
|
+
type: PropType<CustomFormItemProps<Partial<DatePickerProps>, any[]>>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
form: RewriteFormProps<any>;
|
|
26
|
+
formItem: CustomFormItemProps<Partial<DatePickerProps>, any[]>;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { RewriteFormProps } from '../../../components/form/types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
form: {
|
|
5
|
+
type: PropType<RewriteFormProps<any>>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
search: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
}, {
|
|
13
|
+
formItemMap: import("vue").ComputedRef<any>;
|
|
14
|
+
unfold: () => void;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("UnFold" | "Search" | "Reset")[], "UnFold" | "Search" | "Reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
search: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
}>> & {
|
|
25
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
26
|
+
onUnFold?: ((...args: any[]) => any) | undefined;
|
|
27
|
+
onSearch?: ((...args: any[]) => any) | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
form: RewriteFormProps<any>;
|
|
30
|
+
search: boolean;
|
|
31
|
+
}, {}>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RewriteFormProps, CustomFormItemProps } from '../../../components/form/types';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { AutocompleteProps } from 'element-plus';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
form: {
|
|
6
|
+
type: PropType<RewriteFormProps<any>>;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
formItem: {
|
|
10
|
+
type: PropType<CustomFormItemProps<Partial<AutocompleteProps>, any[]>>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
options: import("vue").ComputedRef<import('../../../components/form/types').RewriteFormItemProps<any[]>>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
formItem: {
|
|
21
|
+
type: PropType<CustomFormItemProps<Partial<AutocompleteProps>, any[]>>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
form: RewriteFormProps<any>;
|
|
26
|
+
formItem: CustomFormItemProps<Partial<AutocompleteProps>, any[]>;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RewriteFormProps, CustomFormItemProps } from '../../../components/form/types';
|
|
2
|
+
import type { InputNumberProps } from 'element-plus';
|
|
3
|
+
import type { PropType } from 'vue';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
form: {
|
|
6
|
+
type: PropType<RewriteFormProps<any>>;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
formItem: {
|
|
10
|
+
type: PropType<CustomFormItemProps<Partial<InputNumberProps>, any[]>>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
options: import("vue").ComputedRef<import('../../../components/form/types').RewriteFormItemProps<any[]>>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
formItem: {
|
|
21
|
+
type: PropType<CustomFormItemProps<Partial<InputNumberProps>, any[]>>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
form: RewriteFormProps<any>;
|
|
26
|
+
formItem: CustomFormItemProps<Partial<InputNumberProps>, any[]>;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RewriteFormProps, CustomFormItemProps } from '../../../components/form/types';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { InputProps } from 'element-plus';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
form: {
|
|
6
|
+
type: PropType<RewriteFormProps<any>>;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
formItem: {
|
|
10
|
+
type: PropType<CustomFormItemProps<Partial<InputProps>, any>>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
options: import("vue").ComputedRef<import('../../../components/form/types').RewriteFormItemProps<any>>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
formItem: {
|
|
21
|
+
type: PropType<CustomFormItemProps<Partial<InputProps>, any>>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
form: RewriteFormProps<any>;
|
|
26
|
+
formItem: CustomFormItemProps<Partial<InputProps>, any>;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RewriteFormProps, CustomFormItemProps } from '../../../components/form/types';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { RadioProps } from 'element-plus';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
form: {
|
|
6
|
+
type: PropType<RewriteFormProps<any>>;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
formItem: {
|
|
10
|
+
type: PropType<CustomFormItemProps<Partial<RadioProps>, any[]>>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
options: import("vue").ComputedRef<import('../../../components/form/types').RewriteFormItemProps<any[]>>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
formItem: {
|
|
21
|
+
type: PropType<CustomFormItemProps<Partial<RadioProps>, any[]>>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
form: RewriteFormProps<any>;
|
|
26
|
+
formItem: CustomFormItemProps<Partial<RadioProps>, any[]>;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import type { RewriteFormProps, CustomFormItemProps } from '../../../components/form/types';
|
|
3
|
+
import type { RateProps } from 'element-plus';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
form: {
|
|
6
|
+
type: PropType<RewriteFormProps<any>>;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
formItem: {
|
|
10
|
+
type: PropType<CustomFormItemProps<Partial<RateProps>, any>>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
options: import("vue").ComputedRef<import('../../../components/form/types').RewriteFormItemProps<any>>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
formItem: {
|
|
21
|
+
type: PropType<CustomFormItemProps<Partial<RateProps>, any>>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
form: RewriteFormProps<any>;
|
|
26
|
+
formItem: CustomFormItemProps<Partial<RateProps>, any>;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RewriteFormProps, CustomFormItemProps } from '../../../components/form/types';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { SwitchProps } from 'element-plus';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
form: {
|
|
6
|
+
type: PropType<RewriteFormProps<any>>;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
formItem: {
|
|
10
|
+
type: PropType<CustomFormItemProps<Partial<SwitchProps>, any[]>>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
options: import("vue").ComputedRef<import('../../../components/form/types').RewriteFormItemProps<any[]>>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
formItem: {
|
|
21
|
+
type: PropType<CustomFormItemProps<Partial<SwitchProps>, any[]>>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
form: RewriteFormProps<any>;
|
|
26
|
+
formItem: CustomFormItemProps<Partial<SwitchProps>, any[]>;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { RewriteFormProps, CustomFormItemProps } from '../../../components/form/types';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
form: {
|
|
5
|
+
type: PropType<RewriteFormProps<any>>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
formItem: {
|
|
9
|
+
type: PropType<CustomFormItemProps<Partial<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<any, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any>, {} | {
|
|
12
|
+
[x: string]: any;
|
|
13
|
+
}, {}>>>, any[]>>;
|
|
14
|
+
default: () => {};
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
options: import("vue").ComputedRef<import('../../../components/form/types').RewriteFormItemProps<any[]>>;
|
|
18
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
form: {
|
|
20
|
+
type: PropType<RewriteFormProps<any>>;
|
|
21
|
+
default: () => {};
|
|
22
|
+
};
|
|
23
|
+
formItem: {
|
|
24
|
+
type: PropType<CustomFormItemProps<Partial<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<any, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any>, {} | {
|
|
27
|
+
[x: string]: any;
|
|
28
|
+
}, {}>>>, any[]>>;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
}>>, {
|
|
32
|
+
form: RewriteFormProps<any>;
|
|
33
|
+
formItem: CustomFormItemProps<Partial<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<any, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any>, {} | {
|
|
36
|
+
[x: string]: any;
|
|
37
|
+
}, {}>>>, any[]>;
|
|
38
|
+
}, {}>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type FormProps, type FormItemProps, type ColProps, type RowProps, type InputProps, type InputNumberProps, type AutocompleteProps, type ElSelect, type SwitchProps, type DatePickerProps, type ElInput, type ElInputNumber, type ElAutocomplete, type ElTreeSelect, ElSwitch, ElRadio, ElDatePicker, RateProps, CheckboxGroupProps, CheckboxProps, SelectOptionProxy, ElCascader, CascaderProps } from 'element-plus';
|
|
2
|
+
import { SelectProps } from 'element-plus/es/components/select-v2/src/defaults';
|
|
3
|
+
type RewriteColProps = Partial<ColProps>;
|
|
4
|
+
type RewriteRowProps = Partial<RowProps>;
|
|
5
|
+
type TypeName = 'input' | 'select' | 'textarea' | 'input-autocomplete' | 'input-number' | 'switch' | 'datetime' | 'date' | 'week' | 'month' | 'year' | 'datetimerange' | 'daterange' | 'monthrange' | 'custom' | 'radio' | 'tree-select' | 'rate' | 'checkbox' | 'cascader';
|
|
6
|
+
export interface RewriteFormItemProps<T = any[]> extends Partial<InputProps & InputNumberProps & Omit<typeof SelectProps, 'options' | 'props'> & Omit<typeof ElTreeSelect, 'options' | 'data'> & AutocompleteProps & SwitchProps & DatePickerProps & RateProps & CheckboxGroupProps> {
|
|
7
|
+
data?: T | Partial<CheckboxProps[] & SelectOptionProxy[]>;
|
|
8
|
+
options?: T | Partial<CheckboxProps[] & SelectOptionProxy[]>;
|
|
9
|
+
props?: Partial<CascaderProps>;
|
|
10
|
+
on?: Partial<InstanceType<typeof ElInput & typeof ElInputNumber & typeof ElSelect & typeof ElAutocomplete & typeof ElTreeSelect & typeof ElSwitch & typeof ElRadio & typeof ElDatePicker & typeof ElCascader>>;
|
|
11
|
+
}
|
|
12
|
+
export interface CustomFormItemProps<D = any, O = any[]> extends Partial<FormItemProps> {
|
|
13
|
+
key?: any;
|
|
14
|
+
type: TypeName;
|
|
15
|
+
show?: boolean | ((model: D) => boolean);
|
|
16
|
+
vif?: boolean | ((model: D) => boolean);
|
|
17
|
+
label: string;
|
|
18
|
+
sort?: number;
|
|
19
|
+
options?: RewriteFormItemProps<O>;
|
|
20
|
+
showLabel?: true;
|
|
21
|
+
labelDisabled?: boolean;
|
|
22
|
+
labelWrap?: boolean;
|
|
23
|
+
valueDisabled?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
colLayout?: RewriteColProps;
|
|
26
|
+
on?: Partial<InstanceType<typeof ElInput & typeof ElInputNumber & typeof ElSelect & typeof ElAutocomplete & typeof ElTreeSelect & typeof ElSwitch & typeof ElRadio & typeof ElDatePicker>>;
|
|
27
|
+
}
|
|
28
|
+
export interface RewriteFormProps<D = any> extends Omit<Partial<FormProps>, 'model'> {
|
|
29
|
+
model: Partial<D>;
|
|
30
|
+
formItem: {
|
|
31
|
+
[key: string]: CustomFormItemProps;
|
|
32
|
+
};
|
|
33
|
+
colLayout?: RewriteColProps;
|
|
34
|
+
row?: RewriteRowProps;
|
|
35
|
+
showLabel?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface DinertFormProps<D = any> {
|
|
38
|
+
form: RewriteFormProps<D>;
|
|
39
|
+
search?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const labelMouseEnter: (e: MouseEvent, item: any, _this: any) => void;
|
|
2
|
+
export declare const getTooltipValue: (value: any, item: any) => any;
|
|
3
|
+
export declare const valueMouseEnter: (e: MouseEvent, item: any, value: any, _this: any) => void;
|
|
4
|
+
export declare const customPlaceholder: (customName: any, type?: string, name?: string) => string;
|
|
5
|
+
export declare const formItemSlot: (customName: any, name?: string) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RewriteTableColumnCtx, SelectTable, RewriteTableProps } from '../types/index';
|
|
2
|
+
import type Node from 'element-plus/es/components/tree/src/model/node';
|
|
3
|
+
import type { AllowDropType } from 'element-plus/es/components/tree/src/tree.type';
|
|
4
|
+
export declare const allShow: (selectTable: any, tableColumns: RewriteTableColumnCtx[]) => void;
|
|
5
|
+
export declare const checkTree: (data: Node, checked: boolean, childChecked: boolean) => void;
|
|
6
|
+
export declare const treeNode: (selectTable: any, treeData2: any) => Promise<void>;
|
|
7
|
+
export declare const allowDrop: (draggingNode: Node, dropNode: Node, type: AllowDropType) => boolean;
|
|
8
|
+
export declare const nodeDragEnd: (node: Node, selectTable: SelectTable) => void;
|
|
9
|
+
export declare const resizeTaleHeight: (table: any, header: any, body: any, footer: any, headerFooterRef: any, tableProps: RewriteTableProps) => void;
|
|
10
|
+
export declare const treeProps: {
|
|
11
|
+
children: string;
|
|
12
|
+
label: string;
|
|
13
|
+
class: (data: any) => "" | "hide";
|
|
14
|
+
};
|