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,7 +14,6 @@ import { configVisualizerConfig } from './visualizer'; | ||
14 | import { configThemePlugin } from './theme'; | 14 | import { configThemePlugin } from './theme'; |
15 | import { configImageminPlugin } from './imagemin'; | 15 | import { configImageminPlugin } from './imagemin'; |
16 | import { configSvgIconsPlugin } from './svgSprite'; | 16 | import { configSvgIconsPlugin } from './svgSprite'; |
17 | -import { configHmrPlugin } from './hmr'; | ||
18 | 17 | ||
19 | export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { | 18 | export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { |
20 | const { | 19 | const { |
@@ -37,9 +36,6 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { | @@ -37,9 +36,6 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { | ||
37 | // vite-plugin-windicss | 36 | // vite-plugin-windicss |
38 | vitePlugins.push(windiCSS()); | 37 | vitePlugins.push(windiCSS()); |
39 | 38 | ||
40 | - // TODO | ||
41 | - !isBuild && vitePlugins.push(configHmrPlugin()); | ||
42 | - | ||
43 | // @vitejs/plugin-legacy | 39 | // @vitejs/plugin-legacy |
44 | VITE_LEGACY && isBuild && vitePlugins.push(legacy()); | 40 | VITE_LEGACY && isBuild && vitePlugins.push(legacy()); |
45 | 41 |
package.json
@@ -38,6 +38,8 @@ | @@ -38,6 +38,8 @@ | ||
38 | "@iconify/iconify": "^2.1.0", | 38 | "@iconify/iconify": "^2.1.0", |
39 | "@logicflow/core": "^0.7.11", | 39 | "@logicflow/core": "^0.7.11", |
40 | "@logicflow/extension": "^0.7.11", | 40 | "@logicflow/extension": "^0.7.11", |
41 | + "@vue/runtime-core": "^3.2.23", | ||
42 | + "@vue/shared": "^3.2.23", | ||
41 | "@vueuse/core": "^7.1.2", | 43 | "@vueuse/core": "^7.1.2", |
42 | "@vueuse/shared": "^7.1.2", | 44 | "@vueuse/shared": "^7.1.2", |
43 | "@zxcvbn-ts/core": "^1.0.0", | 45 | "@zxcvbn-ts/core": "^1.0.0", |
pnpm-lock.yaml
@@ -36,6 +36,8 @@ specifiers: | @@ -36,6 +36,8 @@ specifiers: | ||
36 | '@vitejs/plugin-vue': ^1.10.1 | 36 | '@vitejs/plugin-vue': ^1.10.1 |
37 | '@vitejs/plugin-vue-jsx': ^1.3.0 | 37 | '@vitejs/plugin-vue-jsx': ^1.3.0 |
38 | '@vue/compiler-sfc': 3.2.23 | 38 | '@vue/compiler-sfc': 3.2.23 |
39 | + '@vue/runtime-core': ^3.2.23 | ||
40 | + '@vue/shared': ^3.2.23 | ||
39 | '@vue/test-utils': ^2.0.0-rc.17 | 41 | '@vue/test-utils': ^2.0.0-rc.17 |
40 | '@vueuse/core': ^7.1.2 | 42 | '@vueuse/core': ^7.1.2 |
41 | '@vueuse/shared': ^7.1.2 | 43 | '@vueuse/shared': ^7.1.2 |
@@ -122,6 +124,8 @@ dependencies: | @@ -122,6 +124,8 @@ dependencies: | ||
122 | '@iconify/iconify': 2.1.0 | 124 | '@iconify/iconify': 2.1.0 |
123 | '@logicflow/core': 0.7.11 | 125 | '@logicflow/core': 0.7.11 |
124 | '@logicflow/extension': 0.7.11 | 126 | '@logicflow/extension': 0.7.11 |
127 | + '@vue/runtime-core': 3.2.23 | ||
128 | + '@vue/shared': 3.2.23 | ||
125 | '@vueuse/core': 7.1.2_vue@3.2.23 | 129 | '@vueuse/core': 7.1.2_vue@3.2.23 |
126 | '@vueuse/shared': 7.1.2_vue@3.2.23 | 130 | '@vueuse/shared': 7.1.2_vue@3.2.23 |
127 | '@zxcvbn-ts/core': 1.0.0 | 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,6 +2,7 @@ export { default as BasicTable } from './src/BasicTable.vue'; | ||
2 | export { default as TableAction } from './src/components/TableAction.vue'; | 2 | export { default as TableAction } from './src/components/TableAction.vue'; |
3 | export { default as EditTableHeaderIcon } from './src/components/EditTableHeaderIcon.vue'; | 3 | export { default as EditTableHeaderIcon } from './src/components/EditTableHeaderIcon.vue'; |
4 | export { default as TableImg } from './src/components/TableImg.vue'; | 4 | export { default as TableImg } from './src/components/TableImg.vue'; |
5 | + | ||
5 | export * from './src/types/table'; | 6 | export * from './src/types/table'; |
6 | export * from './src/types/pagination'; | 7 | export * from './src/types/pagination'; |
7 | export * from './src/types/tableAction'; | 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,10 +15,10 @@ import { DEFAULT_FILTER_FN, DEFAULT_SORT_FN, FETCH_SETTING, DEFAULT_SIZE } from | ||
15 | import { propTypes } from '/@/utils/propTypes'; | 15 | import { propTypes } from '/@/utils/propTypes'; |
16 | 16 | ||
17 | export const basicProps = { | 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 | tableSetting: propTypes.shape<TableSetting>({}), | 20 | tableSetting: propTypes.shape<TableSetting>({}), |
21 | - inset: propTypes.bool, | 21 | + inset: Boolean, |
22 | sortFn: { | 22 | sortFn: { |
23 | type: Function as PropType<(sortInfo: SorterResult) => any>, | 23 | type: Function as PropType<(sortInfo: SorterResult) => any>, |
24 | default: DEFAULT_SORT_FN, | 24 | default: DEFAULT_SORT_FN, |
@@ -27,10 +27,10 @@ export const basicProps = { | @@ -27,10 +27,10 @@ export const basicProps = { | ||
27 | type: Function as PropType<(data: Partial<Recordable<string[]>>) => any>, | 27 | type: Function as PropType<(data: Partial<Recordable<string[]>>) => any>, |
28 | default: DEFAULT_FILTER_FN, | 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 | summaryFunc: { | 34 | summaryFunc: { |
35 | type: [Function, Array] as PropType<(...arg: any[]) => any[]>, | 35 | type: [Function, Array] as PropType<(...arg: any[]) => any[]>, |
36 | default: null, | 36 | default: null, |
@@ -40,7 +40,7 @@ export const basicProps = { | @@ -40,7 +40,7 @@ export const basicProps = { | ||
40 | default: null, | 40 | default: null, |
41 | }, | 41 | }, |
42 | indentSize: propTypes.number.def(24), | 42 | indentSize: propTypes.number.def(24), |
43 | - canColDrag: propTypes.bool.def(true), | 43 | + canColDrag: { type: Boolean, default: true }, |
44 | api: { | 44 | api: { |
45 | type: Function as PropType<(...arg: any[]) => Promise<any>>, | 45 | type: Function as PropType<(...arg: any[]) => Promise<any>>, |
46 | default: null, | 46 | default: null, |
@@ -64,8 +64,8 @@ export const basicProps = { | @@ -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 | searchInfo: { | 70 | searchInfo: { |
71 | type: Object as PropType<Recordable>, | 71 | type: Object as PropType<Recordable>, |
@@ -87,7 +87,7 @@ export const basicProps = { | @@ -87,7 +87,7 @@ export const basicProps = { | ||
87 | type: [Array] as PropType<BasicColumn[]>, | 87 | type: [Array] as PropType<BasicColumn[]>, |
88 | default: () => [], | 88 | default: () => [], |
89 | }, | 89 | }, |
90 | - showIndexColumn: propTypes.bool.def(true), | 90 | + showIndexColumn: { type: Boolean, default: true }, |
91 | indexColumnProps: { | 91 | indexColumnProps: { |
92 | type: Object as PropType<BasicColumn>, | 92 | type: Object as PropType<BasicColumn>, |
93 | default: null, | 93 | default: null, |
@@ -96,8 +96,8 @@ export const basicProps = { | @@ -96,8 +96,8 @@ export const basicProps = { | ||
96 | type: Object as PropType<BasicColumn>, | 96 | type: Object as PropType<BasicColumn>, |
97 | default: null, | 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 | clearSelectOnPageChange: propTypes.bool, | 101 | clearSelectOnPageChange: propTypes.bool, |
102 | resizeHeightOffset: propTypes.number.def(0), | 102 | resizeHeightOffset: propTypes.number.def(0), |
103 | rowSelection: { | 103 | rowSelection: { |
src/design/ant/btn.less
1 | // button reset | 1 | // button reset |
2 | .ant-btn { | 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 | &-link:hover, | 3 | &-link:hover, |
18 | &-link:focus, | 4 | &-link:focus, |
19 | &-link:active { | 5 | &-link:active { |
@@ -29,23 +15,12 @@ | @@ -29,23 +15,12 @@ | ||
29 | color: @white; | 15 | color: @white; |
30 | background-color: @button-primary-hover-color; | 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 | &-primary:not(&-background-ghost):not([disabled]) { | 20 | &-primary:not(&-background-ghost):not([disabled]) { |
42 | color: @white; | 21 | color: @white; |
43 | } | 22 | } |
44 | 23 | ||
45 | - //&-primary:not(&-background-ghost) { | ||
46 | - // border-width: 0; | ||
47 | - //} | ||
48 | - | ||
49 | &-default { | 24 | &-default { |
50 | color: @button-cancel-color; | 25 | color: @button-cancel-color; |
51 | background-color: @button-cancel-bg-color; | 26 | background-color: @button-cancel-bg-color; |
@@ -127,13 +102,6 @@ | @@ -127,13 +102,6 @@ | ||
127 | background-color: @button-success-active-color; | 102 | background-color: @button-success-active-color; |
128 | border-color: @button-success-active-color; | 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 | &-warning.ant-btn-link:not([disabled='disabled']) { | 107 | &-warning.ant-btn-link:not([disabled='disabled']) { |
src/design/ant/index.less
1 | @import './pagination.less'; | 1 | @import './pagination.less'; |
2 | @import './input.less'; | 2 | @import './input.less'; |
3 | @import './btn.less'; | 3 | @import './btn.less'; |
4 | -// @import './table.less'; | ||
5 | - | ||
6 | -// TODO beta.11 fix | ||
7 | -.ant-col { | ||
8 | - width: 100%; | ||
9 | -} | ||
10 | 4 | ||
11 | .ant-image-preview-root { | 5 | .ant-image-preview-root { |
12 | img { | 6 | img { |
vite.config.ts
@@ -95,6 +95,8 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { | @@ -95,6 +95,8 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { | ||
95 | optimizeDeps: { | 95 | optimizeDeps: { |
96 | // @iconify/iconify: The dependency is dynamically and virtually loaded by @purge-icons/generated, so it needs to be specified explicitly | 96 | // @iconify/iconify: The dependency is dynamically and virtually loaded by @purge-icons/generated, so it needs to be specified explicitly |
97 | include: [ | 97 | include: [ |
98 | + '@vue/runtime-core', | ||
99 | + '@vue/shared', | ||
98 | '@iconify/iconify', | 100 | '@iconify/iconify', |
99 | 'ant-design-vue/es/locale/zh_CN', | 101 | 'ant-design-vue/es/locale/zh_CN', |
100 | 'ant-design-vue/es/locale/en_US', | 102 | 'ant-design-vue/es/locale/en_US', |