Skip to content

Instantly share code, notes, and snippets.

@foreverplay
Created July 26, 2018 08:56
Show Gist options
  • Save foreverplay/be2d50bbc6f0d80b86ec69a21a620dd8 to your computer and use it in GitHub Desktop.
Save foreverplay/be2d50bbc6f0d80b86ec69a21a620dd8 to your computer and use it in GitHub Desktop.
按需引入组件时,message、notification等会自动弹出
import { Button, Notification, Row, Col, Collapse, CollapseItem } from 'element-ui'
Vue.component(Button.name, Button)
Vue.component(Notification.name, Notification)
Vue.component(Row.name, Row)
Vue.component(Col.name, Col)
Vue.component(CollapseItem.name, CollapseItem)
Vue.component(Collapse.name, Collapse)
Vue.prototype.$notify = Notification
//使用Vue.use(Notification)也会直接弹出提示框
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment