refactor: export

This commit is contained in:
xiaojunnuo
2021-02-09 18:05:01 +08:00
parent a9b6e87249
commit c3e374e6e5
8 changed files with 52 additions and 23 deletions
+7 -9
View File
@@ -22,7 +22,6 @@ import {
LocaleProvider,
Modal,
Radio,
Rate,
Row,
Select,
Switch,
@@ -61,7 +60,6 @@ const list = {
TimePicker,
Modal,
Radio,
Rate,
Row,
Select,
Switch,
@@ -77,14 +75,14 @@ const list = {
export default function (app) {
_.forEach(list, item => {
app.use(item)
//
// app.config.globalProperties.$message = message
// app.config.globalProperties.$notification = notification
app.config.globalProperties.$info = Modal.info
app.config.globalProperties.$success = Modal.success
app.config.globalProperties.$error = Modal.error
app.config.globalProperties.$warning = Modal.warning
app.config.globalProperties.$confirm = Modal.confirm
app.config.globalProperties.$destroyAll = Modal.destroyAll
// app.config.globalProperties.$info = Modal.info
// app.config.globalProperties.$success = Modal.success
// app.config.globalProperties.$error = Modal.error
// app.config.globalProperties.$warning = Modal.warning
// app.config.globalProperties.$confirm = Modal.confirm
// app.config.globalProperties.$destroyAll = Modal.destroyAll
})
}
+2 -4
View File
@@ -55,10 +55,8 @@ export function errorLog (error) {
// 打印到控制台
console.log(error)
// 显示提示
notification({
message: error.message,
type: 'error',
duration: 5 * 1000
notification.error({
message: error.message
})
}