运行参数下账号与登录、门店经营两组由纵向堆叠改为按钮切换,默认账号与登录;切换仅更新选中态与渲染内容,字段值均在页面级状态中,未保存内容不丢失。
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<div class="settings-content">
|
<div class="settings-content">
|
||||||
<div v-if="activeSection === 'runtime'" class="settings-groups">
|
<div v-if="activeSection === 'runtime'" class="settings-groups">
|
||||||
<section id="settings-group-account" class="settings-group">
|
<section v-if="activeRuntimeGroup === 'settings-group-account'" id="settings-group-account" class="settings-group">
|
||||||
<header class="settings-group__head">
|
<header class="settings-group__head">
|
||||||
<div class="settings-group__head-main">
|
<div class="settings-group__head-main">
|
||||||
<div class="settings-group__title"><h2>账号与登录</h2></div>
|
<div class="settings-group__title"><h2>账号与登录</h2></div>
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="settings-group-shop" class="settings-group">
|
<section v-if="activeRuntimeGroup === 'settings-group-shop'" id="settings-group-shop" class="settings-group">
|
||||||
<header class="settings-group__head">
|
<header class="settings-group__head">
|
||||||
<div class="settings-group__head-main">
|
<div class="settings-group__head-main">
|
||||||
<div class="settings-group__title"><h2>门店经营</h2><span class="tag">SHOP</span></div>
|
<div class="settings-group__title"><h2>门店经营</h2><span class="tag">SHOP</span></div>
|
||||||
@@ -782,6 +782,8 @@ const toggleProbeDetail = (service: string, operation: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const activeGroup = ref('')
|
const activeGroup = ref('')
|
||||||
|
/** activeRuntimeGroup switches the runtime groups so only one is rendered at a time. */
|
||||||
|
const activeRuntimeGroup = ref('settings-group-account')
|
||||||
/** activeServiceGroup switches the five service groups so only one is rendered at a time. */
|
/** activeServiceGroup switches the five service groups so only one is rendered at a time. */
|
||||||
const activeServiceGroup = ref('settings-group-probe')
|
const activeServiceGroup = ref('settings-group-probe')
|
||||||
const groupNavItems = computed<Array<{ id: string; label: string; badge?: string }>>(() => {
|
const groupNavItems = computed<Array<{ id: string; label: string; badge?: string }>>(() => {
|
||||||
@@ -836,12 +838,21 @@ const handleGroupNavClick = (id: string) => {
|
|||||||
activeGroup.value = id
|
activeGroup.value = id
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (activeSection.value === 'runtime') {
|
||||||
|
activeRuntimeGroup.value = id
|
||||||
|
activeGroup.value = id
|
||||||
|
return
|
||||||
|
}
|
||||||
scrollToGroup(id)
|
scrollToGroup(id)
|
||||||
}
|
}
|
||||||
watch(activeSection, () => {
|
watch(activeSection, () => {
|
||||||
activeGroup.value = activeSection.value === 'services'
|
if (activeSection.value === 'services') {
|
||||||
? activeServiceGroup.value
|
activeGroup.value = activeServiceGroup.value
|
||||||
: groupNavItems.value[0]?.id || ''
|
} else if (activeSection.value === 'runtime') {
|
||||||
|
activeGroup.value = activeRuntimeGroup.value
|
||||||
|
} else {
|
||||||
|
activeGroup.value = groupNavItems.value[0]?.id || ''
|
||||||
|
}
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
const runProbe = async (service: string, operation: string) => {
|
const runProbe = async (service: string, operation: string) => {
|
||||||
const key = `${service}:${operation}`
|
const key = `${service}:${operation}`
|
||||||
|
|||||||
Reference in New Issue
Block a user