123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- import {
- /* eslint-disable no-unused-vars */
- Style,
- // locale
- Locale,
- // basic
- Button,
- Loading,
- Tip,
- Toolbar,
- TabBar,
- TabPanels,
- // form
- Checkbox,
- CheckboxGroup,
- Checker,
- Radio,
- RadioGroup,
- Input,
- Textarea,
- Select,
- Switch,
- Rate,
- Validator,
- Upload,
- Form,
- // popup
- Popup,
- Toast,
- Picker,
- CascadePicker,
- DatePicker,
- TimePicker,
- SegmentPicker,
- Dialog,
- ActionSheet,
- Drawer,
- ImagePreview,
- // scroll
- Scroll,
- Slide,
- IndexList,
- Swipe,
- Sticky,
- ScrollNav,
- ScrollNavBar,
- RecycleList,
- // module
- BetterScroll,
- createAPI
- } from './module'
- import { processComponentName } from './common/helpers/util'
- const components = [
- // locale
- Locale,
- // basic
- Button,
- Loading,
- Tip,
- Toolbar,
- TabBar,
- TabPanels,
- // form
- Checkbox,
- CheckboxGroup,
- Checker,
- Radio,
- RadioGroup,
- Input,
- Textarea,
- Select,
- Switch,
- Rate,
- Validator,
- Upload,
- Form,
- // popup
- Popup,
- Toast,
- Picker,
- CascadePicker,
- DatePicker,
- TimePicker,
- SegmentPicker,
- Dialog,
- ActionSheet,
- Drawer,
- ImagePreview,
- // scroll
- Scroll,
- Slide,
- IndexList,
- Swipe,
- Sticky,
- ScrollNav,
- ScrollNavBar,
- RecycleList
- ]
- function install(Vue) {
- if (install.installed) {
- return
- }
- install.installed = true
- components.forEach((Component) => {
- // ignore radio
- if (Component === Radio) {
- return
- }
- Component.install(Vue)
- })
- }
- const Cube = {
- /* eslint-disable no-undef */
- // version: __VERSION__,
- install,
- BScroll: BetterScroll,
- createAPI
- }
- components.forEach((Component) => {
- const name = processComponentName(Component, {
- firstUpperCase: true
- })
- Cube[name] = Component
- })
- if (typeof window !== 'undefined' && window.Vue) {
- window.Vue.use(install)
- }
- export default Cube
|