mirror of
https://github.com/chillzhuang/Saber.git
synced 2025-05-02 09:38:45 +08:00
⚡ 优化代码
This commit is contained in:
parent
d5e4c0f3cf
commit
9c6db088d1
16
.editorconfig
Normal file
16
.editorconfig
Normal file
@ -0,0 +1,16 @@
|
||||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
BIN
public/favicon.png
Normal file
BIN
public/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
@ -13,7 +13,7 @@
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css">
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/index.css">
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/1.5.3/index.css">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.png">
|
||||
<title>Saber企业级开发平台</title>
|
||||
<style>
|
||||
html,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import request from '@/router/axios';
|
||||
|
||||
export const getList = (current, size, params) => {
|
||||
return request({
|
||||
url: 'api/blade-desk/notice/list',
|
||||
|
@ -1,4 +1,5 @@
|
||||
import request from '@/router/axios';
|
||||
|
||||
export const getUsualList = (current, size) => {
|
||||
return request({
|
||||
url: 'api/blade-log/usual/list',
|
||||
|
@ -1,9 +1,12 @@
|
||||
import request from '@/router/axios';
|
||||
|
||||
export const resetPassword = (userIds) => {
|
||||
return request({
|
||||
url: 'api/blade-user/reset-password',
|
||||
method: 'post',
|
||||
data: userIds
|
||||
params: {
|
||||
userIds,
|
||||
}
|
||||
})
|
||||
}
|
||||
export const getList = (current, size, params) => {
|
||||
@ -18,13 +21,10 @@ export const getList = (current, size, params) => {
|
||||
}
|
||||
export const remove = (ids) => {
|
||||
return request({
|
||||
url: 'api/blade-system/user/remove',
|
||||
url: 'api/blade-user/remove',
|
||||
method: 'post',
|
||||
data: {
|
||||
params: {
|
||||
ids,
|
||||
},
|
||||
meta: {
|
||||
isSerialize: true,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import request from '@/router/axios';
|
||||
|
||||
export const getList = (current, size) => {
|
||||
return request({
|
||||
url: 'api/blade-develop/code/list',
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Mock from 'mockjs'
|
||||
|
||||
const top = [{
|
||||
label: "首页",
|
||||
path: "/wel/index",
|
||||
|
@ -19,7 +19,8 @@
|
||||
icon="el-icon-delete"
|
||||
plain
|
||||
v-if="permission.notice_delete"
|
||||
@click="handleDelete">删 除</el-button>
|
||||
@click="handleDelete">删 除
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row}"
|
||||
slot="category">
|
||||
@ -32,6 +33,7 @@
|
||||
<script>
|
||||
import {getList, remove, update, add, getNotice} from "@/api/dept/notice";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -25,6 +25,7 @@
|
||||
<script>
|
||||
import {getApiList, getApiLogs} from "@/api/logs";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -25,6 +25,7 @@
|
||||
<script>
|
||||
import {getErrorList, getErrorLogs} from "@/api/logs";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -25,6 +25,7 @@
|
||||
<script>
|
||||
import {getUsualList, getUsualLogs} from "@/api/logs";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -19,7 +19,8 @@
|
||||
icon="el-icon-delete"
|
||||
v-if="permission.dept_delete"
|
||||
plain
|
||||
@click="handleDelete">删 除</el-button>
|
||||
@click="handleDelete">删 除
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row}"
|
||||
slot="roleId">
|
||||
@ -43,6 +44,7 @@ import {
|
||||
getDeptTree
|
||||
} from "@/api/system/dept";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -19,7 +19,8 @@
|
||||
icon="el-icon-delete"
|
||||
v-if="permission.dict_delete"
|
||||
plain
|
||||
@click="handleDelete">删 除</el-button>
|
||||
@click="handleDelete">删 除
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row}"
|
||||
slot="roleId">
|
||||
@ -43,6 +44,7 @@ import {
|
||||
getDictTree
|
||||
} from "@/api/system/dict";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -19,7 +19,8 @@
|
||||
icon="el-icon-delete"
|
||||
v-if="permission.menu_delete"
|
||||
plain
|
||||
@click="handleDelete">删 除</el-button>
|
||||
@click="handleDelete">删 除
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row}"
|
||||
slot="roleId">
|
||||
@ -36,6 +37,7 @@
|
||||
<script>
|
||||
import {getList, remove, update, add, getMenu} from "@/api/system/menu";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -18,7 +18,8 @@
|
||||
size="small"
|
||||
icon="el-icon-delete"
|
||||
plain
|
||||
@click="handleDelete">删 除</el-button>
|
||||
@click="handleDelete">删 除
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row}"
|
||||
slot="roleId">
|
||||
@ -35,6 +36,7 @@
|
||||
<script>
|
||||
import {getList, remove, update, add} from "@/api/system/param";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -17,11 +17,13 @@
|
||||
size="small"
|
||||
icon="el-icon-delete"
|
||||
plain
|
||||
@click="handleDelete">删 除</el-button>
|
||||
@click="handleDelete">删 除
|
||||
</el-button>
|
||||
<el-button size="small"
|
||||
icon="el-icon-delete"
|
||||
@click="handleRole"
|
||||
plain>权限设置</el-button>
|
||||
plain>权限设置
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row}"
|
||||
slot="roleId">
|
||||
@ -64,6 +66,7 @@ import {
|
||||
getRole
|
||||
} from "@/api/system/role";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -20,13 +20,15 @@
|
||||
icon="el-icon-delete"
|
||||
plain
|
||||
v-if="permission.user_delete"
|
||||
@click="handleDelete">删 除</el-button>
|
||||
@click="handleDelete">删 除
|
||||
</el-button>
|
||||
<el-button type="primary"
|
||||
size="small"
|
||||
plain
|
||||
v-if="permission. user_reset"
|
||||
icon="el-icon-refresh"
|
||||
@click="handleReset">密码重置</el-button>
|
||||
@click="handleReset">密码重置
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row}"
|
||||
slot="roleId">
|
||||
@ -50,6 +52,7 @@ import {
|
||||
resetPassword
|
||||
} from "@/api/system/user";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -19,12 +19,14 @@
|
||||
size="small"
|
||||
icon="el-icon-delete"
|
||||
plain
|
||||
@click="handleDelete">删 除</el-button>
|
||||
@click="handleDelete">删 除
|
||||
</el-button>
|
||||
<el-button type="primary"
|
||||
size="small"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
@click="handleBuild">代码生成</el-button>
|
||||
@click="handleBuild">代码生成
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row}"
|
||||
slot="roleId">
|
||||
@ -41,6 +43,7 @@
|
||||
<script>
|
||||
import {getList, getCode, build, remove, add, update} from "@/api/tool/code";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
<script>
|
||||
import option from "@/const/user/info";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -3,7 +3,8 @@
|
||||
<h3>请打开浏览器控制台,然后点击下面的按钮</h3>
|
||||
<el-button type="danger"
|
||||
size="small"
|
||||
@click="handleNewError">触发一个错误</el-button>
|
||||
@click="handleNewError">触发一个错误
|
||||
</el-button>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
|
@ -14,13 +14,16 @@
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
<basic-container>
|
||||
权限开关<el-switch :active-value="false"
|
||||
权限开关
|
||||
<el-switch :active-value="false"
|
||||
:inactive-value="true"
|
||||
v-model="text"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
<p> 具体参考<a href="https://avuex.avue.top/#/doc/crud-permission">https://avuex.avue.top/#/doc/crud-permission</a></p>
|
||||
<p> 具体参考<a
|
||||
href="https://avuex.avue.top/#/doc/crud-permission">https://avuex.avue.top/#/doc/crud-permission</a>
|
||||
</p>
|
||||
</basic-container>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -2,50 +2,63 @@
|
||||
<basic-container>
|
||||
<h3>存储</h3>
|
||||
<el-tag class="title"
|
||||
size="small">基本读写删(持久化存储)</el-tag>
|
||||
size="small">基本读写删(持久化存储)
|
||||
</el-tag>
|
||||
<div class="box">
|
||||
<el-button type="primary"
|
||||
size="small"
|
||||
@click="setItem({name:'username', value:'avuex'});">set('username', 'avuex')</el-button>
|
||||
@click="setItem({name:'username', value:'avuex'});">set('username', 'avuex')
|
||||
</el-button>
|
||||
|
||||
<el-button type="success"
|
||||
size="small"
|
||||
@click="getItem({name:'username'});">get('username')</el-button>
|
||||
@click="getItem({name:'username'});">get('username')
|
||||
</el-button>
|
||||
|
||||
<el-button type="danger"
|
||||
size="small"
|
||||
@click="delItem({name:'username'});">remove('username')</el-button>
|
||||
@click="delItem({name:'username'});">remove('username')
|
||||
</el-button>
|
||||
</div>
|
||||
<el-tag class="title"
|
||||
size="small">设置session(session存储)</el-tag>
|
||||
size="small">设置session(session存储)
|
||||
</el-tag>
|
||||
<div class="box">
|
||||
<el-button type="primary"
|
||||
size="small"
|
||||
@click="setItem({name:'username', value:'avuex',type:'session'});">set('username', 'avuex')</el-button>
|
||||
@click="setItem({name:'username', value:'avuex',type:'session'});">set('username', 'avuex')
|
||||
</el-button>
|
||||
|
||||
<el-button type="success"
|
||||
size="small"
|
||||
@click="getItem({name:'username',type:'session'});">get('username')</el-button>
|
||||
@click="getItem({name:'username',type:'session'});">get('username')
|
||||
</el-button>
|
||||
|
||||
<el-button type="danger"
|
||||
size="small"
|
||||
@click="delItem({name:'username',type:'session'});">remove('username')</el-button>
|
||||
@click="delItem({name:'username',type:'session'});">remove('username')
|
||||
</el-button>
|
||||
</div>
|
||||
<el-tag class="title"
|
||||
size="small">获取所有可以获得的数据</el-tag>
|
||||
size="small">获取所有可以获得的数据
|
||||
</el-tag>
|
||||
<div class="box">
|
||||
<el-button type="success"
|
||||
size="small"
|
||||
@click="getAll()">getAll(持久化存储)</el-button>
|
||||
@click="getAll()">getAll(持久化存储)
|
||||
</el-button>
|
||||
<el-button type="success"
|
||||
size="small"
|
||||
@click="getAll({type:'session'})">getAll(session存储)</el-button>
|
||||
@click="getAll({type:'session'})">getAll(session存储)
|
||||
</el-button>
|
||||
<el-button type="danger"
|
||||
size="small"
|
||||
@click="clearAll()">delAll(持久化存储)</el-button>
|
||||
@click="clearAll()">delAll(持久化存储)
|
||||
</el-button>
|
||||
<el-button type="danger"
|
||||
size="small"
|
||||
@click="clearAll({type:'session'})">delAll(session存储)</el-button>
|
||||
@click="clearAll({type:'session'})">delAll(session存储)
|
||||
</el-button>
|
||||
</div>
|
||||
</basic-container>
|
||||
|
||||
@ -59,6 +72,7 @@ import {
|
||||
clearStore,
|
||||
getAllStore
|
||||
} from "@/util/store";
|
||||
|
||||
export default {
|
||||
name: "store",
|
||||
methods: {
|
||||
@ -101,6 +115,7 @@ export default {
|
||||
.title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.box {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
@ -3,13 +3,16 @@
|
||||
<h3>标签</h3>
|
||||
<el-button type="primary"
|
||||
size="small"
|
||||
@click="$router.push('/test/index')">打开一个页面</el-button>
|
||||
@click="$router.push('/test/index')">打开一个页面
|
||||
</el-button>
|
||||
<el-button type="primary"
|
||||
size="small"
|
||||
@click="$router.$avueRouter.closeTag('/test/index')">关闭打开的页面</el-button>
|
||||
@click="$router.$avueRouter.closeTag('/test/index')">关闭打开的页面
|
||||
</el-button>
|
||||
<el-button type="primary"
|
||||
size="small"
|
||||
@click="$router.$avueRouter.closeTag()">关闭本标签</el-button>
|
||||
@click="$router.$avueRouter.closeTag()">关闭本标签
|
||||
</el-button>
|
||||
|
||||
</basic-container>
|
||||
</template>
|
||||
|
@ -11,7 +11,8 @@ export default {
|
||||
return {};
|
||||
},
|
||||
computed: {},
|
||||
created() {},
|
||||
created() {
|
||||
},
|
||||
methods: {}
|
||||
};
|
||||
</script>
|
||||
|
@ -70,6 +70,7 @@
|
||||
|
||||
<script>
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "wel",
|
||||
data() {
|
||||
@ -258,7 +259,8 @@ export default {
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
created() {
|
||||
},
|
||||
methods: {}
|
||||
};
|
||||
</script>
|
||||
@ -273,26 +275,31 @@ export default {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&__info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&-img {
|
||||
border-radius: 72px;
|
||||
display: block;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&-content {
|
||||
position: relative;
|
||||
margin-left: 24px;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
&-title {
|
||||
font-size: 20px;
|
||||
line-height: 28px;
|
||||
@ -300,6 +307,7 @@ export default {
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
&-subtitle {
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
@ -307,16 +315,19 @@ export default {
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
&__extra {
|
||||
&-item {
|
||||
position: relative;
|
||||
padding: 0 32px;
|
||||
display: inline-block;
|
||||
|
||||
&:last-child {
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:after {
|
||||
background-color: #e8e8e8;
|
||||
position: absolute;
|
||||
@ -327,17 +338,20 @@ export default {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
&-title {
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
&-subtitle {
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-size: 30px;
|
||||
line-height: 38px;
|
||||
margin: 0;
|
||||
|
||||
span {
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 20px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user