Demo:基础样式配置连线支持显示箭头

This commit is contained in:
街角小林
2023-12-26 10:23:37 +08:00
parent 80f8a357fe
commit 7b4bd6b0bb
3 changed files with 22 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ export default {
width: 'Width',
style: 'Style',
lineOfOutline: 'Line of outline',
showArrow: 'Is show arrow',
nodePadding: 'Node padding',
nodeMargin: 'Node margin',
horizontal: 'Horizontal',

View File

@@ -11,6 +11,7 @@ export default {
width: '粗细',
style: '风格',
lineOfOutline: '概要的连线',
showArrow: '是否显示箭头',
nodePadding: '节点内边距',
nodeMargin: '节点外边距',
horizontal: '水平',

View File

@@ -199,6 +199,19 @@
</el-select>
</div>
</div>
<div class="row">
<div class="rowItem">
<el-checkbox
v-model="style.showLineMarker"
@change="
value => {
update('showLineMarker', value)
}
"
>{{ $t('baseStyle.showArrow') }}</el-checkbox
>
</div>
</div>
<!-- 概要连线 -->
<div class="title noTop">{{ $t('baseStyle.lineOfOutline') }}</div>
<div class="row">
@@ -857,6 +870,7 @@ export default {
lineColor: '',
lineWidth: '',
lineStyle: '',
showLineMarker: '',
rootLineKeepSameInCurve: '',
generalizationLineWidth: '',
generalizationLineColor: '',
@@ -975,6 +989,7 @@ export default {
'backgroundColor',
'lineWidth',
'lineStyle',
'showLineMarker',
'rootLineKeepSameInCurve',
'lineColor',
'generalizationLineWidth',
@@ -1030,9 +1045,11 @@ export default {
// 初始化水印配置
initWatermark() {
let config = this.mindMap.getConfig('watermarkConfig')
;['text', 'lineSpacing', 'textSpacing', 'angle', 'onlyExport'].forEach(key => {
this.watermarkConfig[key] = config[key]
})
;['text', 'lineSpacing', 'textSpacing', 'angle', 'onlyExport'].forEach(
key => {
this.watermarkConfig[key] = config[key]
}
)
this.watermarkConfig.show = !!config.text
this.watermarkConfig.textStyle = { ...config.textStyle }
},