perf: 优化层级展示, 优化失焦隐藏代码
This commit is contained in:
parent
6ea3f0701e
commit
b66205eda9
@ -843,7 +843,8 @@ export const useChartEditStore = defineStore({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
this.updateComponentList(index, targetItem)
|
this.updateComponentList(index, targetItem)
|
||||||
this.setTargetSelectChart(undefined)
|
// 锁定添加失焦效果
|
||||||
|
if(status) this.setTargetSelectChart(undefined)
|
||||||
loadingFinish()
|
loadingFinish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -876,14 +877,10 @@ export const useChartEditStore = defineStore({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
this.updateComponentList(index, targetItem)
|
this.updateComponentList(index, targetItem)
|
||||||
this.setTargetSelectChart(undefined)
|
|
||||||
loadingFinish()
|
loadingFinish()
|
||||||
|
|
||||||
// 取消选择隐藏
|
// 隐藏添加失焦效果
|
||||||
if (status) {
|
if (status) this.setTargetSelectChart(undefined)
|
||||||
const chartEditStore = useChartEditStore()
|
|
||||||
chartEditStore.setTargetSelectChart(undefined)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (value) {
|
} catch (value) {
|
||||||
loadingError()
|
loadingError()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-show="!isGroup">
|
<div class="icon-item-box" v-show="!isGroup">
|
||||||
<n-icon
|
<n-icon
|
||||||
class="go-ml-1 icon-item"
|
class="go-ml-1 icon-item"
|
||||||
:class="{ active: status.lock }"
|
:class="{ active: status.lock }"
|
||||||
@ -68,9 +68,13 @@ const lockHandle = (e: MouseEvent) => {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$activeColor: v-bind('themeColor');
|
$activeColor: v-bind('themeColor');
|
||||||
|
|
||||||
.icon-item {
|
.icon-item-box {
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
.icon-item {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
|
@extend.go-transition;
|
||||||
&.active,
|
&.active,
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $activeColor;
|
color: $activeColor;
|
||||||
@ -78,5 +82,6 @@ $activeColor: v-bind('themeColor');
|
|||||||
&.active {
|
&.active {
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user