Skip to content

Commit 0c37e69

Browse files
committed
chore: ⬆️ update deps
1 parent 5c0895e commit 0c37e69

14 files changed

+1130
-1113
lines changed

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ module.exports = {
1818
extends: [
1919
'plugin:vue/vue3-recommended',
2020
'plugin:@typescript-eslint/recommended',
21-
'prettier',
22-
'plugin:prettier/recommended'
21+
'plugin:prettier/recommended',
22+
'prettier'
2323
],
2424
rules: {
2525
'vue/require-default-prop': 'off',

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 基于 Vite2.x + Vue3.x + TypeScript H5 低代码平台
22

3-
### 只是一个简单的模板,感兴趣可以根据自己的需要调整, 在这里你可以看到 vue3 很多有趣的新特性和玩法。
3+
### 目前还只是一个简单的模板,后面可能会引入较为完善的机制系统,感兴趣的小伙伴可以根据自己的需要去调整, 通过这个项目或许你可以学到 vue3 很多有趣的新特性和玩法。
44

55
[![license](https://img.shields.io/github/license/buqiyuan/vite-vue3-lowcode.svg)](LICENSE)
66

components.d.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@
33

44
declare module 'vue' {
55
export interface GlobalComponents {
6-
ElAside: typeof import('element-plus/es/el-aside')['default']
7-
ElButton: typeof import('element-plus/es/el-button')['default']
8-
ElCol: typeof import('element-plus/es/el-col')['default']
9-
ElCollapse: typeof import('element-plus/es/el-collapse')['default']
10-
ElCollapseItem: typeof import('element-plus/es/el-collapse-item')['default']
11-
ElConfigProvider: typeof import('element-plus/es/el-config-provider')['default']
12-
ElContainer: typeof import('element-plus/es/el-container')['default']
13-
ElDialog: typeof import('element-plus/es/el-dialog')['default']
14-
ElDropdown: typeof import('element-plus/es/el-dropdown')['default']
15-
ElDropdownItem: typeof import('element-plus/es/el-dropdown-item')['default']
16-
ElDropdownMenu: typeof import('element-plus/es/el-dropdown-menu')['default']
17-
ElHeader: typeof import('element-plus/es/el-header')['default']
18-
ElMain: typeof import('element-plus/es/el-main')['default']
19-
ElPopconfirm: typeof import('element-plus/es/el-popconfirm')['default']
20-
ElPopover: typeof import('element-plus/es/el-popover')['default']
21-
ElRow: typeof import('element-plus/es/el-row')['default']
22-
ElTabPane: typeof import('element-plus/es/el-tab-pane')['default']
23-
ElTabs: typeof import('element-plus/es/el-tabs')['default']
24-
ElTag: typeof import('element-plus/es/el-tag')['default']
25-
ElTooltip: typeof import('element-plus/es/el-tooltip')['default']
26-
ElTree: typeof import('element-plus/es/el-tree')['default']
6+
ElAside: typeof import('element-plus/es')['ElAside']
7+
ElButton: typeof import('element-plus/es')['ElButton']
8+
ElCol: typeof import('element-plus/es')['ElCol']
9+
ElCollapse: typeof import('element-plus/es')['ElCollapse']
10+
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
11+
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
12+
ElContainer: typeof import('element-plus/es')['ElContainer']
13+
ElDialog: typeof import('element-plus/es')['ElDialog']
14+
ElDropdown: typeof import('element-plus/es')['ElDropdown']
15+
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
16+
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
17+
ElHeader: typeof import('element-plus/es')['ElHeader']
18+
ElMain: typeof import('element-plus/es')['ElMain']
19+
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
20+
ElPopover: typeof import('element-plus/es')['ElPopover']
21+
ElRow: typeof import('element-plus/es')['ElRow']
22+
ElTabPane: typeof import('element-plus/es')['ElTabPane']
23+
ElTabs: typeof import('element-plus/es')['ElTabs']
24+
ElTag: typeof import('element-plus/es')['ElTag']
25+
ElTooltip: typeof import('element-plus/es')['ElTooltip']
26+
ElTree: typeof import('element-plus/es')['ElTree']
2727
}
2828
}
2929

package.json

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,62 +21,64 @@
2121
},
2222
"dependencies": {
2323
"@vant/touch-emulator": "^1.3.2",
24-
"@vueuse/core": "^5.3.0",
25-
"@vueuse/integrations": "^5.3.0",
24+
"@vueuse/core": "^6.2.1",
25+
"@vueuse/integrations": "^6.2.1",
2626
"animate.css": "^4.1.1",
27-
"axios": "^0.21.1",
27+
"axios": "^0.21.4",
2828
"dayjs": "^1.10.6",
2929
"dexie": "^3.0.3",
30-
"element-plus": "1.0.2-beta.70",
30+
"element-plus": "1.1.0-beta.9",
3131
"lodash": "^4.17.21",
32-
"monaco-editor": "^0.26.1",
32+
"monaco-editor": "^0.27.0",
3333
"nanoid": "^3.1.25",
3434
"normalize.css": "^8.0.1",
3535
"nprogress": "^1.0.0-1",
3636
"qrcode": "^1.4.4",
3737
"qs": "^6.10.1",
38-
"vant": "3.2.0",
39-
"vue": "3.2.2",
38+
"vant": "3.2.2",
39+
"vue": "3.2.9",
4040
"vue-router": "^4.0.11",
41-
"vuedraggable": "^4.0.3",
41+
"vuedraggable": "^4.1.0",
4242
"vuex": "^4.0.2"
4343
},
4444
"devDependencies": {
4545
"@commitlint/cli": "^13.1.0",
4646
"@commitlint/config-conventional": "^13.1.0",
47-
"@types/node": "^16.6.0",
48-
"@typescript-eslint/eslint-plugin": "^4.29.1",
49-
"@typescript-eslint/parser": "^4.29.1",
50-
"@vitejs/plugin-legacy": "^1.5.1",
51-
"@vitejs/plugin-vue": "^1.4.0",
47+
"@types/lodash": "^4.14.172",
48+
"@types/node": "^16.7.12",
49+
"@typescript-eslint/eslint-plugin": "^4.31.0",
50+
"@typescript-eslint/parser": "^4.31.0",
51+
"@vitejs/plugin-legacy": "^1.5.2",
52+
"@vitejs/plugin-vue": "^1.6.1",
5253
"@vitejs/plugin-vue-jsx": "^1.1.7",
53-
"@vue/compiler-sfc": "3.2.2",
54+
"@vue/compiler-sfc": "3.2.9",
5455
"commitizen": "^4.2.4",
5556
"cross-env": "^7.0.3",
5657
"cz-conventional-changelog": "^3.3.0",
5758
"cz-customizable": "^6.3.0",
5859
"eslint": "^7.32.0",
5960
"eslint-config-prettier": "^8.3.0",
60-
"eslint-plugin-import": "^2.24.0",
61-
"eslint-plugin-prettier": "^3.4.0",
62-
"eslint-plugin-vue": "^7.16.0",
61+
"eslint-plugin-import": "^2.24.2",
62+
"eslint-plugin-prettier": "^4.0.0",
63+
"eslint-plugin-vue": "^7.17.0",
6364
"gh-pages": "^3.2.3",
64-
"husky": "^7.0.1",
65+
"husky": "^7.0.2",
6566
"lint-staged": "^11.1.2",
6667
"prettier": "^2.3.2",
6768
"pretty-quick": "^3.1.1",
68-
"sass": "1.37.5",
69+
"sass": "1.39.0",
6970
"stylelint": "^13.13.1",
7071
"stylelint-config-prettier": "^8.0.2",
7172
"stylelint-config-standard": "^22.0.0",
7273
"stylelint-order": "^4.1.0",
73-
"typescript": "^4.3.5",
74-
"vite": "2.4.4",
75-
"vite-plugin-components": "^0.13.2",
76-
"vite-plugin-style-import": "^1.1.1",
77-
"vite-plugin-windicss": "^1.2.7",
78-
"vue-eslint-parser": "^7.10.0",
79-
"vue-tsc": "^0.2.2",
74+
"stylelint-scss": "^3.20.1",
75+
"typescript": "^4.4.2",
76+
"vite": "2.5.3",
77+
"vite-plugin-components": "^0.13.3",
78+
"vite-plugin-element-plus": "^0.0.12",
79+
"vite-plugin-windicss": "^1.4.1",
80+
"vue-eslint-parser": "^7.11.0",
81+
"vue-tsc": "^0.3.0",
8082
"windicss": "^3.1.7"
8183
},
8284
"repository": {

src/App.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<el-config-provider :locale="locale">
2+
<el-config-provider :locale="zhCn">
33
<router-view #="{ Component, route }">
44
<component :is="Component" :key="route.path" />
55
</router-view>
@@ -17,8 +17,6 @@ provide(injectKey, visualData)
1717
1818
const { jsonData } = visualData
1919
20-
const locale = zhCn
21-
2220
window.addEventListener('beforeunload', () => {
2321
sessionStorage.setItem(localKey, JSON.stringify(jsonData))
2422
})

src/plugins/element-plus.ts

Lines changed: 76 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,80 @@
1-
/*
2-
* @Author: 卜启缘
3-
* @Date: 2021-04-22 02:10:31
4-
* @LastEditTime: 2021-07-05 11:39:10
5-
* @LastEditors: 卜启缘
6-
* @Description: 按需导入element-plus
7-
* @FilePath: \vite-vue3-lowcode\src\plugins\element-plus.ts
8-
*/
9-
import 'element-plus/packages/theme-chalk/src/base.scss'
10-
// import 'element-plus/lib/theme-chalk/index.css'
11-
// import 'element-plus/lib/theme-chalk/el-popper.css'
12-
import type { App } from 'vue'
1+
import { App, Component } from 'vue'
2+
import 'element-plus/dist/index.css'
3+
import {
4+
ElAffix,
5+
ElSkeleton,
6+
ElBreadcrumb,
7+
ElBreadcrumbItem,
8+
ElScrollbar,
9+
ElSubMenu,
10+
ElButton,
11+
ElCol,
12+
ElRow,
13+
ElSpace,
14+
ElDivider,
15+
ElCard,
16+
ElDropdown,
17+
ElDialog,
18+
ElMenu,
19+
ElMenuItem,
20+
ElDropdownItem,
21+
ElDropdownMenu,
22+
ElIcon,
23+
ElInput,
24+
ElForm,
25+
ElFormItem,
26+
ElLoading,
27+
ElPopover,
28+
ElPopper,
29+
ElTooltip,
30+
ElDrawer,
31+
ElPagination,
32+
ElAlert,
33+
ElRadioButton,
34+
ElRadioGroup,
35+
ElInfiniteScroll
36+
} from 'element-plus'
1337

14-
import { ElInfiniteScroll, locale } from 'element-plus'
38+
const components = [
39+
ElAffix,
40+
ElSkeleton,
41+
ElBreadcrumb,
42+
ElBreadcrumbItem,
43+
ElScrollbar,
44+
ElSubMenu,
45+
ElButton,
46+
ElCol,
47+
ElRow,
48+
ElSpace,
49+
ElDivider,
50+
ElCard,
51+
ElDropdown,
52+
ElDialog,
53+
ElMenu,
54+
ElMenuItem,
55+
ElDropdownItem,
56+
ElDropdownMenu,
57+
ElIcon,
58+
ElInput,
59+
ElForm,
60+
ElFormItem,
61+
ElPopover,
62+
ElPopper,
63+
ElTooltip,
64+
ElDrawer,
65+
ElPagination,
66+
ElAlert,
67+
ElRadioButton,
68+
ElRadioGroup
69+
]
1570

16-
import lang from 'element-plus/lib/locale/lang/zh-cn'
17-
import 'dayjs/locale/zh-cn'
71+
const plugins = [ElLoading, ElInfiniteScroll]
1872

19-
// 设置语言
20-
import.meta.env.DEV ? locale(lang) : locale.use(lang)
21-
22-
export const setupElementPlus = (app: App) => {
23-
app.use(ElInfiniteScroll)
73+
export function setupElementPlus(app: App) {
74+
components.forEach((component: Component) => {
75+
app.component(component.name!, component)
76+
})
77+
plugins.forEach((plugin) => {
78+
app.use(plugin)
79+
})
2480
}

stylelint.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
module.exports = {
22
root: true,
3-
plugins: ['stylelint-order'],
3+
plugins: ['stylelint-order', 'stylelint-scss'],
44
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
55
rules: {
66
'selector-pseudo-class-no-unknown': [
77
true,
88
{
9-
ignorePseudoClasses: ['global', 'deep']
9+
ignorePseudoClasses: ['global', 'v-deep', 'deep']
1010
}
1111
],
1212
'selector-pseudo-element-no-unknown': [
1313
true,
1414
{
15-
ignorePseudoElements: ['v-deep']
15+
ignorePseudoElements: ['v-deep', 'deep']
1616
}
1717
],
1818
'at-rule-no-unknown': [
1919
true,
2020
{
21-
ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin']
21+
ignoreAtRules: ['function', 'if', 'each', 'include', 'mixin', 'for']
2222
}
2323
],
2424
'no-empty-source': null,

tsconfig.json

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,46 @@
22
"compilerOptions": {
33
"target": "esnext",
44
"module": "esnext",
5-
"moduleResolution": "node",
65
"strict": true,
7-
"forceConsistentCasingInFileNames": true,
8-
"allowSyntheticDefaultImports": true,
9-
"strictFunctionTypes": false,
106
"jsx": "preserve",
11-
"baseUrl": ".",
12-
"allowJs": true,
13-
"sourceMap": true,
14-
"isolatedModules": true,
7+
"importHelpers": true,
8+
"moduleResolution": "node",
9+
"skipLibCheck": true,
1510
"esModuleInterop": true,
16-
"resolveJsonModule": true,
17-
"noUnusedLocals": true,
18-
"noUnusedParameters": true,
11+
"allowSyntheticDefaultImports": true,
1912
"experimentalDecorators": true,
13+
"sourceMap": true,
14+
"pretty": true,
15+
"resolveJsonModule": true,
16+
"allowJs": true,
17+
"checkJs": true,
18+
"suppressImplicitAnyIndexErrors": true,
19+
"strictPropertyInitialization": false,
20+
"downlevelIteration": true,
21+
"noUnusedLocals": false,
2022
"noImplicitAny": false,
21-
"skipLibCheck": true,
23+
"noImplicitThis": true,
24+
"removeComments": false,
25+
"strictFunctionTypes": false,
26+
"baseUrl": ".",
27+
"types": ["vite/client", "node"],
2228
"typeRoots": ["./node_modules/@types/", "./types"],
23-
"types": ["vite/client"],
2429
"paths": {
2530
"@/*": ["src/*"]
2631
},
2732
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
2833
},
29-
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "preview/**/*.vue"],
30-
"exclude": ["dist", "node_modules"]
34+
"include": [
35+
"src/**/*.ts",
36+
"src/**/*.d.ts",
37+
"src/**/*.tsx",
38+
"src/**/*.vue",
39+
"types/**/*.d.ts",
40+
"types/**/*.ts",
41+
"preview/**/*.ts",
42+
"preview/**/*.d.ts",
43+
"preview/**/*.tsx",
44+
"preview/**/*.vue"
45+
],
46+
"exclude": ["node_modules", "dist"]
3147
}

0 commit comments

Comments
 (0)