Commit f1ea1b7539a044e8aa5eeae351ff641be7622527
1 parent
9c203a49
refactor: move colorPicker to support folder
Showing
5 changed files
with
23 additions
and
60 deletions
front-end/h5/package.json
| @@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
| 16 | "dependencies": { | 16 | "dependencies": { |
| 17 | "@luban-h5/lbc-button": "^0.0.3", | 17 | "@luban-h5/lbc-button": "^0.0.3", |
| 18 | "@luban-h5/lbp-slide": "^0.0.7", | 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 | "@luban-h5/plugin-common-props": "0.2.7", | 20 | "@luban-h5/plugin-common-props": "0.2.7", |
| 21 | "animate.css": "^3.7.2", | 21 | "animate.css": "^3.7.2", |
| 22 | "ant-design-vue": "^1.3.14", | 22 | "ant-design-vue": "^1.3.14", |
front-end/h5/src/components/core/support/index.js
| @@ -2,13 +2,16 @@ | @@ -2,13 +2,16 @@ | ||
| 2 | * @Author: ly525 | 2 | * @Author: ly525 |
| 3 | * @Date: 2019-12-01 18:11:50 | 3 | * @Date: 2019-12-01 18:11:50 |
| 4 | * @LastEditors: ly525 | 4 | * @LastEditors: ly525 |
| 5 | - * @LastEditTime: 2020-01-12 20:42:55 | 5 | + * @LastEditTime: 2020-10-11 10:09:44 |
| 6 | * @FilePath: /luban-h5/front-end/h5/src/components/core/support/index.js | 6 | * @FilePath: /luban-h5/front-end/h5/src/components/core/support/index.js |
| 7 | * @Github: https://github.com/ly525/luban-h5 | 7 | * @Github: https://github.com/ly525/luban-h5 |
| 8 | - * @Description: Do not edit | 8 | + * @Description: |
| 9 | + * - register-global-support-component | ||
| 10 | + * - 注册全局支撑类组件,比如颜色选择器、文字对齐 等等 | ||
| 11 | + * | ||
| 9 | * @Copyright 2018 - 2019 luban-h5. All Rights Reserved | 12 | * @Copyright 2018 - 2019 luban-h5. All Rights Reserved |
| 10 | */ | 13 | */ |
| 11 | -// register-global-support-component | 14 | + |
| 12 | import Vue from 'vue' | 15 | import Vue from 'vue' |
| 13 | import PropMultiTextItemsEditor from './prop-multi-items-editor/text.js' | 16 | import PropMultiTextItemsEditor from './prop-multi-items-editor/text.js' |
| 14 | import ImageGallery from './image-gallery/gallery.js' | 17 | import ImageGallery from './image-gallery/gallery.js' |
| @@ -16,10 +19,18 @@ import VideoGallery from './video-gallery/gallery.js' | @@ -16,10 +19,18 @@ import VideoGallery from './video-gallery/gallery.js' | ||
| 16 | import LbsExcelEditor from './excel' | 19 | import LbsExcelEditor from './excel' |
| 17 | import ColorsPanel from './colors-panel' | 20 | import ColorsPanel from './colors-panel' |
| 18 | import LbpTextAlign from '@luban-h5/lbs-text-align' | 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 | Vue.component(PropMultiTextItemsEditor.name, PropMultiTextItemsEditor) | 31 | Vue.component(PropMultiTextItemsEditor.name, PropMultiTextItemsEditor) |
| 21 | Vue.component(ImageGallery.name, ImageGallery) | 32 | Vue.component(ImageGallery.name, ImageGallery) |
| 22 | Vue.component(VideoGallery.name, VideoGallery) | 33 | Vue.component(VideoGallery.name, VideoGallery) |
| 23 | -Vue.component('lbs-text-align', LbpTextAlign) | 34 | +Vue.component(LbpTextAlign.name, LbpTextAlign) |
| 24 | Vue.component(LbsExcelEditor.name, LbsExcelEditor) | 35 | Vue.component(LbsExcelEditor.name, LbsExcelEditor) |
| 25 | Vue.component(ColorsPanel.name, ColorsPanel) | 36 | Vue.component(ColorsPanel.name, ColorsPanel) |
front-end/h5/src/main.js
| @@ -3,29 +3,7 @@ import App from './App.vue' | @@ -3,29 +3,7 @@ import App from './App.vue' | ||
| 3 | import router from './router' | 3 | import router from './router' |
| 4 | import store from './store/' | 4 | import store from './store/' |
| 5 | import i18n from './locales' | 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 | new Vue({ | 8 | new Vue({ |
| 31 | router, | 9 | router, |
front-end/h5/src/plugins/index.js
0 → 100644
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 | -// } |