style: 优化代码

This commit is contained in:
奔跑的面条
2022-09-29 10:10:54 +08:00
parent a637cd783c
commit 0eb3123848
3 changed files with 13 additions and 3 deletions
@@ -1,5 +1,5 @@
<template>
<div class="go-shape-box" :class="{ lock: item.status.lock, hide: item.status.hide }">
<div class="go-shape-box" :class="{ lock, hide }">
<slot></slot>
<!-- 锚点 -->
<template v-if="!hiddenPoint">
@@ -65,6 +65,16 @@ const select = computed(() => {
if (props.item.status.lock) return false
return chartEditStore.getTargetChart.selectId.find((e: string) => e === id)
})
// 锁定
const lock = computed(() => {
return props.item.status.lock
})
// 隐藏
const hide = computed(() => {
return props.item.status.hide
})
</script>
<style lang="scss" scoped>