Skip to content

Commit ab09ee3

Browse files
committed
Add Theme func detail to look v1.8.1 update log
1 parent 063672a commit ab09ee3

Some content is hidden

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

68 files changed

+2350
-776
lines changed

.env.serve-test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#The defined variable must start with VITE_APP_
22
VITE_APP_ENV = 'test'
3-
VITE_APP_BASE_URL = 'http://localhost:20156/api'
3+
VITE_APP_BASE_URL = 'http://localhost:20156/micro-service-api'
44

55
#image or oss address
66
VITE_APP_IMAGE_URL = 'https://github.jzfai.top/gofast-image'

.eslintrc-auto-import.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
{
22
"globals": {
3+
"acceptHMRUpdate": true,
34
"axiosReq": true,
45
"computed": true,
56
"createApp": true,
7+
"createPinia": true,
68
"customRef": true,
79
"defineAsyncComponent": true,
810
"defineComponent": true,
11+
"defineStore": true,
912
"effectScope": true,
1013
"EffectScope": true,
14+
"getActivePinia": true,
1115
"getCurrentInstance": true,
1216
"getCurrentScope": true,
1317
"h": true,
1418
"inject": true,
1519
"isReadonly": true,
1620
"isRef": true,
21+
"mapActions": true,
22+
"mapGetters": true,
23+
"mapState": true,
24+
"mapStores": true,
25+
"mapWritableState": true,
1726
"markRaw": true,
1827
"nextTick": true,
1928
"onActivated": true,
@@ -34,9 +43,12 @@
3443
"readonly": true,
3544
"ref": true,
3645
"resolveComponent": true,
46+
"setActivePinia": true,
47+
"setMapStoreSuffix": true,
3748
"shallowReactive": true,
3849
"shallowReadonly": true,
3950
"shallowRef": true,
51+
"storeToRefs": true,
4052
"toRaw": true,
4153
"toRef": true,
4254
"toRefs": true,

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"editor.defaultFormatter": "esbenp.prettier-vscode",
3-
"npm.packageManager": "yarn"
3+
"npm.packageManager": "pnpm"
44
}

auto-imports.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
// Generated by 'unplugin-auto-import'
22
// We suggest you to commit this file into source control
33
declare global {
4+
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
45
const axiosReq: typeof import('@/utils/axiosReq')['axiosReq']
56
const computed: typeof import('vue')['computed']
67
const createApp: typeof import('vue')['createApp']
8+
const createPinia: typeof import('pinia')['createPinia']
79
const customRef: typeof import('vue')['customRef']
810
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
911
const defineComponent: typeof import('vue')['defineComponent']
12+
const defineStore: typeof import('pinia')['defineStore']
1013
const effectScope: typeof import('vue')['effectScope']
1114
const EffectScope: typeof import('vue')['EffectScope']
15+
const getActivePinia: typeof import('pinia')['getActivePinia']
1216
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
1317
const getCurrentScope: typeof import('vue')['getCurrentScope']
1418
const h: typeof import('vue')['h']
1519
const inject: typeof import('vue')['inject']
1620
const isReadonly: typeof import('vue')['isReadonly']
1721
const isRef: typeof import('vue')['isRef']
22+
const mapActions: typeof import('pinia')['mapActions']
23+
const mapGetters: typeof import('pinia')['mapGetters']
24+
const mapState: typeof import('pinia')['mapState']
25+
const mapStores: typeof import('pinia')['mapStores']
26+
const mapWritableState: typeof import('pinia')['mapWritableState']
1827
const markRaw: typeof import('vue')['markRaw']
1928
const nextTick: typeof import('vue')['nextTick']
2029
const onActivated: typeof import('vue')['onActivated']
@@ -35,9 +44,12 @@ declare global {
3544
const readonly: typeof import('vue')['readonly']
3645
const ref: typeof import('vue')['ref']
3746
const resolveComponent: typeof import('vue')['resolveComponent']
47+
const setActivePinia: typeof import('pinia')['setActivePinia']
48+
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
3849
const shallowReactive: typeof import('vue')['shallowReactive']
3950
const shallowReadonly: typeof import('vue')['shallowReadonly']
4051
const shallowRef: typeof import('vue')['shallowRef']
52+
const storeToRefs: typeof import('pinia')['storeToRefs']
4153
const toRaw: typeof import('vue')['toRaw']
4254
const toRef: typeof import('vue')['toRef']
4355
const toRefs: typeof import('vue')['toRefs']

components.d.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// generated by unplugin-vue-components
2+
// We suggest you to commit this file into source control
3+
// Read more: https://github.com/vuejs/core/pull/3399
4+
import '@vue/runtime-core'
5+
6+
declare module '@vue/runtime-core' {
7+
export interface GlobalComponents {
8+
ElSvgIcon: typeof import('./src/components/ElSvgIcon.vue')['default']
9+
ImportExportComp: typeof import('./src/components/ImportExportComp.vue')['default']
10+
LangSelect: typeof import('./src/components/LangSelect/index.vue')['default']
11+
Pagination: typeof import('./src/components/Pagination/index.vue')['default']
12+
RouterLink: typeof import('vue-router')['RouterLink']
13+
RouterView: typeof import('vue-router')['RouterView']
14+
ScreenFull: typeof import('./src/components/ScreenFull/index.vue')['default']
15+
SizeSelect: typeof import('./src/components/SizeSelect/index.vue')['default']
16+
TestUnit: typeof import('./src/components/TestUnit.vue')['default']
17+
ThemeSelect: typeof import('./src/components/ThemeSelect/index.vue')['default']
18+
Tinymce: typeof import('./src/components/Tinymce/Tinymce.vue')['default']
19+
}
20+
}
21+
22+
export {}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="en" class="base-theme" >
33
<head>
44
<meta charset="UTF-8" />
55
<link rel="icon" href="/favicon.ico" />

optimize-include.ts

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
// const fs = require('fs')
2+
// const files = fs.readdirSync(
3+
// 'D:\\github\\vue3-admin-ts\\node_modules\\.pnpm\\element-plus@2.2.9_vue@3.2.37\\node_modules\\element-plus\\es\\components\\'
4+
// )
5+
// console.log(111, JSON.stringify(files))
6+
// console.log(console.dir(files))
7+
// console.log(console.dir(files.slice(20)))
8+
9+
const elementPlusComponentNameArr = [
10+
'affix',
11+
'alert',
12+
'aside',
13+
'autocomplete',
14+
'avatar',
15+
'backtop',
16+
'badge',
17+
'base',
18+
'breadcrumb',
19+
'breadcrumb-item',
20+
'button',
21+
'button-group',
22+
'calendar',
23+
'card',
24+
'carousel',
25+
'carousel-item',
26+
'cascader',
27+
'cascader-panel',
28+
'check-tag',
29+
'checkbox',
30+
'checkbox-button',
31+
'checkbox-group',
32+
'col',
33+
'collapse',
34+
'collapse-item',
35+
'collapse-transition',
36+
'color-picker',
37+
'config-provider',
38+
'container',
39+
'date-picker',
40+
'descriptions',
41+
'descriptions-item',
42+
'dialog',
43+
'divider',
44+
'drawer',
45+
'dropdown',
46+
'dropdown-item',
47+
'dropdown-menu',
48+
'empty',
49+
'footer',
50+
'form',
51+
'form-item',
52+
'header',
53+
'icon',
54+
'image',
55+
'image-viewer',
56+
'infinite-scroll',
57+
'input',
58+
'input-number',
59+
'link',
60+
'loading',
61+
'main',
62+
'menu',
63+
'menu-item',
64+
'menu-item-group',
65+
'message',
66+
'message-box',
67+
'notification',
68+
'option',
69+
'option-group',
70+
'overlay',
71+
'page-header',
72+
'pagination',
73+
'popconfirm',
74+
'popover',
75+
'popper',
76+
'progress',
77+
'radio',
78+
'radio-button',
79+
'radio-group',
80+
'rate',
81+
'result',
82+
'row',
83+
'scrollbar',
84+
'select',
85+
'select-v2',
86+
'skeleton',
87+
'skeleton-item',
88+
'slider',
89+
'space',
90+
'step',
91+
'steps',
92+
'sub-menu',
93+
'switch',
94+
'tab-pane',
95+
'table',
96+
'table-column',
97+
'table-v2',
98+
'tabs',
99+
'tag',
100+
'teleport',
101+
'time-picker',
102+
'time-select',
103+
'timeline',
104+
'timeline-item',
105+
'tooltip',
106+
'transfer',
107+
'tree',
108+
'tree-select',
109+
'tree-v2',
110+
'upload',
111+
'virtual-list'
112+
]
113+
export const optimizeDepsArr = () => {
114+
const depsArr = [] as string[]
115+
elementPlusComponentNameArr.forEach((feItem) => {
116+
depsArr.push(`element-plus/es/components/${feItem}/style/index`)
117+
})
118+
119+
return depsArr
120+
}
121+
122+
export default []

package.json

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue3-admin-plus",
3-
"version": "1.6.2",
3+
"version": "1.8.1",
44
"license": "ISC",
55
"author": "kuanghua(869653722@qq.com)",
66
"packageManager": "pnpm@6.32.3",
@@ -22,39 +22,38 @@
2222
"vue": "^3.2.26"
2323
},
2424
"dependencies": {
25-
"@element-plus/icons-vue": "2.0.4",
26-
"@vueuse/core": "^8.7.5",
25+
"@element-plus/icons-vue": "^2.0.4",
2726
"js-error-collection": "^1.0.7",
2827
"axios": "0.21.3",
29-
"d3": "7.2.1",
30-
"driver.js": "^0.9.8",
3128
"echarts": "4.2.1",
32-
"element-china-area-data": "5.0.2",
33-
"element-plus": "2.2.5",
29+
"element-plus": "^2.2.9",
3430
"mitt": "3.0.0",
35-
"moment-mini": "2.24.0",
31+
"moment-mini": "2.22.1",
3632
"nprogress": "0.2.0",
3733
"path": "0.12.7",
38-
"path-to-regexp": "^6.2.0",
39-
"pinia": "2.0.14",
40-
"screenfull": "4.2.0",
34+
"path-to-regexp": "6.2.0",
35+
"pinia": "^2.0.16",
4136
"tinymce": "4.9.11",
4237
"vue": "3.2.37",
38+
"vue-router": "4.0.14",
39+
"@vueuse/core": "^8.7.5",
40+
"d3": "7.2.1",
41+
"driver.js": "^0.9.8",
42+
"element-china-area-data": "5.0.2",
43+
"screenfull": "4.2.0",
4344
"vue-i18n": "9.1.6",
44-
"vue-router": "4.0.12",
4545
"xlsx": "^0.18.5",
4646
"sortablejs": "1.15.0",
4747
"splitpanes": "^3.1.1"
4848
},
4949
"devDependencies": {
50+
"scss": "0.2.4",
5051
"@babel/eslint-parser": "7.16.3",
5152
"@types/echarts": "4.9.7",
52-
"@types/mockjs": "1.0.3",
53-
"@types/node": "15.0.1",
53+
"@types/mockjs": "1.0.6",
5454
"@typescript-eslint/eslint-plugin": "5.5.0",
5555
"@typescript-eslint/parser": "5.5.0",
5656
"@vitejs/plugin-legacy": "1.6.4",
57-
"@vitejs/plugin-vue": "1.10.2",
5857
"@vitejs/plugin-vue-jsx": "1.3.1",
5958
"eslint": "7.32.0",
6059
"eslint-config-prettier": "8.3.0",
@@ -65,19 +64,12 @@
6564
"husky": "7.0.2",
6665
"mockjs": "1.1.0",
6766
"prettier": "2.2.1",
68-
"sass": "1.32.12",
69-
"scss": "0.2.4",
7067
"svg-sprite-loader": "6.0.11",
71-
"typescript": "4.3.2",
72-
"unplugin-auto-import": "^0.5.11",
73-
"unplugin-vue-components": "^0.17.14",
74-
"vite": "2.9.12",
7568
"vite-plugin-html": "^3.2.0",
7669
"vite-plugin-mock": "^2.9.6",
7770
"vite-plugin-style-import": "1.2.1",
7871
"vite-plugin-svg-icons": "1.0.5",
7972
"vite-plugin-vue-setup-extend-plus": "0.0.2",
80-
"vue-tsc": "0.28.1",
8173
"jest": "<27",
8274
"ts-jest": "<27",
8375
"tslib": "^2.4.0",
@@ -92,7 +84,16 @@
9284
"ts-node": "10.7.0",
9385
"majestic": "1.8.1",
9486
"@vue/cli-plugin-unit-jest": "4.5.17",
95-
"@vue/cli-service": "4.5.17"
87+
"@vue/cli-service": "4.5.17",
88+
"@types/node": "^17.0.35",
89+
"@vitejs/plugin-vue": "^2.3.3",
90+
"sass": "^1.52.1",
91+
"typescript": "^4.7.2",
92+
"unplugin-auto-import": "^0.5.11",
93+
"unplugin-vue-components": "^0.19.5",
94+
"vite": "^3.0.0",
95+
"@vueuse/core": "^8.7.5",
96+
"vue-tsc": "^0.34.16"
9697
},
9798
"browserslist": [
9899
"> 1%",

src/App.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
<template>
2-
<router-view />
2+
<el-config-provider :locale="locale" :size="size" namespace="el">
3+
<router-view />
4+
</el-config-provider>
35
</template>
46
<script setup>
57
import { setToken } from '@/utils/auth'
68
import { useAppStore } from '@/store/app'
79
10+
//get settings
811
const appStore = useAppStore()
912
const settings = computed(() => {
1013
return appStore.settings
1114
})
15+
//lang and size config
16+
import zh from 'element-plus/es/locale/lang/zh-cn'
17+
import en from 'element-plus/es/locale/lang/en' // element-ui lang
18+
let lang = { zh, en }
19+
let size = $ref(localStorage.getItem('size') || settings.value.defaultSize)
20+
let locale = $ref(lang[localStorage.getItem('language') || settings.value.defaultLanguage])
21+
1222
onBeforeMount(() => {
1323
//set tmp token when setting isNeedLogin false
1424
if (!settings.value.isNeedLogin) setToken(settings.value.tmpToken)

0 commit comments

Comments
 (0)