style: 优化代码

This commit is contained in:
奔跑的面条 2022-09-29 10:10:54 +08:00
parent b66205eda9
commit dd13a0844b
3 changed files with 13 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<template> <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> <slot></slot>
<!-- 锚点 --> <!-- 锚点 -->
<template v-if="!hiddenPoint"> <template v-if="!hiddenPoint">
@ -65,6 +65,16 @@ const select = computed(() => {
if (props.item.status.lock) return false if (props.item.status.lock) return false
return chartEditStore.getTargetChart.selectId.find((e: string) => e === id) 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -2,7 +2,7 @@
<div class="go-content-layers-group-list-item"> <div class="go-content-layers-group-list-item">
<div <div
class="root-item-content" class="root-item-content"
:class="{ hover: hover, select: select, 'list-mini': selectText }" :class="{ hover, select, 'list-mini': selectText }"
@click="clickHandle($event)" @click="clickHandle($event)"
@mousedown="groupMousedownHandle($event)" @mousedown="groupMousedownHandle($event)"
@mouseenter="mouseenterHandle(componentGroupData)" @mouseenter="mouseenterHandle(componentGroupData)"

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="go-content-layers-list-item" :class="{ hover: hover, select: select, 'list-mini': selectText }"> <div class="go-content-layers-list-item" :class="{ hover, select, 'list-mini': selectText }">
<div class="go-flex-center item-content"> <div class="go-flex-center item-content">
<n-image <n-image
class="list-img" class="list-img"