Commit e024f6a6e76d531fa00d8895fb0cfca9f1cc15a4
1 parent
cb1759b2
fix: typo
Showing
8 changed files
with
22 additions
and
55 deletions
build/vite/plugin/index.ts
... | ... | @@ -14,7 +14,6 @@ import { configVisualizerConfig } from './visualizer'; |
14 | 14 | import { configThemePlugin } from './theme'; |
15 | 15 | import { configImageminPlugin } from './imagemin'; |
16 | 16 | import { configSvgIconsPlugin } from './svgSprite'; |
17 | -import { configHmrPlugin } from './hmr'; | |
18 | 17 | |
19 | 18 | export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { |
20 | 19 | const { |
... | ... | @@ -37,9 +36,6 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { |
37 | 36 | // vite-plugin-windicss |
38 | 37 | vitePlugins.push(windiCSS()); |
39 | 38 | |
40 | - // TODO | |
41 | - !isBuild && vitePlugins.push(configHmrPlugin()); | |
42 | - | |
43 | 39 | // @vitejs/plugin-legacy |
44 | 40 | VITE_LEGACY && isBuild && vitePlugins.push(legacy()); |
45 | 41 | ... | ... |
package.json
... | ... | @@ -38,6 +38,8 @@ |
38 | 38 | "@iconify/iconify": "^2.1.0", |
39 | 39 | "@logicflow/core": "^0.7.11", |
40 | 40 | "@logicflow/extension": "^0.7.11", |
41 | + "@vue/runtime-core": "^3.2.23", | |
42 | + "@vue/shared": "^3.2.23", | |
41 | 43 | "@vueuse/core": "^7.1.2", |
42 | 44 | "@vueuse/shared": "^7.1.2", |
43 | 45 | "@zxcvbn-ts/core": "^1.0.0", | ... | ... |
pnpm-lock.yaml
... | ... | @@ -36,6 +36,8 @@ specifiers: |
36 | 36 | '@vitejs/plugin-vue': ^1.10.1 |
37 | 37 | '@vitejs/plugin-vue-jsx': ^1.3.0 |
38 | 38 | '@vue/compiler-sfc': 3.2.23 |
39 | + '@vue/runtime-core': ^3.2.23 | |
40 | + '@vue/shared': ^3.2.23 | |
39 | 41 | '@vue/test-utils': ^2.0.0-rc.17 |
40 | 42 | '@vueuse/core': ^7.1.2 |
41 | 43 | '@vueuse/shared': ^7.1.2 |
... | ... | @@ -122,6 +124,8 @@ dependencies: |
122 | 124 | '@iconify/iconify': 2.1.0 |
123 | 125 | '@logicflow/core': 0.7.11 |
124 | 126 | '@logicflow/extension': 0.7.11 |
127 | + '@vue/runtime-core': 3.2.23 | |
128 | + '@vue/shared': 3.2.23 | |
125 | 129 | '@vueuse/core': 7.1.2_vue@3.2.23 |
126 | 130 | '@vueuse/shared': 7.1.2_vue@3.2.23 |
127 | 131 | '@zxcvbn-ts/core': 1.0.0 | ... | ... |
src/components/Table/index.ts
... | ... | @@ -2,6 +2,7 @@ export { default as BasicTable } from './src/BasicTable.vue'; |
2 | 2 | export { default as TableAction } from './src/components/TableAction.vue'; |
3 | 3 | export { default as EditTableHeaderIcon } from './src/components/EditTableHeaderIcon.vue'; |
4 | 4 | export { default as TableImg } from './src/components/TableImg.vue'; |
5 | + | |
5 | 6 | export * from './src/types/table'; |
6 | 7 | export * from './src/types/pagination'; |
7 | 8 | export * from './src/types/tableAction'; | ... | ... |
src/components/Table/src/props.ts
... | ... | @@ -15,10 +15,10 @@ import { DEFAULT_FILTER_FN, DEFAULT_SORT_FN, FETCH_SETTING, DEFAULT_SIZE } from |
15 | 15 | import { propTypes } from '/@/utils/propTypes'; |
16 | 16 | |
17 | 17 | export const basicProps = { |
18 | - clickToRowSelect: propTypes.bool.def(true), | |
19 | - isTreeTable: propTypes.bool.def(false), | |
18 | + clickToRowSelect: { type: Boolean, default: true }, | |
19 | + isTreeTable: Boolean, | |
20 | 20 | tableSetting: propTypes.shape<TableSetting>({}), |
21 | - inset: propTypes.bool, | |
21 | + inset: Boolean, | |
22 | 22 | sortFn: { |
23 | 23 | type: Function as PropType<(sortInfo: SorterResult) => any>, |
24 | 24 | default: DEFAULT_SORT_FN, |
... | ... | @@ -27,10 +27,10 @@ export const basicProps = { |
27 | 27 | type: Function as PropType<(data: Partial<Recordable<string[]>>) => any>, |
28 | 28 | default: DEFAULT_FILTER_FN, |
29 | 29 | }, |
30 | - showTableSetting: propTypes.bool, | |
31 | - autoCreateKey: propTypes.bool.def(true), | |
32 | - striped: propTypes.bool.def(true), | |
33 | - showSummary: propTypes.bool, | |
30 | + showTableSetting: Boolean, | |
31 | + autoCreateKey: { type: Boolean, default: true }, | |
32 | + striped: { type: Boolean, default: true }, | |
33 | + showSummary: Boolean, | |
34 | 34 | summaryFunc: { |
35 | 35 | type: [Function, Array] as PropType<(...arg: any[]) => any[]>, |
36 | 36 | default: null, |
... | ... | @@ -40,7 +40,7 @@ export const basicProps = { |
40 | 40 | default: null, |
41 | 41 | }, |
42 | 42 | indentSize: propTypes.number.def(24), |
43 | - canColDrag: propTypes.bool.def(true), | |
43 | + canColDrag: { type: Boolean, default: true }, | |
44 | 44 | api: { |
45 | 45 | type: Function as PropType<(...arg: any[]) => Promise<any>>, |
46 | 46 | default: null, |
... | ... | @@ -64,8 +64,8 @@ export const basicProps = { |
64 | 64 | }, |
65 | 65 | }, |
66 | 66 | // 立即请求接口 |
67 | - immediate: propTypes.bool.def(true), | |
68 | - emptyDataIsShowTable: propTypes.bool.def(true), | |
67 | + immediate: { type: Boolean, default: true }, | |
68 | + emptyDataIsShowTable: { type: Boolean, default: true }, | |
69 | 69 | // 额外的请求参数 |
70 | 70 | searchInfo: { |
71 | 71 | type: Object as PropType<Recordable>, |
... | ... | @@ -87,7 +87,7 @@ export const basicProps = { |
87 | 87 | type: [Array] as PropType<BasicColumn[]>, |
88 | 88 | default: () => [], |
89 | 89 | }, |
90 | - showIndexColumn: propTypes.bool.def(true), | |
90 | + showIndexColumn: { type: Boolean, default: true }, | |
91 | 91 | indexColumnProps: { |
92 | 92 | type: Object as PropType<BasicColumn>, |
93 | 93 | default: null, |
... | ... | @@ -96,8 +96,8 @@ export const basicProps = { |
96 | 96 | type: Object as PropType<BasicColumn>, |
97 | 97 | default: null, |
98 | 98 | }, |
99 | - ellipsis: propTypes.bool.def(true), | |
100 | - canResize: propTypes.bool.def(true), | |
99 | + ellipsis: { type: Boolean, default: true }, | |
100 | + canResize: { type: Boolean, default: true }, | |
101 | 101 | clearSelectOnPageChange: propTypes.bool, |
102 | 102 | resizeHeightOffset: propTypes.number.def(0), |
103 | 103 | rowSelection: { | ... | ... |
src/design/ant/btn.less
1 | 1 | // button reset |
2 | 2 | .ant-btn { |
3 | - // display: inline-flex; | |
4 | - // justify-content: center; | |
5 | - // align-items: center; | |
6 | - // &.ant-btn-success:not(.ant-btn-link), | |
7 | - // &.ant-btn-error:not(.ant-btn-link), | |
8 | - // &.ant-btn-warning:not(.ant-btn-link), | |
9 | - // &.ant-btn-primary:not(.ant-btn-link) { | |
10 | - // box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08) !important; | |
11 | - // } | |
12 | - // &-group { | |
13 | - // .ant-btn:not(:first-child) { | |
14 | - // bottom: 1px; | |
15 | - // } | |
16 | - // } | |
17 | 3 | &-link:hover, |
18 | 4 | &-link:focus, |
19 | 5 | &-link:active { |
... | ... | @@ -29,23 +15,12 @@ |
29 | 15 | color: @white; |
30 | 16 | background-color: @button-primary-hover-color; |
31 | 17 | } |
32 | - // | |
33 | - //&[disabled], | |
34 | - //&[disabled]:hover { | |
35 | - // color: fade(@button-cancel-color, 40%) !important; | |
36 | - // background-color: fade(@button-cancel-bg-color, 40%) !important; | |
37 | - // border-color: fade(@button-cancel-border-color, 40%) !important; | |
38 | - //} | |
39 | 18 | } |
40 | 19 | |
41 | 20 | &-primary:not(&-background-ghost):not([disabled]) { |
42 | 21 | color: @white; |
43 | 22 | } |
44 | 23 | |
45 | - //&-primary:not(&-background-ghost) { | |
46 | - // border-width: 0; | |
47 | - //} | |
48 | - | |
49 | 24 | &-default { |
50 | 25 | color: @button-cancel-color; |
51 | 26 | background-color: @button-cancel-bg-color; |
... | ... | @@ -127,13 +102,6 @@ |
127 | 102 | background-color: @button-success-active-color; |
128 | 103 | border-color: @button-success-active-color; |
129 | 104 | } |
130 | - | |
131 | - //&[disabled], | |
132 | - //&[disabled]:hover { | |
133 | - // color: @white; | |
134 | - // background-color: fade(@button-success-color, 40%); | |
135 | - // border-color: fade(@button-success-color, 40%); | |
136 | - //} | |
137 | 105 | } |
138 | 106 | |
139 | 107 | &-warning.ant-btn-link:not([disabled='disabled']) { | ... | ... |
src/design/ant/index.less
vite.config.ts
... | ... | @@ -95,6 +95,8 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { |
95 | 95 | optimizeDeps: { |
96 | 96 | // @iconify/iconify: The dependency is dynamically and virtually loaded by @purge-icons/generated, so it needs to be specified explicitly |
97 | 97 | include: [ |
98 | + '@vue/runtime-core', | |
99 | + '@vue/shared', | |
98 | 100 | '@iconify/iconify', |
99 | 101 | 'ant-design-vue/es/locale/zh_CN', |
100 | 102 | 'ant-design-vue/es/locale/en_US', | ... | ... |