UNPKG

@cmstops/pro-compo

Version:

[物料平台文档中心](https://arco.design/docs/material/guide)

123 lines (122 loc) 5.72 kB
"use strict"; var vue = require("vue"); var webVue = require("@arco-design/web-vue"); var icon = require("@arco-design/web-vue/es/icon"); const _hoisted_1 = { key: 0, class: "empty-list" }; const _hoisted_2 = { key: 0, class: "message-list" }; const _hoisted_3 = { key: 0, class: "message-body" }; const _hoisted_4 = { class: "media-message-content" }; const _hoisted_5 = { class: "message-content" }; const _hoisted_6 = { class: "title" }; const _hoisted_7 = { key: 0 }; const _hoisted_8 = { class: "time" }; const _hoisted_9 = ["onClick"]; const _hoisted_10 = { class: "message-media-title" }; const _hoisted_11 = { class: "message-media-title-hover" }; const _hoisted_12 = { class: "action" }; const _sfc_main = vue.defineComponent({ __name: "list", props: { listType: {}, list: {}, isLoadingMore: { type: Boolean }, isNorMore: { type: Boolean } }, emits: ["loadMoreMsg"], setup(__props, { emit: __emit }) { const emits = __emit; const props = __props; const isEmptyList = vue.computed(() => { if (props.list.length === 0) { return true; } return false; }); const listData = vue.computed(() => { return props.list; }); const approvalStateMapText = vue.ref({ approval_msg: { label: "\u63D0\u4EA4\u4E86\u4E00\u9879\u5185\u5BB9\uFF0C\u5F85\u60A8\u5BA1\u6838", show_user_alias: true }, approval_submit_msg: { label: "\u63D0\u4EA4\u4E86\u4E00\u9879\u5185\u5BB9\uFF0C\u5F85\u60A8\u5BA1\u6838", show_user_alias: true }, approval_cc_msg: { label: "\u63D0\u4EA4\u4E86\u4E00\u9879\u5185\u5BB9\uFF0C\u6284\u9001\u7ED9\u60A8", show_user_alias: true }, approval_pass: { label: "\u60A8\u63D0\u4EA4\u4E86\u4E00\u9879\u5185\u5BB9\u5DF2\u5BA1\u6838\u901A\u8FC7" }, approval_fail: { label: "\u60A8\u63D0\u4EA4\u4E86\u4E00\u9879\u5185\u5BB9\u5BA1\u6838\u88AB\u9A73\u56DE" }, approval_retrial: { label: "\u60A8\u63D0\u4EA4\u4E86\u4E00\u9879\u5185\u5BB9\u5BA1\u6838\u88AB\u9A73\u56DE\u91CD\u5BA1" }, attachment_reminder: { label: "\u7D20\u6750\u901A\u77E5" }, notice_user_update_pwd: { label: "\u8D26\u53F7\u5B89\u5168\u901A\u77E5" }, license_expire_notice: { label: "license\u8FC7\u671F\u63D0\u9192" } }); const openApprovalDetail = (msg) => { }; const handleScroll = (e) => { e && e.stopPropagation(); if (e.target) { const { scrollTop, scrollHeight, clientHeight } = e.target; if (scrollTop + clientHeight >= scrollHeight) { if (props.isLoadingMore === false && !props.isNorMore) { emits("loadMoreMsg", props.listType); } } } }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [ isEmptyList.value === true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [ vue.createVNode(vue.unref(webVue.Empty)) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(vue.unref(webVue.Scrollbar), { class: "msg-scroll-bar", onScroll: handleScroll }, { default: vue.withCtx(() => [ listData.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_2, [ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(listData.value, (item) => { var _a, _b; return vue.openBlock(), vue.createElementBlock("li", { key: "list_" + item.msg.nid, class: "message-item" }, [ vue.createCommentVNode(" \u901A\u77E5\u5185\u5BB9 "), item.msg ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [ vue.createElementVNode("div", _hoisted_4, [ vue.createElementVNode("div", _hoisted_5, [ vue.createElementVNode("span", _hoisted_6, [ ((_a = approvalStateMapText.value[item.msg.t]) == null ? void 0 : _a.show_user_alias) || "\u672A\u77E5\u63D0\u9192" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7, vue.toDisplayString(item.msg.alias), 1)) : vue.createCommentVNode("v-if", true), vue.createTextVNode(" " + vue.toDisplayString(((_b = approvalStateMapText.value[item.msg.t]) == null ? void 0 : _b.label) || "\u672A\u77E5\u6807\u9898"), 1) ]), vue.createElementVNode("span", _hoisted_8, vue.toDisplayString(item.msg.time), 1) ]), vue.createElementVNode("div", { class: "message-info", onClick: vue.withModifiers(($event) => openApprovalDetail(item.msg), ["stop"]) }, [ vue.createElementVNode("div", _hoisted_10, [ vue.createCommentVNode(' <FileTypeIcons\n class="icon"\n :file-type="item.msg.catalog"\n :doc-type="item.msg.series"\n ></FileTypeIcons> '), vue.createElementVNode("span", _hoisted_11, vue.toDisplayString(item.msg.title), 1) ]), vue.createElementVNode("div", _hoisted_12, [ vue.createVNode(vue.unref(icon.IconRight)) ]) ], 8, _hoisted_9) ]) ])) : vue.createCommentVNode("v-if", true) ]); }), 128)) ])) : vue.createCommentVNode("v-if", true) ]), _: 1 }) ], 64); }; } }); module.exports = _sfc_main;