/* * @Author: 小明丶 * @Date: 2019-08-15 10:40:29 * @LastEditors: 小明丶 * @LastEditTime: 2019-09-02 09:38:20 * @Description: 注册want组件 */ import { Button, Swipe, SwipeItem, Dialog, Checkbox, CheckboxGroup, Search, Icon, NumberKeyboard, Notify, Loading, Popup, Picker, Tabbar, TabbarItem, NavBar, Cell, CellGroup, RadioGroup, Radio, Area, Field, Collapse, CollapseItem, DatetimePicker, Toast, List, Switch,ActionSheet,Grid, GridItem } from 'vant'; let arr = [ Button, Swipe, SwipeItem, Dialog, Checkbox, CheckboxGroup, Search, Icon, NumberKeyboard, Notify, Loading, Popup, Picker, Tabbar, TabbarItem, NavBar, Cell, CellGroup, RadioGroup, Radio, Area, Field, Collapse, CollapseItem, DatetimePicker, Toast, List, Switch,ActionSheet,Grid, GridItem ] // Notify.setDefaultOptions({ // background: '#896EDB' // }) export default { install(Vue, opt) { arr.forEach(item => { Vue.use(item) }) // Vue.prototype.$notify = (text) => { // Notify({ // message: text, // background: 'red' // }) // } Vue.prototype.$notify_success = (text) => { Notify({ message: text, background: '#1989fa' }) } } }