提交 04748ca7 authored 作者: 王鹏飞's avatar 王鹏飞

chore: upgrade to vue2.7

上级 26780cc2
module.exports = {
root: true,
env: {
node: true
},
extends: ['plugin:vue/essential', 'standard'],
extends: ['eslint:recommended', 'plugin:vue/essential'],
rules: {
'vue/comment-directive': 'off',
'vue/multi-word-component-names': 'off',
'space-before-function-paren': 'off'
'vue/multi-word-component-names': 'off'
}
}
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"],
"vueCompilerOptions": {
"target": 2.7
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,8 +2,8 @@
"version": "0.0.0",
"scripts": {
"dev": "vite --mode dev",
"build": "cross-env BUILD_ENV=prod vite build && cross-env BUILD_ENV=prod npm run deploy",
"build:pre": "vite build",
"build": "vite build --mode prod && npm run deploy",
"build:pre": "vite build --mode pre",
"build:test": "vite build --mode test",
"preview": "vite preview",
"deploy": "node ./deploy.js",
......@@ -11,29 +11,23 @@
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src"
},
"dependencies": {
"axios": "^0.26.0",
"element-ui": "^2.15.6",
"axios": "^0.26.1",
"element-ui": "^2.15.10",
"lodash": "^4.17.21",
"query-string": "^7.1.1",
"vue": "^2.6.14",
"vue-json-viewer": "^2.2.21",
"vue-router": "^3.5.3",
"vue": "^2.7.13",
"vue-json-viewer": "^2.2.22",
"vue-router": "^3.6.5",
"vuex": "^3.6.2"
},
"devDependencies": {
"@vitejs/plugin-vue2": "^2.0.0",
"ali-oss": "^6.17.1",
"chalk": "^5.0.0",
"cross-env": "^7.0.3",
"eslint": "^8.9.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^8.4.1",
"sass": "1.49.7",
"vite": "^2.8.1",
"vite-plugin-checker": "^0.4.2",
"vite-plugin-vue2": "^1.9.3",
"vue-template-compiler": "^2.6.14"
"chalk": "^5.1.2",
"eslint": "^8.26.0",
"eslint-plugin-vue": "^9.7.0",
"sass": "1.55.0",
"vite": "^3.2.2",
"vite-plugin-checker": "^0.5.1"
}
}
......@@ -19,7 +19,7 @@ export default function (blobInfo, succFun, failFun) {
failFun('上传失败')
})
})
.catch(response => {
.catch(() => {
failFun('获取Signature失败')
})
}
......@@ -67,7 +67,7 @@ export default {
// 删除
handleRemove(row) {
const ids = [row.id]
deleteAppAdminUsers(this.appid, { user_ids: JSON.stringify(ids) }).then(res => {
deleteAppAdminUsers(this.appid, { user_ids: JSON.stringify(ids) }).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch()
})
......
......@@ -21,8 +21,7 @@
:isEdit="isEdit"
:data="editRaw"
@success="handleSuccess"
v-if="visible"
></event-notification-editform>
v-if="visible"></event-notification-editform>
</app-card>
</template>
......@@ -112,7 +111,7 @@ export default {
// 删除
handleRemove(row) {
const ids = [row.id]
deleteEvents({ ids }).then(res => {
deleteEvents({ ids }).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch()
})
......@@ -129,7 +128,7 @@ export default {
},
// 刷新Token
handleRefreshToken(row) {
refreshEventToken({ id: row.id }).then(res => {
refreshEventToken({ id: row.id }).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch()
})
......
......@@ -33,8 +33,7 @@
:isEdit="true"
:data="detail"
@success="handleUpdateSuccess"
v-if="visible"
></editform>
v-if="visible"></editform>
</div>
</template>
......@@ -75,7 +74,7 @@ export default {
},
// 删除
remove() {
deleteApp(this.id).then(res => {
deleteApp(this.id).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$router.replace('/app')
})
......@@ -95,7 +94,7 @@ export default {
})
},
// 更新成功
handleUpdateSuccess(data) {
handleUpdateSuccess() {
this.getDetail()
}
}
......
......@@ -9,8 +9,7 @@
:label="item.label"
:name="item.value"
v-for="(item, index) in typeList"
:key="index"
></el-tab-pane>
:key="index"></el-tab-pane>
</el-tabs>
<template v-slot:table-x="{ row }">
<el-button type="text" @click="handleCreate(row)">创建子权限</el-button><br />
......@@ -23,8 +22,7 @@
:isEdit="isEdit"
:data="editRaw"
@success="handleSuccess"
v-if="visible"
></editform>
v-if="visible"></editform>
</app-card>
</template>
......@@ -125,7 +123,7 @@ export default {
// 删除
handleRemove(row) {
const ids = [row.id]
deletePermissions({ app_id: this.appid, ids: JSON.stringify(ids) }).then(res => {
deletePermissions({ app_id: this.appid, ids: JSON.stringify(ids) }).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch()
})
......
......@@ -21,8 +21,7 @@
:isEdit="isEdit"
:data="editRaw"
@success="handleSuccess"
v-if="visible"
></editform>
v-if="visible"></editform>
<!-- 权限配置 -->
<permissions :visible.sync="permisssionVisible" :data="editRaw" v-if="permisssionVisible"></permissions>
</app-card>
......@@ -115,7 +114,7 @@ export default {
// 删除
handleRemove() {
const ids = this.multipleSelection.map(item => item.id)
deleteRoles({ app_id: this.appid, ids: JSON.stringify(ids) }).then(res => {
deleteRoles({ app_id: this.appid, ids: JSON.stringify(ids) }).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch()
})
......
......@@ -70,7 +70,7 @@ export default {
// 删除
handleRemove() {
const ids = this.multipleSelection.map(item => item.id)
deleteRoleUsers({ app_id: this.appid, role_id: this.id, user_ids: JSON.stringify(ids) }).then(res => {
deleteRoleUsers({ app_id: this.appid, role_id: this.id, user_ids: JSON.stringify(ids) }).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch()
})
......@@ -78,7 +78,7 @@ export default {
// 确定添加
onPrimary(multipleSelection) {
const ids = multipleSelection.map(item => item.id)
addRoleUsers({ app_id: this.appid, role_id: this.id, user_ids: JSON.stringify(ids) }).then(res => {
addRoleUsers({ app_id: this.appid, role_id: this.id, user_ids: JSON.stringify(ids) }).then(() => {
this.$message({ type: 'success', message: '添加成功' })
this.visible = false
this.$refs.list.refetch()
......
......@@ -15,7 +15,14 @@
<el-tag type="info" v-else></el-tag>
</template>
<template v-slot:table-status="{ row }">
<el-switch v-model="row.status" active-text="启用" inactive-text="停用" :active-value="0" :inactive-value="1" @change="changeStatus(row)"> </el-switch>
<el-switch
v-model="row.status"
active-text="启用"
inactive-text="停用"
:active-value="0"
:inactive-value="1"
@change="changeStatus(row)">
</el-switch>
</template>
<template v-slot:table-x="{ row }">
<el-button type="text" @click="handleUpdate(row)">修改</el-button>
......@@ -25,7 +32,12 @@
<el-button type="primary" @click="setAdmin" :disabled="!multipleSelection.length">设置应用管理员</el-button>
</template>
</app-list>
<editform :visible.sync="visible" :isEdit="isEdit" :data="editRaw" @success="handleSuccess" v-if="visible"></editform>
<editform
:visible.sync="visible"
:isEdit="isEdit"
:data="editRaw"
@success="handleSuccess"
v-if="visible"></editform>
</app-card>
</template>
......@@ -129,20 +141,20 @@ export default {
// 删除
handleRemove() {
const ids = this.multipleSelection.map(item => item.id)
deleteUsers({ app_id: this.appid, ids: JSON.stringify(ids) }).then(res => {
deleteUsers({ app_id: this.appid, ids: JSON.stringify(ids) }).then(() => {
this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch()
})
},
changeStatus(row) {
updateUserStatus({ id: row.id, status: row.status }).then(res => {
updateUserStatus({ id: row.id, status: row.status }).then(() => {
this.$refs.list.refetch()
})
},
// 设为管理员
setAdmin() {
const ids = this.multipleSelection.map(item => item.id)
createAppAdminUsers({ app_id: this.appid, user_ids: JSON.stringify(ids) }).then(res => {
createAppAdminUsers({ app_id: this.appid, user_ids: JSON.stringify(ids) }).then(() => {
this.$message({ type: 'success', message: '设置成功' })
this.$refs.list.refetch()
})
......
import fs from 'fs'
import path from 'path'
import { defineConfig } from 'vite'
import { createVuePlugin } from 'vite-plugin-vue2'
import vue from '@vitejs/plugin-vue2'
import checker from 'vite-plugin-checker'
export default defineConfig({
base: process.env.BUILD_ENV === 'prod' ? 'https://webapp-pub.ezijing.com/website/prod/applications/' : '/',
plugins: [
checker({
eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' }
}),
createVuePlugin()
],
export default defineConfig(({ mode }) => ({
base: mode === 'prod' ? 'https://webapp-pub.ezijing.com/website/prod/applications/' : '/',
plugins: [vue(), checker({ eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' } })],
server: {
open: true,
host: 'dev.ezijing.com',
......@@ -24,15 +19,10 @@ export default defineConfig({
}
},
resolve: {
alias: [
{
find: '@',
replacement: path.resolve(__dirname, 'src')
}
]
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }]
},
css: {
// 禁用SASS警告提醒
preprocessorOptions: { scss: { quietDeps: true, charset: false } }
}
})
}))
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论