ljr-cli 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{lib → bin}/demo1.js +1 -1
- package/{lib → bin}/demo2.js +1 -1
- package/{lib → bin}/index.js +2 -0
- package/{lib → bin}/templates/vue2.7.16/package.json +41 -41
- package/{lib → bin}/templates/vue2.7.16/pnpm-lock.yaml +5 -5
- package/{lib → bin}/templates/vue2.7.16/src/views/Pitfalls//345/206/205/345/255/230/346/272/242/345/207/272/index.vue +2 -2
- package/{lib → bin}/templates/vue2.7.16/src/views/demo//345/205/250/345/261/200store/346/225/260/346/215/256/345/255/227/345/205/270/index.vue +11 -11
- package/{lib → bin}/templates/vue2.7.16/src/views/demo//345/205/250/345/261/200/346/214/207/344/273/244/index.vue +10 -10
- package/{lib → bin}/templates/vue2.7.16/src/views/demo//350/257/267/346/261/202/347/244/272/344/276/213/index.vue +2 -2
- package/{lib → bin}/templates/vue2.7.16/src/views/login.vue +7 -7
- package/bin/templates/vue2.7.16/src/views/template/base-info2.vue +56 -0
- package/{lib → bin}/templates/vue2.7.16/src/views/template/list/index.vue +3 -3
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/.vscode/settings.json +1 -1
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/README.md +66 -35
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/auto-imports.d.ts +12 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/components.d.ts +8 -0
- package/bin/templates/vue3.5.25-2025.12.4/env.d.ts +2 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/eslint.config.ts +1 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/package.json +3 -1
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/pnpm-lock.yaml +558 -399
- package/bin/templates/vue3.5.25-2025.12.4/src/boot/pinia.ts +31 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/src/boot/router.ts +2 -2
- package/bin/templates/vue3.5.25-2025.12.4/src/components/layout/header.vue +16 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/components/layout/left-right.vue +28 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/components/layout/menu.vue +12 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/pages/[...404].vue +5 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/pages/index/about.vue +7 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/pages/index/index.vue +70 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/pages/index.vue +13 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/pages/login.vue +76 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/router/index.ts +28 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/stores/account.ts +49 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/stores/dd.ts +35 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/stores/index.ts +3 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/stores/layout.ts +22 -0
- package/bin/templates/vue3.5.25-2025.12.4/src/stores//347/273/204/345/220/210/345/274/217pinia/345/206/231/346/263/225(/344/273/245account/344/270/272/344/276/213).ts +28 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/tsconfig.app.json +1 -1
- package/bin/templates/vue3.5.25-2025.12.4/typed-router.d.ts +119 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/vite.config.ts +3 -1
- package/package.json +8 -7
- package/lib/templates/vue2.7.16/src/views/template/base-info2.vue +0 -56
- package/lib/templates/vue3.5.25-2025.12.4/env.d.ts +0 -1
- package/lib/templates/vue3.5.25-2025.12.4/src/boot/pinia.ts +0 -10
- package/lib/templates/vue3.5.25-2025.12.4/src/router/index.ts +0 -20
- package/lib/templates/vue3.5.25-2025.12.4/src/stores/counter.ts +0 -12
- package/lib/templates/vue3.5.25-2025.12.4/src/views/AboutView.vue +0 -3
- package/lib/templates/vue3.5.25-2025.12.4/src/views/HomeView.vue +0 -14
- package/{lib → bin}/templates/flutter//346/210/221/346/230/257flutter.txt +0 -0
- package/{lib → bin}/templates/java//346/210/221/346/230/257java.txt +0 -0
- package/{lib → bin}/templates/monorepo//346/210/221/346/230/257monorepo.txt +0 -0
- package/{lib → bin}/templates/mysql//346/210/221/346/230/257mysql.txt +0 -0
- package/{lib → bin}/templates/node//346/210/221/346/230/257node.txt +0 -0
- package/{lib → bin}/templates/qiankun//346/210/221/346/230/257qiankun.txt +0 -0
- package/{lib → bin}/templates/react//346/210/221/346/230/257react.txt +0 -0
- package/{lib → bin}/templates/uni-app//346/210/221/346/230/257uni-app.txt +0 -0
- package/{lib → bin}/templates/vue2.7.16/.browserslistrc +0 -0
- package/{lib → bin}/templates/vue2.7.16/.env +0 -0
- package/{lib → bin}/templates/vue2.7.16/.env.development +0 -0
- package/{lib → bin}/templates/vue2.7.16/.env.production +0 -0
- package/{lib → bin}/templates/vue2.7.16/.eslintignore +0 -0
- package/{lib → bin}/templates/vue2.7.16/.eslintrc.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/.prettierrc.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/.vscode/settings.json +0 -0
- package/{lib → bin}/templates/vue2.7.16/README.md +0 -0
- package/{lib → bin}/templates/vue2.7.16/babel.config.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/jsconfig.json +0 -0
- package/{lib → bin}/templates/vue2.7.16/public/favicon.svg +0 -0
- package/{lib → bin}/templates/vue2.7.16/public/index.html +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/App.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/api/interface/index.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/api/request.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/api/server/index.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/assets/logo.png +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/components/README.md +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/components/baseInfo/index.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/components/baseInfo/item.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/components/index.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/components/layout/left-menu-and-top-info.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/components/pagination/index.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/css/coverage-style.css +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/directive/index.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/directive/input-number.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/directive/permission.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/directive/re-click.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/global-config.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/main.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/prototype/README.md +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/prototype/el-dialog.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/prototype/index.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/router/index.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/store/index.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/store/modules/dd.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/store/modules/permissions.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/views/404.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/views/Pitfalls//345/206/205/345/255/230/346/272/242/345/207/272//351/200/240/346/210/220vue2/345/206/205/345/255/230/346/272/242/345/207/272/347/232/204/345/257/271/350/261/241.js +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/views/about.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/views/demo//345/205/250/345/261/200/345/274/271/347/252/227/ce.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/views/demo//345/205/250/345/261/200/345/274/271/347/252/227/index.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/views/home.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/views/template/base-info.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/views/template/list/ce.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/src/views/template/list/search.vue +0 -0
- package/{lib → bin}/templates/vue2.7.16/vue.config.js +0 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/.editorconfig +0 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/.gitattributes +0 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/.prettierrc.json +0 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/.vscode/extensions.json +0 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/index.html +0 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/public/favicon.svg +0 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/src/App.vue +0 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/src/assets/vue.svg +0 -0
- package/{lib → bin}/templates/vue3.5.25-2025.12.4/src/boot/index.ts +2 -2
- /package/{lib → bin}/templates/vue3.5.25-2025.12.4/src/boot/style.ts +0 -0
- /package/{lib → bin}/templates/vue3.5.25-2025.12.4/src/css/coverage-style.css +0 -0
- /package/{lib → bin}/templates/vue3.5.25-2025.12.4/src/directive/index.js +0 -0
- /package/{lib → bin}/templates/vue3.5.25-2025.12.4/src/directive/rememberScrollPosition.ts +0 -0
- /package/{lib → bin}/templates/vue3.5.25-2025.12.4/src/main.ts +0 -0
- /package/{lib → bin}/templates/vue3.5.25-2025.12.4/tsconfig.json +0 -0
- /package/{lib → bin}/templates/vue3.5.25-2025.12.4/tsconfig.node.json +0 -0
- /package/{lib → bin}/templates/wx-miniapp//346/210/221/346/230/257wx-miniapp.txt" +0 -0
package/{lib → bin}/demo1.js
RENAMED
package/{lib → bin}/demo2.js
RENAMED
package/{lib → bin}/index.js
RENAMED
|
@@ -10,6 +10,7 @@ import path from "path"
|
|
|
10
10
|
import { dateFormat } from "l-global/utils/date.js"
|
|
11
11
|
import download from "download-git-repo"
|
|
12
12
|
import { replaceInFile } from "replace-in-file"
|
|
13
|
+
import updateNotifier from "update-notifier"
|
|
13
14
|
|
|
14
15
|
/** 渐变字符串 */
|
|
15
16
|
const gradientString = (str, gradientColor = ["#42d392", "#647eff"]) => {
|
|
@@ -33,6 +34,7 @@ const __filename = fileURLToPath(import.meta.url)
|
|
|
33
34
|
const __dirname = path.dirname(__filename)
|
|
34
35
|
const pkg = JSON.parse(readFileSync(path.join(__dirname, "../package.json"), "utf-8"))
|
|
35
36
|
const version = pkg.version
|
|
37
|
+
updateNotifier({ pkg: pkg }).notify()
|
|
36
38
|
|
|
37
39
|
// 当前命令行的路径
|
|
38
40
|
const cwdPath = process.cwd()
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vue2.7.16",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"packageManager": "pnpm@10.27.0",
|
|
6
|
-
"engines": {
|
|
7
|
-
"node": ">=22.18.0"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"dev": "vue-cli-service serve --port 9999",
|
|
11
|
-
"serve": "vue-cli-service serve --port 9999",
|
|
12
|
-
"build": "vue-cli-service build",
|
|
13
|
-
"lint": "vue-cli-service lint"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"axios": "^1.13.2",
|
|
17
|
-
"core-js": "^3.8.3",
|
|
18
|
-
"element-ui": "^2.15.14",
|
|
19
|
-
"l-global": "^1.0.
|
|
20
|
-
"lodash": "^4.17.21",
|
|
21
|
-
"vue": "^2.6.14",
|
|
22
|
-
"vue-router": "^3.5.1",
|
|
23
|
-
"vuex": "^3.6.2",
|
|
24
|
-
"vuex-persist": "^3.1.3"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@babel/core": "^7.12.16",
|
|
28
|
-
"@babel/eslint-parser": "^7.12.16",
|
|
29
|
-
"@vue/cli-plugin-babel": "~5.0.0",
|
|
30
|
-
"@vue/cli-plugin-eslint": "~5.0.0",
|
|
31
|
-
"@vue/cli-plugin-router": "~5.0.0",
|
|
32
|
-
"@vue/cli-plugin-vuex": "~5.0.0",
|
|
33
|
-
"@vue/cli-service": "~5.0.0",
|
|
34
|
-
"eslint": "^7.32.0",
|
|
35
|
-
"eslint-config-prettier": "^8.3.0",
|
|
36
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
37
|
-
"eslint-plugin-vue": "^8.0.3",
|
|
38
|
-
"prettier": "^2.4.1",
|
|
39
|
-
"vue-template-compiler": "^2.6.14"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vue2.7.16",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"packageManager": "pnpm@10.27.0",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=22.18.0"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "vue-cli-service serve --port 9999",
|
|
11
|
+
"serve": "vue-cli-service serve --port 9999",
|
|
12
|
+
"build": "vue-cli-service build",
|
|
13
|
+
"lint": "vue-cli-service lint"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"axios": "^1.13.2",
|
|
17
|
+
"core-js": "^3.8.3",
|
|
18
|
+
"element-ui": "^2.15.14",
|
|
19
|
+
"l-global": "^1.0.5",
|
|
20
|
+
"lodash": "^4.17.21",
|
|
21
|
+
"vue": "^2.6.14",
|
|
22
|
+
"vue-router": "^3.5.1",
|
|
23
|
+
"vuex": "^3.6.2",
|
|
24
|
+
"vuex-persist": "^3.1.3"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@babel/core": "^7.12.16",
|
|
28
|
+
"@babel/eslint-parser": "^7.12.16",
|
|
29
|
+
"@vue/cli-plugin-babel": "~5.0.0",
|
|
30
|
+
"@vue/cli-plugin-eslint": "~5.0.0",
|
|
31
|
+
"@vue/cli-plugin-router": "~5.0.0",
|
|
32
|
+
"@vue/cli-plugin-vuex": "~5.0.0",
|
|
33
|
+
"@vue/cli-service": "~5.0.0",
|
|
34
|
+
"eslint": "^7.32.0",
|
|
35
|
+
"eslint-config-prettier": "^8.3.0",
|
|
36
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
37
|
+
"eslint-plugin-vue": "^8.0.3",
|
|
38
|
+
"prettier": "^2.4.1",
|
|
39
|
+
"vue-template-compiler": "^2.6.14"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -18,8 +18,8 @@ importers:
|
|
|
18
18
|
specifier: ^2.15.14
|
|
19
19
|
version: 2.15.14(vue@2.7.16)
|
|
20
20
|
l-global:
|
|
21
|
-
specifier: ^1.0.
|
|
22
|
-
version: 1.0.
|
|
21
|
+
specifier: ^1.0.5
|
|
22
|
+
version: 1.0.5
|
|
23
23
|
lodash:
|
|
24
24
|
specifier: ^4.17.21
|
|
25
25
|
version: 4.17.21
|
|
@@ -2483,8 +2483,8 @@ packages:
|
|
|
2483
2483
|
resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==}
|
|
2484
2484
|
engines: {node: '>= 8'}
|
|
2485
2485
|
|
|
2486
|
-
l-global@1.0.
|
|
2487
|
-
resolution: {integrity: sha512-
|
|
2486
|
+
l-global@1.0.5:
|
|
2487
|
+
resolution: {integrity: sha512-qYSgDaVAs/TrhbC85YK6PxsGEeau2DmIziMDRbwE0tKXE+sgtGe0a/fbNquQOr+hb4phZccqnOiErTgWEKrnIg==}
|
|
2488
2488
|
|
|
2489
2489
|
launch-editor-middleware@2.12.0:
|
|
2490
2490
|
resolution: {integrity: sha512-SgU5QWoR+Grq1sQedvS/RlfoyO6bdvrztpP+2RRg8UzE7Jz2Yup5J4jiFfm2J9dYBCQYD26AbJVbjnvgwdL6Pw==}
|
|
@@ -6707,7 +6707,7 @@ snapshots:
|
|
|
6707
6707
|
|
|
6708
6708
|
klona@2.0.6: {}
|
|
6709
6709
|
|
|
6710
|
-
l-global@1.0.
|
|
6710
|
+
l-global@1.0.5: {}
|
|
6711
6711
|
|
|
6712
6712
|
launch-editor-middleware@2.12.0:
|
|
6713
6713
|
dependencies:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="c-layout">
|
|
3
3
|
<!-- 顶部 -->
|
|
4
|
-
<div class="c-
|
|
4
|
+
<div class="c-mb-20">
|
|
5
5
|
<el-button type="primary" @click="normalAssignment()"> 正常赋值 </el-button>
|
|
6
6
|
<el-button type="danger" @click="memoryOverflow()"> 内存溢出赋值 </el-button>
|
|
7
7
|
<el-divider></el-divider>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
15
|
<!-- 表格 -->
|
|
16
|
-
<el-table class="c-
|
|
16
|
+
<el-table class="c-flex-1 c-overflow-auto" :data="tableData" border height="100%">
|
|
17
17
|
<el-table-column type="index" width="50"> </el-table-column>
|
|
18
18
|
<el-table-column prop="name" label="姓名" width="180"> </el-table-column>
|
|
19
19
|
<el-table-column prop="address" label="地址"> </el-table-column>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="c-card-
|
|
3
|
-
<el-card class="c-
|
|
2
|
+
<div class="c-card-layout">
|
|
3
|
+
<el-card class="c-w-full">
|
|
4
4
|
<div slot="header" class="clearfix">
|
|
5
5
|
<span>全局store示例</span>
|
|
6
6
|
</div>
|
|
7
|
-
<div class="c-
|
|
7
|
+
<div class="c-mb-10">在创建生命周期直接初始化了,如果需要清空请点击按钮</div>
|
|
8
8
|
<div style="text-align: right">
|
|
9
9
|
<el-button type="primary" size="small" @click="printAllDD"> 打印全部数据字典 </el-button>
|
|
10
10
|
<el-button type="danger" size="small" @click="clearAllDD"> 清空全部数据字典 </el-button>
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
</el-card>
|
|
14
14
|
|
|
15
|
-
<el-card class="c-
|
|
15
|
+
<el-card class="c-w-full">
|
|
16
16
|
<div slot="header" class="clearfix">
|
|
17
17
|
<span>性别的数据字典</span>
|
|
18
18
|
</div>
|
|
19
|
-
<div class="c-
|
|
20
|
-
<div class="c-
|
|
21
|
-
<div class="c-
|
|
19
|
+
<div class="c-mb-10">数据:{{ $store.getters.dd.sex }}</div>
|
|
20
|
+
<div class="c-mb-10">编码转换名称:{{ $root.ddCodeToName({ sex: "1" }) }}</div>
|
|
21
|
+
<div class="c-mb-10">
|
|
22
22
|
使用在select组件上:
|
|
23
23
|
<el-select v-model="activeCity" placeholder="请选择">
|
|
24
24
|
<el-option v-for="item in $store.getters.dd.sex" :key="item.value" :label="item.label" :value="item.value">
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
</el-card>
|
|
32
32
|
|
|
33
|
-
<el-card class="c-
|
|
33
|
+
<el-card class="c-w-full">
|
|
34
34
|
<div slot="header" class="clearfix">
|
|
35
35
|
<span>城市的数据字典</span>
|
|
36
36
|
</div>
|
|
37
|
-
<div class="c-
|
|
38
|
-
<div class="c-
|
|
39
|
-
<div class="c-
|
|
37
|
+
<div class="c-mb-10">数据:{{ $store.getters.dd.citys }}</div>
|
|
38
|
+
<div class="c-mb-10">编码转换名称:{{ $root.ddCodeToName({ citys: "5" }) }}</div>
|
|
39
|
+
<div class="c-mb-10">
|
|
40
40
|
使用在select组件上:
|
|
41
41
|
<el-select v-model="activeCity" placeholder="请选择">
|
|
42
42
|
<el-option v-for="item in $store.getters.dd.citys" :key="item.value" :label="item.label" :value="item.value">
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="c-card-
|
|
3
|
-
<el-card class="c-
|
|
2
|
+
<div class="c-card-layout">
|
|
3
|
+
<el-card class="c-w-full">
|
|
4
4
|
<div slot="header" class="clearfix">
|
|
5
5
|
<span>当前权限:{{ $store.getters.permissions }}</span>
|
|
6
6
|
</div>
|
|
7
|
-
<div class="c-
|
|
7
|
+
<div class="c-mb-10">
|
|
8
8
|
<el-alert
|
|
9
9
|
title="权限一般在登录的时候记录,在页面的时候不会做修改,所以这里不需要更新视图,所以更改了权限后,需要刷新页面,这里更改权限后会自动刷新页面"
|
|
10
10
|
type="warning"
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
>
|
|
14
14
|
</el-alert>
|
|
15
15
|
</div>
|
|
16
|
-
<div class="c-
|
|
17
|
-
<div class="c-
|
|
18
|
-
<el-button v-permission="['hasDelete']"
|
|
16
|
+
<div class="c-mb-10">需要有删除权限才显示删除按钮</div>
|
|
17
|
+
<div class="c-mb-10">
|
|
18
|
+
<el-button v-permission="['hasDelete']" type="danger" size="small"> 删除按钮 </el-button>
|
|
19
19
|
</div>
|
|
20
20
|
<div style="text-align: right">
|
|
21
21
|
<el-button type="primary" size="small" @click="changePermission('setAdminPermissions')">
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
</div>
|
|
29
29
|
</el-card>
|
|
30
30
|
|
|
31
|
-
<el-card class="c-
|
|
31
|
+
<el-card class="c-w-full">
|
|
32
32
|
<div slot="header" class="clearfix">
|
|
33
33
|
<span>只能输入数字指令</span>
|
|
34
34
|
</div>
|
|
35
|
-
<div class="c-
|
|
35
|
+
<div class="c-mb-10">
|
|
36
36
|
<el-form ref="form" label-width="80px">
|
|
37
37
|
<el-form-item label="纯数字">
|
|
38
38
|
<el-input v-model="input" v-input-number placeholder="请输入内容"></el-input>
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
</div>
|
|
45
45
|
</el-card>
|
|
46
46
|
|
|
47
|
-
<el-card class="c-
|
|
47
|
+
<el-card class="c-w-full">
|
|
48
48
|
<div slot="header" class="clearfix">
|
|
49
49
|
<span>防止重复点击</span>
|
|
50
50
|
</div>
|
|
51
|
-
<div class="c-
|
|
51
|
+
<div class="c-mb-10">
|
|
52
52
|
<el-button v-re-click:2000 type="primary" size="small" @click="reClick"> 重复点击,输出到控制台 </el-button>
|
|
53
53
|
</div>
|
|
54
54
|
</el-card>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="c-card-
|
|
3
|
-
<el-card class="c-
|
|
2
|
+
<div class="c-card-layout" style="padding: 50px">
|
|
3
|
+
<el-card class="c-w-full">
|
|
4
4
|
<div slot="header" class="clearfix">
|
|
5
5
|
<span>是否需要登录</span>
|
|
6
6
|
<el-button style="float: right" size="small" type="primary" @click="$store.commit('changeNeedLogin')">
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
{{ $store.state.needLogin }}
|
|
12
12
|
</div>
|
|
13
13
|
</el-card>
|
|
14
|
-
<el-card class="c-
|
|
14
|
+
<el-card class="c-w-full">
|
|
15
15
|
<div slot="header" class="clearfix">
|
|
16
16
|
<span>当前登录状态</span>
|
|
17
17
|
<el-button style="float: right" size="small" type="primary" @click="$store.commit('changeLoginStatus')">
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
</el-button>
|
|
20
20
|
</div>
|
|
21
21
|
<div>
|
|
22
|
-
<h3 class="c-
|
|
23
|
-
<h3 class="c-
|
|
22
|
+
<h3 class="c-mb-10">通过 mapState 读取的方式:{{ loginStatus }}</h3>
|
|
23
|
+
<h3 class="c-mb-10">通过 $store.state.loginStatus 读取的方式:{{ $store.state.loginStatus }}</h3>
|
|
24
24
|
</div>
|
|
25
25
|
</el-card>
|
|
26
26
|
|
|
27
|
-
<el-card class="c-
|
|
27
|
+
<el-card class="c-w-full">
|
|
28
28
|
<div style="text-align: right">
|
|
29
29
|
<el-button type="primary" size="small" @click="printStore"> 打印$store </el-button>
|
|
30
30
|
</div>
|
|
31
31
|
</el-card>
|
|
32
32
|
|
|
33
|
-
<el-card class="c-
|
|
33
|
+
<el-card class="c-w-full">
|
|
34
34
|
<div style="text-align: right">
|
|
35
35
|
<el-button
|
|
36
36
|
type="primary"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="padding: 50px">
|
|
3
|
+
<h1>注意:支持跨列,但是不支持显示隐藏</h1>
|
|
4
|
+
<table class="c-table c-text-left">
|
|
5
|
+
<thead>
|
|
6
|
+
<tr>
|
|
7
|
+
<th colspan="8">基础信息</th>
|
|
8
|
+
</tr>
|
|
9
|
+
</thead>
|
|
10
|
+
<tbody>
|
|
11
|
+
<tr>
|
|
12
|
+
<td class="c-w-10per ctdLabel">包名称</td>
|
|
13
|
+
<td class="c-w-15per">
|
|
14
|
+
{{ baseInfo.pkgName }}
|
|
15
|
+
</td>
|
|
16
|
+
<td class="c-w-10per ctdLabel">计划包编码</td>
|
|
17
|
+
<td class="c-w-15per">
|
|
18
|
+
{{ baseInfo.pkgCode }}
|
|
19
|
+
</td>
|
|
20
|
+
<td class="c-w-10per ctdLabel">计划名称</td>
|
|
21
|
+
<td class="c-w-15per">
|
|
22
|
+
{{ baseInfo.planName }}
|
|
23
|
+
</td>
|
|
24
|
+
<td class="c-w-10per ctdLabel">计划编码</td>
|
|
25
|
+
<td class="c-w-15per">
|
|
26
|
+
{{ baseInfo.planCode }}
|
|
27
|
+
</td>
|
|
28
|
+
</tr>
|
|
29
|
+
<tr>
|
|
30
|
+
<td class="c-w-10per ctdLabel">跨列</td>
|
|
31
|
+
<td class="c-w-15per" colspan="3">
|
|
32
|
+
{{ baseInfo.pkgName }}
|
|
33
|
+
</td>
|
|
34
|
+
<td class="c-w-10per ctdLabel">计划包编码</td>
|
|
35
|
+
<td class="c-w-15per">
|
|
36
|
+
{{ baseInfo.pkgCode }}
|
|
37
|
+
</td>
|
|
38
|
+
<td class="c-w-10per ctdLabel">计划名称</td>
|
|
39
|
+
<td class="c-w-15per">
|
|
40
|
+
{{ baseInfo.planName }}
|
|
41
|
+
</td>
|
|
42
|
+
</tr>
|
|
43
|
+
</tbody>
|
|
44
|
+
</table>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script>
|
|
49
|
+
export default {
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
baseInfo: {},
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
}
|
|
56
|
+
</script>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-loading="loading" class="c-layout">
|
|
3
3
|
<!-- 顶部 -->
|
|
4
|
-
<div class="c-
|
|
4
|
+
<div class="c-mb-20">
|
|
5
5
|
<search v-model="form" @ok="getList(true)"></search>
|
|
6
6
|
<el-divider></el-divider>
|
|
7
7
|
<el-button type="primary" @click="ce()"> 新增 </el-button>
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
10
|
<!-- 表格 -->
|
|
11
|
-
<el-table class="c-
|
|
11
|
+
<el-table class="c-flex-1 c-overflow-hidden" :data="tableData" border height="100%">
|
|
12
12
|
<el-table-column type="index" width="50"> </el-table-column>
|
|
13
13
|
<el-table-column prop="name" label="姓名" width="180"> </el-table-column>
|
|
14
14
|
<el-table-column prop="address" label="地址"> </el-table-column>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
<!-- 分页 -->
|
|
25
25
|
<l-pagination
|
|
26
|
-
class="c-
|
|
26
|
+
class="c-mt-20"
|
|
27
27
|
style="text-align: right"
|
|
28
28
|
:current-page.sync="page.currentPage"
|
|
29
29
|
:page-size.sync="page.size"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"explorer.fileNesting.patterns": {
|
|
4
4
|
"tsconfig.json": "tsconfig.*.json, env.d.ts",
|
|
5
5
|
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
|
|
6
|
-
"package.json": "*.env, .env.*, env.d.ts, package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .prettier*, prettier*, .editorconfig, .gitignore, .gitattributes, index.html, .browserslistrc, babel.config.js, jsconfig.json, auto-imports.d.ts, components.d.ts"
|
|
6
|
+
"package.json": "*.env, .env.*, env.d.ts, package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .prettier*, prettier*, .editorconfig, .gitignore, .gitattributes, index.html, .browserslistrc, babel.config.js, jsconfig.json, auto-imports.d.ts, components.d.ts, typed-router.d.ts"
|
|
7
7
|
},
|
|
8
8
|
"editor.codeActionsOnSave": {
|
|
9
9
|
"source.fixAll": "explicit"
|
|
@@ -1,43 +1,12 @@
|
|
|
1
1
|
# vue3.5.25模版
|
|
2
2
|
|
|
3
3
|
2025.12.4创建的模版
|
|
4
|
-
全局引入 l-global 包,包括 variable.css、base.css、global.css 和 utils 工具类
|
|
5
|
-
使用 `unplugin-auto-import` 自动导入vue、vue-route
|
|
6
|
-
使用 `unplugin-auto-import` `unplugin-vue-components` 按需导入element-plus组件
|
|
7
|
-
|
|
8
|
-
项目内采用`unplugin-vue-router`插件,可无需钉子自动根据目录及文件命名规则,生成配置路由信息。
|
|
9
|
-
做了登录页,404 页
|
|
10
|
-
做了通过路由配置生成左侧菜单
|
|
11
|
-
使用 vuex-persist 插件做 vuex 持久化
|
|
12
|
-
封装了全局登录判断的路由卫士
|
|
13
|
-
eslint + prettier
|
|
14
|
-
axios 封装
|
|
15
|
-
封装自定义指令
|
|
16
|
-
封装自动注册全局组件
|
|
17
|
-
封装函数式弹窗
|
|
18
|
-
封装 store 的数据字典
|
|
19
|
-
原型扩展
|
|
20
|
-
收集一些模版
|
|
21
|
-
收集一些遇到的问题
|
|
22
|
-
收集一些动画
|
|
23
|
-
列表的模版,顶部搜索,中间表格,底下分页,新建编辑弹窗,删除二次确认模版
|
|
24
|
-
|
|
25
|
-
# 目录
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
├── assets # 静态资源
|
|
29
|
-
├── components # 组件
|
|
30
|
-
├── css # css
|
|
31
|
-
├── router # 路由
|
|
32
|
-
├── stores # stores
|
|
33
|
-
├── views # 页面
|
|
34
|
-
├── package.json
|
|
35
|
-
├── package-lock.json
|
|
36
|
-
```
|
|
37
4
|
|
|
38
5
|
## 初始化(必须在当前根目录执行)
|
|
39
6
|
|
|
40
|
-
|
|
7
|
+
### 包管理工具
|
|
8
|
+
|
|
9
|
+
此项目使用 pnpm 作为包管理工具
|
|
41
10
|
|
|
42
11
|
首次使用 corepack 需要先启用
|
|
43
12
|
|
|
@@ -81,7 +50,69 @@ pnpm run lint
|
|
|
81
50
|
pnpm run format
|
|
82
51
|
```
|
|
83
52
|
|
|
84
|
-
|
|
53
|
+
# 全局
|
|
54
|
+
|
|
55
|
+
全局引入 l-global 包,包括 variable.css、base.css、global.css 和 utils 工具类
|
|
56
|
+
|
|
57
|
+
# 自动导入
|
|
58
|
+
|
|
59
|
+
使用 `unplugin-auto-import` 插件自动导入vue、vue-route
|
|
60
|
+
使用 `unplugin-auto-import`、`unplugin-vue-components` 插件按需导入element-plus组件
|
|
61
|
+
|
|
62
|
+
# 路由
|
|
63
|
+
|
|
64
|
+
项目内采用 `unplugin-vue-router` 插件,可无需钉子自动根据目录及文件命名规则,生成配置路由信息。
|
|
65
|
+
加入页面过渡动画
|
|
66
|
+
封装了全局登录判断的路由卫士
|
|
67
|
+
|
|
68
|
+
# store仓库
|
|
69
|
+
|
|
70
|
+
使用 `pinia-plugin-persistedstate` 做持久化,默认全部 store 都持久化
|
|
71
|
+
持久化储存的 `key` 默认加上 `pinia` 前缀
|
|
72
|
+
默认都存到 `sessionStorage` ,account 的 store 默认改成 `localStorage` 存储
|
|
73
|
+
如果需要关闭持久化,为单个 store 配置
|
|
74
|
+
|
|
75
|
+
# 布局
|
|
76
|
+
|
|
77
|
+
封装了几种布局:
|
|
78
|
+
|
|
79
|
+
- 上下布局:顶部信息,下左菜单,下右页面
|
|
80
|
+
- 左右布局:左侧菜单,右上顶部信息,右下页面
|
|
81
|
+
- 全屏页面(隐藏顶部信息和菜单):只有页面,没有顶部信息和菜单,可通过快捷键退出全屏页面
|
|
82
|
+
|
|
83
|
+
# 其他
|
|
84
|
+
|
|
85
|
+
做了登录页,404 页
|
|
86
|
+
做了通过路由配置生成左侧菜单
|
|
87
|
+
使用 xxxx 插件做 pinia 持久化
|
|
88
|
+
封装 store 的数据字典
|
|
89
|
+
|
|
90
|
+
eslint + prettier
|
|
91
|
+
axios 封装
|
|
92
|
+
封装自定义指令
|
|
93
|
+
封装自动注册全局组件
|
|
94
|
+
封装函数式弹窗
|
|
95
|
+
|
|
96
|
+
原型扩展
|
|
97
|
+
收集一些模版
|
|
98
|
+
收集一些遇到的问题
|
|
99
|
+
收集一些动画
|
|
100
|
+
列表的模版,顶部搜索,中间表格,底下分页,新建编辑弹窗,删除二次确认模版
|
|
101
|
+
|
|
102
|
+
# 目录
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
├── assets # 静态资源
|
|
106
|
+
├── components # 组件
|
|
107
|
+
├── css # css
|
|
108
|
+
├── router # 路由
|
|
109
|
+
├── stores # stores
|
|
110
|
+
├── views # 页面
|
|
111
|
+
├── package.json
|
|
112
|
+
├── package-lock.json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## 命名规范
|
|
85
116
|
|
|
86
117
|
| 类别 | 推荐命名方式 | 示例 | 关键点/例外情况 |
|
|
87
118
|
| ------------------ | ----------------------------------------------- | ----------------- | ---------------------- |
|
|
@@ -7,12 +7,16 @@
|
|
|
7
7
|
export {}
|
|
8
8
|
declare global {
|
|
9
9
|
const EffectScope: typeof import('vue').EffectScope
|
|
10
|
+
const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate
|
|
10
11
|
const computed: typeof import('vue').computed
|
|
11
12
|
const createApp: typeof import('vue').createApp
|
|
13
|
+
const createPinia: typeof import('pinia').createPinia
|
|
12
14
|
const customRef: typeof import('vue').customRef
|
|
13
15
|
const defineAsyncComponent: typeof import('vue').defineAsyncComponent
|
|
14
16
|
const defineComponent: typeof import('vue').defineComponent
|
|
17
|
+
const defineStore: typeof import('pinia').defineStore
|
|
15
18
|
const effectScope: typeof import('vue').effectScope
|
|
19
|
+
const getActivePinia: typeof import('pinia').getActivePinia
|
|
16
20
|
const getCurrentInstance: typeof import('vue').getCurrentInstance
|
|
17
21
|
const getCurrentScope: typeof import('vue').getCurrentScope
|
|
18
22
|
const getCurrentWatcher: typeof import('vue').getCurrentWatcher
|
|
@@ -23,6 +27,11 @@ declare global {
|
|
|
23
27
|
const isReadonly: typeof import('vue').isReadonly
|
|
24
28
|
const isRef: typeof import('vue').isRef
|
|
25
29
|
const isShallow: typeof import('vue').isShallow
|
|
30
|
+
const mapActions: typeof import('pinia').mapActions
|
|
31
|
+
const mapGetters: typeof import('pinia').mapGetters
|
|
32
|
+
const mapState: typeof import('pinia').mapState
|
|
33
|
+
const mapStores: typeof import('pinia').mapStores
|
|
34
|
+
const mapWritableState: typeof import('pinia').mapWritableState
|
|
26
35
|
const markRaw: typeof import('vue').markRaw
|
|
27
36
|
const nextTick: typeof import('vue').nextTick
|
|
28
37
|
const onActivated: typeof import('vue').onActivated
|
|
@@ -46,9 +55,12 @@ declare global {
|
|
|
46
55
|
const readonly: typeof import('vue').readonly
|
|
47
56
|
const ref: typeof import('vue').ref
|
|
48
57
|
const resolveComponent: typeof import('vue').resolveComponent
|
|
58
|
+
const setActivePinia: typeof import('pinia').setActivePinia
|
|
59
|
+
const setMapStoreSuffix: typeof import('pinia').setMapStoreSuffix
|
|
49
60
|
const shallowReactive: typeof import('vue').shallowReactive
|
|
50
61
|
const shallowReadonly: typeof import('vue').shallowReadonly
|
|
51
62
|
const shallowRef: typeof import('vue').shallowRef
|
|
63
|
+
const storeToRefs: typeof import('pinia').storeToRefs
|
|
52
64
|
const toRaw: typeof import('vue').toRaw
|
|
53
65
|
const toRef: typeof import('vue').toRef
|
|
54
66
|
const toRefs: typeof import('vue').toRefs
|
|
@@ -13,7 +13,11 @@ export {}
|
|
|
13
13
|
declare module 'vue' {
|
|
14
14
|
export interface GlobalComponents {
|
|
15
15
|
ElButton: typeof import('element-plus/es')['ElButton']
|
|
16
|
+
ElCard: typeof import('element-plus/es')['ElCard']
|
|
16
17
|
ElInput: typeof import('element-plus/es')['ElInput']
|
|
18
|
+
Header: typeof import('./src/components/layout/header.vue')['default']
|
|
19
|
+
LeftRight: typeof import('./src/components/layout/left-right.vue')['default']
|
|
20
|
+
Menu: typeof import('./src/components/layout/menu.vue')['default']
|
|
17
21
|
RouterLink: typeof import('vue-router')['RouterLink']
|
|
18
22
|
RouterView: typeof import('vue-router')['RouterView']
|
|
19
23
|
}
|
|
@@ -22,7 +26,11 @@ declare module 'vue' {
|
|
|
22
26
|
// For TSX support
|
|
23
27
|
declare global {
|
|
24
28
|
const ElButton: typeof import('element-plus/es')['ElButton']
|
|
29
|
+
const ElCard: typeof import('element-plus/es')['ElCard']
|
|
25
30
|
const ElInput: typeof import('element-plus/es')['ElInput']
|
|
31
|
+
const Header: typeof import('./src/components/layout/header.vue')['default']
|
|
32
|
+
const LeftRight: typeof import('./src/components/layout/left-right.vue')['default']
|
|
33
|
+
const Menu: typeof import('./src/components/layout/menu.vue')['default']
|
|
26
34
|
const RouterLink: typeof import('vue-router')['RouterLink']
|
|
27
35
|
const RouterView: typeof import('vue-router')['RouterView']
|
|
28
36
|
}
|
|
@@ -27,6 +27,7 @@ export default defineConfigWithVueTs(
|
|
|
27
27
|
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", // debugger是否要警告
|
|
28
28
|
"spaced-comment": ["error", "always", { markers: ["/"] }], // 注释 // 或 /* 开始后的间距的一致性
|
|
29
29
|
"vue/attributes-order": "error", // vue属性排序
|
|
30
|
+
"vue/multi-word-component-names": "off", // vue多单词组件名称
|
|
30
31
|
},
|
|
31
32
|
},
|
|
32
33
|
)
|
|
@@ -19,8 +19,10 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"element-plus": "^2.12.0",
|
|
22
|
-
"l-global": "^1.0.
|
|
22
|
+
"l-global": "^1.0.5",
|
|
23
23
|
"pinia": "^3.0.4",
|
|
24
|
+
"pinia-plugin-persistedstate": "^4.7.1",
|
|
25
|
+
"unplugin-vue-router": "^0.19.2",
|
|
24
26
|
"vue": "^3.5.25",
|
|
25
27
|
"vue-router": "^4.6.3"
|
|
26
28
|
},
|