From 2b6679ef2b0b2a9fedd28e02f7140a8b3a958aea Mon Sep 17 00:00:00 2001 From: GaoNeng-wWw Date: Tue, 26 Mar 2024 19:49:47 +0800 Subject: [PATCH] refactor(mind-map): move style to theme --- packages/theme/src/mind-map/index.less | 33 ++++++++++++++++++++++++++ packages/vue/src/mind-map/index.ts | 1 + packages/vue/src/mind-map/src/pc.vue | 32 ------------------------- 3 files changed, 34 insertions(+), 32 deletions(-) create mode 100644 packages/theme/src/mind-map/index.less diff --git a/packages/theme/src/mind-map/index.less b/packages/theme/src/mind-map/index.less new file mode 100644 index 0000000000..0e3e62bb28 --- /dev/null +++ b/packages/theme/src/mind-map/index.less @@ -0,0 +1,33 @@ +.map-container { + .map-canvas { + span { + word-break: break-all; + } + + me-root { + me-tpc { + #input-box { + border-radius: var(--root-radius); + } + } + + .selected { + #input-box { + box-shadow: 0 0 0 4px var(--selected); + border: unset; + } + } + } + } + + me-main>me-wrapper>me-parent>me-tpc { + border: unset; + box-shadow: unset; + + #input-box { + border-radius: var(--main-radius); + box-shadow: 0 0 0 4px var(--selected); + border: unset; + } + } +} \ No newline at end of file diff --git a/packages/vue/src/mind-map/index.ts b/packages/vue/src/mind-map/index.ts index d90aedc775..3e3ba3d576 100644 --- a/packages/vue/src/mind-map/index.ts +++ b/packages/vue/src/mind-map/index.ts @@ -1,5 +1,6 @@ import MindMap from './src/index' import { version } from './package.json' +import '@opentiny/vue-theme/mind-map/index.less' MindMap.model = { prop: 'modelValue', diff --git a/packages/vue/src/mind-map/src/pc.vue b/packages/vue/src/mind-map/src/pc.vue index 422fbddd68..59f86f986c 100644 --- a/packages/vue/src/mind-map/src/pc.vue +++ b/packages/vue/src/mind-map/src/pc.vue @@ -27,35 +27,3 @@ export default defineComponent({ } }) - -