From f9f449761b9dec175e0bc4a4552008db0a397318 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=95=E9=87=91=E6=B3=BD?= <1098696801@qq.com>
Date: Thu, 23 Jun 2022 21:25:36 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=20element=20plus=20=E7=89=88?=
=?UTF-8?q?=E6=9C=AC=20->=202.2.6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../component/数据管理/测试生成/列表.ms | 12 +++++-----
magic-boot-ui/package.json | 2 +-
.../src/components/magic/basic/mb-button.vue | 4 ++--
.../components/magic/data/mb-table-column.vue | 2 +-
.../components/magic/form/mb-inputrange.vue | 3 ++-
magic-boot-ui/src/layout/tabs.vue | 1 -
magic-boot-ui/src/scripts/gen/gen-mb-list.js | 10 +++++----
.../src/views/examples/test-mb-list.vue | 6 +++--
.../src/views/lowcode/code-gen-list.vue | 8 ++++---
.../views/system/configure/configure-list.vue | 6 +++--
.../src/views/system/dict/dict-items.vue | 12 ++++++----
.../src/views/system/dict/dict-list.vue | 9 +++++---
.../src/views/system/menu/menu-list.vue | 19 ++++++++++------
.../src/views/system/monitor/online-user.vue | 3 ++-
.../src/views/system/office/office-list.vue | 22 ++++++++++++-------
.../src/views/system/role/role-list.vue | 14 +++++++-----
.../src/views/system/user/user-list.vue | 6 +++--
17 files changed, 87 insertions(+), 52 deletions(-)
diff --git a/data/magic-api/component/数据管理/测试生成/列表.ms b/data/magic-api/component/数据管理/测试生成/列表.ms
index bd9a02e..3711051 100644
--- a/data/magic-api/component/数据管理/测试生成/列表.ms
+++ b/data/magic-api/component/数据管理/测试生成/列表.ms
@@ -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({
@@ -104,7 +106,7 @@
]
}
})
-
+
const formOptions = reactive({
detail: {
request: {
@@ -145,9 +147,9 @@
props: {
type: 'textarea'
}
-
+
}]
}]
}
})
-
\ No newline at end of file
+
diff --git a/magic-boot-ui/package.json b/magic-boot-ui/package.json
index 0d6be38..a9f9ec7 100644
--- a/magic-boot-ui/package.json
+++ b/magic-boot-ui/package.json
@@ -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",
diff --git a/magic-boot-ui/src/components/magic/basic/mb-button.vue b/magic-boot-ui/src/components/magic/basic/mb-button.vue
index b8d51a7..f9c5a0d 100644
--- a/magic-boot-ui/src/components/magic/basic/mb-button.vue
+++ b/magic-boot-ui/src/components/magic/basic/mb-button.vue
@@ -4,7 +4,7 @@
:plain="plain"
@click="buttonClick"
>
- {{ props_.text }}
+ {{ props_.label }}
@@ -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_ = '删除成功!'
diff --git a/magic-boot-ui/src/components/magic/data/mb-table-column.vue b/magic-boot-ui/src/components/magic/data/mb-table-column.vue
index 0d1355d..cb6ca13 100644
--- a/magic-boot-ui/src/components/magic/data/mb-table-column.vue
+++ b/magic-boot-ui/src/components/magic/data/mb-table-column.vue
@@ -26,7 +26,7 @@
-
+
{{ btn.label }}
diff --git a/magic-boot-ui/src/components/magic/form/mb-inputrange.vue b/magic-boot-ui/src/components/magic/form/mb-inputrange.vue
index 45238d5..9264821 100644
--- a/magic-boot-ui/src/components/magic/form/mb-inputrange.vue
+++ b/magic-boot-ui/src/components/magic/form/mb-inputrange.vue
@@ -11,7 +11,8 @@ const props = defineProps({
modelValue: {
type: String,
default: ''
- }
+ },
+ itemLabel: String
})
const input1 = ref('')
const input2 = ref('')
diff --git a/magic-boot-ui/src/layout/tabs.vue b/magic-boot-ui/src/layout/tabs.vue
index 7b6deec..7a73cff 100644
--- a/magic-boot-ui/src/layout/tabs.vue
+++ b/magic-boot-ui/src/layout/tabs.vue
@@ -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
diff --git a/magic-boot-ui/src/scripts/gen/gen-mb-list.js b/magic-boot-ui/src/scripts/gen/gen-mb-list.js
index dc4bd16..94a0c53 100644
--- a/magic-boot-ui/src/scripts/gen/gen-mb-list.js
+++ b/magic-boot-ui/src/scripts/gen/gen-mb-list.js
@@ -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',
diff --git a/magic-boot-ui/src/views/examples/test-mb-list.vue b/magic-boot-ui/src/views/examples/test-mb-list.vue
index b7a6a81..4c347cd 100644
--- a/magic-boot-ui/src/views/examples/test-mb-list.vue
+++ b/magic-boot-ui/src/views/examples/test-mb-list.vue
@@ -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({
diff --git a/magic-boot-ui/src/views/lowcode/code-gen-list.vue b/magic-boot-ui/src/views/lowcode/code-gen-list.vue
index 0507dfc..ca5922e 100644
--- a/magic-boot-ui/src/views/lowcode/code-gen-list.vue
+++ b/magic-boot-ui/src/views/lowcode/code-gen-list.vue
@@ -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({
diff --git a/magic-boot-ui/src/views/system/configure/configure-list.vue b/magic-boot-ui/src/views/system/configure/configure-list.vue
index d56355d..8a73a67 100644
--- a/magic-boot-ui/src/views/system/configure/configure-list.vue
+++ b/magic-boot-ui/src/views/system/configure/configure-list.vue
@@ -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({
diff --git a/magic-boot-ui/src/views/system/dict/dict-items.vue b/magic-boot-ui/src/views/system/dict/dict-items.vue
index 57f1e88..870e54f 100644
--- a/magic-boot-ui/src/views/system/dict/dict-items.vue
+++ b/magic-boot-ui/src/views/system/dict/dict-items.vue
@@ -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({
diff --git a/magic-boot-ui/src/views/system/dict/dict-list.vue b/magic-boot-ui/src/views/system/dict/dict-list.vue
index a62d9bb..289a026 100644
--- a/magic-boot-ui/src/views/system/dict/dict-list.vue
+++ b/magic-boot-ui/src/views/system/dict/dict-list.vue
@@ -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()
diff --git a/magic-boot-ui/src/views/system/menu/menu-list.vue b/magic-boot-ui/src/views/system/menu/menu-list.vue
index 284ab64..808b6e7 100644
--- a/magic-boot-ui/src/views/system/menu/menu-list.vue
+++ b/magic-boot-ui/src/views/system/menu/menu-list.vue
@@ -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) => {
diff --git a/magic-boot-ui/src/views/system/monitor/online-user.vue b/magic-boot-ui/src/views/system/monitor/online-user.vue
index f10dcf1..c7a651a 100644
--- a/magic-boot-ui/src/views/system/monitor/online-user.vue
+++ b/magic-boot-ui/src/views/system/monitor/online-user.vue
@@ -85,7 +85,8 @@
{
permission: 'online:logout',
label: '踢人',
- type: 'text',
+ type: 'primary',
+ link: true,
icon: 'ElIconBicycle',
click: (row) => {
// currRow.value = row
diff --git a/magic-boot-ui/src/views/system/office/office-list.vue b/magic-boot-ui/src/views/system/office/office-list.vue
index e633596..1a300a8 100644
--- a/magic-boot-ui/src/views/system/office/office-list.vue
+++ b/magic-boot-ui/src/views/system/office/office-list.vue
@@ -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({
diff --git a/magic-boot-ui/src/views/system/role/role-list.vue b/magic-boot-ui/src/views/system/role/role-list.vue
index 6a988cf..6751f90 100644
--- a/magic-boot-ui/src/views/system/role/role-list.vue
+++ b/magic-boot-ui/src/views/system/role/role-list.vue
@@ -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({
diff --git a/magic-boot-ui/src/views/system/user/user-list.vue b/magic-boot-ui/src/views/system/user/user-list.vue
index c0318fb..ce01b09 100644
--- a/magic-boot-ui/src/views/system/user/user-list.vue
+++ b/magic-boot-ui/src/views/system/user/user-list.vue
@@ -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'