Commit 5798683a24af231cb47e28c5981c2478912d23c2

Authored by ly525
1 parent 612fd034

register global support component

front-end/h5/src/components/core/support/index.js
... ... @@ -2,10 +2,8 @@
2 2 import Vue from 'vue'
3 3 import PropMultiTextItemsEditor from './prop-multi-items-editor/text.js'
4 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 1 import commonProps from './common/props.js'
3 2  
4 3 export default {
... ... @@ -44,10 +43,5 @@ export default {
44 43 borderColor: commonProps.borderColor,
45 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 1 import commonProps from './common/props.js'
3 2  
4 3 export default {
... ... @@ -74,7 +73,6 @@ export default {
74 73 },
75 74 editorConfig: {
76 75 components: {
77   - 'lbs-text-align': LbpTextAlign,
78 76 'lbs-select-input-type': {
79 77 props: ['value'],
80 78 computed: {
... ...
front-end/h5/src/components/plugins/lbp-form-input.js
1   -import LbpTextAlign from '@luban-h5/lbs-text-align'
2 1 import commonProps from './common/props.js'
3 2  
4 3 export default {
... ... @@ -58,7 +57,6 @@ export default {
58 57 },
59 58 editorConfig: {
60 59 components: {
61   - 'lbs-text-align': LbpTextAlign,
62 60 'lbs-select-input-type': {
63 61 props: ['value'],
64 62 computed: {
... ...
front-end/h5/src/views/Editor.vue
1 1 <script>
2 2 import CoreEditor from '../components/core/editor/index.js'
3 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 6 export default {
7 7 extends: CoreEditor,
8   - mixins: [loadPluginMixin, loadEnhancePropsEditorMixin]
  8 + mixins: [loadPluginMixin]
9 9 }
10 10 </script>
11 11 <style lang="scss">
... ...