Commit 5798683a24af231cb47e28c5981c2478912d23c2
1 parent
612fd034
register global support component
Showing
5 changed files
with
6 additions
and
18 deletions
front-end/h5/src/components/core/support/index.js
| @@ -2,10 +2,8 @@ | @@ -2,10 +2,8 @@ | ||
| 2 | import Vue from 'vue' | 2 | import Vue from 'vue' |
| 3 | import PropMultiTextItemsEditor from './prop-multi-items-editor/text.js' | 3 | import PropMultiTextItemsEditor from './prop-multi-items-editor/text.js' |
| 4 | import ImageGallery from './image-gallery/gallery.js' | 4 | import ImageGallery from './image-gallery/gallery.js' |
| 5 | +import LbpTextAlign from '@luban-h5/lbs-text-align' | ||
| 5 | 6 | ||
| 6 | -export default { | ||
| 7 | - mounted () { | ||
| 8 | - Vue.component(PropMultiTextItemsEditor.name, PropMultiTextItemsEditor) | ||
| 9 | - Vue.component(ImageGallery.name, ImageGallery) | ||
| 10 | - } | ||
| 11 | -} | 7 | +Vue.component(PropMultiTextItemsEditor.name, PropMultiTextItemsEditor) |
| 8 | +Vue.component(ImageGallery.name, ImageGallery) | ||
| 9 | +Vue.component('lbs-text-align', LbpTextAlign) |
front-end/h5/src/components/plugins/lbp-button.js
| 1 | -import LbpTextAlign from '@luban-h5/lbs-text-align' | ||
| 2 | import commonProps from './common/props.js' | 1 | import commonProps from './common/props.js' |
| 3 | 2 | ||
| 4 | export default { | 3 | export default { |
| @@ -44,10 +43,5 @@ export default { | @@ -44,10 +43,5 @@ export default { | ||
| 44 | borderColor: commonProps.borderColor, | 43 | borderColor: commonProps.borderColor, |
| 45 | textAlign: commonProps.textAlign() | 44 | textAlign: commonProps.textAlign() |
| 46 | 45 | ||
| 47 | - }, | ||
| 48 | - editorConfig: { | ||
| 49 | - components: { | ||
| 50 | - 'lbs-text-align': LbpTextAlign | ||
| 51 | - } | ||
| 52 | } | 46 | } |
| 53 | } | 47 | } |
front-end/h5/src/components/plugins/lbp-form-button.js
| 1 | -import LbpTextAlign from '@luban-h5/lbs-text-align' | ||
| 2 | import commonProps from './common/props.js' | 1 | import commonProps from './common/props.js' |
| 3 | 2 | ||
| 4 | export default { | 3 | export default { |
| @@ -74,7 +73,6 @@ export default { | @@ -74,7 +73,6 @@ export default { | ||
| 74 | }, | 73 | }, |
| 75 | editorConfig: { | 74 | editorConfig: { |
| 76 | components: { | 75 | components: { |
| 77 | - 'lbs-text-align': LbpTextAlign, | ||
| 78 | 'lbs-select-input-type': { | 76 | 'lbs-select-input-type': { |
| 79 | props: ['value'], | 77 | props: ['value'], |
| 80 | computed: { | 78 | computed: { |
front-end/h5/src/components/plugins/lbp-form-input.js
| 1 | -import LbpTextAlign from '@luban-h5/lbs-text-align' | ||
| 2 | import commonProps from './common/props.js' | 1 | import commonProps from './common/props.js' |
| 3 | 2 | ||
| 4 | export default { | 3 | export default { |
| @@ -58,7 +57,6 @@ export default { | @@ -58,7 +57,6 @@ export default { | ||
| 58 | }, | 57 | }, |
| 59 | editorConfig: { | 58 | editorConfig: { |
| 60 | components: { | 59 | components: { |
| 61 | - 'lbs-text-align': LbpTextAlign, | ||
| 62 | 'lbs-select-input-type': { | 60 | 'lbs-select-input-type': { |
| 63 | props: ['value'], | 61 | props: ['value'], |
| 64 | computed: { | 62 | computed: { |
front-end/h5/src/views/Editor.vue
| 1 | <script> | 1 | <script> |
| 2 | import CoreEditor from '../components/core/editor/index.js' | 2 | import CoreEditor from '../components/core/editor/index.js' |
| 3 | import loadPluginMixin from '../mixins/load-plugins.js' | 3 | import loadPluginMixin from '../mixins/load-plugins.js' |
| 4 | -import loadEnhancePropsEditorMixin from '../components/core/support/index.js' | 4 | +import '../components/core/support/index.js' |
| 5 | 5 | ||
| 6 | export default { | 6 | export default { |
| 7 | extends: CoreEditor, | 7 | extends: CoreEditor, |
| 8 | - mixins: [loadPluginMixin, loadEnhancePropsEditorMixin] | 8 | + mixins: [loadPluginMixin] |
| 9 | } | 9 | } |
| 10 | </script> | 10 | </script> |
| 11 | <style lang="scss"> | 11 | <style lang="scss"> |