Commit 2f1132b470bd1678f8c08590087124e5818e9fe3

Authored by ly525
1 parent d9fd3464

update plugin list style

front-end/h5/src/components/core/editor/shortcuts-panel/index.js
@@ -93,6 +93,7 @@ export default { @@ -93,6 +93,7 @@ export default {
93 clickFn={this.onClickShortcut.bind(this, plugin)} 93 clickFn={this.onClickShortcut.bind(this, plugin)}
94 title={plugin.title} 94 title={plugin.title}
95 faIcon={plugin.icon} 95 faIcon={plugin.icon}
  96 + disabled={plugin.disabled}
96 /> 97 />
97 </a-col> 98 </a-col>
98 )) 99 ))
front-end/h5/src/components/core/editor/shortcuts-panel/shortcut-button.js
@@ -12,6 +12,10 @@ export default { @@ -12,6 +12,10 @@ export default {
12 clickFn: { 12 clickFn: {
13 required: false, 13 required: false,
14 type: Function 14 type: Function
  15 + },
  16 + disabled: {
  17 + type: Boolean,
  18 + default: false
15 } 19 }
16 }, 20 },
17 render: (h, { props, listeners, slots }) => { 21 render: (h, { props, listeners, slots }) => {
@@ -20,6 +24,7 @@ export default { @@ -20,6 +24,7 @@ export default {
20 <a-button 24 <a-button
21 class="shortcut-button" 25 class="shortcut-button"
22 onClick={onClick} 26 onClick={onClick}
  27 + disabled={props.disabled}
23 > 28 >
24 <i 29 <i
25 class={['shortcut-icon', 'fa', `fa-${props.faIcon}`]} 30 class={['shortcut-icon', 'fa', `fa-${props.faIcon}`]}
front-end/h5/src/components/core/styles/index.scss
@@ -41,6 +41,10 @@ @@ -41,6 +41,10 @@
41 flex-direction: column; 41 flex-direction: column;
42 color: #393e46; 42 color: #393e46;
43 width: 100%; 43 width: 100%;
  44 +
  45 + &:disabled {
  46 + cursor: not-allowed;
  47 + }
44 .shortcut-icon { 48 .shortcut-icon {
45 padding: 4px; 49 padding: 4px;
46 // display: block; 50 // display: block;
front-end/h5/src/mixins/load-plugins.js
@@ -16,18 +16,42 @@ export const pluginsList = [ @@ -16,18 +16,42 @@ export const pluginsList = [
16 }, 16 },
17 { 17 {
18 title: '文字', 18 title: '文字',
19 - icon: 'font', 19 + icon: 'text-width',
20 component: LbpText, 20 component: LbpText,
21 visible: true, 21 visible: true,
22 name: LbpText.name 22 name: LbpText.name
23 }, 23 },
24 { 24 {
25 - title: '按钮', 25 + title: '普通按钮',
26 icon: 'hand-pointer-o', 26 icon: 'hand-pointer-o',
27 component: LbpButton, 27 component: LbpButton,
28 visible: true, 28 visible: true,
29 name: LbpButton.name 29 name: LbpButton.name
30 }, 30 },
  31 + {
  32 + title: '轮播图',
  33 + icon: 'photo',
  34 + component: LbpFormRadioGroup,
  35 + visible: true,
  36 + name: LbpFormRadioGroup.name,
  37 + disabled: true
  38 + },
  39 + {
  40 + title: '地图',
  41 + icon: 'map-o',
  42 + component: LbpFormRadioGroup,
  43 + visible: true,
  44 + name: LbpFormRadioGroup.name,
  45 + disabled: true
  46 + },
  47 + {
  48 + title: '视频',
  49 + icon: 'file-video-o',
  50 + component: LbpFormRadioGroup,
  51 + visible: true,
  52 + name: LbpFormRadioGroup.name,
  53 + disabled: true
  54 + },
31 // { 55 // {
32 // title: '视频', 56 // title: '视频',
33 // icon: 'play-circle-o', 57 // icon: 'play-circle-o',
@@ -58,7 +82,14 @@ export const pluginsList = [ @@ -58,7 +82,14 @@ export const pluginsList = [
58 // }, 82 // },
59 { 83 {
60 title: '表单单选', 84 title: '表单单选',
61 - icon: 'hand-pointer-o', 85 + icon: 'check-square-o',
  86 + component: LbpFormRadioGroup,
  87 + visible: true,
  88 + name: LbpFormRadioGroup.name
  89 + },
  90 + {
  91 + title: '表单单选',
  92 + icon: 'dot-circle-o',
62 component: LbpFormRadioGroup, 93 component: LbpFormRadioGroup,
63 visible: true, 94 visible: true,
64 name: LbpFormRadioGroup.name 95 name: LbpFormRadioGroup.name