升级 element plus 版本 -> 2.2.6

This commit is contained in:
吕金泽 2022-06-23 21:25:36 +08:00
parent 01e600707a
commit f9f449761b
17 changed files with 87 additions and 52 deletions

View File

@ -80,7 +80,8 @@
{
permission: 'data:test:save',
label: '修改',
type: 'text',
type: 'primary',
link: true,
icon: 'ElEdit',
click: (row) => {
magicFormTitle.value = '修改'
@ -89,7 +90,8 @@
}, {
permission: 'data:test:delete',
label: '删除',
type: 'text',
type: 'primary',
link: true,
icon: 'ElDelete',
click: (row) => {
proxy.$common.handleDelete({

View File

@ -10,7 +10,7 @@
},
"dependencies": {
"axios": "^0.24.0",
"element-plus": "^2.1.11",
"element-plus": "^2.2.6",
"nprogress": "0.2.0",
"path-browserify": "^1.0.1",
"vue": "^3.2.25",

View File

@ -4,7 +4,7 @@
:plain="plain"
@click="buttonClick"
>
{{ props_.text }}
{{ props_.label }}
</el-button>
</template>
@ -78,7 +78,7 @@ export default {
if (this.btnType === 'delete') {
this.requestMethod_ = 'delete'
this.props_.type = 'danger'
this.props_.text = '删除'
this.props_.label = '删除'
this.props_.icon = 'ElIconDelete'
this.beforeConfirm_ = '此操作将永久删除该数据, 是否继续?'
this.successTips_ = '删除成功!'

View File

@ -26,7 +26,7 @@
</div>
<div v-else-if="col.type == 'btns'">
<template v-for="btn in col.btns">
<el-button v-if="btn.if === undefined ? true : btn.if(scope.row)" :icon="btn.icon" :key="btn.label" v-permission="btn.permission" :type="btn.type" :size="btn.size || 'small'" :class="btn.class" @click="btn.click(scope.row, scope.$index)">
<el-button v-if="btn.if === undefined ? true : btn.if(scope.row)" :icon="btn.icon" :key="btn.label" v-permission="btn.permission" :type="btn.type" :link="btn.link" :size="btn.size || 'small'" :class="btn.class" @click="btn.click(scope.row, scope.$index)">
{{ btn.label }}
</el-button>
</template>

View File

@ -11,7 +11,8 @@ const props = defineProps({
modelValue: {
type: String,
default: ''
}
},
itemLabel: String
})
const input1 = ref('')
const input2 = ref('')

View File

@ -43,7 +43,6 @@
tabValue.value = global.tabValue.value
})
function openTab(item){
console.log(global.visitedViews.map(it => it.name))
proxy.$router.push({
path: item.props.name,
query: global.visitedViews.filter(it => it.path == item.props.name)[0].query

View File

@ -79,8 +79,9 @@ function gen(groupPath, data){
{
permission: '${permissionPrefix}:save',
label: '修改',
type: 'text',
icon: 'ElEdit',
type: 'primary',
link: true,
icon: 'ElIconEdit',
click: (row) => {
magicFormTitle.value = '修改'
formDialog.value.show(() => magicForm.value.getDetail(row.id))
@ -88,8 +89,9 @@ function gen(groupPath, data){
}, {
permission: '${permissionPrefix}:delete',
label: '删除',
type: 'text',
icon: 'ElDelete',
type: 'primary',
link: true,
icon: 'ElIconDelete',
click: (row) => {
proxy.$common.handleDelete({
url: '${groupPath}/delete',

View File

@ -91,7 +91,8 @@ const listOptions = reactive({
{
permission: 'user:save',
label: '修改',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconEdit',
click: (row) => {
// magicForm.value.getDetail(row.id)
@ -102,7 +103,8 @@ const listOptions = reactive({
}, {
permission: 'user:delete',
label: '删除',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconDelete',
click: (row) => {
proxy.$common.handleDelete({

View File

@ -56,13 +56,14 @@
}, {
label: '操作',
type: 'btns',
width: 140,
width: 180,
fixed: 'right',
btns: [
{
permission: 'code:gen:save',
label: '修改',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconEdit',
click: (row) => {
formDialog.value.show()
@ -71,7 +72,8 @@
}, {
permission: 'code:gen:delete',
label: '删除',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconDelete',
click: (row) => {
proxy.$common.handleDelete({

View File

@ -148,7 +148,8 @@ const tableOptions = reactive({
{
permission: 'configure:save',
label: '修改',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconEdit',
click: (row) => {
handleUpdate(row)
@ -157,7 +158,8 @@ const tableOptions = reactive({
{
permission: 'configure:delete',
label: '删除',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconDelete',
click: (row) => {
proxy.$common.handleDelete({

View File

@ -90,7 +90,8 @@ const tableOptions = reactive({
btns: [
{
label: '上移',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconSortUp',
click: (row) => {
proxy.$get('/system/dict/items/sort/up',{
@ -104,7 +105,8 @@ const tableOptions = reactive({
},
{
label: '下移',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconSortDown',
click: (row) => {
proxy.$get('/system/dict/items/sort/down',{
@ -131,7 +133,8 @@ const tableOptions = reactive({
{
permission: 'dict:items:save',
label: '修改',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconEdit',
click: (row) => {
handleUpdate(row)
@ -140,7 +143,8 @@ const tableOptions = reactive({
{
permission: 'dict:items:delete',
label: '删除',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconDelete',
click: (row) => {
proxy.$common.handleDelete({

View File

@ -107,7 +107,8 @@ const tableOptions = reactive({
{
permission: 'dict:save',
label: '修改',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconEdit',
click: (row) => {
handleUpdate(row)
@ -116,7 +117,8 @@ const tableOptions = reactive({
{
permission: 'dict:delete',
label: '删除',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconDelete',
click: (row) => {
proxy.$common.handleDelete({
@ -132,7 +134,8 @@ const tableOptions = reactive({
{
permission: 'dict:items:view',
label: '字典项',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconList',
click: (row) => {
dictItemsDialog.value.show()

View File

@ -90,11 +90,12 @@ const tableOptions = reactive({
{
label: '排序',
type: 'btns',
width: 150,
width: 180,
btns: [
{
label: '上移',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconSortUp',
click: (row) => {
proxy.$get('/system/menu/sort/up',{
@ -108,7 +109,8 @@ const tableOptions = reactive({
},
{
label: '下移',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconSortDown',
click: (row) => {
proxy.$get('/system/menu/sort/down',{
@ -149,13 +151,14 @@ const tableOptions = reactive({
{
label: '操作',
type: 'btns',
width: 260,
width: 280,
fixed: 'right',
align: 'left',
btns: [
{
label: '添加下级菜单',
type: 'text',
type: 'primary',
link: true,
permission: 'menu:save',
icon: 'ElIconPlus',
click: (row) => {
@ -164,7 +167,8 @@ const tableOptions = reactive({
},
{
label: '修改',
type: 'text',
type: 'primary',
link: true,
permission: 'menu:save',
icon: 'ElIconEdit',
click: (row) => {
@ -173,7 +177,8 @@ const tableOptions = reactive({
},
{
label: '删除',
type: 'text',
type: 'primary',
link: true,
permission: 'menu:delete',
icon: 'ElIconDelete',
click: (row) => {

View File

@ -85,7 +85,8 @@
{
permission: 'online:logout',
label: '踢人',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconBicycle',
click: (row) => {
// currRow.value = row

View File

@ -118,11 +118,12 @@ const tableOptions = reactive({
{
label: '排序',
type: 'btns',
width: 150,
width: 180,
btns: [
{
label: '上移',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconSortUp',
click: (row) => {
proxy.$get('/system/office/sort/up',{
@ -136,7 +137,8 @@ const tableOptions = reactive({
},
{
label: '下移',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconSortDown',
click: (row) => {
proxy.$get('/system/office/sort/down',{
@ -153,13 +155,14 @@ const tableOptions = reactive({
{
label: '操作',
type: 'btns',
width: 310,
width: 360,
fixed: 'right',
align: 'left',
btns: [
{
label: '添加下级机构',
type: 'text',
type: 'primary',
link: true,
permission: 'office:save',
icon: 'ElIconPlus',
click: (row) => {
@ -168,7 +171,8 @@ const tableOptions = reactive({
},
{
label: '修改',
type: 'text',
type: 'primary',
link: true,
permission: 'office:save',
icon: 'ElIconEdit',
click: (row) => {
@ -177,7 +181,8 @@ const tableOptions = reactive({
},
{
label: '删除',
type: 'text',
type: 'primary',
link: true,
permission: 'office:delete',
icon: 'ElIconDelete',
if: (row) => {
@ -194,7 +199,8 @@ const tableOptions = reactive({
{
permission: 'office:user:list',
label: '用户列表',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconUserFilled',
click: (row) => {
proxy.$router.push({

View File

@ -118,13 +118,14 @@ const tableOptions = reactive({
{
label: '操作',
type: 'btns',
width: 270,
width: 300,
fixed: 'right',
btns: [
{
permission: 'role:save',
label: '修改',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconEdit',
click: (row) => {
handleUpdate(row)
@ -133,7 +134,8 @@ const tableOptions = reactive({
{
permission: 'role:delete',
label: '删除',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconDelete',
click: (row) => {
proxy.$common.handleDelete({
@ -146,7 +148,8 @@ const tableOptions = reactive({
{
permission: 'role:permission',
label: '权限',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconPlus',
click: (row) => {
temp.value.id = row.id
@ -156,7 +159,8 @@ const tableOptions = reactive({
{
permission: 'role:user:list',
label: '用户列表',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconUserFilled',
click: (row) => {
proxy.$router.push({

View File

@ -186,7 +186,8 @@ const tableOptions = reactive({
{
permission: 'user:save',
label: '修改',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconEdit',
click: (row) => {
handleUpdate(row)
@ -195,7 +196,8 @@ const tableOptions = reactive({
{
permission: 'user:delete',
label: '删除',
type: 'text',
type: 'primary',
link: true,
icon: 'ElIconDelete',
if: (row) => {
return row.id != '1'