wh_components
Version:
郭炜恒的vue组件库
68 lines (58 loc) • 1.69 kB
JavaScript
import Button from '../package/Button/index.js'
import Backtop from '../package/Backtop/index.js'
import Tip from '../package/Tip/index.js'
import Confirm from '../package/Confirm/index.js'
import Radio from '../package/Radio/index.js'
import Check from '../package/Check/index.js'
import Mark from '../package/Mark/index.js'
import Input from '../package/Input/index.js'
import Dropdown from '../package/Dropdown/index.js'
import Switch from '../package/Switch/index.js'
import Unfind from '../package/Unfind/index.js'
import Loading from '../package/Loading/index.js'
import Table from '../package/Table/index.js'
import Spearer from '../package/Spearer/index.js'
import Popup from '../package/Popup/index.js'
import Menu from '../package/Menu/index.js'
import Icon from '../package/Icon/index.js'
import Spantip from '../package/Spantip/index.js'
import Collapsible from '../package/Collapsible/index.js'
import Preview from '../package/Preview/index.js'
import Skeleton from '../package/Skeleton/index.js'
import Datepicker from '../package/Datepicker/index.js'
// 动画样式
import '../wh_animation.css'
import '../iconfont.css'
const components = [
Button,
Backtop,
Radio,
Check,
Mark,
Input,
Dropdown,
Switch,
Unfind,
Table,
Spearer,
Popup,
Menu,
Icon,
Spantip,
Collapsible,
Preview,
Skeleton,
Datepicker
]
const install = function(Vue) {
components.forEach(component => {
Vue.component(component.name, component);
});
Vue.prototype.$tip = Tip
Vue.prototype.$confirm = Confirm
Vue.prototype.$loading = Loading
}
if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
}
export default { install }