Skip to content

Commit 67b1031

Browse files
committed
打包方式webpack调整为最新的vite,vuex调整为pinia
1 parent 1e98f93 commit 67b1031

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

+1888
-399
lines changed

.browserslistrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VUE_APP_BASE_API = 'http://www.vuecmf.com'
1+
VITE_APP_BASE_API = 'http://www.vc.com'

.env.production

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VUE_APP_BASE_API = 'http://www.vuecmf.com'
1+
VITE_APP_BASE_API = 'http://www.vc.com'

.env.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VUE_APP_BASE_API = 'http://www.vuecmf.com'
1+
VITE_APP_BASE_API = 'http://www.vuecmf.com'

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

.gitignore

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1-
.DS_Store
2-
node_modules
3-
/dist
4-
5-
6-
# local env files
7-
.env.local
8-
.env.*.local
9-
10-
# Log files
1+
# Logs
2+
logs
3+
*.log
114
npm-debug.log*
125
yarn-debug.log*
136
yarn-error.log*
147
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
1519

1620
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
1723
.idea
18-
.vscode
1924
*.suo
2025
*.ntvs*
2126
*.njsproj
2227
*.sln
2328
*.sw?
24-
yarn.lock
25-
package-lock.json
29+
30+
*.tsbuildinfo

.htaccess

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<IfModule mod_rewrite.c>
2+
Options +FollowSymlinks
3+
RewriteEngine On
4+
5+
RewriteCond %{REQUEST_URI} ^(.*)$
6+
RewriteRule ^/index\.html$ - [L,NC]
7+
8+
RewriteCond %{REQUEST_FILENAME} !-d
9+
RewriteCond %{REQUEST_FILENAME} !-f
10+
RewriteRule ^(.*)$ index.html [L]
11+
</IfModule>

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["Vue.volar"]
3+
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 emei8
3+
Copyright (c) 2022 vuecmf.com <tulihua2004@126.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# vuecmf
2-
VueCMF内容管理快速开发框架v2.1+(前端)
2+
VueCMF内容管理快速开发框架v3(前端)
3+
4+
v3版本开始使用vite方式打包,原v2版本使用的是webpack方式打包
35

46
前端:
57

@@ -16,14 +18,14 @@ Go版 https://gitee.com/emei/vuecmf-go
1618
注意:前端v2.0.x与后端v2.0.x匹配, 前端v2.1.x与后端v2.1.x匹配
1719

1820
# 项目介绍
19-
VueCMF是一款完全开源免费的内容管理快速开发框架。采用前后端分离模式搭建,2.1+版本前端使用vue3、Element Plus和TypeScript构建,后端API的PHP版基于ThinkPHP6开发,Go版基于Gin开发。可用于快速开发CMS、CRM、WMS、OMS、ERP等管理系统,开发简单、高效易用,极大减少系统的开发周期和研发成本!甚至不用写一行代码就能设计出功能强大的管理系统。
21+
VueCMF是一款完全开源免费的内容管理快速开发框架。采用前后端分离模式搭建,2.1+版本前端使用vue3、Element Plus和TypeScript构建,后端API的PHP版基于ThinkPHP8开发,Go版基于Gin开发。可用于快速开发CMS、CRM、WMS、OMS、ERP等管理系统,开发简单、高效易用,极大减少系统的开发周期和研发成本!甚至不用写一行代码就能设计出功能强大的管理系统。
2022

2123
# 示例演示
2224
- [vuecmf示例演示](http://www.vuecmf.com/)
2325

2426
# 开始使用
2527
## 安装运行环境
26-
第一步:安装nodejs (已安装过的则跳过此步骤),建议安装v18.14+
28+
第一步:安装nodejs (已安装过的则跳过此步骤),建议安装v20+
2729

2830
- [下载nodejs(https://nodejs.org/zh-cn/)](https://nodejs.org/zh-cn/), 并安装完后,在命令行执行下面操作安装yarn
2931
```

auto-imports.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable */
22
/* prettier-ignore */
33
// @ts-nocheck
4+
// noinspection JSUnusedGlobalSymbols
45
// Generated by unplugin-auto-import
56
export {}
67
declare global {

babel.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

components.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// generated by unplugin-vue-components
2-
// We suggest you to commit this file into source control
1+
/* eslint-disable */
2+
/* prettier-ignore */
3+
// @ts-nocheck
4+
// Generated by unplugin-vue-components
35
// Read more: https://github.com/vuejs/core/pull/3399
4-
import '@vue/runtime-core'
5-
66
export {}
77

8-
declare module '@vue/runtime-core' {
8+
declare module 'vue' {
99
export interface GlobalComponents {
1010
ElAffix: typeof import('element-plus/es')['ElAffix']
1111
ElAside: typeof import('element-plus/es')['ElAside']

env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<link rel="icon" href="/favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>VueCMF</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>

package.json

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,42 @@
11
{
2-
"name": "vuecmf",
3-
"version": "2.5.1",
2+
"name": "vuecmf-web",
3+
"version": "3.0.0",
44
"private": true,
5-
"description": "VueCMF是一款完全开源免费的内容管理快速开发框架。2.1+版本使用vue3、Element Plus和TypeScript构建,后端API基于Go/PHP开发。可用于快速开发CMS、CRM、WMS、OMS、ERP等管理系统,开发简单、高效易用,极大减少系统的开发周期和研发成本!甚至不用写一行代码使用VueCMF就能设计出功能强大的后台管理系统。",
6-
"author": "vuecmf <tulihua2004@126.com>",
5+
"description": "VueCMF是一款完全开源免费的内容管理快速开发框架。前端使用vue3、Element Plus和TypeScript构建,后端API基于Go/PHP开发。可用于快速开发CMS、CRM、WMS、OMS、ERP等管理系统,开发简单、高效易用,极大减少系统的开发周期和研发成本!甚至不用写一行代码使用VueCMF就能设计出功能强大的后台管理系统。",
6+
"author": "vuecmf.com <tulihua2004@126.com>",
7+
"type": "module",
78
"scripts": {
8-
"serve": "vue-cli-service serve",
9-
"build": "vue-cli-service build",
10-
"lint": "vue-cli-service lint",
11-
"build:test": "vue-cli-service build --mode test",
12-
"dev": "vue-cli-service serve",
13-
"test": "vue-cli-service serve --mode test"
9+
"dev": "vite",
10+
"build": "run-p type-check \"build-only {@}\" --",
11+
"preview": "vite preview",
12+
"build-only": "vite build",
13+
"type-check": "vue-tsc --build --force"
1414
},
1515
"dependencies": {
16-
"@element-plus/icons-vue": "^2.1.0",
17-
"@types/node": "^18.15.3",
18-
"axios": "^1.3.4",
19-
"core-js": "^3.29.1",
20-
"element-plus": "^2.3.9",
21-
"qs": "^6.11.1",
22-
"register-service-worker": "^1.7.2",
23-
"vue": "^3.3.4",
24-
"vue-router": "^4.2.4",
25-
"vue-vuecmf-dialog": "^1.4.9",
26-
"vue3-vuecmf-table": "^1.26.1",
27-
"vuex": "^4.1.0"
16+
"@element-plus/icons-vue": "^2.3.1",
17+
"@types/qs": "^6.9.14",
18+
"axios": "^1.6.8",
19+
"core-js": "^3.36.1",
20+
"element-plus": "^2.6.1",
21+
"pinia": "^2.1.7",
22+
"qs": "^6.12.0",
23+
"sass": "^1.72.0",
24+
"unplugin-auto-import": "^0.17.5",
25+
"unplugin-vue-components": "^0.26.0",
26+
"vue": "^3.4.21",
27+
"vue-router": "^4.3.0",
28+
"vue-vuecmf-dialog": "^2.0.2",
29+
"vue3-vuecmf-table": "^2.0.4"
2830
},
2931
"devDependencies": {
30-
"@typescript-eslint/eslint-plugin": "^5.55.0",
31-
"@typescript-eslint/parser": "^5.55.0",
32-
"@vue/cli-plugin-babel": "~5.0.8",
33-
"@vue/cli-plugin-eslint": "~5.0.8",
34-
"@vue/cli-plugin-pwa": "~5.0.8",
35-
"@vue/cli-plugin-router": "~5.0.8",
36-
"@vue/cli-plugin-typescript": "~5.0.8",
37-
"@vue/cli-plugin-vuex": "~5.0.8",
38-
"@vue/cli-service": "~5.0.8",
39-
"@vue/compiler-sfc": "^3.2.47",
40-
"@vue/eslint-config-typescript": "^11.0.2",
41-
"eslint": "^8.36.0",
42-
"eslint-plugin-vue": "^9.9.0",
43-
"sass": "^1.59.3",
44-
"sass-loader": "^13.2.1",
45-
"typescript": "~4.9.5",
46-
"unplugin-auto-import": "^0.14.4",
47-
"unplugin-vue-components": "^0.23.0"
32+
"@tsconfig/node20": "^20.1.2",
33+
"@types/node": "^20.11.30",
34+
"@vitejs/plugin-vue": "^5.0.4",
35+
"@vue/tsconfig": "^0.5.1",
36+
"npm-run-all2": "^6.1.2",
37+
"typescript": "~5.4.0",
38+
"vite": "^5.1.6",
39+
"vue-tsc": "^2.0.6"
4840
},
4941
"bugs": {
5042
"url": "https://github.com/vuecmf/vuecmf/issues"
-9.2 KB
Binary file not shown.
-29.1 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
-3.29 KB
Binary file not shown.
-3.95 KB
Binary file not shown.
-4.57 KB
Binary file not shown.
-1.46 KB
Binary file not shown.
-1.78 KB
Binary file not shown.

public/img/icons/apple-touch-icon.png

-4.57 KB
Binary file not shown.

public/img/icons/favicon-16x16.png

-799 Bytes
Binary file not shown.

public/img/icons/favicon-32x32.png

-1.24 KB
Binary file not shown.
-1.14 KB
Binary file not shown.

public/img/icons/mstile-150x150.png

-4.18 KB
Binary file not shown.

public/img/icons/safari-pinned-tab.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

public/index.html

Lines changed: 0 additions & 18 deletions
This file was deleted.

public/robots.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/components/LayoutAsideMenu.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
<script lang="ts">
3636
import {defineComponent} from "vue"
37+
import type { PropType } from 'vue'
3738
import VuecmfLayoutAsideMenuItem from "@/components/LayoutAsideMenuItem.vue"
3839
3940
export default defineComponent({
@@ -43,7 +44,7 @@ export default defineComponent({
4344
aside_menu_active: String,
4445
is_side_collapse: Boolean,
4546
aside_menu_list: Object,
46-
collapse: Function,
47+
collapse: Function as PropType<() => void>,
4748
addTab: Function,
4849
},
4950
})

src/components/LayoutAsideMenuItem.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818

1919
<script lang="ts">
2020
import {defineComponent} from "vue"
21+
import type { PropType } from 'vue'
2122
2223
export default defineComponent({
2324
name: "vuecmf-layout-aside-menu-item",
2425
props: {
25-
menu_item_list: Object
26+
menu_item_list: Object as PropType<any>
2627
},
2728
})
2829
</script>

src/components/LayoutHeader.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import {defineComponent} from "vue"
4343
import LoginService from "@/service/LoginService";
4444
import { Avatar } from '@element-plus/icons-vue'
45+
import type {AnyObject} from "@/typings/vuecmf";
4546
4647
4748
export default defineComponent({
@@ -54,7 +55,7 @@ export default defineComponent({
5455
},
5556
setup() {
5657
const loginService = new LoginService()
57-
const user_info = loginService.getLoginUser()
58+
const user_info = loginService.getLoginUser() as AnyObject
5859
5960
const logout = (command:string):void => {
6061
if(command == 'logout'){
@@ -119,4 +120,4 @@ export default defineComponent({
119120
120121
121122
122-
</style>
123+
</style>

src/components/LayoutTabs.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
:id=" 'vucmf_tag_' + tag.path + '_' + idx "
88
v-for="(tag,idx) in tags_list"
99
:key="'vucmf_tag_' + tag.path"
10-
:type=" current_tab_index === idx ? '' : 'info' "
10+
:type=" current_tab_index === idx ? 'primary' : 'info' "
1111
effect="plain"
12-
:closable=" idx > 0 "
12+
:closable=" idx as number > 0 "
1313
:disable-transitions
1414
="true"
15-
@close="closeTag(tag)"
15+
@close="closeTag?.(tag)"
1616
@click="selectTab"
1717
>
1818
{{ tag.title }}
@@ -51,22 +51,24 @@
5151

5252
<script lang="ts">
5353
import {defineComponent} from "vue"
54+
import type { PropType } from 'vue'
55+
import type {Tag, TagList} from "@/typings/vuecmf";
5456
5557
export default defineComponent({
5658
name: "LayoutTabs",
5759
props:{
5860
current_tab_index: Number,
5961
left_disabled: Boolean,
6062
right_disabled: Boolean,
61-
tags_list: Object,
63+
tags_list: Object as PropType<TagList>,
6264
scroll_x: Number,
6365
scrollLeft: Function,
6466
scrollRight: Function,
65-
closeTag: Function,
67+
closeTag: Function as PropType<(tag: Tag) => void>,
6668
manageVuecmfTabs: Function,
6769
selectTab: Function,
68-
fullScreen: Function,
69-
reloadTabPage: Function,
70+
fullScreen: Function as PropType<() => void>,
71+
reloadTabPage: Function as PropType<() => void>,
7072
},
7173
})
7274
</script>

0 commit comments

Comments
 (0)