diff --git a/web/src/pages/Edit/components/Style.vue b/web/src/pages/Edit/components/Style.vue index 6bce2364..e20b2f7f 100644 --- a/web/src/pages/Edit/components/Style.vue +++ b/web/src/pages/Edit/components/Style.vue @@ -5,10 +5,6 @@ :class="{ isDark: isDark }" v-if="activeNodes.length > 0" > - - - -
{{ $t('style.text') }}
@@ -19,7 +15,6 @@ size="mini" v-model="style.fontFamily" placeholder="" - :disabled="checkDisabled('fontFamily')" @change="update('fontFamily')" >
-
+
A @@ -105,8 +93,7 @@
@@ -120,27 +107,16 @@
U
- + - +
- + @@ -223,7 +198,6 @@ style="width: 80px" v-model="style.borderWidth" placeholder="" - :disabled="checkDisabled('borderWidth')" @change="update('borderWidth')" >
-
+
{{ $t('style.borderRadius') }} - +
@@ -292,7 +259,6 @@ style="width: 120px" v-model="style.shape" placeholder="" - :disabled="checkDisabled('shape')" @change="update('shape')" > @@ -322,14 +294,8 @@ class="block" v-popover:popover5 :style="{ width: '80px', backgroundColor: style.lineColor }" - :class="{ disabled: checkDisabled('lineColor') }" > - +
@@ -340,7 +306,6 @@ style="width: 80px" v-model="style.lineDasharray" placeholder="" - :disabled="checkDisabled('lineDasharray')" @change="update('lineDasharray')" > @@ -372,7 +343,6 @@ style="width: 80px" v-model="style.lineWidth" placeholder="" - :disabled="checkDisabled('lineWidth')" @change="update('lineWidth')" >
@@ -410,7 +379,6 @@
@@ -437,7 +405,6 @@ import { shapeList, shapeListMap } from '@/config' -import { supportActiveStyle } from 'simple-mind-map/src/themes/default' import { mapState } from 'vuex' /** @@ -453,13 +420,11 @@ export default { }, data() { return { - supportActiveStyle, fontSizeList, borderWidthList, borderRadiusList, lineHeightList, activeNodes: [], - activeTab: 'normal', style: { shape: '', paddingX: 0, @@ -496,7 +461,7 @@ export default { }, shapeListMap() { return shapeListMap[this.$i18n.locale] || shapeListMap.zh - }, + } }, watch: { activeSidebar(val) { @@ -521,32 +486,11 @@ export default { */ onNodeActive(...args) { this.$nextTick(() => { - this.activeTab = 'normal' this.activeNodes = args[1] this.initNodeStyle() }) }, - - /** - * @Author: 王林 - * @Date: 2021-05-05 11:42:32 - * @Desc: tab切换 - */ - handleTabClick() { - this.initNodeStyle() - }, - - /** - * @Author: 王林 - * @Date: 2022-09-12 22:16:56 - * @Desc: 检查是否禁用 - */ - checkDisabled(prop) { - return ( - this.activeTab === 'active' && !this.supportActiveStyle.includes(prop) - ) - }, - + /** * @Author: 王林 * @Date: 2021-05-05 09:48:52 @@ -554,7 +498,6 @@ export default { */ initNodeStyle() { if (this.activeNodes.length <= 0) { - this.activeTab = 'normal' return } ;[ @@ -577,11 +520,7 @@ export default { 'lineDasharray', 'lineWidth' ].forEach(item => { - this.style[item] = this.activeNodes[0].getStyle( - item, - false, - this.activeTab === 'active' - ) + this.style[item] = this.activeNodes[0].getStyle(item, false) }) }, @@ -592,7 +531,7 @@ export default { */ update(prop) { this.activeNodes.forEach(node => { - node.setStyle(prop, this.style[prop], this.activeTab === 'active') + node.setStyle(prop, this.style[prop]) }) }, @@ -829,4 +768,4 @@ export default { background-color: #409eff; } } - \ No newline at end of file +