diff --git a/core/core-frontend/src/custom-component/de-tree/Component.vue b/core/core-frontend/src/custom-component/de-tree/Component.vue index 69915c2..0b69d4c 100644 --- a/core/core-frontend/src/custom-component/de-tree/Component.vue +++ b/core/core-frontend/src/custom-component/de-tree/Component.vue @@ -1,75 +1,50 @@ - - - - + + :deep(.el-dropdown-link) { + color: #fff; + } +} + +.ed-tabs-light { + :deep(.ed-tabs__new-tab) { + margin-right: 25px; + background-color: #fff; + } +} + +.el-tab-pane-custom { + width: 100%; +} + +.canvas-move-in { + border: 2px dotted transparent; + border-color: blueviolet; +} + +.tab-head-left :deep(.ed-tabs__nav-scroll) { + display: flex; + justify-content: flex-start; +} + +.tab-head-right :deep(.ed-tabs__nav-scroll) { + display: flex; + justify-content: flex-end; +} + +.tab-head-center :deep(.ed-tabs__nav-scroll) { + display: flex; + justify-content: center; +} + +.switch-hidden { + opacity: 0; + z-index: -1; +} + +.tab-content-custom { + position: absolute; + width: 100%; + height: 100%; +} + +.custom-tab-title { + .title-inner { + position: relative; + background-size: 100% 100% !important; + } + + :deep(.ed-dropdown) { + vertical-align: middle !important; + } +} + + \ No newline at end of file diff --git a/core/core-frontend/src/custom-component/de-tree/tree.vue b/core/core-frontend/src/custom-component/de-tree/tree.vue new file mode 100644 index 0000000..7a302b1 --- /dev/null +++ b/core/core-frontend/src/custom-component/de-tree/tree.vue @@ -0,0 +1,79 @@ + + + + + \ No newline at end of file diff --git a/core/core-frontend/src/models/chart/chart-style.d.ts b/core/core-frontend/src/models/chart/chart-style.d.ts index 6db8102..ab263bd 100644 --- a/core/core-frontend/src/models/chart/chart-style.d.ts +++ b/core/core-frontend/src/models/chart/chart-style.d.ts @@ -2,7 +2,8 @@ * 图表样式设置 */ declare interface ChartStyle { - graphicText: any + treeBasicStyle:ChartTreeBasicStyle + graphicText: ChartGraphicTextStyle /** * 标题样式设置 */ @@ -130,6 +131,37 @@ declare interface ChartGraphicTextStyle { } ] } +/** + * 树基础属性配置 + */ +declare interface ChartTreeBasicStyle { + /** + * 是否节点全部展开 + */ + defaultExpandAll: boolean + /** + * 是否高亮节点 + */ + highlightCurrent: boolean + expandOnClickNode:boolean + fontSize: number + isItalic: boolean + isBolder: boolean + fontFamily: string + color: string + letterSpace: number + /** + * 高亮节点配置 + */ + highlightAttr:{ + backgroundColor: string + color: string + fontSize: number + isItalic: boolean + isBolder: boolean + letterSpace: number + } +} /** * 图例设置 */ diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue index 67906e5..d5815d8 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue @@ -123,6 +123,7 @@ const emit = defineEmits([ 'onChangeYAxisExtForm', 'onTextChange', 'onGraphicTextChange', + 'onTreeBasicChange', 'onLegendChange', 'onBasicStyleChange', 'onBackgroundChange', @@ -179,6 +180,10 @@ const onChangeYAxisExtForm = (val, prop) => { const onTextChange = (val, prop) => { state.initReady && emit('onTextChange', val, prop) } +const onTreeBasicChange = (val, prop) => { + console.log(val,prop,'树属性') + state.initReady && emit('onTreeBasicChange', val, prop) +} const onGraphicTextChange = (val, prop) => { state.initReady && emit('onGraphicTextChange', val, prop) } @@ -286,8 +291,7 @@ watch( :themes="themes" :chart="chart" :allGraphcs = "props.allGraphcs" - @onBasicStyleChange="onBasicStyleChange" - @onMiscChange="onMiscChange" + @onTreeBasicChange="onTreeBasicChange" /> { return props.themes === 'dark' ? 'light' : 'dark' }) @@ -53,7 +53,7 @@ const fontFamily = CHART_FONT_FAMILY.concat( const fontLetterSpace = CHART_FONT_LETTER_SPACE const state = reactive({ - titleForm: JSON.parse(JSON.stringify(DEFAULT_TITLE_STYLE)) + treeForm: JSON.parse(JSON.stringify(DEFAULT_TREE_BASIC_STYLE)) }) const { chart } = toRefs(props) @@ -75,49 +75,31 @@ const fontSizeList = computed(() => { return arr }) -const changeTitleStyle = prop => { - emit('onTextChange', state.titleForm, prop) +const changeTreeStyle = prop => { + emit('onTreeBasicChange', state.treeForm, prop) } const init = () => { const customText = defaultsDeep( - cloneDeep(props.chart?.customStyle?.text), - cloneDeep(DEFAULT_TITLE_STYLE) + cloneDeep(props.chart?.customStyle?.treeBasicStyle), + cloneDeep(DEFAULT_TREE_BASIC_STYLE) ) - state.titleForm = cloneDeep(customText) + state.treeForm = cloneDeep(customText) //第一次颜色可能赋值失败,单独赋值一次 nextTick(() => { - state.titleForm.color = customText.color + state.treeForm.color = customText.color }) } -const showEditRemark = ref(false) -const tempRemark = ref('') - -const openEditRemark = () => { - tempRemark.value = cloneDeep(state.titleForm.remark) - showEditRemark.value = true -} - -const closeEditRemark = () => { - showEditRemark.value = false - tempRemark.value = '' -} - -const saveEditRemark = () => { - showEditRemark.value = false - state.titleForm.remark = tempRemark.value - changeTitleStyle('remark') -} onMounted(() => { init() }) watch( - () => props.chart?.customStyle?.text, + () => props.chart?.customStyle?.treeBasicStyle, () => { init() }, @@ -127,119 +109,24 @@ watch(