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,12 +23,20 @@ export default { | ||
| 23 | renderPropsEditorPanel (h, editingElement) { | 23 | renderPropsEditorPanel (h, editingElement) { |
| 24 | const propsConfig = editingElement.editorConfig.propsConfig | 24 | const propsConfig = editingElement.editorConfig.propsConfig |
| 25 | return ( | 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 | Object.keys(propsConfig).map(propKey => { | 35 | Object.keys(propsConfig).map(propKey => { |
| 29 | const item = propsConfig[propKey] | 36 | const item = propsConfig[propKey] |
| 30 | // https://vuejs.org/v2/guide/render-function.html | 37 | // https://vuejs.org/v2/guide/render-function.html |
| 31 | const data = { | 38 | const data = { |
| 39 | + style: { width: '100%' }, | ||
| 32 | props: { | 40 | props: { |
| 33 | ...item.prop, | 41 | ...item.prop, |
| 34 | // https://vuejs.org/v2/guide/render-function.html#v-model | 42 | // https://vuejs.org/v2/guide/render-function.html#v-model |
| @@ -46,7 +54,7 @@ export default { | @@ -46,7 +54,7 @@ export default { | ||
| 46 | } | 54 | } |
| 47 | } | 55 | } |
| 48 | return ( | 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 | { h(item.type, data) } | 58 | { h(item.type, data) } |
| 51 | </a-form-item> | 59 | </a-form-item> |
| 52 | ) | 60 | ) |
front-end/h5/src/components/core/editor/index.js
| @@ -14,12 +14,12 @@ const sidebarMenus = [ | @@ -14,12 +14,12 @@ const sidebarMenus = [ | ||
| 14 | { | 14 | { |
| 15 | label: '组件列表', | 15 | label: '组件列表', |
| 16 | value: 'pluginList', | 16 | value: 'pluginList', |
| 17 | - antIcon: 'user' | 17 | + antIcon: 'bars' |
| 18 | }, | 18 | }, |
| 19 | { | 19 | { |
| 20 | label: '页面管理', | 20 | label: '页面管理', |
| 21 | value: 'pageManagement', | 21 | value: 'pageManagement', |
| 22 | - antIcon: 'copy' | 22 | + antIcon: 'snippets' |
| 23 | }, | 23 | }, |
| 24 | { | 24 | { |
| 25 | label: '免费模板', | 25 | label: '免费模板', |
| @@ -92,8 +92,13 @@ export default { | @@ -92,8 +92,13 @@ export default { | ||
| 92 | </a-menu> | 92 | </a-menu> |
| 93 | </a-layout-header> | 93 | </a-layout-header> |
| 94 | <a-layout> | 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 | sidebarMenus.map(menu => ( | 103 | sidebarMenus.map(menu => ( |
| 99 | <a-menu-item key={menu.value}> | 104 | <a-menu-item key={menu.value}> |
| @@ -131,8 +136,8 @@ export default { | @@ -131,8 +136,8 @@ export default { | ||
| 131 | </div> | 136 | </div> |
| 132 | </a-layout-content> | 137 | </a-layout-content> |
| 133 | </a-layout> | 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 | #!zh tab 标题: | 142 | #!zh tab 标题: |
| 138 | #!en tab title | 143 | #!en tab title |
| @@ -149,6 +154,7 @@ export default { | @@ -149,6 +154,7 @@ export default { | ||
| 149 | </a-tab-pane> | 154 | </a-tab-pane> |
| 150 | <a-tab-pane label="动画" key='动画' tab='动画'>动画</a-tab-pane> | 155 | <a-tab-pane label="动画" key='动画' tab='动画'>动画</a-tab-pane> |
| 151 | <a-tab-pane label="动作" key='动作' tab='动作'>动作</a-tab-pane> | 156 | <a-tab-pane label="动作" key='动作' tab='动作'>动作</a-tab-pane> |
| 157 | + <a-tab-pane label="脚本" key='脚本' tab='脚本'>脚本</a-tab-pane> | ||
| 152 | </a-tabs> | 158 | </a-tabs> |
| 153 | </a-layout-sider> | 159 | </a-layout-sider> |
| 154 | </a-layout> | 160 | </a-layout> |
front-end/h5/src/components/core/styles/index.scss