Commit ec56f329490d5010a4fc8cf6dd5f858cf331d680
1 parent
66a2a740
chore: 更新右侧属性面板样式
Showing
3 changed files
with
40 additions
and
32 deletions
front-end/h5/src/components/core/editor/right-panel/index.js
| ... | ... | @@ -25,7 +25,12 @@ export default { |
| 25 | 25 | }, |
| 26 | 26 | render (h) { |
| 27 | 27 | return ( |
| 28 | - <a-layout-sider width={this.width} data-set-width={this.width} theme='light' style={{ background: '#fff', padding: '0 12px 0 12px' }}> | |
| 28 | + <a-layout-sider | |
| 29 | + width={this.width} | |
| 30 | + data-set-width={this.width} | |
| 31 | + theme='light' | |
| 32 | + style={{ background: '#fff', padding: '0 6px 0 6px' }} | |
| 33 | + > | |
| 29 | 34 | <a-tabs |
| 30 | 35 | style="height: 100%;" |
| 31 | 36 | tabBarGutter={10} | ... | ... |
front-end/h5/src/components/core/editor/right-panel/props.js
| ... | ... | @@ -42,7 +42,8 @@ export default { |
| 42 | 42 | }, |
| 43 | 43 | methods: { |
| 44 | 44 | ...mapActions('editor', [ |
| 45 | - 'setEditingElement', 'setElementPosition' | |
| 45 | + 'setEditingElement', | |
| 46 | + 'setElementPosition' | |
| 46 | 47 | ]), |
| 47 | 48 | loadCustomEditorForPlugin () { |
| 48 | 49 | this.loadCustomEditorFlag = false |
| ... | ... | @@ -184,37 +185,39 @@ export default { |
| 184 | 185 | {/* margin、padding编辑 */} |
| 185 | 186 | <BoxModelEditor /> |
| 186 | 187 | </a-collapse-panel> |
| 187 | - </a-collapse> | |
| 188 | - <a-form | |
| 189 | - ref="form" | |
| 190 | - size="mini" | |
| 191 | - class="props-config-form" | |
| 192 | - layout={this.layout} | |
| 193 | - > | |
| 188 | + <a-collapse-panel key="2" header="属性设置"> | |
| 189 | + <a-form | |
| 190 | + ref="form" | |
| 191 | + size="mini" | |
| 192 | + class="props-config-form" | |
| 193 | + layout={this.layout} | |
| 194 | + > | |
| 194 | 195 | |
| 195 | - { | |
| 196 | - // plugin-custom-editor | |
| 197 | - this.loadCustomEditorFlag && | |
| 198 | - h(this.customEditorName, { | |
| 199 | - props: { | |
| 200 | - elementProps: editingElement.pluginProps | |
| 196 | + { | |
| 197 | + // plugin-custom-editor | |
| 198 | + this.loadCustomEditorFlag && | |
| 199 | + h(this.customEditorName, { | |
| 200 | + props: { | |
| 201 | + elementProps: editingElement.pluginProps | |
| 202 | + } | |
| 203 | + }) | |
| 201 | 204 | } |
| 202 | - }) | |
| 203 | - } | |
| 204 | - { | |
| 205 | - Object | |
| 206 | - .entries(props) | |
| 207 | - .filter(([propKey, propConfig]) => { | |
| 208 | - // 1. 如果开发者给 某个prop 显式指定了 visible 属性,则取开发者指定的值; | |
| 209 | - // 2. 否则取默认值:true,即默认在属性面板显示该属性 | |
| 210 | - // 3. 组件的某些属性是不需要显示在 配置编辑器的,比如:editorMode(编辑模式/预览模式),因为这个是鲁班编辑器默认注入到每个组件的,无须显示出来 | |
| 211 | - const isVisible = propConfig.hasOwnProperty('visible') ? propConfig.visible : true | |
| 212 | - return isVisible && propConfig.editor && !propConfig.editor.custom | |
| 213 | - }) | |
| 214 | - .map(([propKey, propConfig]) => this.renderPropFormItem(h, { propKey, propConfig })) | |
| 215 | - } | |
| 216 | - </a-form> | |
| 217 | - </div> | |
| 205 | + { | |
| 206 | + Object | |
| 207 | + .entries(props) | |
| 208 | + .filter(([propKey, propConfig]) => { | |
| 209 | + // 1. 如果开发者给 某个prop 显式指定了 visible 属性,则取开发者指定的值; | |
| 210 | + // 2. 否则取默认值:true,即默认在属性面板显示该属性 | |
| 211 | + // 3. 组件的某些属性是不需要显示在 配置编辑器的,比如:editorMode(编辑模式/预览模式),因为这个是鲁班编辑器默认注入到每个组件的,无须显示出来 | |
| 212 | + const isVisible = propConfig.hasOwnProperty('visible') ? propConfig.visible : true | |
| 213 | + return isVisible && propConfig.editor && !propConfig.editor.custom | |
| 214 | + }) | |
| 215 | + .map(([propKey, propConfig]) => this.renderPropFormItem(h, { propKey, propConfig })) | |
| 216 | + } | |
| 217 | + </a-form> | |
| 218 | + </a-collapse-panel> | |
| 219 | + </a-collapse> | |
| 220 | + </div> | |
| 218 | 221 | ) |
| 219 | 222 | }, |
| 220 | 223 | renderWorkGlobalPropsPanel (h) { | ... | ... |
front-end/h5/src/components/core/editor/right-panel/work-mode.vue
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | --> |
| 11 | 11 | <template> |
| 12 | 12 | <a-form :layout="formLayout"> |
| 13 | - <a-form-item label="H5类型"> | |
| 13 | + <a-form-item style="margin: 0;"> | |
| 14 | 14 | <a-radio-group v-model="pageMode" size="small"> |
| 15 | 15 | <a-radio-button v-for="(value, key) in PAGE_MODE" :key="key" :value="value"> |
| 16 | 16 | {{PAGE_MODE_LABEL[key]}} | ... | ... |