+
+
visible = true">选择图标
@@ -91,7 +93,9 @@
const currentIcon = ref()
const props = defineProps({
- modelValue: { type: String }
+ modelValue: { type: String },
+ type: { type: String, default: 'select' },
+ preview: { type: Boolean, default: true },
})
const emit = defineEmits(['update:modelValue'])
--
Gitee
From 039d92fbb7cb6ae38afe0b2a947e9fb5f34b8b90 Mon Sep 17 00:00:00 2001
From: "X.Mo"
Date: Mon, 14 Nov 2022 10:16:08 +0800
Subject: [PATCH 27/47] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=E5=99=A8=E7=BC=96=E8=BE=91=E6=97=B6?=
=?UTF-8?q?=E5=BF=85=E5=A1=AB=E9=A1=B9=E9=AA=8C=E8=AF=81=E4=B8=8D=E9=80=9A?=
=?UTF-8?q?=E8=BF=87=E4=BB=8D=E6=8F=90=E4=BA=A4bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/setting/code/components/editInfo.vue | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/views/setting/code/components/editInfo.vue b/src/views/setting/code/components/editInfo.vue
index 0ce5594..ce79c95 100644
--- a/src/views/setting/code/components/editInfo.vue
+++ b/src/views/setting/code/components/editInfo.vue
@@ -12,7 +12,7 @@
编辑生成信息 - {{ record?.table_comment }}
-
+
@@ -523,6 +523,9 @@ const form = ref({
generate_menus: ['save', 'update' , 'read', 'delete' , 'recycle', 'changeStatus', 'numberOperation', 'import', 'export'],
columns: [],
})
+
+const formRef = ref()
+
// form扩展组
const formOptions = ref({
relations: []
@@ -558,6 +561,13 @@ const confrimSetting = (name, value) => {
}
const save = async (done) => {
+ const validResult = await formRef.value.validate()
+ if (validResult) {
+ for (let i in validResult) {
+ Message.error(validResult[i].message)
+ }
+ return false
+ }
form.value.options = formOptions.value
if (! form.value.generate_menus) {
form.value.generate_menus = ['save', 'update' , 'read', 'delete' , 'recycle', 'changeStatus', 'numberOperation', 'import', 'export']
--
Gitee
From 8e27e99f5fac8f6bdf33a2b3b640f9599f30345f Mon Sep 17 00:00:00 2001
From: "X.Mo"
Date: Mon, 14 Nov 2022 15:04:49 +0800
Subject: [PATCH 28/47] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B9=8B?=
=?UTF-8?q?=E5=89=8D=E5=AD=97=E5=85=B8code=E6=94=B9value=EF=BC=8C=E4=B8=80?=
=?UTF-8?q?=E4=BA=9B=E6=96=87=E4=BB=B6=E5=BF=98=E8=AE=B0=E5=90=8C=E6=AD=A5?=
=?UTF-8?q?=E6=9B=B4=E6=94=B9=E8=BF=87=E6=9D=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../setting/code/components/settingComponent.vue | 2 +-
src/views/setting/code/index.vue | 4 ++--
.../setting/config/components/addConfig.vue | 16 ++++++++--------
.../setting/config/components/manageConfig.vue | 16 ++++++++--------
src/views/setting/crontab/index.vue | 10 +++++-----
src/views/setting/module/index.vue | 2 +-
src/views/system/api/index.vue | 2 +-
src/views/system/api/paramsList.vue | 4 ++--
src/views/system/logs/loginLog.vue | 2 +-
src/views/system/menu/index.vue | 10 +++++-----
10 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/src/views/setting/code/components/settingComponent.vue b/src/views/setting/code/components/settingComponent.vue
index 97f00b5..628706e 100644
--- a/src/views/setting/code/components/settingComponent.vue
+++ b/src/views/setting/code/components/settingComponent.vue
@@ -323,7 +323,7 @@ const open = (record) => {
}
const add = () => {
- form.value.collection.push({ label: '', code: ''})
+ form.value.collection.push({ label: '', value: ''})
}
const del = (idx) => {
form.value.collection.splice(idx, 1)
diff --git a/src/views/setting/code/index.vue b/src/views/setting/code/index.vue
index aaa48b1..56cc2f7 100644
--- a/src/views/setting/code/index.vue
+++ b/src/views/setting/code/index.vue
@@ -76,8 +76,8 @@
const router = useRouter()
const types = [
- { label: '单表CRUD', code: 'single' },
- { label: '树表CRUD', code: 'tree' },
+ { label: '单表CRUD', value: 'single' },
+ { label: '树表CRUD', value: 'tree' },
]
const selectSuccess = (result) => {
diff --git a/src/views/setting/config/components/addConfig.vue b/src/views/setting/config/components/addConfig.vue
index a06e86b..5eeaf96 100644
--- a/src/views/setting/config/components/addConfig.vue
+++ b/src/views/setting/config/components/addConfig.vue
@@ -28,14 +28,14 @@ const emit = defineEmits(['success'])
const formRef = ref()
const form = ref({ input_type: 'input', sort: 0 })
const inputComponent = [
- { label: '文本框', code: 'input' },
- { label: '文本域', code: 'textarea' },
- { label: '下拉选择框', code: 'select' },
- { label: '单选框', code: 'radio' },
- { label: '复选框', code: 'checkbox' },
- { label: '开关', code: 'switch' },
- { label: '图片上传', code: 'upload' },
- { label: '富文本编辑器', code: 'editor' },
+ { label: '文本框', value: 'input' },
+ { label: '文本域', value: 'textarea' },
+ { label: '下拉选择框', value: 'select' },
+ { label: '单选框', value: 'radio' },
+ { label: '复选框', value: 'checkbox' },
+ { label: '开关', value: 'switch' },
+ { label: '图片上传', value: 'upload' },
+ { label: '富文本编辑器', value: 'editor' },
]
const submit = async (data, done) => {
diff --git a/src/views/setting/config/components/manageConfig.vue b/src/views/setting/config/components/manageConfig.vue
index 58e4f43..2106c54 100644
--- a/src/views/setting/config/components/manageConfig.vue
+++ b/src/views/setting/config/components/manageConfig.vue
@@ -24,14 +24,14 @@ const visible = ref(false)
const groupId = ref()
const crudRef = ref()
const inputComponent = [
- { label: '文本框', code: 'input' },
- { label: '文本域', code: 'textarea' },
- { label: '下拉选择框', code: 'select' },
- { label: '单选框', code: 'radio' },
- { label: '复选框', code: 'checkbox' },
- { label: '开关', code: 'switch' },
- { label: '图片上传', code: 'upload' },
- { label: '富文本编辑器', code: 'editor' },
+ { label: '文本框', value: 'input' },
+ { label: '文本域', value: 'textarea' },
+ { label: '下拉选择框', value: 'select' },
+ { label: '单选框', value: 'radio' },
+ { label: '复选框', value: 'checkbox' },
+ { label: '开关', value: 'switch' },
+ { label: '图片上传', value: 'upload' },
+ { label: '富文本编辑器', value: 'editor' },
]
const open = (id) => {
diff --git a/src/views/setting/crontab/index.vue b/src/views/setting/crontab/index.vue
index 4d195f5..7db2a55 100644
--- a/src/views/setting/crontab/index.vue
+++ b/src/views/setting/crontab/index.vue
@@ -44,10 +44,10 @@
const logsRef = ref()
const types = [
- { label: '命令任务', code: 1 },
- { label: '类任务', code: 2} ,
- { label: 'URL任务', code: 3 },
- { label: 'PHP脚本任务', code: 4 },
+ { label: '命令任务', value: 1 },
+ { label: '类任务', value: 2} ,
+ { label: 'URL任务', value: 3 },
+ { label: 'PHP脚本任务', value: 4 },
]
const changeStatus = async (status, id) => {
@@ -105,7 +105,7 @@
},
{
title: '单次执行', dataIndex: 'singleton', formType: 'radio', addDefaultValue: 2,
- dict: { data: [{ label: '是', code: 1 }, { label: '否', code: 2 }]}, hide: true
+ dict: { data: [{ label: '是', value: 1 }, { label: '否', value: 2 }]}, hide: true
},
{
title: '状态', dataIndex: 'status', search: true, formType: 'radio',
diff --git a/src/views/setting/module/index.vue b/src/views/setting/module/index.vue
index 502c774..46b9b66 100644
--- a/src/views/setting/module/index.vue
+++ b/src/views/setting/module/index.vue
@@ -154,7 +154,7 @@
},
{
title: '状态', dataIndex: 'enabled', formType: 'radio', addDisplay: false, editDisplay: false, width: 120,
- dict: { data: [ { label: '开启', code: true }, { label: '禁用', code: false } ], translation: true },
+ dict: { data: [ { label: '开启', value: true }, { label: '禁用', value: false } ], translation: true },
}
])
diff --git a/src/views/system/api/index.vue b/src/views/system/api/index.vue
index 52e1b24..6cc3a96 100644
--- a/src/views/system/api/index.vue
+++ b/src/views/system/api/index.vue
@@ -118,7 +118,7 @@
},
{
title: '认证模式', dataIndex: 'auth_mode', formType: 'radio',
- dict: { data: [{ label: '简易模式', code: 1 }, { label: '复杂模式', code: 2 }], translation: true },
+ dict: { data: [{ label: '简易模式', value: 1 }, { label: '复杂模式', value: 2 }], translation: true },
addDefaultValue: 1, width: 130, span: 12,
},
{
diff --git a/src/views/system/api/paramsList.vue b/src/views/system/api/paramsList.vue
index f855626..983be00 100644
--- a/src/views/system/api/paramsList.vue
+++ b/src/views/system/api/paramsList.vue
@@ -88,7 +88,7 @@ const columns = reactive([
},
{
title: '字段类型', dataIndex: 'type', disabled: true, formType: 'radio',
- dict: { data: [{ label: '请求', code: 1 }, { label: '响应', code: 2 }], translation: true },
+ dict: { data: [{ label: '请求', value: 1 }, { label: '响应', value: 2 }], translation: true },
addDefaultValue: () => currentType.value == 'request' ? 1 : 2,
span: 8, labelWidth: '140px',
},
@@ -99,7 +99,7 @@ const columns = reactive([
},
{
title: '必填', dataIndex: 'is_required', search: true,
- dict: { data: [{ label: '是', code: 2 }, { label: '否', code: 1 }], translation: true },
+ dict: { data: [{ label: '是', value: 2 }, { label: '否', value: 1 }], translation: true },
addDefaultValue: 2, formType: 'radio', span: 8,
control: (value) => {
if ( value == 2) {
diff --git a/src/views/system/logs/loginLog.vue b/src/views/system/logs/loginLog.vue
index 62eaea8..130aee8 100644
--- a/src/views/system/logs/loginLog.vue
+++ b/src/views/system/logs/loginLog.vue
@@ -37,7 +37,7 @@
{ title: '登录用户', dataIndex: 'username', search: true, width: 150 },
{
title: '登录状态', dataIndex: 'status', search: true, width: 120, formType: 'select',
- dict: { data: [ { label: '成功', code: 1 }, { label: '失败', code: 2 } ], translation: true }
+ dict: { data: [ { label: '成功', value: 1 }, { label: '失败', value: 2 } ], translation: true }
},
{ title: '登录IP', dataIndex: 'ip', width: 150, search: true },
{ title: '登录地点', dataIndex: 'ip_location', width: 150 },
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index f31e00f..e46dc39 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -59,10 +59,10 @@
let isRecovery = computed(() => crudRef.value ? crudRef.value.isRecovery : false )
const menuType = [
- { label: '菜单', code: 'M' },
- { label: '按钮', code: 'B' },
- { label: '外链', code: 'L' },
- { label: 'iFrame', code: 'I' },
+ { label: '菜单', value: 'M' },
+ { label: '按钮', value: 'B' },
+ { label: '外链', value: 'L' },
+ { label: 'iFrame', value: 'I' },
]
const changeStatus = async (status, id) => {
@@ -121,7 +121,7 @@
{
title: '菜单类型', dataIndex: 'type', formType: 'radio', addDefaultValue: 'M', width: 100,
dict: {
- data: menuType, props: { label: 'label', value: 'code' }, translation: true,
+ data: menuType, translation: true,
tagColors: { 'M': 'blue', 'B': 'green', 'L': 'orangered', 'I': 'pinkpurple' }
},
control: (value) => {
--
Gitee
From 43487762fac7c31bc179b7ea5fe16cad112cee1c Mon Sep 17 00:00:00 2001
From: "X.Mo"
Date: Mon, 14 Nov 2022 15:09:27 +0800
Subject: [PATCH 29/47] fix
---
src/views/setting/code/components/settingComponent.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/views/setting/code/components/settingComponent.vue b/src/views/setting/code/components/settingComponent.vue
index 628706e..a1b78f1 100644
--- a/src/views/setting/code/components/settingComponent.vue
+++ b/src/views/setting/code/components/settingComponent.vue
@@ -109,11 +109,11 @@
-
+
--
Gitee
From 165c46453edbefbe2afe8c7763dde22d3eed46ec Mon Sep 17 00:00:00 2001
From: "X.Mo"