Commit b93f20f0df91689191b8414657171e9f17ba5d68
1 parent
8f76ef4e
perf(login): enter to log in
Showing
16 changed files
with
64 additions
and
55 deletions
.github/workflows/deploy.yml
@@ -55,7 +55,7 @@ jobs: | @@ -55,7 +55,7 @@ jobs: | ||
55 | # ARGS: --delete --verbose --parallel=80 | 55 | # ARGS: --delete --verbose --parallel=80 |
56 | 56 | ||
57 | push-to-gh-pages: | 57 | push-to-gh-pages: |
58 | - if: "contains(github.event.head_commit.message, '[deploy]')" | 58 | + if: "contains(github.event.head_commit.message, '[release]')" |
59 | runs-on: ubuntu-latest | 59 | runs-on: ubuntu-latest |
60 | steps: | 60 | steps: |
61 | - name: Checkout | 61 | - name: Checkout |
CHANGELOG.zh_CN.md
@@ -4,6 +4,11 @@ | @@ -4,6 +4,11 @@ | ||
4 | 4 | ||
5 | - `BasicTree` 新增`clickRowToExpand`,用于单击树节点展开 | 5 | - `BasicTree` 新增`clickRowToExpand`,用于单击树节点展开 |
6 | 6 | ||
7 | +### ⚡ Performance Improvements | ||
8 | + | ||
9 | +- 表格关闭分页时不再携带分页参数 | ||
10 | +- 登录页监听回车事件进行登录 | ||
11 | + | ||
7 | ### 🐛 Bug Fixes | 12 | ### 🐛 Bug Fixes |
8 | 13 | ||
9 | - 修复`Description`已知问题 | 14 | - 修复`Description`已知问题 |
package.json
@@ -91,6 +91,7 @@ | @@ -91,6 +91,7 @@ | ||
91 | "is-ci": "^3.0.0", | 91 | "is-ci": "^3.0.0", |
92 | "less": "^4.1.1", | 92 | "less": "^4.1.1", |
93 | "lint-staged": "^10.5.4", | 93 | "lint-staged": "^10.5.4", |
94 | + "postcss": "^8.2.7", | ||
94 | "prettier": "^2.2.1", | 95 | "prettier": "^2.2.1", |
95 | "pretty-quick": "^3.1.0", | 96 | "pretty-quick": "^3.1.0", |
96 | "rimraf": "^3.0.2", | 97 | "rimraf": "^3.0.2", |
@@ -116,7 +117,9 @@ | @@ -116,7 +117,9 @@ | ||
116 | }, | 117 | }, |
117 | "resolutions": { | 118 | "resolutions": { |
118 | "//": "Used to install imagemin dependencies, because imagemin may not be installed in China.If it is abroad, you can delete it", | 119 | "//": "Used to install imagemin dependencies, because imagemin may not be installed in China.If it is abroad, you can delete it", |
119 | - "bin-wrapper": "npm:bin-wrapper-china" | 120 | + "bin-wrapper": "npm:bin-wrapper-china", |
121 | + "esbuild": "0.8.55", | ||
122 | + "rollup": "2.40.0" | ||
120 | }, | 123 | }, |
121 | "repository": { | 124 | "repository": { |
122 | "type": "git", | 125 | "type": "git", |
src/components/Application/src/search/useMenuSearch.ts
@@ -3,6 +3,7 @@ import type { Menu } from '/@/router/types'; | @@ -3,6 +3,7 @@ import type { Menu } from '/@/router/types'; | ||
3 | import { ref, onBeforeMount, unref, Ref, nextTick } from 'vue'; | 3 | import { ref, onBeforeMount, unref, Ref, nextTick } from 'vue'; |
4 | 4 | ||
5 | import { getMenus } from '/@/router/menus'; | 5 | import { getMenus } from '/@/router/menus'; |
6 | +import { KeyCodeEnum } from '/@/enums/keyCodeEnum'; | ||
6 | 7 | ||
7 | import { cloneDeep } from 'lodash-es'; | 8 | import { cloneDeep } from 'lodash-es'; |
8 | import { filter, forEach } from '/@/utils/helper/treeHelper'; | 9 | import { filter, forEach } from '/@/utils/helper/treeHelper'; |
@@ -19,13 +20,6 @@ export interface SearchResult { | @@ -19,13 +20,6 @@ export interface SearchResult { | ||
19 | icon?: string; | 20 | icon?: string; |
20 | } | 21 | } |
21 | 22 | ||
22 | -const enum KeyCodeEnum { | ||
23 | - UP = 38, | ||
24 | - DOWN = 40, | ||
25 | - ENTER = 13, | ||
26 | - ESC = 27, | ||
27 | -} | ||
28 | - | ||
29 | // Translate special characters | 23 | // Translate special characters |
30 | function transform(c: string) { | 24 | function transform(c: string) { |
31 | const code: string[] = ['$', '(', ')', '*', '+', '.', '[', ']', '?', '\\', '^', '{', '}', '|']; | 25 | const code: string[] = ['$', '(', ')', '*', '+', '.', '[', ']', '?', '\\', '^', '{', '}', '|']; |
src/components/Container/src/collapse/CollapseContainer.vue
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | :prefixCls="prefixCls" | 5 | :prefixCls="prefixCls" |
6 | :show="show" | 6 | :show="show" |
7 | @expand="handleExpand" | 7 | @expand="handleExpand" |
8 | + :class="show ? 'mb-3' : ''" | ||
8 | > | 9 | > |
9 | <template #title> | 10 | <template #title> |
10 | <slot name="title"></slot> | 11 | <slot name="title"></slot> |
@@ -108,7 +109,7 @@ | @@ -108,7 +109,7 @@ | ||
108 | &__header { | 109 | &__header { |
109 | display: flex; | 110 | display: flex; |
110 | height: 32px; | 111 | height: 32px; |
111 | - margin-bottom: 10px; | 112 | + // margin-bottom: 10px; |
112 | justify-content: space-between; | 113 | justify-content: space-between; |
113 | align-items: center; | 114 | align-items: center; |
114 | } | 115 | } |
src/components/Container/src/collapse/CollapseHeader.vue
src/components/Description/src/index.vue
@@ -13,8 +13,6 @@ | @@ -13,8 +13,6 @@ | ||
13 | 13 | ||
14 | import { isFunction } from '/@/utils/is'; | 14 | import { isFunction } from '/@/utils/is'; |
15 | import { getSlot } from '/@/utils/helper/tsxHelper'; | 15 | import { getSlot } from '/@/utils/helper/tsxHelper'; |
16 | - import { cloneDeep } from 'lodash-es'; | ||
17 | - import { deepMerge } from '/@/utils'; | ||
18 | 16 | ||
19 | import descProps from './props'; | 17 | import descProps from './props'; |
20 | import { useAttrs } from '/@/hooks/core/useAttrs'; | 18 | import { useAttrs } from '/@/hooks/core/useAttrs'; |
src/components/Form/src/components/FormItem.tsx
@@ -105,6 +105,7 @@ export default defineComponent({ | @@ -105,6 +105,7 @@ export default defineComponent({ | ||
105 | ? props.schema.isAdvanced | 105 | ? props.schema.isAdvanced |
106 | : true | 106 | : true |
107 | : true; | 107 | : true; |
108 | + | ||
108 | let isShow = true; | 109 | let isShow = true; |
109 | let isIfShow = true; | 110 | let isIfShow = true; |
110 | 111 |
src/components/Page/src/PageWrapper.vue
@@ -37,8 +37,8 @@ | @@ -37,8 +37,8 @@ | ||
37 | import { PageHeader } from 'ant-design-vue'; | 37 | import { PageHeader } from 'ant-design-vue'; |
38 | export default defineComponent({ | 38 | export default defineComponent({ |
39 | name: 'PageWrapper', | 39 | name: 'PageWrapper', |
40 | - inheritAttrs: false, | ||
41 | components: { PageFooter, PageHeader }, | 40 | components: { PageFooter, PageHeader }, |
41 | + inheritAttrs: false, | ||
42 | props: { | 42 | props: { |
43 | dense: propTypes.bool, | 43 | dense: propTypes.bool, |
44 | ghost: propTypes.bool, | 44 | ghost: propTypes.bool, |
src/components/Table/src/hooks/useDataSource.ts
@@ -155,9 +155,15 @@ export function useDataSource( | @@ -155,9 +155,15 @@ export function useDataSource( | ||
155 | } | 155 | } |
156 | 156 | ||
157 | async function fetch(opt?: FetchParams) { | 157 | async function fetch(opt?: FetchParams) { |
158 | - const { api, searchInfo, fetchSetting, beforeFetch, afterFetch, useSearchForm } = unref( | ||
159 | - propsRef | ||
160 | - ); | 158 | + const { |
159 | + api, | ||
160 | + searchInfo, | ||
161 | + fetchSetting, | ||
162 | + beforeFetch, | ||
163 | + afterFetch, | ||
164 | + useSearchForm, | ||
165 | + pagination, | ||
166 | + } = unref(propsRef); | ||
161 | if (!api || !isFunction(api)) return; | 167 | if (!api || !isFunction(api)) return; |
162 | try { | 168 | try { |
163 | setLoading(true); | 169 | setLoading(true); |
@@ -166,7 +172,7 @@ export function useDataSource( | @@ -166,7 +172,7 @@ export function useDataSource( | ||
166 | 172 | ||
167 | const { current = 1, pageSize = PAGE_SIZE } = unref(getPaginationInfo) as PaginationProps; | 173 | const { current = 1, pageSize = PAGE_SIZE } = unref(getPaginationInfo) as PaginationProps; |
168 | 174 | ||
169 | - if (isBoolean(getPaginationInfo)) { | 175 | + if (!pagination || isBoolean(getPaginationInfo)) { |
170 | pageParams = {}; | 176 | pageParams = {}; |
171 | } else { | 177 | } else { |
172 | pageParams[pageField] = (opt && opt.page) || current; | 178 | pageParams[pageField] = (opt && opt.page) || current; |
src/enums/keyCodeEnum.ts
0 → 100644
src/views/demo/comp/desc/index.vue
@@ -72,7 +72,7 @@ | @@ -72,7 +72,7 @@ | ||
72 | schema: schema, | 72 | schema: schema, |
73 | }); | 73 | }); |
74 | 74 | ||
75 | - const [register1, { setDescProps }] = useDescription({ | 75 | + const [register1] = useDescription({ |
76 | title: '无边框', | 76 | title: '无边框', |
77 | bordered: false, | 77 | bordered: false, |
78 | data: mockData, | 78 | data: mockData, |
src/views/demo/system/account/AccountModal.vue
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | }, | 26 | }, |
27 | }); | 27 | }); |
28 | 28 | ||
29 | - const [registerModal, { setModalProps }] = useModalInner(async (data) => { | 29 | + const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { |
30 | resetFields(); | 30 | resetFields(); |
31 | setModalProps({ confirmLoading: false }); | 31 | setModalProps({ confirmLoading: false }); |
32 | isUpdate.value = !!data?.isUpdate; | 32 | isUpdate.value = !!data?.isUpdate; |
@@ -58,6 +58,7 @@ | @@ -58,6 +58,7 @@ | ||
58 | setModalProps({ confirmLoading: true }); | 58 | setModalProps({ confirmLoading: true }); |
59 | // TODO custom api | 59 | // TODO custom api |
60 | console.log(values); | 60 | console.log(values); |
61 | + closeModal(); | ||
61 | emit('success'); | 62 | emit('success'); |
62 | } finally { | 63 | } finally { |
63 | setModalProps({ confirmLoading: false }); | 64 | setModalProps({ confirmLoading: false }); |
src/views/demo/system/account/index.vue
src/views/sys/login/LoginForm.vue
@@ -88,6 +88,8 @@ | @@ -88,6 +88,8 @@ | ||
88 | import { userStore } from '/@/store/modules/user'; | 88 | import { userStore } from '/@/store/modules/user'; |
89 | import { LoginStateEnum, useLoginState, useFormRules, useFormValid } from './useLogin'; | 89 | import { LoginStateEnum, useLoginState, useFormRules, useFormValid } from './useLogin'; |
90 | import { useDesign } from '/@/hooks/web/useDesign'; | 90 | import { useDesign } from '/@/hooks/web/useDesign'; |
91 | + import { useKeyPress } from '/@/hooks/event/useKeyPress'; | ||
92 | + import { KeyCodeEnum } from '/@/enums/keyCodeEnum'; | ||
91 | 93 | ||
92 | export default defineComponent({ | 94 | export default defineComponent({ |
93 | name: 'LoginForm', | 95 | name: 'LoginForm', |
@@ -126,6 +128,13 @@ | @@ -126,6 +128,13 @@ | ||
126 | }); | 128 | }); |
127 | 129 | ||
128 | const { validForm } = useFormValid(formRef); | 130 | const { validForm } = useFormValid(formRef); |
131 | + useKeyPress(['enter'], (events) => { | ||
132 | + const keyCode = events.keyCode; | ||
133 | + | ||
134 | + if (keyCode === KeyCodeEnum.ENTER) { | ||
135 | + handleLogin(); | ||
136 | + } | ||
137 | + }); | ||
129 | 138 | ||
130 | const getShow = computed(() => unref(getLoginState) === LoginStateEnum.LOGIN); | 139 | const getShow = computed(() => unref(getLoginState) === LoginStateEnum.LOGIN); |
131 | 140 |
yarn.lock
@@ -2665,6 +2665,11 @@ colorette@^1.2.1: | @@ -2665,6 +2665,11 @@ colorette@^1.2.1: | ||
2665 | resolved "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" | 2665 | resolved "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" |
2666 | integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== | 2666 | integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== |
2667 | 2667 | ||
2668 | +colorette@^1.2.2: | ||
2669 | + version "1.2.2" | ||
2670 | + resolved "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" | ||
2671 | + integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== | ||
2672 | + | ||
2668 | colors@^1.4.0: | 2673 | colors@^1.4.0: |
2669 | version "1.4.0" | 2674 | version "1.4.0" |
2670 | resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" | 2675 | resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" |
@@ -3625,20 +3630,10 @@ esbuild-register@^2.0.0: | @@ -3625,20 +3630,10 @@ esbuild-register@^2.0.0: | ||
3625 | source-map-support "^0.5.19" | 3630 | source-map-support "^0.5.19" |
3626 | strip-json-comments "^3.1.1" | 3631 | strip-json-comments "^3.1.1" |
3627 | 3632 | ||
3628 | -esbuild@^0.8.52: | ||
3629 | - version "0.8.52" | ||
3630 | - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.8.52.tgz#6dabf11c517af449a96d66da20dfc204ee7b5294" | ||
3631 | - integrity sha512-b5KzFweLLXoXQwdC/e2+Z80c8uo2M5MgP7yQEEebkFw6In4T9CvYcNoM2ElvJt8ByO04zAZUV0fZkXmXoi2s9A== | ||
3632 | - | ||
3633 | -esbuild@^0.8.53: | ||
3634 | - version "0.8.53" | ||
3635 | - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.8.53.tgz#b408bb0ca1b29dab13d8bbf7d59f59afe6776e86" | ||
3636 | - integrity sha512-GIaYGdMukH58hu+lf07XWAeESBYFAsz8fXnrylHDCbBXKOSNtFmoYA8PhSeSF+3/qzeJ0VjzV9AkLURo5yfu3g== | ||
3637 | - | ||
3638 | -esbuild@^0.8.54: | ||
3639 | - version "0.8.54" | ||
3640 | - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.8.54.tgz#2f32ff80e95c69a0f25b799d76a27c05e2857cdf" | ||
3641 | - integrity sha512-DJH38OiTgXJxFb/EhHrCrY8eGmtdkTtWymHpN9IYN9AF+4jykT0dQArr7wzFejpVbaB0TMIq2+vfNRWr3LXpvw== | 3633 | +esbuild@0.8.55, esbuild@^0.8.52, esbuild@^0.8.53, esbuild@^0.8.54: |
3634 | + version "0.8.55" | ||
3635 | + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.8.55.tgz#4bf949c44db4ffc2a206ac0c002e8e94eecff7d5" | ||
3636 | + integrity sha512-mM/s7hjYe5mQR+zAWOM5JVrCtYCke182E9l1Bbs6rG5EDP3b1gZF9sHZka53PD/iNt6OccymVZRWkTtBfcKW4w== | ||
3642 | 3637 | ||
3643 | escalade@^3.1.1: | 3638 | escalade@^3.1.1: |
3644 | version "3.1.1" | 3639 | version "3.1.1" |
@@ -4297,11 +4292,6 @@ fs.realpath@^1.0.0: | @@ -4297,11 +4292,6 @@ fs.realpath@^1.0.0: | ||
4297 | resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" | 4292 | resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" |
4298 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= | 4293 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= |
4299 | 4294 | ||
4300 | -fsevents@~2.1.2: | ||
4301 | - version "2.1.3" | ||
4302 | - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" | ||
4303 | - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== | ||
4304 | - | ||
4305 | fsevents@~2.3.1: | 4295 | fsevents@~2.3.1: |
4306 | version "2.3.2" | 4296 | version "2.3.2" |
4307 | resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" | 4297 | resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" |
@@ -7006,6 +6996,15 @@ postcss@^8.1.10, postcss@^8.2.1: | @@ -7006,6 +6996,15 @@ postcss@^8.1.10, postcss@^8.2.1: | ||
7006 | nanoid "^3.1.20" | 6996 | nanoid "^3.1.20" |
7007 | source-map "^0.6.1" | 6997 | source-map "^0.6.1" |
7008 | 6998 | ||
6999 | +postcss@^8.2.7: | ||
7000 | + version "8.2.7" | ||
7001 | + resolved "https://registry.npmjs.org/postcss/-/postcss-8.2.7.tgz#48ed8d88b4de10afa0dfd1c3f840aa57b55c4d47" | ||
7002 | + integrity sha512-DsVLH3xJzut+VT+rYr0mtvOtpTjSyqDwPf5EZWXcb0uAKfitGpTY9Ec+afi2+TgdN8rWS9Cs88UDYehKo/RvOw== | ||
7003 | + dependencies: | ||
7004 | + colorette "^1.2.2" | ||
7005 | + nanoid "^3.1.20" | ||
7006 | + source-map "^0.6.1" | ||
7007 | + | ||
7009 | prelude-ls@^1.2.1: | 7008 | prelude-ls@^1.2.1: |
7010 | version "1.2.1" | 7009 | version "1.2.1" |
7011 | resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" | 7010 | resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" |
@@ -7505,22 +7504,7 @@ rollup-plugin-visualizer@^4.2.0: | @@ -7505,22 +7504,7 @@ rollup-plugin-visualizer@^4.2.0: | ||
7505 | source-map "^0.7.3" | 7504 | source-map "^0.7.3" |
7506 | yargs "^16.0.3" | 7505 | yargs "^16.0.3" |
7507 | 7506 | ||
7508 | -rollup@^0.63.4: | ||
7509 | - version "0.63.5" | ||
7510 | - resolved "https://registry.npmjs.org/rollup/-/rollup-0.63.5.tgz#5543eecac9a1b83b7e1be598b5be84c9c0a089db" | ||
7511 | - integrity sha512-dFf8LpUNzIj3oE0vCvobX6rqOzHzLBoblyFp+3znPbjiSmSvOoK2kMKx+Fv9jYduG1rvcCfCveSgEaQHjWRF6g== | ||
7512 | - dependencies: | ||
7513 | - "@types/estree" "0.0.39" | ||
7514 | - "@types/node" "*" | ||
7515 | - | ||
7516 | -rollup@^2.25.0: | ||
7517 | - version "2.38.0" | ||
7518 | - resolved "https://registry.npmjs.org/rollup/-/rollup-2.38.0.tgz#57942d5a10826cb12ed1f19c261f774efa502d2d" | ||
7519 | - integrity sha512-ay9zDiNitZK/LNE/EM2+v5CZ7drkB2xyDljvb1fQJCGnq43ZWRkhxN145oV8GmoW1YNi4sA/1Jdkr2LfawJoXw== | ||
7520 | - optionalDependencies: | ||
7521 | - fsevents "~2.1.2" | ||
7522 | - | ||
7523 | -rollup@^2.38.5, rollup@^2.40.0: | 7507 | +rollup@2.40.0, rollup@^0.63.4, rollup@^2.25.0, rollup@^2.38.5, rollup@^2.40.0: |
7524 | version "2.40.0" | 7508 | version "2.40.0" |
7525 | resolved "https://registry.npmjs.org/rollup/-/rollup-2.40.0.tgz#efc218eaede7ab590954df50f96195188999c304" | 7509 | resolved "https://registry.npmjs.org/rollup/-/rollup-2.40.0.tgz#efc218eaede7ab590954df50f96195188999c304" |
7526 | integrity sha512-WiOGAPbXoHu+TOz6hyYUxIksOwsY/21TRWoO593jgYt8mvYafYqQl+axaA8y1z2HFazNUUrsMSjahV2A6/2R9A== | 7510 | integrity sha512-WiOGAPbXoHu+TOz6hyYUxIksOwsY/21TRWoO593jgYt8mvYafYqQl+axaA8y1z2HFazNUUrsMSjahV2A6/2R9A== |