el-plus 0.0.38 → 0.0.40

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.
Files changed (95) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +206 -30
  4. package/dist/index.full.min.js +1 -1
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +1 -1
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +203 -28
  9. package/es/components/index.d.ts +1 -0
  10. package/es/components/index.mjs +2 -0
  11. package/es/components/index.mjs.map +1 -1
  12. package/es/components/search-list-page/index.d.ts +12 -12
  13. package/es/components/search-list-page/src/search-list-page.d.ts +1 -1
  14. package/es/components/search-list-page/src/search-list-page.vue.d.ts +5 -5
  15. package/es/components/search-list-page/src/use-search-list-page.d.ts +3 -3
  16. package/es/components/search-list-page/src/use-search-list-page.mjs +4 -1
  17. package/es/components/search-list-page/src/use-search-list-page.mjs.map +1 -1
  18. package/es/components/select/index.d.ts +3 -3
  19. package/es/components/select/src/select.d.ts +1 -1
  20. package/es/components/select/src/select.vue.d.ts +2 -2
  21. package/es/components/table/index.d.ts +3 -3
  22. package/es/components/table/src/table.d.ts +1 -1
  23. package/es/components/table/src/table.vue.d.ts +2 -2
  24. package/es/components/uni-vue/index.d.ts +24 -0
  25. package/es/components/uni-vue/index.mjs +8 -0
  26. package/es/components/uni-vue/index.mjs.map +1 -0
  27. package/es/components/uni-vue/src/uni-vue.d.ts +7 -0
  28. package/es/components/uni-vue/src/uni-vue.mjs +10 -0
  29. package/es/components/uni-vue/src/uni-vue.mjs.map +1 -0
  30. package/es/components/uni-vue/src/uni-vue.vue.d.ts +9 -0
  31. package/es/components/uni-vue/src/uni-vue.vue.mjs +6 -0
  32. package/es/components/uni-vue/src/uni-vue.vue.mjs.map +1 -0
  33. package/es/components/uni-vue/src/uni-vue.vue2.mjs +40 -0
  34. package/es/components/uni-vue/src/uni-vue.vue2.mjs.map +1 -0
  35. package/es/components/uni-vue/src/use-uni-vue.d.ts +3 -0
  36. package/es/components/uni-vue/src/use-uni-vue.mjs +138 -0
  37. package/es/components/uni-vue/src/use-uni-vue.mjs.map +1 -0
  38. package/es/components/uni-vue/style/css.d.ts +2 -0
  39. package/es/components/uni-vue/style/css.mjs +5 -0
  40. package/es/components/uni-vue/style/css.mjs.map +1 -0
  41. package/es/components/uni-vue/style/index.d.ts +2 -0
  42. package/es/components/uni-vue/style/index.mjs +5 -0
  43. package/es/components/uni-vue/style/index.mjs.map +1 -0
  44. package/es/components.mjs +3 -1
  45. package/es/components.mjs.map +1 -1
  46. package/es/index.mjs +2 -0
  47. package/es/index.mjs.map +1 -1
  48. package/es/package.json.mjs +1 -1
  49. package/es/types/global.d.ts +5 -0
  50. package/lib/components/index.d.ts +1 -0
  51. package/lib/components/index.js +5 -0
  52. package/lib/components/index.js.map +1 -1
  53. package/lib/components/search-list-page/index.d.ts +12 -12
  54. package/lib/components/search-list-page/src/search-list-page.d.ts +1 -1
  55. package/lib/components/search-list-page/src/search-list-page.vue.d.ts +5 -5
  56. package/lib/components/search-list-page/src/use-search-list-page.d.ts +3 -3
  57. package/lib/components/search-list-page/src/use-search-list-page.js +4 -1
  58. package/lib/components/search-list-page/src/use-search-list-page.js.map +1 -1
  59. package/lib/components/select/index.d.ts +3 -3
  60. package/lib/components/select/src/select.d.ts +1 -1
  61. package/lib/components/select/src/select.vue.d.ts +2 -2
  62. package/lib/components/table/index.d.ts +3 -3
  63. package/lib/components/table/src/table.d.ts +1 -1
  64. package/lib/components/table/src/table.vue.d.ts +2 -2
  65. package/lib/components/uni-vue/index.d.ts +24 -0
  66. package/lib/components/uni-vue/index.js +15 -0
  67. package/lib/components/uni-vue/index.js.map +1 -0
  68. package/lib/components/uni-vue/src/uni-vue.d.ts +7 -0
  69. package/lib/components/uni-vue/src/uni-vue.js +13 -0
  70. package/lib/components/uni-vue/src/uni-vue.js.map +1 -0
  71. package/lib/components/uni-vue/src/uni-vue.vue.d.ts +9 -0
  72. package/lib/components/uni-vue/src/uni-vue.vue.js +10 -0
  73. package/lib/components/uni-vue/src/uni-vue.vue.js.map +1 -0
  74. package/lib/components/uni-vue/src/uni-vue.vue2.js +44 -0
  75. package/lib/components/uni-vue/src/uni-vue.vue2.js.map +1 -0
  76. package/lib/components/uni-vue/src/use-uni-vue.d.ts +3 -0
  77. package/lib/components/uni-vue/src/use-uni-vue.js +140 -0
  78. package/lib/components/uni-vue/src/use-uni-vue.js.map +1 -0
  79. package/lib/components/uni-vue/style/css.d.ts +2 -0
  80. package/lib/components/uni-vue/style/css.js +7 -0
  81. package/lib/components/uni-vue/style/css.js.map +1 -0
  82. package/lib/components/uni-vue/style/index.d.ts +2 -0
  83. package/lib/components/uni-vue/style/index.js +7 -0
  84. package/lib/components/uni-vue/style/index.js.map +1 -0
  85. package/lib/components.js +3 -1
  86. package/lib/components.js.map +1 -1
  87. package/lib/index.js +11 -6
  88. package/lib/index.js.map +1 -1
  89. package/lib/package.json.js +1 -1
  90. package/lib/types/global.d.ts +5 -0
  91. package/package.json +1 -1
  92. package/theme-chalk/index.css +1 -1
  93. package/theme-chalk/src/index.scss +2 -1
  94. package/theme-chalk/src/uni-vue.scss +11 -0
  95. package/theme-chalk/uni-vue.css +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"use-search-list-page.mjs","sources":["../../../../../../packages/components/search-list-page/src/use-search-list-page.ts"],"sourcesContent":["import { ref, onMounted, computed, useTemplateRef } from 'vue'\nimport type { SearchListPageProps } from './search-list-page'\nimport type { ButtonsProps } from '@el-plus/components/buttons'\nimport type { FormInstance } from '@el-plus/components/form'\nimport type { TableInstance } from '@el-plus/components/table'\nimport type { FormItemProp } from 'element-plus'\nimport { mergeListByKey, getEnv } from '@el-plus/utils'\nimport { useLocale } from '@el-plus/hooks/use-locale'\n\nexport const useSearchListPage = (props: SearchListPageProps, config = {}) => {\n const { calcTableHeight, tableProps, tableRef } = useTable(props, config)\n const { formProps, validate, resetFields, formRef } = useForm(props, {\n calcTableHeight,\n })\n const { buttonsProps, searchButtons, search, reset } = useButtons(props, {\n validate,\n resetFields,\n tableRef,\n })\n return {\n formProps,\n tableProps,\n buttonsProps,\n searchButtons,\n search,\n reset,\n tableRef,\n formRef,\n beforeSearch: validate,\n }\n}\nconst useTable = (props: SearchListPageProps, config) => {\n const instanceName = 'tableRef'\n const tableRef = useTemplateRef<TableInstance>(instanceName)\n const tableHeight = ref(window.innerHeight)\n const tableProps = computed(() => {\n return {\n ref: instanceName,\n columns: props.columns,\n showPagination: true,\n height: tableHeight.value,\n showIndexCol: props.showIndexCol,\n showSelectionCol: props.showSelectionCol,\n showSingleSelectionCol: props.showSingleSelectionCol,\n actionButtons: props.actionButtons,\n formatColumns: props.formatColumns,\n api: props.api,\n reqData: props.formData,\n customColumnModule: props.customColumnModule,\n minWidth: props.minWidth,\n actionColWidth: props.actionColWidth,\n ...props.tableProps,\n }\n })\n const calcTableHeight = () => {\n setTimeout(() => {\n const topHeight = (document.getElementById('top') as HTMLElement)\n .offsetHeight\n const middleHeight = (document.getElementById('middle') as HTMLElement)\n .offsetHeight\n let paginationHeight = 0\n if (tableProps.value.showPagination) {\n paginationHeight =\n (document.querySelector('.el-pagination') as HTMLElement)\n .offsetHeight + 12\n }\n const frameDistance = getEnv() ? 82 + 40 : 40\n tableHeight.value =\n window.innerHeight -\n topHeight -\n middleHeight -\n paginationHeight -\n frameDistance -\n props.offsetTop!\n }, 0)\n }\n\n onMounted(calcTableHeight)\n return {\n tableRef,\n tableProps,\n calcTableHeight,\n }\n}\nconst useForm = (props: SearchListPageProps, { calcTableHeight }) => {\n const instanceName = 'formRef'\n const formRef = useTemplateRef<FormInstance>(instanceName)\n const formProps = computed(() => {\n return {\n ref: instanceName,\n formItemList: props.formItemList,\n isShowFold: true,\n modelValue: props.formData,\n ...props.formProps,\n onToggleStatus: () => {\n calcTableHeight()\n },\n }\n })\n // 校验\n const validate = () => {\n return formRef.value!.validate()\n }\n // 重置校验\n const resetFields = (props: FormItemProp) => {\n return formRef.value!.resetFields(props)\n }\n // 清理某个字段的表单验证信息\n const clearValidate = (props: FormItemProp) => {\n return formRef.value!.clearValidate(props)\n }\n return {\n formProps,\n formRef,\n validate,\n resetFields,\n clearValidate,\n }\n}\nconst useButtons = (\n props: SearchListPageProps,\n { validate, resetFields, tableRef },\n) => {\n const { t } = useLocale()\n const defaultButtons: ButtonsProps['list'] = [\n {\n name: t('ep.searchListPage.add'),\n prop: 'add',\n permission: props.name ? `${props.name}:ADD` : '',\n show: () => {\n return !!props.add\n },\n onClick: () => {\n props.add?.()\n },\n },\n // {\n // name: t('ep.searchListPage.templateDownload'),\n // prop: 'templateDownload',\n // permission: props.name ? `${props.name}:TEMPLATEDOWNLOAD` : '',\n // show: !!props.templateDownloadApi,\n // },\n // {\n // name: t('ep.searchListPage.import'),\n // prop: 'import',\n // permission: props.name ? `${props.name}:IMPORT` : '',\n // show: !!props.importApi,\n // },\n // {\n // name: t('ep.searchListPage.export'),\n // prop: 'export',\n // permission: props.name ? `${props.name}:EXPORT` : '',\n // show: !!props.exportApi,\n // },\n ]\n const list = mergeListByKey(defaultButtons, props.leftButtons)\n if (props.customColumnModule) {\n list.push({\n name: t('ep.customColumn.defineColumn'),\n prop: 'customColumn',\n type: 'primary',\n onClick: () => {\n tableRef.value.openCustomColumnDialog()\n },\n })\n }\n list.forEach((item) => {\n if (item.onClick) {\n const clickFn = item.onClick\n item.onClick = () => {\n // 增加选中项\n const rows = tableRef.value.elTableRef.getSelectionRows()\n clickFn(rows)\n }\n }\n })\n\n const buttonsProps = computed(() => {\n return {\n list,\n ...props.buttonsProps,\n }\n })\n // 搜索\n const search = async (isInitSearch = false) => {\n // await validate()\n tableRef.value.search(isInitSearch)\n }\n // 清空\n const reset = async () => {\n resetFields()\n search(true)\n }\n const searchButtons: ButtonsProps['list'] = [\n {\n name: t('ep.searchListPage.search'),\n type: 'primary',\n onClick: search.bind(null, true),\n },\n {\n name: t('ep.searchListPage.clear'),\n onClick: reset,\n },\n ]\n return {\n buttonsProps,\n searchButtons,\n search,\n reset,\n }\n}\n"],"names":["props"],"mappings":";;;;;AASO,MAAM,iBAAA,GAAoB,CAAC,KAAA,EAA4B,MAAA,GAAS,EAAC,KAAM;AAC5E,EAAA,MAAM,EAAE,eAAA,EAAiB,UAAA,EAAY,UAAS,GAAI,QAAA,CAAS,KAAa,CAAA;AACxE,EAAA,MAAM,EAAE,SAAA,EAAW,QAAA,EAAU,aAAa,OAAA,EAAQ,GAAI,QAAQ,KAAA,EAAO;AAAA,IACnE;AAAA,GACD,CAAA;AACD,EAAA,MAAM,EAAE,YAAA,EAAc,aAAA,EAAe,QAAQ,KAAA,EAAM,GAAI,WAAW,KAAA,EAAO;AAAA,IACvE,QAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA,GACD,CAAA;AACD,EAAA,OAAO;AAAA,IACL,SAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,aAAA;AAAA,IACA,MAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,YAAA,EAAc;AAAA,GAChB;AACF;AACA,MAAM,QAAA,GAAW,CAAC,KAAA,EAA4B,MAAA,KAAW;AACvD,EAAA,MAAM,YAAA,GAAe,UAAA;AACrB,EAAA,MAAM,QAAA,GAAW,eAA8B,YAAY,CAAA;AAC3D,EAAA,MAAM,WAAA,GAAc,GAAA,CAAI,MAAA,CAAO,WAAW,CAAA;AAC1C,EAAA,MAAM,UAAA,GAAa,SAAS,MAAM;AAChC,IAAA,OAAO;AAAA,MACL,GAAA,EAAK,YAAA;AAAA,MACL,SAAS,KAAA,CAAM,OAAA;AAAA,MACf,cAAA,EAAgB,IAAA;AAAA,MAChB,QAAQ,WAAA,CAAY,KAAA;AAAA,MACpB,cAAc,KAAA,CAAM,YAAA;AAAA,MACpB,kBAAkB,KAAA,CAAM,gBAAA;AAAA,MACxB,wBAAwB,KAAA,CAA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AAA,WAAA,EAAY;AACZ,IAAA,MAAA,CAAO,IAAI,CAAA;AAAA,EACb,CAAA;AACA,EAAA,MAAM,aAAA,GAAsC;AAAA,IAC1C;AAAA,MACE,IAAA,EAAM,EAAE,0BAA0B,CAAA;AAAA,MAClC,IAAA,EAAM,SAAA;AAAA,MACN,OAAA,EAAS,MAAA,CAAO,IAAA,CAAK,IAAA,EAAM,IAAI;AAAA,KACjC;AAAA,IACA;AAAA,MACE,IAAA,EAAM,EAAE,yBAAyB,CAAA;AAAA,MACjC,OAAA,EAAS;AAAA;AACX,GACF;AACA,EAAA,OAAO;AAAA,IACL,YAAA;AAAA,IACA,aAAA;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GACF;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"use-search-list-page.mjs","sources":["../../../../../../packages/components/search-list-page/src/use-search-list-page.ts"],"sourcesContent":["import { ref, onMounted, computed, useTemplateRef } from 'vue'\nimport type { SearchListPageProps } from './search-list-page'\nimport type { ButtonsProps } from '@el-plus/components/buttons'\nimport type { FormInstance } from '@el-plus/components/form'\nimport type { TableInstance } from '@el-plus/components/table'\nimport type { FormItemProp } from 'element-plus'\nimport { mergeListByKey, getEnv } from '@el-plus/utils'\nimport { useLocale } from '@el-plus/hooks/use-locale'\n\nexport const useSearchListPage = (props: SearchListPageProps, config = {}) => {\n const { calcTableHeight, tableProps, tableRef } = useTable(props, config)\n const { formProps, validate, resetFields, formRef } = useForm(props, {\n calcTableHeight,\n })\n const { buttonsProps, searchButtons, search, reset } = useButtons(props, {\n validate,\n resetFields,\n tableRef,\n })\n return {\n formProps,\n tableProps,\n buttonsProps,\n searchButtons,\n search,\n reset,\n tableRef,\n formRef,\n beforeSearch: validate,\n }\n}\nconst useTable = (props: SearchListPageProps, config) => {\n const instanceName = 'tableRef'\n const tableRef = useTemplateRef<TableInstance>(instanceName)\n const tableHeight = ref(window.innerHeight)\n const tableProps = computed(() => {\n return {\n ref: instanceName,\n columns: props.columns,\n showPagination: true,\n height: tableHeight.value,\n showIndexCol: props.showIndexCol,\n showSelectionCol: props.showSelectionCol,\n showSingleSelectionCol: props.showSingleSelectionCol,\n actionButtons: props.actionButtons,\n formatColumns: props.formatColumns,\n api: props.api,\n reqData: props.formData,\n customColumnModule: props.customColumnModule,\n minWidth: props.minWidth,\n actionColWidth: props.actionColWidth,\n ...props.tableProps,\n }\n })\n const calcTableHeight = () => {\n setTimeout(() => {\n const topHeight = (document.getElementById('top') as HTMLElement)\n .offsetHeight\n const middleHeight = (document.getElementById('middle') as HTMLElement)\n .offsetHeight\n let paginationHeight = 0\n if (tableProps.value.showPagination) {\n paginationHeight =\n (document.querySelector('.el-pagination') as HTMLElement)\n .offsetHeight + 12\n }\n const frameDistance = getEnv()\n ? // 82\n 48 + 40\n : 40\n tableHeight.value =\n window.innerHeight -\n topHeight -\n middleHeight -\n paginationHeight -\n frameDistance -\n props.offsetTop!\n }, 0)\n }\n\n onMounted(calcTableHeight)\n return {\n tableRef,\n tableProps,\n calcTableHeight,\n }\n}\nconst useForm = (props: SearchListPageProps, { calcTableHeight }) => {\n const instanceName = 'formRef'\n const formRef = useTemplateRef<FormInstance>(instanceName)\n const formProps = computed(() => {\n return {\n ref: instanceName,\n formItemList: props.formItemList,\n isShowFold: true,\n modelValue: props.formData,\n ...props.formProps,\n onToggleStatus: () => {\n calcTableHeight()\n },\n }\n })\n // 校验\n const validate = () => {\n return formRef.value!.validate()\n }\n // 重置校验\n const resetFields = (props: FormItemProp) => {\n return formRef.value!.resetFields(props)\n }\n // 清理某个字段的表单验证信息\n const clearValidate = (props: FormItemProp) => {\n return formRef.value!.clearValidate(props)\n }\n return {\n formProps,\n formRef,\n validate,\n resetFields,\n clearValidate,\n }\n}\nconst useButtons = (\n props: SearchListPageProps,\n { validate, resetFields, tableRef },\n) => {\n const { t } = useLocale()\n const defaultButtons: ButtonsProps['list'] = [\n {\n name: t('ep.searchListPage.add'),\n prop: 'add',\n permission: props.name ? `${props.name}:ADD` : '',\n show: () => {\n return !!props.add\n },\n onClick: () => {\n props.add?.()\n },\n },\n // {\n // name: t('ep.searchListPage.templateDownload'),\n // prop: 'templateDownload',\n // permission: props.name ? `${props.name}:TEMPLATEDOWNLOAD` : '',\n // show: !!props.templateDownloadApi,\n // },\n // {\n // name: t('ep.searchListPage.import'),\n // prop: 'import',\n // permission: props.name ? `${props.name}:IMPORT` : '',\n // show: !!props.importApi,\n // },\n // {\n // name: t('ep.searchListPage.export'),\n // prop: 'export',\n // permission: props.name ? `${props.name}:EXPORT` : '',\n // show: !!props.exportApi,\n // },\n ]\n const list = mergeListByKey(defaultButtons, props.leftButtons)\n if (props.customColumnModule) {\n list.push({\n name: t('ep.customColumn.defineColumn'),\n prop: 'customColumn',\n type: 'primary',\n onClick: () => {\n tableRef.value.openCustomColumnDialog()\n },\n })\n }\n list.forEach((item) => {\n if (item.onClick) {\n const clickFn = item.onClick\n item.onClick = () => {\n // 增加选中项\n const rows = tableRef.value.elTableRef.getSelectionRows()\n clickFn(rows)\n }\n }\n })\n\n const buttonsProps = computed(() => {\n return {\n list,\n ...props.buttonsProps,\n }\n })\n // 搜索\n const search = async (isInitSearch = false) => {\n // await validate()\n tableRef.value.search(isInitSearch)\n }\n // 清空\n const reset = async () => {\n resetFields()\n search(true)\n }\n const searchButtons: ButtonsProps['list'] = [\n {\n name: t('ep.searchListPage.search'),\n type: 'primary',\n onClick: search.bind(null, true),\n },\n {\n name: t('ep.searchListPage.clear'),\n onClick: reset,\n },\n ]\n return {\n buttonsProps,\n searchButtons,\n search,\n reset,\n }\n}\n"],"names":["props"],"mappings":";;;;;AASO,MAAM,iBAAA,GAAoB,CAAC,KAAA,EAA4B,MAAA,GAAS,EAAC,KAAM;AAC5E,EAAA,MAAM,EAAE,eAAA,EAAiB,UAAA,EAAY,UAAS,GAAI,QAAA,CAAS,KAAa,CAAA;AACxE,EAAA,MAAM,EAAE,SAAA,EAAW,QAAA,EAAU,aAAa,OAAA,EAAQ,GAAI,QAAQ,KAAA,EAA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A;AACX,GACF;AACA,EAAA,OAAO;AAAA,IACL,YAAA;AAAA,IACA,aAAA;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GACF;AACF,CAAA;;;;"}
@@ -23,7 +23,7 @@ export declare const EpSelect: {
23
23
  type: import("vue").PropType<import("el-plus/es/types/axios").Api>;
24
24
  };
25
25
  method: {
26
- type: import("vue").PropType<import("el-plus/es/types/axios").Method>;
26
+ type: import("vue").PropType<import("axios").Method>;
27
27
  };
28
28
  reqData: {
29
29
  type: ObjectConstructor;
@@ -246,7 +246,7 @@ export declare const EpSelect: {
246
246
  type: import("vue").PropType<import("el-plus/es/types/axios").Api>;
247
247
  };
248
248
  method: {
249
- type: import("vue").PropType<import("el-plus/es/types/axios").Method>;
249
+ type: import("vue").PropType<import("axios").Method>;
250
250
  };
251
251
  reqData: {
252
252
  type: ObjectConstructor;
@@ -453,7 +453,7 @@ export declare const EpSelect: {
453
453
  type: import("vue").PropType<import("el-plus/es/types/axios").Api>;
454
454
  };
455
455
  method: {
456
- type: import("vue").PropType<import("el-plus/es/types/axios").Method>;
456
+ type: import("vue").PropType<import("axios").Method>;
457
457
  };
458
458
  reqData: {
459
459
  type: ObjectConstructor;
@@ -138,7 +138,7 @@ export declare const selectProps: {
138
138
  type: PropType<import("el-plus/es/types").Api>;
139
139
  };
140
140
  readonly method: {
141
- type: PropType<import("el-plus/es/types").Method>;
141
+ type: PropType<import("axios").Method>;
142
142
  };
143
143
  readonly reqData: {
144
144
  type: ObjectConstructor;
@@ -30,7 +30,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
30
30
  type: import("vue").PropType<import("el-plus/es/types").Api>;
31
31
  };
32
32
  method: {
33
- type: import("vue").PropType<import("el-plus/es/types").Method>;
33
+ type: import("vue").PropType<import("axios").Method>;
34
34
  };
35
35
  reqData: {
36
36
  type: ObjectConstructor;
@@ -194,7 +194,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
194
194
  type: import("vue").PropType<import("el-plus/es/types").Api>;
195
195
  };
196
196
  method: {
197
- type: import("vue").PropType<import("el-plus/es/types").Method>;
197
+ type: import("vue").PropType<import("axios").Method>;
198
198
  };
199
199
  reqData: {
200
200
  type: ObjectConstructor;
@@ -93,7 +93,7 @@ export declare const EpTable: {
93
93
  type: import("vue").PropType<import("el-plus/es/types/axios").Api>;
94
94
  };
95
95
  readonly method: {
96
- type: import("vue").PropType<import("el-plus/es/types/axios").Method>;
96
+ type: import("vue").PropType<import("axios").Method>;
97
97
  };
98
98
  readonly reqData: {
99
99
  type: ObjectConstructor;
@@ -1023,7 +1023,7 @@ export declare const EpTable: {
1023
1023
  type: import("vue").PropType<import("el-plus/es/types/axios").Api>;
1024
1024
  };
1025
1025
  readonly method: {
1026
- type: import("vue").PropType<import("el-plus/es/types/axios").Method>;
1026
+ type: import("vue").PropType<import("axios").Method>;
1027
1027
  };
1028
1028
  readonly reqData: {
1029
1029
  type: ObjectConstructor;
@@ -1912,7 +1912,7 @@ export declare const EpTable: {
1912
1912
  type: import("vue").PropType<import("el-plus/es/types/axios").Api>;
1913
1913
  };
1914
1914
  readonly method: {
1915
- type: import("vue").PropType<import("el-plus/es/types/axios").Method>;
1915
+ type: import("vue").PropType<import("axios").Method>;
1916
1916
  };
1917
1917
  readonly reqData: {
1918
1918
  type: ObjectConstructor;
@@ -76,7 +76,7 @@ export declare const tableProps: {
76
76
  type: PropType<import("el-plus/es/types").Api>;
77
77
  };
78
78
  readonly method: {
79
- type: PropType<import("el-plus/es/types").Method>;
79
+ type: PropType<import("axios").Method>;
80
80
  };
81
81
  readonly reqData: {
82
82
  type: ObjectConstructor;
@@ -57,7 +57,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
57
57
  type: import("vue").PropType<import("el-plus/es/types").Api>;
58
58
  };
59
59
  readonly method: {
60
- type: import("vue").PropType<import("el-plus/es/types").Method>;
60
+ type: import("vue").PropType<import("axios").Method>;
61
61
  };
62
62
  readonly reqData: {
63
63
  type: ObjectConstructor;
@@ -834,7 +834,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
834
834
  type: import("vue").PropType<import("el-plus/es/types").Api>;
835
835
  };
836
836
  readonly method: {
837
- type: import("vue").PropType<import("el-plus/es/types").Method>;
837
+ type: import("vue").PropType<import("axios").Method>;
838
838
  };
839
839
  readonly reqData: {
840
840
  type: ObjectConstructor;
@@ -0,0 +1,24 @@
1
+ export declare const EpUniVue: {
2
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
3
+ readonly name: StringConstructor;
4
+ readonly type: import("vue").PropType<typeof import("./src/uni-vue").componentType[number]>;
5
+ }>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
6
+ P: {};
7
+ B: {};
8
+ D: {};
9
+ C: {};
10
+ M: {};
11
+ Defaults: {};
12
+ }, Readonly<import("vue").ExtractPropTypes<{
13
+ readonly name: StringConstructor;
14
+ readonly type: import("vue").PropType<typeof import("./src/uni-vue").componentType[number]>;
15
+ }>> & Readonly<{}>, {}, {}, {}, {}, {}>;
16
+ __isFragment?: never;
17
+ __isTeleport?: never;
18
+ __isSuspense?: never;
19
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
20
+ readonly name: StringConstructor;
21
+ readonly type: import("vue").PropType<typeof import("./src/uni-vue").componentType[number]>;
22
+ }>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
23
+ export default EpUniVue;
24
+ export * from './src/uni-vue';
@@ -0,0 +1,8 @@
1
+ import _sfc_main from './src/uni-vue.vue2.mjs';
2
+ import { withInstall } from '../../utils/with-install.mjs';
3
+ export { componentType, uniVueProps } from './src/uni-vue.mjs';
4
+
5
+ const EpUniVue = withInstall(_sfc_main);
6
+
7
+ export { EpUniVue, EpUniVue as default };
8
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/components/uni-vue/index.ts"],"sourcesContent":["import UniVue from './src/uni-vue.vue'\nimport { withInstall } from '@el-plus/utils/with-install'\n\nexport const EpUniVue = withInstall(UniVue)\nexport default EpUniVue\nexport * from './src/uni-vue'\n"],"names":["UniVue"],"mappings":";;;;AAGO,MAAM,QAAA,GAAW,YAAYA,SAAM;;;;"}
@@ -0,0 +1,7 @@
1
+ import type { ExtractPublicPropTypes, PropType } from 'vue';
2
+ export declare const componentType: readonly ["bpm", "address"];
3
+ export declare const uniVueProps: {
4
+ readonly name: StringConstructor;
5
+ readonly type: PropType<(typeof componentType)[number]>;
6
+ };
7
+ export type UniVueProps = ExtractPublicPropTypes<typeof uniVueProps>;
@@ -0,0 +1,10 @@
1
+ const componentType = ["bpm", "address"];
2
+ const uniVueProps = {
3
+ name: String,
4
+ // 组件名字
5
+ type: String
6
+ // 组件类型 bpm、 address
7
+ };
8
+
9
+ export { componentType, uniVueProps };
10
+ //# sourceMappingURL=uni-vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uni-vue.mjs","sources":["../../../../../../packages/components/uni-vue/src/uni-vue.ts"],"sourcesContent":["import type { ExtractPublicPropTypes, PropType } from 'vue'\n\nexport const componentType = ['bpm', 'address'] as const\nexport const uniVueProps = {\n name: String, // 组件名字\n type: String as PropType<(typeof componentType)[number]>, // 组件类型 bpm、 address\n} as const\nexport type UniVueProps = ExtractPublicPropTypes<typeof uniVueProps>\n"],"names":[],"mappings":"AAEO,MAAM,aAAA,GAAgB,CAAC,KAAA,EAAO,SAAS;AACvC,MAAM,WAAA,GAAc;AAAA,EACzB,IAAA,EAAM,MAAA;AAAA;AAAA,EACN,IAAA,EAAM;AAAA;AACR;;;;"}
@@ -0,0 +1,9 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ readonly name: StringConstructor;
3
+ readonly type: import("vue").PropType<typeof import("./uni-vue").componentType[number]>;
4
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
5
+ readonly name: StringConstructor;
6
+ readonly type: import("vue").PropType<typeof import("./uni-vue").componentType[number]>;
7
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import _sfc_main from './uni-vue.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
6
+ //# sourceMappingURL=uni-vue.vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uni-vue.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,40 @@
1
+ import { defineComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, unref, normalizeClass, normalizeStyle } from 'vue';
2
+ import { createNameSpace } from '../../../utils/bem.mjs';
3
+ import { uniVueProps } from './uni-vue.mjs';
4
+ import { prepareStyles, prepareClassNames } from '../../../utils/props.mjs';
5
+ import { ElSkeleton } from 'element-plus';
6
+ import { useUniVue } from './use-uni-vue.mjs';
7
+
8
+ var _sfc_main = /* @__PURE__ */ defineComponent({
9
+ ...{
10
+ name: "EpUniVue",
11
+ inheritAttrs: false
12
+ },
13
+ __name: "uni-vue",
14
+ props: uniVueProps,
15
+ setup(__props) {
16
+ const bem = createNameSpace("uni-vue");
17
+ const props = __props;
18
+ const { loading } = useUniVue(props);
19
+ return (_ctx, _cache) => {
20
+ return openBlock(), createElementBlock(Fragment, null, [
21
+ createVNode(unref(ElSkeleton), {
22
+ class: normalizeClass(unref(bem).e("skeleton")),
23
+ loading: unref(loading),
24
+ style: { "background": "#fff", "padding": "5px 15px" },
25
+ rows: 1
26
+ }, null, 8, ["class", "loading"]),
27
+ createElementVNode("div", {
28
+ ref: "uniVue",
29
+ class: normalizeClass(`${unref(bem).b()} ${unref(prepareClassNames)()}`),
30
+ style: normalizeStyle({
31
+ ...unref(prepareStyles)()
32
+ })
33
+ }, null, 6)
34
+ ], 64);
35
+ };
36
+ }
37
+ });
38
+
39
+ export { _sfc_main as default };
40
+ //# sourceMappingURL=uni-vue.vue2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uni-vue.vue2.mjs","sources":["../../../../../../packages/components/uni-vue/src/uni-vue.vue"],"sourcesContent":["<template>\n <el-skeleton\n :class=\"bem.e('skeleton')\"\n :loading=\"loading\"\n style=\"background: #fff; padding: 5px 15px\"\n :rows=\"1\"\n />\n <div\n ref=\"uniVue\"\n :class=\"`${bem.b()} ${prepareClassNames()}`\"\n :style=\"{\n ...prepareStyles(),\n }\"\n />\n</template>\n<script setup lang=\"ts\">\nimport { createNameSpace } from '@el-plus/utils/bem'\nimport { uniVueProps } from './uni-vue'\nimport { prepareClassNames, prepareStyles } from '@el-plus/utils/props'\nimport { ElSkeleton } from 'element-plus'\nimport { useUniVue } from './use-uni-vue'\ndefineOptions({\n name: 'EpUniVue',\n inheritAttrs: false,\n})\nconst bem = createNameSpace('uni-vue')\nconst props = defineProps(uniVueProps)\nconst { loading } = useUniVue(props)\n</script>\n"],"names":["_createVNode","_unref","_normalizeClass","_createElementVNode","_normalizeStyle"],"mappings":";;;;;;;;;;;;;;;AAyBA,IAAA,MAAM,GAAA,GAAM,gBAAgB,SAAS,CAAA;AACrC,IAAA,MAAM,KAAA,GAAQ,OAAA;AACd,IAAA,MAAM,EAAE,OAAA,EAAQ,GAAI,SAAA,CAAU,KAAK,CAAA;;;QA1BjCA,WAAA,CAKEC,KAAA,CAAA,UAAA,CAAA,EAAA;AAAA,UAJC,OAAKC,cAAA,CAAED,KAAA,CAAA,GAAA,CAAA,CAAI,CAAA,CAAC,UAAA,CAAA,CAAA;AAAA,UACZ,OAAA,EAASA,MAAA,OAAA,CAAA;AAAA,UACV,KAAA,EAAA,EAAA,YAAA,EAAA,MAAA,EAAA,WAAA,UAAA,EAAA;AAAA,UACC,IAAA,EAAM;AAAA;QAETE,mBAME,KAAA,EAAA;AAAA,UALA,GAAA,EAAI,QAAA;AAAA,UACH,KAAA,EAAKD,cAAA,CAAA,CAAA,EAAKD,KAAA,CAAA,GAAA,CAAA,CAAI,CAAA,MAAOA,KAAA,CAAA,iBAAA,CAAA,EAAiB,CAAA,CAAA,CAAA;AAAA,UACtC,OAAKG,cAAA,CAAA;AAAA,eAAaH,KAAA,CAAA,aAAA,CAAA;AAAa;;;;;;;;;"}
@@ -0,0 +1,3 @@
1
+ export declare const useUniVue: (props: any) => {
2
+ loading: import("vue").Ref<boolean, boolean>;
3
+ };
@@ -0,0 +1,138 @@
1
+ import { useTemplateRef, ref, useAttrs, onMounted } from 'vue';
2
+ import { http } from '../../../utils/http/index.mjs';
3
+ import Vue2 from 'vue2/dist/vue.min.js';
4
+ import VueRouter3 from 'vue-router3';
5
+ import { componentType } from './uni-vue.mjs';
6
+ import axios from 'axios';
7
+ import { ElLoading, ElMessage } from 'element-plus';
8
+
9
+ const useUniVue = (props) => {
10
+ const uniVue = useTemplateRef("uniVue");
11
+ const { type } = props;
12
+ const loading = ref(true);
13
+ const isAddress = type === "address";
14
+ const isBpm = type === "bpm";
15
+ const isLoadStatic = componentType.indexOf(type) > -1;
16
+ const attrs = useAttrs();
17
+ const setupWindow = () => {
18
+ Vue2.use(VueRouter3);
19
+ if (!window.Vue) {
20
+ window.Vue = Vue2;
21
+ }
22
+ if (isAddress) {
23
+ if (!window.axios) {
24
+ window.axios = axios;
25
+ }
26
+ if (!window.ElementUI) {
27
+ window.ElementUI = {
28
+ Message: ElMessage,
29
+ Loading: ElLoading
30
+ };
31
+ }
32
+ }
33
+ };
34
+ setupWindow();
35
+ const prepareVueAttributes = () => {
36
+ const events = {};
37
+ const _props = {};
38
+ Object.keys(attrs).forEach((key) => {
39
+ if (key.startsWith("on")) {
40
+ let eventName = key.slice(2);
41
+ eventName = eventName.replace(/([A-Z])/g, "-$1").toLowerCase();
42
+ eventName = eventName.slice(1);
43
+ events[eventName] = attrs[key];
44
+ } else {
45
+ _props[key] = attrs[key];
46
+ }
47
+ });
48
+ return {
49
+ on: events,
50
+ props: _props
51
+ };
52
+ };
53
+ const cdn = "//j01.hongxinshop.com/";
54
+ const getStaticJsUrl = () => {
55
+ switch (type) {
56
+ case "bpm":
57
+ return `${cdn}bpm-common/common/index.umd.min.js`;
58
+ case "address":
59
+ return `${cdn}address/static/hx-address-full.js`;
60
+ default:
61
+ return "";
62
+ }
63
+ };
64
+ const getStaticCssUrl = () => {
65
+ switch (type) {
66
+ case "bpm":
67
+ return `/bpm-common/common/index.css`;
68
+ case "address":
69
+ return `/address/static/hx-address.css`;
70
+ default:
71
+ return "";
72
+ }
73
+ };
74
+ const hasLoadStaticJsResource = () => {
75
+ let globalName;
76
+ if (isAddress) {
77
+ globalName = "hxAddress";
78
+ }
79
+ if (isBpm) {
80
+ globalName = "index";
81
+ }
82
+ if (window[globalName]) return true;
83
+ return false;
84
+ };
85
+ const loadStaticJsResource = async () => {
86
+ return new Promise((resolve, reject) => {
87
+ if (hasLoadStaticJsResource()) return resolve("");
88
+ const script = document.createElement("script");
89
+ script.src = getStaticJsUrl();
90
+ script.onload = resolve;
91
+ script.onerror = reject;
92
+ document.body.appendChild(script);
93
+ });
94
+ };
95
+ const loadStaticCssResource = async () => {
96
+ const { data: css } = await http.request(getStaticCssUrl(), {
97
+ responseReturn: "raw"
98
+ });
99
+ return css;
100
+ };
101
+ const setupInstance = async () => {
102
+ if (import.meta.hot) return;
103
+ const el = uniVue.value;
104
+ const shadowRoot = el.attachShadow({ mode: "open" });
105
+ const container = document.createElement("div");
106
+ if (isLoadStatic) {
107
+ try {
108
+ loading.value = true;
109
+ const [_res1, css] = await Promise.all([
110
+ loadStaticJsResource(),
111
+ loadStaticCssResource()
112
+ ]);
113
+ const style = document.createElement("style");
114
+ style.textContent = css;
115
+ shadowRoot.appendChild(style);
116
+ } catch (error) {
117
+ console.log(error);
118
+ } finally {
119
+ loading.value = false;
120
+ }
121
+ }
122
+ shadowRoot.appendChild(container);
123
+ new Vue2({
124
+ el: container,
125
+ router: new VueRouter3(),
126
+ render: (h) => h(props.name, prepareVueAttributes())
127
+ });
128
+ };
129
+ onMounted(() => {
130
+ setupInstance();
131
+ });
132
+ return {
133
+ loading
134
+ };
135
+ };
136
+
137
+ export { useUniVue };
138
+ //# sourceMappingURL=use-uni-vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-uni-vue.mjs","sources":["../../../../../../packages/components/uni-vue/src/use-uni-vue.ts"],"sourcesContent":["import { onMounted, ref, useAttrs, useTemplateRef } from 'vue'\nimport { http } from '@el-plus/utils/http'\nimport Vue2 from 'vue2/dist/vue.min.js'\nimport VueRouter3 from 'vue-router3'\nimport { componentType } from './uni-vue'\nimport axios from 'axios'\nimport { ElMessage, ElLoading } from 'element-plus'\nexport const useUniVue = (props) => {\n const uniVue = useTemplateRef<HTMLElement>('uniVue')\n const { type } = props\n const loading = ref(true)\n const isAddress = type === 'address'\n const isBpm = type === 'bpm'\n // 是否需要加载静态资源\n const isLoadStatic = componentType.indexOf(type) > -1\n const attrs = useAttrs()\n const setupWindow = () => {\n Vue2.use(VueRouter3)\n if (!window.Vue) {\n window.Vue = Vue2\n }\n // 地址\n if (isAddress) {\n if (!window.axios) {\n window.axios = axios\n }\n if (!window.ElementUI) {\n window.ElementUI = {\n Message: ElMessage,\n Loading: ElLoading,\n }\n }\n }\n }\n setupWindow()\n const prepareVueAttributes = () => {\n const events = {}\n const _props = {}\n Object.keys(attrs).forEach((key) => {\n // 如果key以on开头,就是事件,转换为下划线\n if (key.startsWith('on')) {\n let eventName = key.slice(2) // 去掉 'on' 前缀\n // 将驼峰命名转换为下划线命名\n eventName = eventName.replace(/([A-Z])/g, '-$1').toLowerCase()\n // 删除第一位的-\n eventName = eventName.slice(1)\n events[eventName] = attrs[key]\n } else {\n _props[key] = attrs[key]\n }\n })\n return {\n on: events,\n props: _props,\n }\n }\n\n const cdn = '//j01.hongxinshop.com/'\n const getStaticJsUrl = () => {\n switch (type) {\n case 'bpm':\n return `${cdn}bpm-common/common/index.umd.min.js`\n case 'address':\n return `${cdn}address/static/hx-address-full.js`\n default:\n return ''\n }\n }\n const getStaticCssUrl = () => {\n switch (type) {\n case 'bpm':\n return `/bpm-common/common/index.css`\n case 'address':\n return `/address/static/hx-address.css`\n default:\n return ''\n }\n }\n const hasLoadStaticJsResource = () => {\n let globalName\n if (isAddress) {\n globalName = 'hxAddress'\n }\n if (isBpm) {\n globalName = 'index'\n }\n if (window[globalName]) return true\n return false\n }\n const loadStaticJsResource = async () => {\n return new Promise((resolve, reject) => {\n if (hasLoadStaticJsResource()) return resolve('')\n const script = document.createElement('script')\n script.src = getStaticJsUrl()\n script.onload = resolve\n script.onerror = reject\n document.body.appendChild(script)\n })\n }\n const loadStaticCssResource = async () => {\n const { data: css } = await http.request<string>(getStaticCssUrl(), {\n responseReturn: 'raw',\n })\n return css\n }\n const setupInstance = async () => {\n if (import.meta.hot) return // 每次热更新都会执行,在这里阻止,防止每次热更新页面都会重复插入组件\n const el = uniVue.value // 选择一个宿主元素\n const shadowRoot = el!.attachShadow({ mode: 'open' }) // 创建一个开放模式的 shadow root\n const container = document.createElement('div')\n if (isLoadStatic) {\n try {\n loading.value = true\n const [_res1, css] = await Promise.all([\n loadStaticJsResource(),\n loadStaticCssResource(),\n ])\n const style = document.createElement('style')\n style.textContent = css\n shadowRoot.appendChild(style)\n } catch (error) {\n console.log(error)\n } finally {\n loading.value = false\n }\n }\n shadowRoot.appendChild(container)\n new Vue2({\n el: container,\n router: new VueRouter3(),\n render: (h) => h(props.name, prepareVueAttributes()),\n })\n }\n onMounted(() => {\n setupInstance()\n })\n return {\n loading,\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAOO,MAAM,SAAA,GAAY,CAAC,KAAA,KAAU;AAClC,EAAA,MAAM,MAAA,GAAS,eAA4B,QAAQ,CAAA;AACnD,EAAA,MAAM,EAAE,MAAK,GAAI,KAAA;AACjB,EAAA,MAAM,OAAA,GAAU,IAAI,IAAI,CAAA;AACxB,EAAA,MAAM,YAAY,IAAA,KAAS,SAAA;AAC3B,EAAA,MAAM,QAAQ,IAAA,KAAS,KAAA;AAEvB,EAAA,MAAM,YAAA,GAAe,aAAA,CAAc,OAAA,CAAQ,IAAI,CAAA,GAAI,EAAA;AACnD,EAAA,MAAM,QAAQ,QAAA,EAAS;AACvB,EAAA,MAAM,cAAc,MAAM;AACxB,IAAA,IAAA,CAAK,IAAI,UAAU,CAAA;AACnB,IAAA,IAAI,CAAC,OAAO,GAAA,EAAK;AACf,MAAA,MAAA,CAAO,GAAA,GAAM,IAAA;AAAA,IACf;AAEA,IAAA,IAAI,SAAA,EAAW;AACb,MAAA,IAAI,CAAC,OAAO,KAAA,EAAO;AACjB,QAAA,MAAA,CAAO,KAAA,GAAQ,KAAA;AAAA,MACjB;AACA,MAAA,IAAI,CAAC,OAAO,SAAA,EAAW;AACrB,QAAA,MAAA,CAAO,SAAA,GAAY;AAAA,UACjB,OAAA,EAAS,SAAA;AAAA,UACT,OAAA,EAAS;AAAA,SACX;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAA;AACA,EAAA,WAAA,EAAY;AACZ,EAAA,MAAM,uBAAuB,MAAM;AACjC,IAAA,MAAM,SAAS,EAAC;AAChB,IAAA,MAAM,SAAS,EAAC;AAChB,IAAA,MAAA,CAAO,IAAA,CAAK,KAAK,CAAA,CAAE,OAAA,CAAQ,CAAC,GAAA,KAAQ;AAElC,MAAA,IAAI,GAAA,CAAI,UAAA,CAAW,IAA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rB,qBAAA;AAAsB,SACvB,CAAA;AACD,QAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,aAAA,CAAc,OAAO,CAAA;AAC5C,QAAA,KAAA,CAAM,WAAA,GAAc,GAAA;AACpB,QAAA,UAAA,CAAW,YAAY,KAAK,CAAA;AAAA,MAC9B,SAAS,KAAA,EAAO;AACd,QAAA,OAAA,CAAQ,IAAI,KAAK,CAAA;AAAA,MACnB,CAAA,SAAE;AACA,QAAA,OAAA,CAAQ,KAAA,GAAQ,KAAA;AAAA,MAClB;AAAA,IACF;AACA,IAAA,UAAA,CAAW,YAAY,SAAS,CAAA;AAChC,IAAA,IAAI,IAAA,CAAK;AAAA,MACP,EAAA,EAAI,SAAA;AAAA,MACJ,MAAA,EAAQ,IAAI,UAAA,EAAW;AAAA,MACvB,QAAQ,CAAC,CAAA,KAAM,EAAE,KAAA,CAAM,IAAA,EAAM,sBAAsB;AAAA,KACpD,CAAA;AAAA,EACH,CAAA;AACA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,aAAA,EAAc;AAAA,EAChB,CAAC,CAAA;AACD,EAAA,OAAO;AAAA,IACL;AAAA,GACF;AACF;;;;"}
@@ -0,0 +1,2 @@
1
+ import 'el-plus/es/components/base/style/css';
2
+ import 'el-plus/es/theme-chalk/uni-vue.css';
@@ -0,0 +1,5 @@
1
+ import '../../base/style/css.mjs';
2
+ import 'el-plus/theme-chalk/uni-vue.css';
3
+
4
+ "use strict";
5
+ //# sourceMappingURL=css.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,2 @@
1
+ import 'el-plus/es/components/base/style';
2
+ import 'el-plus/es/theme-chalk/src/uni-vue.scss';
@@ -0,0 +1,5 @@
1
+ import '../../base/style/index.mjs';
2
+ import 'el-plus/theme-chalk/src/uni-vue.scss';
3
+
4
+ "use strict";
5
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
package/es/components.mjs CHANGED
@@ -10,6 +10,7 @@ import { EpDatePickerRange } from './components/date-picker-range/index.mjs';
10
10
  import { EpCustomColumn } from './components/custom-column/index.mjs';
11
11
  import { EpLink } from './components/link/index.mjs';
12
12
  import { EpAttachment } from './components/attachment/index.mjs';
13
+ import { EpUniVue } from './components/uni-vue/index.mjs';
13
14
 
14
15
  var components = [
15
16
  EpButtons,
@@ -23,7 +24,8 @@ var components = [
23
24
  EpDatePickerRange,
24
25
  EpCustomColumn,
25
26
  EpLink,
26
- EpAttachment
27
+ EpAttachment,
28
+ EpUniVue
27
29
  ];
28
30
 
29
31
  export { components as default };
@@ -1 +1 @@
1
- {"version":3,"file":"components.mjs","sources":["../../../packages/el-plus/components.ts"],"sourcesContent":["import type { Plugin } from 'vue'\nimport Buttons from '@el-plus/components/buttons'\nimport Form from '@el-plus/components/form'\nimport Input from '@el-plus/components/input'\nimport SearchListPage from '@el-plus/components/search-list-page'\nimport Select from '@el-plus/components/select'\nimport Table from '@el-plus/components/table'\nimport Title from '@el-plus/components/title'\nimport Header from '@el-plus/components/header'\nimport DatePickerRange from '@el-plus/components/date-picker-range'\nimport CustomColumn from '@el-plus/components/custom-column'\nimport Link from '@el-plus/components/link'\nimport Attachment from '@el-plus/components/attachment'\n\nexport default [\n Buttons,\n Form,\n Input,\n SearchListPage,\n Select,\n Table,\n Title,\n Header,\n DatePickerRange,\n CustomColumn,\n Link,\n Attachment,\n] as Plugin[]\n"],"names":["Buttons","Form","Input","SearchListPage","Select","Table","Title","Header","DatePickerRange","CustomColumn","Link","Attachment"],"mappings":";;;;;;;;;;;;;AAcA,iBAAe;AAAA,EACbA,SAAA;AAAA,EACAC,MAAA;AAAA,EACAC,OAAA;AAAA,EACAC,gBAAA;AAAA,EACAC,QAAA;AAAA,EACAC,OAAA;AAAA,EACAC,OAAA;AAAA,EACAC,QAAA;AAAA,EACAC,iBAAA;AAAA,EACAC,cAAA;AAAA,EACAC,MAAA;AAAA,EACAC;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"components.mjs","sources":["../../../packages/el-plus/components.ts"],"sourcesContent":["import type { Plugin } from 'vue'\nimport Buttons from '@el-plus/components/buttons'\nimport Form from '@el-plus/components/form'\nimport Input from '@el-plus/components/input'\nimport SearchListPage from '@el-plus/components/search-list-page'\nimport Select from '@el-plus/components/select'\nimport Table from '@el-plus/components/table'\nimport Title from '@el-plus/components/title'\nimport Header from '@el-plus/components/header'\nimport DatePickerRange from '@el-plus/components/date-picker-range'\nimport CustomColumn from '@el-plus/components/custom-column'\nimport Link from '@el-plus/components/link'\nimport Attachment from '@el-plus/components/attachment'\nimport UniVue from '@el-plus/components/uni-vue'\n\nexport default [\n Buttons,\n Form,\n Input,\n SearchListPage,\n Select,\n Table,\n Title,\n Header,\n DatePickerRange,\n CustomColumn,\n Link,\n Attachment,\n UniVue,\n] as Plugin[]\n"],"names":["Buttons","Form","Input","SearchListPage","Select","Table","Title","Header","DatePickerRange","CustomColumn","Link","Attachment","UniVue"],"mappings":";;;;;;;;;;;;;;AAeA,iBAAe;AAAA,EACbA,SAAA;AAAA,EACAC,MAAA;AAAA,EACAC,OAAA;AAAA,EACAC,gBAAA;AAAA,EACAC,QAAA;AAAA,EACAC,OAAA;AAAA,EACAC,OAAA;AAAA,EACAC,QAAA;AAAA,EACAC,iBAAA;AAAA,EACAC,cAAA;AAAA,EACAC,MAAA;AAAA,EACAC,YAAA;AAAA,EACAC;AACF,CAAA;;;;"}
package/es/index.mjs CHANGED
@@ -29,6 +29,8 @@ export { linkProps } from './components/link/src/link.mjs';
29
29
  export { EpLink } from './components/link/index.mjs';
30
30
  export { attachmentProps } from './components/attachment/src/attachment.mjs';
31
31
  export { EpAttachment } from './components/attachment/index.mjs';
32
+ export { componentType, uniVueProps } from './components/uni-vue/src/uni-vue.mjs';
33
+ export { EpUniVue } from './components/uni-vue/index.mjs';
32
34
  export { useRequest } from './hooks/use-request.mjs';
33
35
  export { useTemplatePromise } from './hooks/use-template-promise.mjs';
34
36
  export { useDialog } from './hooks/dialog/use-dialog.mjs';
package/es/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../packages/el-plus/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport components from './components'\nimport { version } from './package.json'\nimport * as plugins from './plugins'\n// import type { RouteRecordRaw } from 'vue-router'\n\nconst INSTALLED_KEY = Symbol('INSTALLED_KEY')\nconst provideGlobalConfig = (config, app) => {}\nexport type EpOptions = {\n // routes?: RouteRecordRaw\n}\nexport const install = (app: App, options?: EpOptions) => {\n if (app[INSTALLED_KEY]) return // 防止多次use导致重复安装注册,控制台警告\n app[INSTALLED_KEY] = true\n components.forEach((c) => app.use(c))\n Object.values(plugins).forEach((p) => app.use(p))\n if (options) {\n provideGlobalConfig(options, app)\n }\n}\n\nconst plugin: Plugin & { version: string } = {\n install,\n version,\n}\nexport default plugin\nexport * from '@el-plus/components/index'\nexport * from '@el-plus/hooks'\nexport * from '@el-plus/directives'\n"],"names":["plugins"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,aAAA,0BAAuB,eAAe,CAAA;AAKrC,MAAM,OAAA,GAAU,CAAC,GAAA,EAAU,OAAA,KAAwB;AACxD,EAAA,IAAI,GAAA,CAAI,aAAa,CAAA,EAAG;AACxB,EAAA,GAAA,CAAI,aAAa,CAAA,GAAI,IAAA;AACrB,EAAA,UAAA,CAAW,QAAQ,CAAC,CAAA,KAAM,GAAA,CAAI,GAAA,CAAI,CAAC,CAAC,CAAA;AACpC,EAAA,MAAA,CAAO,MAAA,CAAOA,KAAO,CAAA,CAAE,OAAA,CAAQ,CAAC,CAAA,KAAM,GAAA,CAAI,GAAA,CAAI,CAAC,CAAC,CAAA;AAIlD;AAEA,MAAM,MAAA,GAAuC;AAAA,EAC3C,OAAA;AAAA,EACA;AACF;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../packages/el-plus/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport components from './components'\nimport { version } from './package.json'\nimport * as plugins from './plugins'\n// import type { RouteRecordRaw } from 'vue-router'\n\nconst INSTALLED_KEY = Symbol('INSTALLED_KEY')\nconst provideGlobalConfig = (config, app) => {}\nexport type EpOptions = {\n // routes?: RouteRecordRaw\n}\nexport const install = (app: App, options?: EpOptions) => {\n if (app[INSTALLED_KEY]) return // 防止多次use导致重复安装注册,控制台警告\n app[INSTALLED_KEY] = true\n components.forEach((c) => app.use(c))\n Object.values(plugins).forEach((p) => app.use(p))\n if (options) {\n provideGlobalConfig(options, app)\n }\n}\n\nconst plugin: Plugin & { version: string } = {\n install,\n version,\n}\nexport default plugin\nexport * from '@el-plus/components/index'\nexport * from '@el-plus/hooks'\nexport * from '@el-plus/directives'\n"],"names":["plugins"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,aAAA,0BAAuB,eAAe,CAAA;AAKrC,MAAM,OAAA,GAAU,CAAC,GAAA,EAAU,OAAA,KAAwB;AACxD,EAAA,IAAI,GAAA,CAAI,aAAa,CAAA,EAAG;AACxB,EAAA,GAAA,CAAI,aAAa,CAAA,GAAI,IAAA;AACrB,EAAA,UAAA,CAAW,QAAQ,CAAC,CAAA,KAAM,GAAA,CAAI,GAAA,CAAI,CAAC,CAAC,CAAA;AACpC,EAAA,MAAA,CAAO,MAAA,CAAOA,KAAO,CAAA,CAAE,OAAA,CAAQ,CAAC,CAAA,KAAM,GAAA,CAAI,GAAA,CAAI,CAAC,CAAC,CAAA;AAIlD;AAEA,MAAM,MAAA,GAAuC;AAAA,EAC3C,OAAA;AAAA,EACA;AACF;;;;"}
@@ -1,4 +1,4 @@
1
- var version = "0.0.38";
1
+ var version = "0.0.40";
2
2
 
3
3
  export { version };
4
4
  //# sourceMappingURL=package.json.mjs.map
@@ -1,4 +1,5 @@
1
1
  import type { NavigationConfig } from '@el-plus/utils'
2
+ import type { AxiosStatic } from 'axios'
2
3
 
3
4
  declare global {
4
5
  interface Window {
@@ -10,5 +11,9 @@ declare global {
10
11
  selectedRouterTags?: any[]
11
12
  closeTag?: (tag: any) => void
12
13
  currentRouterTagIndex?: number
14
+ Vue: any
15
+ hxLangPluginInstall: () => void
16
+ axios: AxiosStatic
17
+ ElementUI: any
13
18
  }
14
19
  }
@@ -10,3 +10,4 @@ export * from './date-picker-range';
10
10
  export * from './custom-column';
11
11
  export * from './link';
12
12
  export * from './attachment';
13
+ export * from './uni-vue';
@@ -12,6 +12,7 @@ var index$8 = require('./date-picker-range/index.js');
12
12
  var index$9 = require('./custom-column/index.js');
13
13
  var index$a = require('./link/index.js');
14
14
  var index$b = require('./attachment/index.js');
15
+ var index$c = require('./uni-vue/index.js');
15
16
  var buttons = require('./buttons/src/buttons.js');
16
17
  var form = require('./form/src/form.js');
17
18
  var formItem = require('./form/src/form-item.js');
@@ -26,6 +27,7 @@ var datePickerRange = require('./date-picker-range/src/date-picker-range.js');
26
27
  var customColumn = require('./custom-column/src/custom-column.js');
27
28
  var link = require('./link/src/link.js');
28
29
  var attachment = require('./attachment/src/attachment.js');
30
+ var uniVue = require('./uni-vue/src/uni-vue.js');
29
31
 
30
32
 
31
33
 
@@ -41,6 +43,7 @@ exports.EpDatePickerRange = index$8.EpDatePickerRange;
41
43
  exports.EpCustomColumn = index$9.EpCustomColumn;
42
44
  exports.EpLink = index$a.EpLink;
43
45
  exports.EpAttachment = index$b.EpAttachment;
46
+ exports.EpUniVue = index$c.EpUniVue;
44
47
  exports.buttonsProps = buttons.buttonsProps;
45
48
  exports.expandFormPropsKeys = form.expandFormPropsKeys;
46
49
  exports.formEmits = form.formEmits;
@@ -72,4 +75,6 @@ exports.customColumnEmits = customColumn.customColumnEmits;
72
75
  exports.customColumnProps = customColumn.customColumnProps;
73
76
  exports.linkProps = link.linkProps;
74
77
  exports.attachmentProps = attachment.attachmentProps;
78
+ exports.componentType = uniVue.componentType;
79
+ exports.uniVueProps = uniVue.uniVueProps;
75
80
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}