wecui
Version:
一款基于Vue2.x版本的移动端web组件
78 lines (70 loc) • 2.19 kB
JavaScript
/* Automatically generated by './build/bin/new.js' */
import Button from '../packages/button/index.js'
import Header from '../packages/header/index.js'
import Tabbar from '../packages/tabbar/index.js'
import TabItem from '../packages/tab-item/index.js'
import TabContainer from '../packages/tab-container/index.js'
import TabContainerItem from '../packages/tab-container-item/index.js'
import Navbar from '../packages/navbar/index.js'
import Cell from '../packages/cell/index.js'
import Search from '../packages/search/index.js'
import Switch from '../packages/switch/index.js'
import Radio from '../packages/radio/index.js'
import Checklist from '../packages/checklist/index.js'
import Field from '../packages/field/index.js'
import Toast from '../packages/toast/index.js'
import Indicator from '../packages/indicator/index.js'
import Spinner from '../packages/spinner/index.js'
import MessageBox from '../packages/message-box/index.js'
import Actionsheet from '../packages/actionsheet/index.js'
import Popup from '../packages/popup/index.js'
import Swipe from '../packages/swipe/index.js'
import SwipeItem from '../packages/swipe-item/index.js'
import Range from '../packages/range/index.js'
import Picker from '../packages/picker/index.js'
import DatetimePicker from '../packages/datetime-picker/index.js'
import Container from '../packages/container/index.js'
const components = [
Button,
Header,
Tabbar,
TabItem,
TabContainer,
TabContainerItem,
Navbar,
Cell,
Search,
Switch,
Radio,
Checklist,
Field,
Spinner,
Actionsheet,
Popup,
Swipe,
SwipeItem,
Range,
Picker,
DatetimePicker,
Container
]
// 提供plugins的install方法
const install = function (Vue, opt = {}) {
// if (install.installed) return
components.map(component => {
Vue.component(component.name, component)
})
// js componet
Vue.$toast = Vue.prototype.$toast = Toast
Vue.$indicator = Vue.prototype.$indicator = Indicator
Vue.$messagebox = Vue.prototype.$messagebox = MessageBox
}
if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue)
}
// install()
module.exports = {
install,
...components
}
module.exports.default = module.exports