Skip to content

Commit

Permalink
refactor(mind-map): move style to theme
Browse files Browse the repository at this point in the history
  • Loading branch information
GaoNeng-wWw committed Mar 26, 2024
1 parent 7786561 commit 2b6679e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
33 changes: 33 additions & 0 deletions packages/theme/src/mind-map/index.less
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
1 change: 1 addition & 0 deletions packages/vue/src/mind-map/index.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
32 changes: 0 additions & 32 deletions packages/vue/src/mind-map/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,3 @@ export default defineComponent({
}
})
</script>

<style lang="less">
.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;
}
}
}
</style>

0 comments on commit 2b6679e

Please sign in to comment.