Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
陆宇天
/
config-center-front
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d1ea2a56
authored
Sep 18, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
校验重置
1 parent
e812658d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
src/views/publicConfig/AddConfig.vue
src/views/publicConfig/AddModel.vue
src/views/publicConfig/index.vue
src/views/publicConfig/AddConfig.vue
View file @
d1ea2a5
...
@@ -6,6 +6,7 @@ import {
...
@@ -6,6 +6,7 @@ import {
defineProps
,
defineProps
,
withDefaults
,
withDefaults
,
watch
,
watch
,
onBeforeUnmount
,
}
from
"vue"
;
}
from
"vue"
;
import
type
{
FormInstance
,
FormRules
}
from
"element-plus"
;
import
type
{
FormInstance
,
FormRules
}
from
"element-plus"
;
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
...
@@ -46,6 +47,8 @@ watch(
...
@@ -46,6 +47,8 @@ watch(
// 获取编辑数据
// 获取编辑数据
let
keysLength
=
Object
.
keys
(
val
).
length
;
let
keysLength
=
Object
.
keys
(
val
).
length
;
ruleFormRef
.
value
?.
resetFields
();
if
(
keysLength
>
0
)
{
if
(
keysLength
>
0
)
{
isEdit
.
value
=
true
;
isEdit
.
value
=
true
;
//编辑
//编辑
...
@@ -161,8 +164,8 @@ const isUniqueName = async () => {
...
@@ -161,8 +164,8 @@ const isUniqueName = async () => {
ruleForm
.
uniqueName
=
''
ruleForm
.
uniqueName
=
''
return
false
;
return
false
;
}
}
}
}
</
script
>
</
script
>
<
template
>
<
template
>
...
...
src/views/publicConfig/AddModel.vue
View file @
d1ea2a5
...
@@ -46,6 +46,9 @@ watch(
...
@@ -46,6 +46,9 @@ watch(
(
val
)
=>
{
(
val
)
=>
{
// 获取编辑数据
// 获取编辑数据
let
keysLength
=
Object
.
keys
(
val
).
length
;
let
keysLength
=
Object
.
keys
(
val
).
length
;
ruleFormRef
.
value
?.
resetFields
();
if
(
keysLength
>
0
)
{
if
(
keysLength
>
0
)
{
isEdit
.
value
=
true
;
isEdit
.
value
=
true
;
//编辑
//编辑
...
...
src/views/publicConfig/index.vue
View file @
d1ea2a5
...
@@ -49,7 +49,6 @@ let currentTab = reactive<Comp>({
...
@@ -49,7 +49,6 @@ let currentTab = reactive<Comp>({
// 添加公共模板
// 添加公共模板
const
addConfig
=
(
index
:
number
)
=>
{
const
addConfig
=
(
index
:
number
)
=>
{
console
.
log
(
index
);
propsData
=
{}
propsData
=
{}
currentTab
.
tabComp
=
''
currentTab
.
tabComp
=
''
nextTick
(()
=>
{
nextTick
(()
=>
{
...
@@ -100,10 +99,9 @@ let propsData = reactive({})
...
@@ -100,10 +99,9 @@ let propsData = reactive({})
// 点击子菜单
// 点击子菜单
const
clickSubItem
=
(
index
:
number
,
item
:
any
)
=>
{
const
clickSubItem
=
(
index
:
number
,
item
:
any
)
=>
{
console
.
log
(
index
,
item
);
propsData
=
{...
item
}
currentTab
.
tabComp
=
''
currentTab
.
tabComp
=
''
currentTab
.
tabComp
=
tabData
[
index
].
tabComp
;
currentTab
.
tabComp
=
tabData
[
index
].
tabComp
;
propsData
=
{...
item
}
}
}
// 菜单展开收起
// 菜单展开收起
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment