el-plus-crud 0.0.2

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 (86) hide show
  1. package/.eslintignore +18 -0
  2. package/.eslintrc.js +78 -0
  3. package/.lintstagedrc +3 -0
  4. package/.prettierrc.js +39 -0
  5. package/CHANGELOG.md +5 -0
  6. package/LICENSE +21 -0
  7. package/README.md +15 -0
  8. package/example/App.vue +79 -0
  9. package/example/assets/vue.svg +1 -0
  10. package/example/main.js +18 -0
  11. package/example/style.css +5 -0
  12. package/index.html +13 -0
  13. package/lib/components/el-plus-form/ElPlusForm.vue +744 -0
  14. package/lib/components/el-plus-form/ElPlusFormDialog.vue +107 -0
  15. package/lib/components/el-plus-form/components/ElPlusFormAutocomplete.vue +49 -0
  16. package/lib/components/el-plus-form/components/ElPlusFormBtn.vue +96 -0
  17. package/lib/components/el-plus-form/components/ElPlusFormBtns.vue +133 -0
  18. package/lib/components/el-plus-form/components/ElPlusFormCascader.vue +38 -0
  19. package/lib/components/el-plus-form/components/ElPlusFormCascaderPanel.vue +51 -0
  20. package/lib/components/el-plus-form/components/ElPlusFormCheckbox.vue +42 -0
  21. package/lib/components/el-plus-form/components/ElPlusFormCheckboxButton.vue +42 -0
  22. package/lib/components/el-plus-form/components/ElPlusFormColor.vue +38 -0
  23. package/lib/components/el-plus-form/components/ElPlusFormDate.vue +37 -0
  24. package/lib/components/el-plus-form/components/ElPlusFormDaterange.vue +44 -0
  25. package/lib/components/el-plus-form/components/ElPlusFormDatetime.vue +38 -0
  26. package/lib/components/el-plus-form/components/ElPlusFormFile.vue +47 -0
  27. package/lib/components/el-plus-form/components/ElPlusFormImage.vue +113 -0
  28. package/lib/components/el-plus-form/components/ElPlusFormInput.vue +56 -0
  29. package/lib/components/el-plus-form/components/ElPlusFormLink.vue +271 -0
  30. package/lib/components/el-plus-form/components/ElPlusFormNbinput.vue +51 -0
  31. package/lib/components/el-plus-form/components/ElPlusFormNumber.vue +107 -0
  32. package/lib/components/el-plus-form/components/ElPlusFormPassword.vue +39 -0
  33. package/lib/components/el-plus-form/components/ElPlusFormRadio.vue +42 -0
  34. package/lib/components/el-plus-form/components/ElPlusFormRate.vue +38 -0
  35. package/lib/components/el-plus-form/components/ElPlusFormSelect.vue +149 -0
  36. package/lib/components/el-plus-form/components/ElPlusFormSlider.vue +38 -0
  37. package/lib/components/el-plus-form/components/ElPlusFormStatus.vue +67 -0
  38. package/lib/components/el-plus-form/components/ElPlusFormSwitch.vue +38 -0
  39. package/lib/components/el-plus-form/components/ElPlusFormTag.vue +78 -0
  40. package/lib/components/el-plus-form/components/ElPlusFormText.vue +115 -0
  41. package/lib/components/el-plus-form/components/ElPlusFormTextarea.vue +45 -0
  42. package/lib/components/el-plus-form/components/ElPlusFormTransfer.vue +44 -0
  43. package/lib/components/el-plus-form/components/ElPlusFormTree.vue +53 -0
  44. package/lib/components/el-plus-form/components/ElPlusFormTreeSelect.vue +36 -0
  45. package/lib/components/el-plus-form/components/components/IconSelectorList.vue +92 -0
  46. package/lib/components/el-plus-form/components/components/file-icons/FileIcons.vue +135 -0
  47. package/lib/components/el-plus-form/components/components/file-icons/data/index.ts +27 -0
  48. package/lib/components/el-plus-form/components/components/file-icons/images/doc.svg +13 -0
  49. package/lib/components/el-plus-form/components/components/file-icons/images/file.svg +19 -0
  50. package/lib/components/el-plus-form/components/components/file-icons/images/jpg.svg +14 -0
  51. package/lib/components/el-plus-form/components/components/file-icons/images/pdf.svg +13 -0
  52. package/lib/components/el-plus-form/components/components/file-icons/images/png.svg +13 -0
  53. package/lib/components/el-plus-form/components/components/file-icons/images/ppt.svg +13 -0
  54. package/lib/components/el-plus-form/components/components/file-icons/images/xls.svg +13 -0
  55. package/lib/components/el-plus-form/components/index.ts +17 -0
  56. package/lib/components/el-plus-form/data/file.ts +74 -0
  57. package/lib/components/el-plus-form/images/icon/excel.png +0 -0
  58. package/lib/components/el-plus-form/images/icon/file.png +0 -0
  59. package/lib/components/el-plus-form/images/icon/pdf.png +0 -0
  60. package/lib/components/el-plus-form/images/icon/ppt.png +0 -0
  61. package/lib/components/el-plus-form/images/icon/txt.png +0 -0
  62. package/lib/components/el-plus-form/images/icon/word.png +0 -0
  63. package/lib/components/el-plus-form/images/icon/zip.png +0 -0
  64. package/lib/components/el-plus-form/mixins/index.ts +113 -0
  65. package/lib/components/el-plus-form/util/index.ts +266 -0
  66. package/lib/components/el-plus-form/util/validate.ts +310 -0
  67. package/lib/components/el-plus-table/ElPlusTable.vue +723 -0
  68. package/lib/components/el-plus-table/components/columnItem.vue +185 -0
  69. package/lib/components/el-plus-table/components/header.vue +185 -0
  70. package/lib/components/el-plus-table/components/settingColumn.vue +168 -0
  71. package/lib/components/el-plus-table/components/statisticInfo.vue +47 -0
  72. package/lib/components/el-plus-table/util/index.ts +123 -0
  73. package/lib/config/form.ts +12 -0
  74. package/lib/config/index.ts +9 -0
  75. package/lib/index.ts +29 -0
  76. package/package.json +65 -0
  77. package/public/vite.svg +1 -0
  78. package/tsconfig.json +68 -0
  79. package/types/axios.d.ts +13 -0
  80. package/types/formList.d.ts +365 -0
  81. package/types/global.d.ts +145 -0
  82. package/types/layout.d.ts +57 -0
  83. package/types/mitt.d.ts +38 -0
  84. package/types/pinia.d.ts +149 -0
  85. package/types/views.d.ts +329 -0
  86. package/vite.config.ts +68 -0
package/vite.config.ts ADDED
@@ -0,0 +1,68 @@
1
+ import vue from '@vitejs/plugin-vue'
2
+ import { resolve } from 'path'
3
+ import { defineConfig } from 'vite'
4
+ import vueSetupExtend from 'vite-plugin-vue-setup-extend'
5
+
6
+ const pathResolve = (dir: string) => {
7
+ return resolve(__dirname, '.', dir)
8
+ }
9
+
10
+ const alias: Record<string, string> = {
11
+ '@': pathResolve('./lib/')
12
+ }
13
+
14
+ const viteConfig = defineConfig(() => {
15
+ return {
16
+ plugins: [vue(), vueSetupExtend()],
17
+ root: process.cwd(),
18
+ resolve: { alias },
19
+ base: './',
20
+ server: {
21
+ host: '0.0.0.0',
22
+ port: 9991,
23
+ open: true,
24
+ hmr: true
25
+ },
26
+ build: {
27
+ target: 'modules',
28
+ outDir: 'dist',
29
+ chunkSizeWarningLimit: 500,
30
+ lib: {
31
+ entry: 'lib/index.ts',
32
+ name: 'el-plus-crud',
33
+ formats: ['umd']
34
+ },
35
+ rollupOptions: {
36
+ external: ['vue', 'element-plus'],
37
+ output: {
38
+ // entryFileNames: `static/js/[hash].js`,
39
+ // chunkFileNames: `static/js/[hash].js`,
40
+ // assetFileNames: (asser) => {
41
+ // const suff = asser.name?.substring(asser.name?.lastIndexOf('.') + 1) || ''
42
+ // switch (suff.toLowerCase()) {
43
+ // case 'js':
44
+ // return 'static/js/[hash].js'
45
+ // case 'css':
46
+ // return `static/css/[hash].css`
47
+ // case 'png':
48
+ // case 'jpg':
49
+ // case 'gif':
50
+ // case 'svg':
51
+ // return 'static/images/[hash].[ext]'
52
+ // }
53
+ // return `static/assets/[hash].[ext]`
54
+ // },
55
+ compact: true
56
+ },
57
+ minify: 'esbuild'
58
+ }
59
+ },
60
+ css: { preprocessorOptions: { css: { charset: false } } },
61
+ define: {
62
+ __NEXT_VERSION__: JSON.stringify(process.env.npm_package_version),
63
+ __NEXT_NAME__: JSON.stringify(process.env.npm_package_name)
64
+ }
65
+ }
66
+ })
67
+
68
+ export default viteConfig