使用
import {
SilentMessage,
AppointmentMessage,
ImageTextMessage,
LocationMessage,
VideoMessage,
TemplateMessage,
MultipleImageTextMessage,
OrderMessage
} from '@degon/im-custom-message'
Vue
.use(SilentMessage)
.use(AppointmentMessage)
.use(ImageTextMessage)
.use(VideoMessage)
.use(TemplateMessage)
.use(MultipleImageTextMessage)
.use(OrderMessage)
.use(LocationMessage, {
maps: {
qqmap: ''
}
})
注意:小程序和app端需在main.js引入组件全局注册, 组件名为组件的name属性
import SilentMessage from '@degon/im-custom-message/lib/silent-message/index.vue'
import AppointmentMessage from '@degon/im-custom-message/lib/appointment-message/index.vue'
import ImageTextMessage from '@degon/im-custom-message/lib/activity-message/index.vue'
import LocationMessage from '@degon/im-custom-message/lib/activity-message/index.vue'
import VideoMessage from '@degon/im-custom-message/lib/video-message/index.vue'
import TemplateMessage from '@degon/im-custom-message/lib/template-message/index.vue'
import MultipleImageTextMessage from '@degon/im-custom-message/lib/multiple-image-text-message/index.vue'
import OrderMessage from '@degon/im-custom-message/lib/order-message/index.vue'
Vue.component('SilentMsg', SilentMessage)
Vue.component('AppointmentMsg', AppointmentMessage)
Vue.component('ImageTextMsg', ImageTextMessage)
Vue.component('LocationMsg', LocationMessage)
Vue.component('VideoMsg', VideoMessage)
Vue.component('TemplateMsg', TemplateMessage)
Vue.component('MultipleImageTextMsg', MultipleImageTextMessage)
Vue.component('OrderMessage', OrderMessage)