Skip to content

Commit 70efdda

Browse files
committed
refactor(components): [schema-form, dynamic-table, useModal] refactor
1 parent 3fd1513 commit 70efdda

File tree

111 files changed

+3480
-1696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+3480
-1696
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ module.exports = {
5151
'@typescript-eslint/ban-ts-comment': 'off',
5252
'@typescript-eslint/ban-types': 'off',
5353
'@typescript-eslint/explicit-module-boundary-types': 'off',
54+
'@typescript-eslint/no-empty-function': 'off',
5455
'@typescript-eslint/no-explicit-any': 'off',
5556
'@typescript-eslint/no-non-null-assertion': 'off',
5657
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
- [gitee 地址](https://gitee.com/buqiyuan/vue3-antd-admin)
1414
- 根据 JSON 生成 typescript 的工具:[http://json2ts.com/](http://json2ts.com/)
1515

16+
部分设计参考了 [vue-vben-admin](https://github.com/vbenjs/vue-vben-admin)
17+
1618
## 安装使用
1719

1820
- 获取项目代码

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = {
77
'header-max-length': [2, 'always', 108],
88
'subject-empty': [2, 'never'],
99
'type-empty': [2, 'never'],
10+
'subject-case': [0],
1011
'type-enum': [
1112
2,
1213
'always',

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@
2828
"test:br": "npx http-server dist --cors --brotli -c-1"
2929
},
3030
"dependencies": {
31-
"@ant-design/icons-vue": "^6.0.1",
32-
"@vueuse/core": "^7.7.1",
33-
"ant-design-vue": "3.0.0-beta.13",
31+
"@ant-design/icons-vue": "^6.1.0",
32+
"@vueuse/core": "^8.0.1",
33+
"ant-design-vue": "3.1.0-rc.0",
3434
"axios": "^0.26.1",
3535
"core-js": "^3.21.1",
36-
"dayjs": "^1.10.8",
36+
"dayjs": "^1.11.0",
3737
"file-saver": "^2.0.5",
3838
"lodash-es": "^4.17.21",
3939
"mitt": "^3.0.0",
4040
"mockjs": "^1.1.0",
4141
"nprogress": "^1.0.0-1",
42-
"pinia": "2.0.11",
42+
"pinia": "2.0.12",
4343
"qs": "^6.10.3",
4444
"socket.io-client": "4.4.1",
4545
"sortablejs": "^1.14.0",
4646
"vue": "^3.2.31",
4747
"vue-i18n": "^9.2.0-beta.30",
48-
"vue-router": "^4.0.13",
48+
"vue-router": "^4.0.14",
4949
"xlsx": "^0.18.3"
5050
},
5151
"devDependencies": {
@@ -54,21 +54,21 @@
5454
"@types/lodash-es": "^4.17.6",
5555
"@types/node": "^17.0.21",
5656
"@types/webpack-env": "^1.16.3",
57-
"@typescript-eslint/eslint-plugin": "^5.14.0",
58-
"@typescript-eslint/parser": "^5.14.0",
59-
"@vue/cli-plugin-babel": "^5.0.1",
60-
"@vue/cli-plugin-eslint": "^5.0.1",
61-
"@vue/cli-plugin-router": "^5.0.1",
62-
"@vue/cli-plugin-typescript": "^5.0.1",
63-
"@vue/cli-plugin-vuex": "^5.0.1",
64-
"@vue/cli-service": "^5.0.1",
57+
"@typescript-eslint/eslint-plugin": "^5.15.0",
58+
"@typescript-eslint/parser": "^5.15.0",
59+
"@vue/cli-plugin-babel": "^5.0.3",
60+
"@vue/cli-plugin-eslint": "^5.0.3",
61+
"@vue/cli-plugin-router": "^5.0.3",
62+
"@vue/cli-plugin-typescript": "^5.0.3",
63+
"@vue/cli-plugin-vuex": "^5.0.3",
64+
"@vue/cli-service": "^5.0.3",
6565
"@vue/compiler-sfc": "^3.2.31",
6666
"@vue/eslint-config-typescript": "^10.0.0",
6767
"babel-plugin-import": "^1.13.3",
6868
"commitizen": "^4.2.4",
6969
"compression-webpack-plugin": "^9.2.0",
7070
"conventional-changelog-cli": "^2.2.2",
71-
"eslint": "^8.10.0",
71+
"eslint": "^8.11.0",
7272
"eslint-config-prettier": "^8.5.0",
7373
"eslint-plugin-import": "2.25.4",
7474
"eslint-plugin-prettier": "^4.0.0",
@@ -88,7 +88,7 @@
8888
"stylelint-config-standard": "^25.0.0",
8989
"stylelint-order": "^5.0.0",
9090
"svg-sprite-loader": "^6.0.11",
91-
"typescript": "^4.5.5",
91+
"typescript": "^4.6.2",
9292
"unplugin-vue-define-options": "^0.4.0",
9393
"vue-cli-plugin-windicss": "^1.1.3",
9494
"vue-eslint-parser": "^8.3.0"

src/api/system/user/model.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
declare namespace API {
22
type UserListPageResultItem = {
3-
createTime: string;
3+
createdAt: string;
44
departmentId: number;
55
email: string;
66
headImg: string;
@@ -10,7 +10,7 @@ declare namespace API {
1010
phone: string;
1111
remark: string;
1212
status: number;
13-
updateTime: string;
13+
updatedAt: string;
1414
username: string;
1515
departmentName: string;
1616
roleNames: string[];
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as BasicArrow } from './index.vue';
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<template>
2+
<DownOutlined class="collapse-icon" />
3+
</template>
4+
5+
<script lang="ts" setup>
6+
import { computed } from 'vue';
7+
import { DownOutlined } from '@ant-design/icons-vue';
8+
9+
const props = defineProps({
10+
expand: { type: Boolean },
11+
});
12+
13+
/**
14+
* @description 展开/收起 图标旋转转数
15+
*/
16+
const turn = computed(() => `${props.expand ? 0 : 0.5}turn`);
17+
</script>
18+
19+
<style lang="less" scoped>
20+
.collapse-icon {
21+
transform: rotate(v-bind(turn));
22+
transition: transform 0.3s;
23+
}
24+
</style>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import buttonProps from 'ant-design-vue/es/button/buttonTypes';
2+
import type { ButtonType as AButtonType } from 'ant-design-vue/es/button/buttonTypes';
3+
import type { ExtractPropTypes } from 'vue';
4+
5+
export type ButtonType = AButtonType | 'danger' | 'warning' | 'success';
6+
7+
export declare type ButtonProps = Partial<ExtractPropTypes<typeof buttonProps>>;
8+
9+
export { buttonProps };

src/components/basic/button/button.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
</template>
1313
<script lang="ts" setup>
1414
import { computed, type PropType } from 'vue';
15-
import buttonProps, { type ButtonType } from 'ant-design-vue/es/button/buttonTypes';
1615
import { Button } from 'ant-design-vue';
16+
import { buttonProps, type ButtonType } from './button';
1717
1818
const props = defineProps({
1919
...buttonProps(),
2020
type: {
21-
type: String as PropType<ButtonType | 'danger' | 'warning' | 'success'>,
21+
type: String as PropType<ButtonType>,
2222
default: 'default',
2323
},
2424
});
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
export { default as AButton } from './button.vue';
1+
import AButton from './button.vue';
2+
3+
export default AButton;
4+
5+
export const Button = AButton;
6+
7+
export * from './button';
8+
9+
export { AButton };

0 commit comments

Comments
 (0)