From 2cd23657709a4620f4d64372f0d0b43cd933dc80 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 5 May 2021 22:14:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=B8=BB=E9=A2=98=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/RightPanel/index.vue | 1 - .../canvas/components/Editor/ContextMenu.vue | 2 +- .../canvas/components/Editor/Preview.vue | 8 +- .../canvas/components/Editor/PreviewEject.vue | 8 +- .../canvas/components/Editor/index.vue | 33 ++- .../components/canvas/components/Toolbar.vue | 1 + .../canvas/custom-component/UserView.vue | 66 +++++- frontend/src/components/canvas/index.vue | 8 +- frontend/src/store/index.js | 14 +- .../views/chart/components/ChartComponent.vue | 34 ++-- .../BackgroundColorSelector.vue | 7 +- .../component-style/LegendSelector.vue | 7 +- .../component-style/TitleSelector.vue | 15 +- .../component-style/XAxisSelector.vue | 7 +- .../component-style/YAxisSelector.vue | 7 +- .../components/shape-attr/ColorSelector.vue | 7 +- .../components/shape-attr/LabelSelector.vue | 7 +- .../components/shape-attr/SizeSelector.vue | 7 +- .../components/shape-attr/TooltipSelector.vue | 7 +- frontend/src/views/chart/view/ChartEdit.vue | 1 + frontend/src/views/link/view/index.vue | 8 +- .../src/views/panel/GrantAuth/shareTree.vue | 8 +- .../SubjectSetting/BackgroundSelector.vue | 183 ----------------- .../PanelStyle/BackgroundSelector.vue | 149 ++++++++++++++ .../PanelStyle/ComponentGap.vue | 75 +++++++ .../{ => PreSubject}/Slider.vue | 0 .../{ => PreSubject}/SubjectTemplateItem.vue | 0 .../src/views/panel/SubjectSetting/index.vue | 192 ++++++++++++++++-- frontend/src/views/panel/edit/index.vue | 23 +-- frontend/src/views/panel/enshrine/index.vue | 8 +- .../src/views/panel/list/EditPanel/index.vue | 1 - frontend/src/views/panel/list/PanelList.vue | 9 +- .../src/views/panel/list/PanelViewShow.vue | 3 - frontend/src/views/panel/panel.js | 49 ++++- frontend/src/views/panel/template/index.vue | 1 - .../system/systemParamSettings/UiSetting.vue | 1 - 36 files changed, 668 insertions(+), 289 deletions(-) delete mode 100644 frontend/src/views/panel/SubjectSetting/BackgroundSelector.vue create mode 100644 frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue create mode 100644 frontend/src/views/panel/SubjectSetting/PanelStyle/ComponentGap.vue rename frontend/src/views/panel/SubjectSetting/{ => PreSubject}/Slider.vue (100%) rename frontend/src/views/panel/SubjectSetting/{ => PreSubject}/SubjectTemplateItem.vue (100%) diff --git a/frontend/src/components/RightPanel/index.vue b/frontend/src/components/RightPanel/index.vue index 9f555c5871..55e8c1e5c0 100644 --- a/frontend/src/components/RightPanel/index.vue +++ b/frontend/src/components/RightPanel/index.vue @@ -63,7 +63,6 @@ export default { closeSidebar(evt) { const parent = evt.target.closest('.rightPanel') if (!parent) { - debugger this.show = false window.removeEventListener('click', this.closeSidebar) } diff --git a/frontend/src/components/canvas/components/Editor/ContextMenu.vue b/frontend/src/components/canvas/components/Editor/ContextMenu.vue index 423ac3d5e9..18f3fdb6a8 100644 --- a/frontend/src/components/canvas/components/Editor/ContextMenu.vue +++ b/frontend/src/components/canvas/components/Editor/ContextMenu.vue @@ -47,7 +47,7 @@ export default { if (this.curComponent.component === 'user-view') { this.$store.dispatch('chart/setViewId', null) this.$store.dispatch('chart/setViewId', this.curComponent.propValue.viewId) - bus.$emit('PanelSwitchComponent', { name: 'ChartEdit' }) + bus.$emit('PanelSwitchComponent', { name: 'ChartEdit', param: { 'id': this.curComponent.propValue.viewId }}) } if (this.curComponent.type === 'custom') { bus.$emit('component-dialog-edit') diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index b086c8ef74..ef5c9143b3 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -81,9 +81,11 @@ export default { this.handleScaleChange() }, resetID(data) { - data.forEach(item => { - item.id = uuid.v1() - }) + if( data ) { + data.forEach(item => { + item.id = uuid.v1() + }) + } return data }, format(value, scale) { diff --git a/frontend/src/components/canvas/components/Editor/PreviewEject.vue b/frontend/src/components/canvas/components/Editor/PreviewEject.vue index 59bb770dcd..209d2d691a 100644 --- a/frontend/src/components/canvas/components/Editor/PreviewEject.vue +++ b/frontend/src/components/canvas/components/Editor/PreviewEject.vue @@ -96,9 +96,11 @@ export default { }) }, resetID(data) { - data.forEach(item => { - item.id = uuid.v1() - }) + if( data ) { + data.forEach(item => { + item.id = uuid.v1() + }) + } return data }, diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index b209b4d560..150d0898f2 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -3,10 +3,7 @@ id="editor" class="editor" :class="{ edit: isEdit }" - :style="{ - width: changeStyleWithScale(canvasStyleData.width) + 'px', - height: changeStyleWithScale(canvasStyleData.height) + 'px', - }" + :style="customStyle" @contextmenu="handleContextMenu" @mousedown="handleMouseDown" > @@ -58,8 +55,8 @@ - - + + @@ -106,6 +103,29 @@ export default { } }, computed: { + customStyle() { + let style = { + width: this.changeStyleWithScale(this.canvasStyleData.width) + 'px', + height: this.changeStyleWithScale(this.canvasStyleData.height) + 'px' + } + if (this.canvasStyleData.openCommonStyle) { + if (this.canvasStyleData.panel.backgroundType === 'image') { + style = { + width: this.changeStyleWithScale(this.canvasStyleData.width) + 'px', + height: this.changeStyleWithScale(this.canvasStyleData.height) + 'px', + background: `url(${this.canvasStyleData.panel.imageUrl}) no-repeat` + } + } else { + style = { + width: this.changeStyleWithScale(this.canvasStyleData.width) + 'px', + height: this.changeStyleWithScale(this.canvasStyleData.height) + 'px', + background: this.canvasStyleData.panel.color + } + } + } + + return style + }, panelInfo() { return this.$store.state.panel.panelInfo }, @@ -355,6 +375,7 @@ export default { position: relative; background: #fff; margin: auto; + background-size:100% 100% !important; .lock { opacity: .5; diff --git a/frontend/src/components/canvas/components/Toolbar.vue b/frontend/src/components/canvas/components/Toolbar.vue index 15665d8499..d1aa4a9b60 100644 --- a/frontend/src/components/canvas/components/Toolbar.vue +++ b/frontend/src/components/canvas/components/Toolbar.vue @@ -205,6 +205,7 @@ export default { panelStyle: JSON.stringify(this.canvasStyleData), panelData: JSON.stringify(this.componentData) } + debugger post('panel/group/save', requestInfo, () => {}) this.$message.success('保存成功') }, diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index 80e23aba41..ce94a8d5b4 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -8,6 +8,20 @@ import { post } from '@/api/panel/panel' import ChartComponent from '@/views/chart/components/ChartComponent.vue' +import { mapState } from 'vuex' +import { deepCopy } from '@/components/canvas/utils/utils' + +import { + DEFAULT_COLOR_CASE, + DEFAULT_SIZE, + DEFAULT_TITLE_STYLE, + DEFAULT_LEGEND_STYLE, + DEFAULT_LABEL, + DEFAULT_TOOLTIP, + DEFAULT_XAXIS_STYLE, + DEFAULT_YAXIS_STYLE, + DEFAULT_BACKGROUND_COLOR +} from '@/views/chart/chart/chart' export default { name: 'UserView', @@ -29,11 +43,61 @@ export default { watch: { filter(val) { this.getData(this.element.propValue.viewId) + }, + // deep监听panel 如果改变 提交到 store + canvasStyleData: { + handler(newVal, oldVla) { + debugger + // this.chart.viewFirst == false 优先使用仪表盘样式 + if (!this.chart.viewFirst) { + this.chart = { + ...this.chart, + customAttr: this.canvasStyleData.chart.customAttr, + customStyle: this.canvasStyleData.chart.customStyle + } + } + }, + deep: true } }, + computed: mapState([ + 'canvasStyleData' + ]), + // computed: mapState({ + // canvasStyleData: function(state) { + // debugger + // // this.chart.viewFirst == false 优先使用仪表盘样式 + // if (!this.chart.viewFirst) { + // this.chart.customAttr = state.canvasStyleData.chart.customAttr + // this.chart.customStyle = state.canvasStyleData.chart.customStyle + // } + // } + // + // }), data() { return { - chart: {} + chart: { + viewFirst: false, + xaxis: [], + yaxis: [], + show: true, + type: 'panel', + title: '', + customAttr: { + color: DEFAULT_COLOR_CASE, + size: DEFAULT_SIZE, + label: DEFAULT_LABEL, + tooltip: DEFAULT_TOOLTIP + }, + customStyle: { + text: DEFAULT_TITLE_STYLE, + legend: DEFAULT_LEGEND_STYLE, + xAxis: DEFAULT_XAXIS_STYLE, + yAxis: DEFAULT_YAXIS_STYLE, + background: DEFAULT_BACKGROUND_COLOR + }, + customFilter: [] + } } }, created() { diff --git a/frontend/src/components/canvas/index.vue b/frontend/src/components/canvas/index.vue index d349e1744d..219a2134c8 100644 --- a/frontend/src/components/canvas/index.vue +++ b/frontend/src/components/canvas/index.vue @@ -69,9 +69,11 @@ export default { }, resetID(data) { - data.forEach(item => { - item.id = generateID() - }) + if( data ) { + data.forEach(item => { + item.id = uuid.v1() + }) + } return data }, diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index 82b6210316..c5dd6b2ab8 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -20,6 +20,10 @@ import layer from '@/components/canvas/store/layer' import snapshot from '@/components/canvas/store/snapshot' import lock from '@/components/canvas/store/lock' +import { + DEFAULT_COMMON_CANVAS_STYLE +} from '@/views/panel/panel' + Vue.use(Vuex) const data = { @@ -34,17 +38,14 @@ const data = { ...lock.state, editMode: 'edit', // 编辑器模式 edit preview - canvasStyleData: { // 页面全局数据 - width: 1200, - height: 740, - scale: 100 - }, + canvasStyleData: DEFAULT_COMMON_CANVAS_STYLE, // 页面全局数据 //扩展公共样式 公共的仪表盘样式,用来实时响应样式的变化 componentData: [], // 画布组件数据 curComponent: null, curComponentIndex: null, // 点击画布时是否点中组件,主要用于取消选中组件用。 // 如果没点中组件,并且在画布空白处弹起鼠标,则取消当前组件的选中状态 - isClickComponent: false + isClickComponent: false, + canvasCommonStyleData: DEFAULT_COMMON_CANVAS_STYLE }, mutations: { ...animation.mutations, @@ -121,7 +122,6 @@ const data = { if (index === undefined) { index = state.curComponentIndex } - state.componentData.splice(index, 1) } }, diff --git a/frontend/src/views/chart/components/ChartComponent.vue b/frontend/src/views/chart/components/ChartComponent.vue index 34ec088d9f..50bd5a1d42 100644 --- a/frontend/src/views/chart/components/ChartComponent.vue +++ b/frontend/src/views/chart/components/ChartComponent.vue @@ -36,25 +36,20 @@ export default { } }, watch: { - chart() { - this.drawEcharts() + chart: { + handler(newVal, oldVla) { + debugger + console.log('chart,watch') + this.preDraw() + }, + deep: true }, resize() { this.drawEcharts() } }, mounted() { - // 基于准备好的dom,初始化echarts实例 - console.log('chartId:' + this.chartId) - // 渲染echart等待dom加载完毕,渲染之前先尝试销毁具有相同id的echart 放置多次切换仪表盘有重复id情况 - new Promise((resolve) => { resolve() }).then(() => { - // 此dom为echarts图标展示dom - this.myChart = this.$echarts.getInstanceByDom(document.getElementById(this.chartId)) - if (!this.myChart) { - this.myChart = this.$echarts.init(document.getElementById(this.chartId)) - } - this.drawEcharts() - }) + this.preDraw() // 监听元素变动事件 eventBus.$on('resizing', (componentId) => { @@ -62,6 +57,19 @@ export default { }) }, methods: { + preDraw() { + // 基于准备好的dom,初始化echarts实例 + console.log('chartId:' + this.chartId) + // 渲染echart等待dom加载完毕,渲染之前先尝试销毁具有相同id的echart 放置多次切换仪表盘有重复id情况 + new Promise((resolve) => { resolve() }).then(() => { + // 此dom为echarts图标展示dom + this.myChart = this.$echarts.getInstanceByDom(document.getElementById(this.chartId)) + if (!this.myChart) { + this.myChart = this.$echarts.init(document.getElementById(this.chartId)) + } + this.drawEcharts() + }) + }, drawEcharts() { const chart = this.chart let chart_option = {} diff --git a/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue b/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue index bd563ecc27..76fb8d145b 100644 --- a/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue +++ b/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue @@ -44,7 +44,12 @@ export default { handler: function() { const chart = JSON.parse(JSON.stringify(this.chart)) if (chart.customStyle) { - const customStyle = JSON.parse(chart.customStyle) + let customStyle = null + if (Object.prototype.toString.call(chart.customStyle) === '[object Object]') { + customStyle = JSON.parse(JSON.stringify(chart.customStyle)) + } else { + customStyle = JSON.parse(chart.customStyle) + } if (customStyle.background) { this.colorForm = customStyle.background } diff --git a/frontend/src/views/chart/components/component-style/LegendSelector.vue b/frontend/src/views/chart/components/component-style/LegendSelector.vue index 9308df28b0..c5efed7e8d 100644 --- a/frontend/src/views/chart/components/component-style/LegendSelector.vue +++ b/frontend/src/views/chart/components/component-style/LegendSelector.vue @@ -88,7 +88,12 @@ export default { handler: function() { const chart = JSON.parse(JSON.stringify(this.chart)) if (chart.customStyle) { - const customStyle = JSON.parse(chart.customStyle) + let customStyle = null + if (Object.prototype.toString.call(chart.customStyle) === '[object Object]') { + customStyle = JSON.parse(JSON.stringify(chart.customStyle)) + } else { + customStyle = JSON.parse(chart.customStyle) + } if (customStyle.legend) { this.legendForm = customStyle.legend } diff --git a/frontend/src/views/chart/components/component-style/TitleSelector.vue b/frontend/src/views/chart/components/component-style/TitleSelector.vue index 75747febb3..4de21591b9 100644 --- a/frontend/src/views/chart/components/component-style/TitleSelector.vue +++ b/frontend/src/views/chart/components/component-style/TitleSelector.vue @@ -67,14 +67,23 @@ export default { handler: function() { const chart = JSON.parse(JSON.stringify(this.chart)) if (chart.customStyle) { - const customStyle = JSON.parse(chart.customStyle) - if (customStyle.text) { - this.titleForm = customStyle.text + let customStyle = null + if (Object.prototype.toString.call(chart.customStyle) === '[object Object]') { + customStyle = JSON.parse(JSON.stringify(chart.customStyle)) + } else { + customStyle = JSON.parse(chart.customStyle) + } + if (customStyle.background) { + this.colorForm = customStyle.background } } } } }, + created() { + debugger + console.log(JSON.stringify(this.chart)) + }, mounted() { this.init() }, diff --git a/frontend/src/views/chart/components/component-style/XAxisSelector.vue b/frontend/src/views/chart/components/component-style/XAxisSelector.vue index eebed0cd8f..c967201f7d 100644 --- a/frontend/src/views/chart/components/component-style/XAxisSelector.vue +++ b/frontend/src/views/chart/components/component-style/XAxisSelector.vue @@ -56,7 +56,12 @@ export default { handler: function() { const chart = JSON.parse(JSON.stringify(this.chart)) if (chart.customStyle) { - const customStyle = JSON.parse(chart.customStyle) + let customStyle = null + if (Object.prototype.toString.call(chart.customStyle) === '[object Object]') { + customStyle = JSON.parse(JSON.stringify(chart.customStyle)) + } else { + customStyle = JSON.parse(chart.customStyle) + } if (customStyle.xAxis) { this.axisForm = customStyle.xAxis } diff --git a/frontend/src/views/chart/components/component-style/YAxisSelector.vue b/frontend/src/views/chart/components/component-style/YAxisSelector.vue index a8bb41abf2..8bfed38fa1 100644 --- a/frontend/src/views/chart/components/component-style/YAxisSelector.vue +++ b/frontend/src/views/chart/components/component-style/YAxisSelector.vue @@ -56,7 +56,12 @@ export default { handler: function() { const chart = JSON.parse(JSON.stringify(this.chart)) if (chart.customStyle) { - const customStyle = JSON.parse(chart.customStyle) + let customStyle = null + if (Object.prototype.toString.call(chart.customStyle) === '[object Object]') { + customStyle = JSON.parse(JSON.stringify(chart.customStyle)) + } else { + customStyle = JSON.parse(chart.customStyle) + } if (customStyle.yAxis) { this.axisForm = customStyle.yAxis } diff --git a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue index da36e6547d..14acc312af 100644 --- a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue @@ -112,7 +112,12 @@ export default { handler: function() { const chart = JSON.parse(JSON.stringify(this.chart)) if (chart.customAttr) { - const customAttr = JSON.parse(chart.customAttr) + let customAttr = null + if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') { + customAttr = JSON.parse(JSON.stringify(chart.customAttr)) + } else { + customAttr = JSON.parse(chart.customAttr) + } if (customAttr.color) { this.colorForm = customAttr.color } diff --git a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue index ee671da097..1c7b8bafde 100644 --- a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue @@ -73,7 +73,12 @@ export default { handler: function() { const chart = JSON.parse(JSON.stringify(this.chart)) if (chart.customAttr) { - const customAttr = JSON.parse(chart.customAttr) + let customAttr = null + if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') { + customAttr = JSON.parse(JSON.stringify(chart.customAttr)) + } else { + customAttr = JSON.parse(chart.customAttr) + } if (customAttr.label) { this.labelForm = customAttr.label } diff --git a/frontend/src/views/chart/components/shape-attr/SizeSelector.vue b/frontend/src/views/chart/components/shape-attr/SizeSelector.vue index a3404a0d2d..b8f5511048 100644 --- a/frontend/src/views/chart/components/shape-attr/SizeSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/SizeSelector.vue @@ -138,7 +138,12 @@ export default { handler: function() { const chart = JSON.parse(JSON.stringify(this.chart)) if (chart.customAttr) { - const customAttr = JSON.parse(chart.customAttr) + let customAttr = null + if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') { + customAttr = JSON.parse(JSON.stringify(chart.customAttr)) + } else { + customAttr = JSON.parse(chart.customAttr) + } if (customAttr.size) { this.sizeForm = customAttr.size } diff --git a/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue b/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue index 01512f4581..c344863797 100644 --- a/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue @@ -82,7 +82,12 @@ export default { handler: function() { const chart = JSON.parse(JSON.stringify(this.chart)) if (chart.customAttr) { - const customAttr = JSON.parse(chart.customAttr) + let customAttr = null + if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') { + customAttr = JSON.parse(JSON.stringify(chart.customAttr)) + } else { + customAttr = JSON.parse(chart.customAttr) + } if (customAttr.tooltip) { this.tooltipForm = customAttr.tooltip } diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index ff2378ea05..1ed34c9cf0 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -441,6 +441,7 @@ export default { this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {} // 将视图传入echart组件 this.chart = response.data + console.log(JSON.stringify(this.chart)) }) } else { this.view = {} diff --git a/frontend/src/views/link/view/index.vue b/frontend/src/views/link/view/index.vue index 1c251eccbe..cbecfb25ae 100644 --- a/frontend/src/views/link/view/index.vue +++ b/frontend/src/views/link/view/index.vue @@ -36,9 +36,11 @@ export default { }) }, resetID(data) { - data.forEach(item => { - item.id = uuid.v1() - }) + if( data ) { + data.forEach(item => { + item.id = uuid.v1() + }) + } return data } diff --git a/frontend/src/views/panel/GrantAuth/shareTree.vue b/frontend/src/views/panel/GrantAuth/shareTree.vue index f81fc250ba..4cd9348234 100644 --- a/frontend/src/views/panel/GrantAuth/shareTree.vue +++ b/frontend/src/views/panel/GrantAuth/shareTree.vue @@ -51,9 +51,11 @@ export default { }) }, resetID(data) { - data.forEach(item => { - item.id = uuid.v1() - }) + if( data ) { + data.forEach(item => { + item.id = uuid.v1() + }) + } return data } diff --git a/frontend/src/views/panel/SubjectSetting/BackgroundSelector.vue b/frontend/src/views/panel/SubjectSetting/BackgroundSelector.vue deleted file mode 100644 index 9974fcf2f5..0000000000 --- a/frontend/src/views/panel/SubjectSetting/BackgroundSelector.vue +++ /dev/null @@ -1,183 +0,0 @@ - - - - - diff --git a/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue b/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue new file mode 100644 index 0000000000..9c4a685cdc --- /dev/null +++ b/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue @@ -0,0 +1,149 @@ + + + + + diff --git a/frontend/src/views/panel/SubjectSetting/PanelStyle/ComponentGap.vue b/frontend/src/views/panel/SubjectSetting/PanelStyle/ComponentGap.vue new file mode 100644 index 0000000000..58559816a6 --- /dev/null +++ b/frontend/src/views/panel/SubjectSetting/PanelStyle/ComponentGap.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/frontend/src/views/panel/SubjectSetting/Slider.vue b/frontend/src/views/panel/SubjectSetting/PreSubject/Slider.vue similarity index 100% rename from frontend/src/views/panel/SubjectSetting/Slider.vue rename to frontend/src/views/panel/SubjectSetting/PreSubject/Slider.vue diff --git a/frontend/src/views/panel/SubjectSetting/SubjectTemplateItem.vue b/frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItem.vue similarity index 100% rename from frontend/src/views/panel/SubjectSetting/SubjectTemplateItem.vue rename to frontend/src/views/panel/SubjectSetting/PreSubject/SubjectTemplateItem.vue diff --git a/frontend/src/views/panel/SubjectSetting/index.vue b/frontend/src/views/panel/SubjectSetting/index.vue index 2daf7bcf69..9b4e67e39b 100644 --- a/frontend/src/views/panel/SubjectSetting/index.vue +++ b/frontend/src/views/panel/SubjectSetting/index.vue @@ -10,24 +10,37 @@ - - - - + + - -
控制反馈:通过界面样式和交互动效让用户可以清晰的感知自己的操作;
-
页面反馈:操作后,通过页面元素的变化清晰地展现当前状态。
+ + + + + + + + + + + + + + + -
简化流程:设计简洁直观的操作流程;
-
清晰明确:语言表达清晰且表意明确,让用户快速理解进而作出决策;
-
帮助用户识别:界面简单直白,让用户快速识别而非回忆,减少用户记忆负担。
+ + + +
- -
用户决策:根据场景可给予用户操作建议或安全提示,但不能代替用户进行决策;
-
结果可控:用户可以自由的进行操作,包括撤销、回退和终止当前操作等。
+ + + + +
@@ -35,31 +48,166 @@