Commit cfea7d5a4c6d6f651652fd19d817992aa900b55d
1 parent
f9e241ad
update props edit panel style
Showing
3 changed files
with
28 additions
and
8 deletions
front-end/h5/src/components/core/editor/edit-panel/props.js
| ... | ... | @@ -23,12 +23,20 @@ export default { |
| 23 | 23 | renderPropsEditorPanel (h, editingElement) { |
| 24 | 24 | const propsConfig = editingElement.editorConfig.propsConfig |
| 25 | 25 | return ( |
| 26 | - <a-form ref="form" label-width="100px" size="mini" label-position="left"> | |
| 26 | + <a-form | |
| 27 | + ref="form" | |
| 28 | + size="mini" | |
| 29 | + id="props-edit-form" | |
| 30 | + label-width="100px" | |
| 31 | + label-position="left" | |
| 32 | + | |
| 33 | + > | |
| 27 | 34 | { |
| 28 | 35 | Object.keys(propsConfig).map(propKey => { |
| 29 | 36 | const item = propsConfig[propKey] |
| 30 | 37 | // https://vuejs.org/v2/guide/render-function.html |
| 31 | 38 | const data = { |
| 39 | + style: { width: '100%' }, | |
| 32 | 40 | props: { |
| 33 | 41 | ...item.prop, |
| 34 | 42 | // https://vuejs.org/v2/guide/render-function.html#v-model |
| ... | ... | @@ -46,7 +54,7 @@ export default { |
| 46 | 54 | } |
| 47 | 55 | } |
| 48 | 56 | return ( |
| 49 | - <a-form-item label={item.label}> | |
| 57 | + <a-form-item label={item.label} labelCol={{ span: 8 }} wrapperCol={{ span: 14, offset: 2 }}> | |
| 50 | 58 | { h(item.type, data) } |
| 51 | 59 | </a-form-item> |
| 52 | 60 | ) | ... | ... |
front-end/h5/src/components/core/editor/index.js
| ... | ... | @@ -14,12 +14,12 @@ const sidebarMenus = [ |
| 14 | 14 | { |
| 15 | 15 | label: '组件列表', |
| 16 | 16 | value: 'pluginList', |
| 17 | - antIcon: 'user' | |
| 17 | + antIcon: 'bars' | |
| 18 | 18 | }, |
| 19 | 19 | { |
| 20 | 20 | label: '页面管理', |
| 21 | 21 | value: 'pageManagement', |
| 22 | - antIcon: 'copy' | |
| 22 | + antIcon: 'snippets' | |
| 23 | 23 | }, |
| 24 | 24 | { |
| 25 | 25 | label: '免费模板', |
| ... | ... | @@ -92,8 +92,13 @@ export default { |
| 92 | 92 | </a-menu> |
| 93 | 93 | </a-layout-header> |
| 94 | 94 | <a-layout> |
| 95 | - <a-layout-sider width="160" style="background: #fff"> | |
| 96 | - <a-menu onSelect={val => { this.activeMenuKey = val }} mode="inline" defaultSelectedKeys={['pluginList']} style={{ height: '100%', borderRight: 1 }}> | |
| 95 | + <a-layout-sider width="160" style="background: #fff" collapsed> | |
| 96 | + <a-menu | |
| 97 | + mode="inline" | |
| 98 | + defaultSelectedKeys={['pluginList']} | |
| 99 | + style={{ height: '100%', borderRight: 1 }} | |
| 100 | + onSelect={val => { this.activeMenuKey = val }} | |
| 101 | + > | |
| 97 | 102 | { |
| 98 | 103 | sidebarMenus.map(menu => ( |
| 99 | 104 | <a-menu-item key={menu.value}> |
| ... | ... | @@ -131,8 +136,8 @@ export default { |
| 131 | 136 | </div> |
| 132 | 137 | </a-layout-content> |
| 133 | 138 | </a-layout> |
| 134 | - <a-layout-sider width="240" theme='light' style={{ background: '#fff', padding: '0 12px' }}> | |
| 135 | - <a-tabs type="card" style="height: 100%;"> | |
| 139 | + <a-layout-sider width="340" theme='light' style={{ background: '#fff', padding: '0 12px' }}> | |
| 140 | + <a-tabs style="height: 100%;" tabBarGutter={10}> | |
| 136 | 141 | {/* |
| 137 | 142 | #!zh tab 标题: |
| 138 | 143 | #!en tab title |
| ... | ... | @@ -149,6 +154,7 @@ export default { |
| 149 | 154 | </a-tab-pane> |
| 150 | 155 | <a-tab-pane label="动画" key='动画' tab='动画'>动画</a-tab-pane> |
| 151 | 156 | <a-tab-pane label="动作" key='动作' tab='动作'>动作</a-tab-pane> |
| 157 | + <a-tab-pane label="脚本" key='脚本' tab='脚本'>脚本</a-tab-pane> | |
| 152 | 158 | </a-tabs> |
| 153 | 159 | </a-layout-sider> |
| 154 | 160 | </a-layout> | ... | ... |