message-views-template
Version:
+ 一个会话视图、朋友圈、微信收藏的 视图模板,只需要 写好自己数据结构的适配层,然后以props传入 即可。 + 项目刚开始开发,很多事件和需求并不完善; + 项目主要于公司业务,用于展示市面上大多数社交app的会话视图和朋友圈,的通用展示解决方案;
39 lines (31 loc) • 1.06 kB
JavaScript
import conversation from "./components/messagebody/conversation.vue";
import messagebody from "./components/messagebody/messagebody.vue";
import collection from "./components/messagebody/collection.vue";
import collectbody from "./components/messagebody/collectbody.vue";
import packge from "../package.json";
export function install(Vue) {
Vue.component("conversation", conversation);
Vue.component("messagebody", messagebody);
Vue.component("collection", collection);
Vue.component("collectbody", collectbody);
}
export { conversation, messagebody, collection, collectbody };
/* -- Plugin definition & Auto-install -- */
/* You shouldn't have to modify the code below */
// Plugin
const plugin = {
/* eslint-disable no-undef */
version: packge.version,
install
};
export default plugin;
// Auto-install
let GlobalVue = null;
if (typeof window !== "undefined") {
GlobalVue = window.Vue;
} else if (typeof global !== "undefined") {
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
}