Commit f1ea1b7539a044e8aa5eeae351ff641be7622527

Authored by ly525
1 parent 9c203a49

refactor: move colorPicker to support folder

front-end/h5/package.json
... ... @@ -16,7 +16,7 @@
16 16 "dependencies": {
17 17 "@luban-h5/lbc-button": "^0.0.3",
18 18 "@luban-h5/lbp-slide": "^0.0.7",
19   - "@luban-h5/lbs-text-align": "^0.0.3",
  19 + "@luban-h5/lbs-text-align": "^0.0.5",
20 20 "@luban-h5/plugin-common-props": "0.2.7",
21 21 "animate.css": "^3.7.2",
22 22 "ant-design-vue": "^1.3.14",
... ...
front-end/h5/src/components/core/support/index.js
... ... @@ -2,13 +2,16 @@
2 2 * @Author: ly525
3 3 * @Date: 2019-12-01 18:11:50
4 4 * @LastEditors: ly525
5   - * @LastEditTime: 2020-01-12 20:42:55
  5 + * @LastEditTime: 2020-10-11 10:09:44
6 6 * @FilePath: /luban-h5/front-end/h5/src/components/core/support/index.js
7 7 * @Github: https://github.com/ly525/luban-h5
8   - * @Description: Do not edit
  8 + * @Description:
  9 + * - register-global-support-component
  10 + * - 注册全局支撑类组件,比如颜色选择器、文字对齐 等等
  11 + *
9 12 * @Copyright 2018 - 2019 luban-h5. All Rights Reserved
10 13 */
11   -// register-global-support-component
  14 +
12 15 import Vue from 'vue'
13 16 import PropMultiTextItemsEditor from './prop-multi-items-editor/text.js'
14 17 import ImageGallery from './image-gallery/gallery.js'
... ... @@ -16,10 +19,18 @@ import VideoGallery from './video-gallery/gallery.js'
16 19 import LbsExcelEditor from './excel'
17 20 import ColorsPanel from './colors-panel'
18 21 import LbpTextAlign from '@luban-h5/lbs-text-align'
  22 +/**
  23 + * #!en import element-ui color picker for bgcolor、color, because a-input(ant-design-vue) component do not support alpha
  24 + * #!zh 引入 element-ui 颜色选择器,因为 ant-design-vue 没有提供颜色选择器,默认的 <a-input type="color" /> 不支持选择透明度
  25 + * https://github.com/ly525/luban-h5/issues/105
  26 + */
  27 +import { ColorPicker, Button } from 'element-ui'
19 28  
  29 +Vue.component(Button.name, Button)
  30 +Vue.component(ColorPicker.name, ColorPicker)
20 31 Vue.component(PropMultiTextItemsEditor.name, PropMultiTextItemsEditor)
21 32 Vue.component(ImageGallery.name, ImageGallery)
22 33 Vue.component(VideoGallery.name, VideoGallery)
23   -Vue.component('lbs-text-align', LbpTextAlign)
  34 +Vue.component(LbpTextAlign.name, LbpTextAlign)
24 35 Vue.component(LbsExcelEditor.name, LbsExcelEditor)
25 36 Vue.component(ColorsPanel.name, ColorsPanel)
... ...
front-end/h5/src/main.js
... ... @@ -3,29 +3,7 @@ import App from &#39;./App.vue&#39;
3 3 import router from './router'
4 4 import store from './store/'
5 5 import i18n from './locales'
6   -// import './registerServiceWorker'
7   -// import ElementUI from 'element-ui'
8   -import { ColorPicker, Button } from 'element-ui'
9   -import Antd from 'ant-design-vue'
10   -
11   -// import 'element-ui/lib/theme-chalk/index.css'
12   -import 'ant-design-vue/dist/antd.css'
13   -// !#zh 请注意,务必使用 font-awesome@4.7.0 版本
14   -import 'font-awesome/css/font-awesome.min.css'
15   -import vClickOutside from 'v-click-outside'
16   -
17   -Vue.config.productionTip = false
18   -Vue.use(Antd)
19   -Vue.use(vClickOutside)
20   -
21   -/**
22   - * #!en import element-ui color picker for bgcolor、color, because a-input(ant-design-vue) component do not support alpha
23   - * #!zh 引入 element-ui 颜色选择器,因为 ant-design-vue 没有提供颜色选择器,默认的 <a-input type="color" /> 不支持选择透明度
24   - *
25   - * https://github.com/ly525/luban-h5/issues/105
26   - */
27   -Vue.component(Button.name, Button)
28   -Vue.component(ColorPicker.name, ColorPicker)
  6 +import './plugins/index'
29 7  
30 8 new Vue({
31 9 router,
... ...
front-end/h5/src/plugins/index.js 0 → 100644
  1 +import Vue from 'vue'
  2 +import Antd from 'ant-design-vue'
  3 +import 'ant-design-vue/dist/antd.css'
  4 +// !#zh 请注意,务必使用 font-awesome@4.7.0 版本
  5 +import 'font-awesome/css/font-awesome.min.css'
  6 +Vue.use(Antd)
... ...
front-end/h5/src/registerServiceWorker.js deleted 100644 → 0
1   -/* eslint-disable no-console */
2   -
3   -// import { register } from 'register-service-worker'
4   -
5   -// if (process.env.NODE_ENV === 'production') {
6   -// register(`${process.env.BASE_URL}service-worker.js`, {
7   -// ready () {
8   -// console.log(
9   -// 'App is being served from cache by a service worker.\n' +
10   -// 'For more details, visit https://goo.gl/AFskqB'
11   -// )
12   -// },
13   -// registered () {
14   -// console.log('Service worker has been registered.')
15   -// },
16   -// cached () {
17   -// console.log('Content has been cached for offline use.')
18   -// },
19   -// updatefound () {
20   -// console.log('New content is downloading.')
21   -// },
22   -// updated () {
23   -// console.log('New content is available; please refresh.')
24   -// },
25   -// offline () {
26   -// console.log('No internet connection found. App is running in offline mode.')
27   -// },
28   -// error (error) {
29   -// console.error('Error during service worker registration:', error)
30   -// }
31   -// })
32   -// }