Closed zhangzilong1992 closed 5 years ago
<template>
<van-notify id="van-notify" />
</template>
<script>
import Notify from 'vant-weapp/dist/notify/notify'
export default {
config: {
usingComponents: {
'van-notify': '/static/vant-weapp/dist/notify/index'
}
},
mounted() {
Notify('通知内容')
}
}
</script>
0.1.3 版的 mpvue-config-loader 搭配相应的 webpack 配置修改 https://github.com/F-loat/mpvue-quickstart/commit/b828586223a6ac9bf5d735c898808f7f5b4b89da ,可实现以下写法
<template>
<van-notify id="van-notify" />
</template>
<script>
import Notify from 'vant-weapp/dist/notify/notify'
export default {
config: {
usingComponents: {
'van-notify': 'vant-weapp/dist/notify/index'
}
},
mounted() {
Notify('通知内容')
}
}
</script>
请问一下vant-weapp类似notify如何使用,非组件