Skip to content

Commit

Permalink
update vite element-plus vue3 version
Browse files Browse the repository at this point in the history
  • Loading branch information
jzfai committed Jun 12, 2022
1 parent 1c38dc9 commit 07c239b
Show file tree
Hide file tree
Showing 23 changed files with 171 additions and 94 deletions.
8 changes: 3 additions & 5 deletions .env.build
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
VITE_APP_ENV = 'prod'
#自动获取地址推荐
#VITE_APP_BASE_URL = '/micro-service-api'
VITE_APP_BASE_URL = 'http://8.135.1.141/micro-service-api'
VITE_APP_BASE_WS_URL = ''
#The defined variable must start with VITE_APP_
VITE_APP_BASE_URL = 'https://github.jzfai.top/micro-service-api'

#image or oss address
VITE_APP_IMAGE_URL = 'http://8.135.1.141:8080'
VITE_APP_IMAGE_URL = 'https://github.jzfai.top/gofast-image'
4 changes: 2 additions & 2 deletions .env.build-test
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VITE_APP_ENV = 'test'
#自动获取地址推荐
#VITE_APP_BASE_URL = '/micro-service-api'
VITE_APP_BASE_URL = 'http://8.135.1.141/micro-service-api'
VITE_APP_BASE_URL = 'https://github.jzfai.top/micro-service-api'
VITE_APP_BASE_WS_URL = ''

#image or oss address
VITE_APP_IMAGE_URL = 'http://8.135.1.141:8080'
VITE_APP_IMAGE_URL = 'https://github.jzfai.top:8080'
6 changes: 3 additions & 3 deletions .env.serve-dev
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#The defined variable must start with VITE_APP_
VITE_APP_ENV = 'dev'
VITE_APP_BASE_URL = 'http://8.135.1.141/micro-service-api'
VITE_APP_BASE_URL = 'https://github.jzfai.top/micro-service-api'

#image or oss address
VITE_APP_IMAGE_URL = 'http://8.135.1.141:8080'
VITE_APP_IMAGE_URL = 'https://github.jzfai.top/gofast-image'

#proxy, use this to test proxy
#VITE_APP_BASE_URL = '/api'
#VITE_APP_PROXY_URL = 'http://8.135.1.141/micro-service-api'
#VITE_APP_PROXY_URL = 'https://github.jzfai.top/micro-service-api'
4 changes: 2 additions & 2 deletions .env.serve-test
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ VITE_APP_ENV = 'test'
VITE_APP_BASE_URL = 'http://localhost:20156/api'

#image or oss address
VITE_APP_IMAGE_URL = 'http://8.135.1.141:8080'
VITE_APP_IMAGE_URL = 'https://github.jzfai.top/gofast-image'

#proxy, use this to test proxy
#VITE_APP_BASE_URL = '/api'
#VITE_APP_PROXY_URL = 'http://8.135.1.141/micro-service-api'
#VITE_APP_PROXY_URL = 'https://github.jzfai.top/micro-service-api'
14 changes: 7 additions & 7 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@

[github address](https://github.com/jzfai/vue3-admin-plus.git)

[Access address](http://8.135.1.141/vue3-admin-plus)
[Access address](https://github.jzfai.top/vue3-admin-plus)

github 地址: https://github.com/jzfai/vue3-admin-plus.git

国内体验地址:http://8.135.1.141/vue3-admin-plus
国内体验地址:https://github.jzfai.top/vue3-admin-plus


## 例子

---- 我们先看看加载速度和构建后的包大小:

![template-speed-analysis](http://8.135.1.141/file/images/template-speed-analysis.png)
![template-speed-analysis](https://github.jzfai.top/file/images/template-speed-analysis.png)

![template-demo](http://8.135.1.141/file/images/template-demo.png)
![template-demo](https://github.jzfai.top/file/images/template-demo.png)

## 相关项目

Expand Down Expand Up @@ -82,7 +82,7 @@ cd vue3-admin-plus

# pnpm address https://pnpm.io/zh/motivation
# 安装依赖(建议用pnpm)
# 你可以使用 "npm -g i pnpm" 去安装pnpm
# 你可以使用 "npm -g i pnpm@6.32.3" 去安装pnpm
pnpm i

# 启动服务
Expand Down Expand Up @@ -200,7 +200,7 @@ Modern browsers and Internet Explorer 11+.
|Edge| last 2 versions| last 2 versions| last 2 versions

## 讨论和交流(含vue3+ts视频教程)
[WeChat group](http://8.135.1.141/file/images/wx-groud.png)
[WeChat group](https://github.jzfai.top/file/images/wx-groud.png)


## 赞赏(appreciate)
Expand All @@ -209,7 +209,7 @@ Modern browsers and Internet Explorer 11+.

| 微信 | 支付宝 |
| :-: | :-: |
| <img src="http://8.135.1.141/file/images/wxpay-code.png" height="220" /> | <img src="http://8.135.1.141/file/images/alipay-code.png" height="220" /> |
| <img src="https://github.jzfai.top/file/images/wxpay-code.png" height="220" /> | <img src="https://github.jzfai.top/file/images/alipay-code.png" height="220" /> |

>如果属于特别赞助,需注明信息,必要时可以提供特别帮助
>如果公司需要技术合作,可以单独联系(进群找群主)
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ Vite need Node.js >= 12.0.0。

[github address](https://github.com/jzfai/vue3-admin-plus.git)

[Access address](http://8.135.1.141/vue3-admin-plus)
[Access address](https://github.jzfai.top/vue3-admin-plus)

国内体验地址:http://8.135.1.141/vue3-admin-plus
国内体验地址:https://github.jzfai.top/vue3-admin-plus

github 地址: https://github.com/jzfai/vue3-admin-plus.git

## Demo

---- Let's look at the loading speed and the size of the built package first.:

![template-speed-analysis](http://8.135.1.141/file/images/template-speed-analysis.png)
![template-speed-analysis](https://github.jzfai.top/file/images/template-speed-analysis.png)

![template-demo](http://8.135.1.141/file/images/plus-demo.png)
![template-demo](https://github.jzfai.top/file/images/plus-demo.png)

## Related items

Expand Down Expand Up @@ -74,7 +74,7 @@ cd vue3-admin-plus

# pnpm address https://pnpm.io/zh/motivation
# install dependency(Recommend use pnpm)
# you can use "npm -g i pnpm" to install pnpm
# you can use "npm -g i pnpm@6.32.3" to install pnpm
pnpm i

# develop
Expand Down Expand Up @@ -120,15 +120,15 @@ Modern browsers and Internet Explorer 11+.
|Edge| last 2 versions| last 2 versions| last 2 versions

## Discussion and Communication
[WeChat group](http://8.135.1.141/file/images/wx-groud.png)
[WeChat group](https://github.jzfai.top/file/images/wx-groud.png)

## 赞赏(appreciate)

如果可以请我喝杯下午茶(Treat me to afternoon tea if you can)

| 微信 | 支付宝 |
| :-: | :-: |
| <img src="http://8.135.1.141/file/images/wxpay-code.png" height="220" /> | <img src="http://8.135.1.141/file/images/alipay-code.png" height="220" /> |
| <img src="https://github.jzfai.top/file/images/wxpay-code.png" height="220" /> | <img src="https://github.jzfai.top/file/images/alipay-code.png" height="220" /> |

>如果属于特别赞助,需注明信息,必要时可以提供特别帮助
>
Expand Down
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"name": "vue3-admin-plus",
"version": "1.5.5",
"version": "1.6.1",
"license": "ISC",
"author": "kuanghua([email protected])",
"packageManager": "[email protected]",
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "vite --mode serve-dev --host",
"test": "vite --mode serve-test --host",
"build:test": "vite build --mode build-test",
Expand All @@ -20,26 +22,26 @@
"vue": "^3.2.26"
},
"dependencies": {
"@element-plus/icons-vue": "1.1.4",
"js-errorlog-collection": "^1.0.5",
"@element-plus/icons-vue": "2.0.4",
"js-error-collection": "^1.0.7",
"axios": "0.21.3",
"d3": "7.2.1",
"driver.js": "^0.9.8",
"echarts": "4.2.1",
"element-china-area-data": "5.0.2",
"element-plus": "2.1.9",
"element-plus": "2.2.5",
"mitt": "3.0.0",
"moment-mini": "2.24.0",
"nprogress": "0.2.0",
"path": "0.12.7",
"path-to-regexp": "^6.2.0",
"pinia": "2.0.13",
"pinia": "2.0.14",
"screenfull": "4.2.0",
"tinymce": "4.9.11",
"vue": "3.2.33",
"vue": "3.2.37",
"vue-i18n": "9.1.6",
"vue-router": "4.0.12",
"vuedraggable": "^4.1.0"
"sortablejs": "^1.15.0"
},
"devDependencies": {
"@babel/eslint-parser": "7.16.3",
Expand All @@ -66,7 +68,7 @@
"typescript": "4.3.2",
"unplugin-auto-import": "^0.5.11",
"unplugin-vue-components": "^0.17.14",
"vite": "2.9.5",
"vite": "2.9.12",
"vite-plugin-html": "^3.2.0",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-style-import": "1.2.1",
Expand Down Expand Up @@ -95,6 +97,6 @@
"not op_mini all"
],
"engines": {
"node": ">= 14"
"node": ">= 14<18"
}
}
2 changes: 1 addition & 1 deletion src/api/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"sj": "2022-01-05 10:00:12",
"dl": "10A",
"img": "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.autohome.com.cn%2Falbum%2F2009%2F2%2F19%2Fe53e9b0b-f0bd-4a0d-b7fd-7d38924a6f69.jpg&refer=http%3A%2F%2Fimg.autohome.com.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1643968757&t=658b4aa47e7355dc55a5beb0e8f76639",
"video": "http://8.135.1.141/file/video/test-video.mp4"
"video": "https://github.jzfai.top/file/video/test-video.mp4"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useErrorLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import request from '@/utils/axiosReq'
import setting from '@/settings'
import bus from '@/utils/bus'
import pack from '../../package.json'
import { jsErrorCollection } from 'js-errorlog-collection'
import { jsErrorCollection } from 'js-error-collection'
const errorLogReq = (errLog) => {
request({
url: '/integration-front/errorCollection/insert',
Expand Down
4 changes: 2 additions & 2 deletions src/layout/components/Sidebar/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ import { useAppStore } from '@/store/app'
import { usePermissionStore } from '@/store/permission'
const scssJson = dillScssExportToJson(scssExportJson)
const activeMenu = computed(() => {
const { meta, fullPath } = route
const { meta, path } = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
return fullPath
return path
})
</script>

Expand Down
40 changes: 2 additions & 38 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Layout from '@/layout'

/* Router Modules */
import chartsRouter from './modules/charts'
import useExample from './modules/useExample'

export const constantRoutes = [
{
Expand Down Expand Up @@ -280,44 +281,7 @@ export const constantRoutes = [
}
]
},
{
path: '/use-example',
component: Layout,
meta: { title: 'Use Example', icon: 'documentation' },
alwaysShow: true,
children: [
// {
// path: 'tinymce',
// component: () => import('@/views/use-example/tinymce-example/TinymceExample.vue'),
// name: 'Tinymce',
// meta: { title: 'Tinymce', icon: 'documentation' }
// },
{
path: 'i18n-demo',
component: () => import('@/views/use-example/i18n/I18n-Demo.vue'),
name: 'I18nDemo',
meta: { title: 'I18n-Demo', icon: 'documentation' }
},
{
path: 'd3',
component: () => import('@/views/use-example/d3/D3.vue'),
name: 'D3',
meta: { title: 'd3-force', icon: 'documentation' }
},
{
path: 'signboard',
component: () => import('@/views/use-example/signboard/SignBoard.vue'),
name: 'SignBoard-demo',
meta: { title: 'signboard', icon: 'documentation' }
},
{
path: 'worker-Demo',
name: 'WorkerDemo',
component: () => import('@/views/use-example/worker'),
meta: { title: 'Worker Demo', icon: 'nested' }
}
]
},
useExample,
{
path: '/directive',
component: Layout,
Expand Down
42 changes: 42 additions & 0 deletions src/router/modules/useExample.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import Layout from '@/layout'

const useExampleRouter = {
path: '/use-example',
component: Layout,
meta: { title: 'Use Example', icon: 'documentation' },
alwaysShow: true,
children: [
{
path: 'i18n-demo',
component: () => import('@/views/use-example/i18n/I18n-Demo.vue'),
name: 'I18nDemo',
meta: { title: 'I18n-Demo', icon: 'documentation' }
},
{
path: 'd3',
component: () => import('@/views/use-example/d3/D3.vue'),
name: 'D3',
meta: { title: 'd3-force', icon: 'documentation' }
},
{
path: 'signboard',
component: () => import('@/views/use-example/signboard/SignBoard.vue'),
name: 'SignBoard-demo',
meta: { title: 'signboard', icon: 'documentation' }
},
{
path: 'sortable',
name: 'Sortable',
component: () => import('@/views/use-example/Sortable'),
meta: { title: 'Sortable', icon: 'nested' }
},
{
path: 'worker-Demo',
name: 'WorkerDemo',
component: () => import('@/views/use-example/worker'),
meta: { title: 'Worker Demo', icon: 'nested' }
}
]
}

export default useExampleRouter
2 changes: 1 addition & 1 deletion src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const setting = {
* vite.config.js base config
* such as
* */
viteBasePath: '/vue3-admin-plus/'
viteBasePath: './'
}

export default setting
8 changes: 5 additions & 3 deletions src/views/crud/CRUD.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@
<!--点击操作-->
<el-table-column fixed="right" align="center" label="操作" width="180">
<template #default="{ row }">
<el-button type="text" size="small" @click="tableEditClick(row)">编辑</el-button>
<el-button type="text" size="small" @click="tableDetailClick(row)">详情</el-button>
<el-button type="text" size="small" @click="tableDelClick(row)">删除</el-button>
<div class="rowSS">
<el-button type="text" size="small" @click="tableEditClick(row)">编辑</el-button>
<el-button type="text" size="small" @click="tableDetailClick(row)">详情</el-button>
<el-button type="text" size="small" @click="tableDelClick(row)">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
Expand Down
8 changes: 5 additions & 3 deletions src/views/crud/Vci.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@
<!--点击操作-->
<el-table-column align="center" label="操作" width="120px">
<template #default="{ row }">
<el-button type="text" size="small" @click="tableEditClick(row)">编辑</el-button>
<el-button type="text" size="small" @click="tableDelClick(row)">删除</el-button>
<div class="rowSS">
<el-button type="text" size="small" @click="tableEditClick(row)">编辑</el-button>
<el-button type="text" size="small" @click="tableDelClick(row)">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
Expand Down Expand Up @@ -221,7 +223,7 @@ const multiDelBtnClick = async () => {
//download template
const downloadTemplate = () => {
const link = document.createElement('a')
link.href = 'http://8.135.1.141/file/template/export-import-template.xlsx'
link.href = 'https://github.jzfai.top/file/template/export-import-template.xlsx'
link.setAttribute('download', `import-export-template.xls`)
document.body.appendChild(link)
link.click()
Expand Down
2 changes: 1 addition & 1 deletion src/views/error-log/ErrorLog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ let usertableData = ref([])
import packages from '/package.json'
let searchForm = reactive({
errorLog: '',
pageUrl: `8.135.1.141/${packages.name}`,
pageUrl: `https://github.jzfai.top/${packages.name}`,
createTime: '',
id: ''
})
Expand Down
Loading

0 comments on commit 07c239b

Please sign in to comment.