mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-12-07 18:56:58 +08:00
style(editor): 调整已选组件节点右侧按钮样式
This commit is contained in:
parent
7e71c070f1
commit
a2a9556ab8
@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<template v-if="data.type !== 'page'">
|
||||
<MIcon v-if="data.visible === false" :icon="Hide" @click.stop="setNodeVisible(true)" title="点击显示"></MIcon>
|
||||
<MIcon v-else :icon="View" @click.stop="setNodeVisible(false)" class="node-lock" title="点击隐藏"></MIcon>
|
||||
<TMagicButton
|
||||
link
|
||||
:type="data.visible === false ? 'primary' : 'default'"
|
||||
:icon="data.visible === false ? Hide : View"
|
||||
:title="data.visible === false ? '点击显示' : '点击隐藏'"
|
||||
@click.stop="setNodeVisible(data.visible === false)"
|
||||
></TMagicButton>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@ -9,8 +14,8 @@
|
||||
import { Hide, View } from '@element-plus/icons-vue';
|
||||
|
||||
import type { MNode } from '@tmagic/core';
|
||||
import { TMagicButton } from '@tmagic/design';
|
||||
|
||||
import MIcon from '@editor/components/Icon.vue';
|
||||
import { useServices } from '@editor/hooks/use-services';
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@ -5,6 +5,22 @@
|
||||
|
||||
.m-editor-tree {
|
||||
padding-top: 48px;
|
||||
|
||||
.tree-node-tool {
|
||||
padding-right: 10px;
|
||||
|
||||
.tmagic-design-button + .tmagic-design-button {
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.tree-node.selected {
|
||||
.tree-node-tool {
|
||||
.tmagic-design-button {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search-wrapper {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user