优化页面
This commit is contained in:
@@ -1,94 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
require("../../../../adapter-vue.js");
|
||||
const common_assets = require("../../../../../common/assets.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
const TUIKit_components_TUIChat_emojiConfig_index = require("../../emoji-config/index.js");
|
||||
if (!Math) {
|
||||
Icon();
|
||||
}
|
||||
const Icon = () => "../../../common/Icon.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
displayType: { default: "editor" }
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const TYPES = common_vendor.qt.TYPES;
|
||||
const quoteMessage = common_vendor.ref();
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.Jt.watch(common_vendor.o.CHAT, {
|
||||
quoteMessage: onQuoteMessageUpdated
|
||||
});
|
||||
});
|
||||
common_vendor.onUnmounted(() => {
|
||||
common_vendor.Jt.unwatch(common_vendor.o.CHAT, {
|
||||
quoteMessage: onQuoteMessageUpdated
|
||||
});
|
||||
});
|
||||
const quoteContentText = common_vendor.computed(() => {
|
||||
var _a, _b;
|
||||
let _quoteContentText;
|
||||
switch ((_a = quoteMessage.value) == null ? void 0 : _a.type) {
|
||||
case TYPES.MSG_TEXT:
|
||||
_quoteContentText = TUIKit_components_TUIChat_emojiConfig_index.transformTextWithKeysToEmojiNames((_b = quoteMessage.value.payload) == null ? void 0 : _b.text);
|
||||
break;
|
||||
case TYPES.MSG_IMAGE:
|
||||
_quoteContentText = common_vendor.Wt.t("TUIChat.图片");
|
||||
break;
|
||||
case TYPES.MSG_AUDIO:
|
||||
_quoteContentText = common_vendor.Wt.t("TUIChat.语音");
|
||||
break;
|
||||
case TYPES.MSG_VIDEO:
|
||||
_quoteContentText = common_vendor.Wt.t("TUIChat.视频");
|
||||
break;
|
||||
case TYPES.MSG_FILE:
|
||||
_quoteContentText = common_vendor.Wt.t("TUIChat.文件");
|
||||
break;
|
||||
case TYPES.MSG_CUSTOM:
|
||||
_quoteContentText = common_vendor.Wt.t("TUIChat.自定义");
|
||||
break;
|
||||
case TYPES.MSG_FACE:
|
||||
_quoteContentText = common_vendor.Wt.t("TUIChat.表情");
|
||||
break;
|
||||
case TYPES.MSG_MERGER:
|
||||
_quoteContentText = common_vendor.Wt.t("TUIChat.聊天记录");
|
||||
break;
|
||||
default:
|
||||
_quoteContentText = common_vendor.Wt.t("TUIChat.消息");
|
||||
break;
|
||||
}
|
||||
return _quoteContentText;
|
||||
});
|
||||
function cancelQuote() {
|
||||
common_vendor.Jt.update(common_vendor.o.CHAT, "quoteMessage", { message: void 0, type: "quote" });
|
||||
}
|
||||
function onQuoteMessageUpdated(options) {
|
||||
if ((options == null ? void 0 : options.message) && (options == null ? void 0 : options.type) === "quote") {
|
||||
quoteMessage.value = options.message;
|
||||
} else {
|
||||
quoteMessage.value = void 0;
|
||||
}
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: Boolean(common_vendor.unref(quoteMessage)) && props.displayType !== "audio"
|
||||
}, Boolean(common_vendor.unref(quoteMessage)) && props.displayType !== "audio" ? {
|
||||
b: common_vendor.t(common_vendor.unref(quoteMessage).nick || common_vendor.unref(quoteMessage).from),
|
||||
c: common_vendor.t(common_vendor.unref(quoteContentText)),
|
||||
d: common_vendor.o$1(cancelQuote),
|
||||
e: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.closeIcon$2),
|
||||
width: "11px",
|
||||
height: "11px"
|
||||
}),
|
||||
f: common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? 1 : "",
|
||||
g: common_vendor.unref(TUIKit_utils_env.isH5) ? 1 : ""
|
||||
} : {});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-0be2008a"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input/message-input-quote/index.js.map
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../../common/Icon"
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<view wx:if="{{a}}" class="{{['data-v-0be2008a', 'input-quote-container', f && 'input-quote-container-uni', g && 'input-quote-container-h5']}}"><view class="input-quote-content data-v-0be2008a"><view class="max-one-line data-v-0be2008a">{{b}}: {{c}}</view><icon wx:if="{{e}}" class="input-quote-close-icon data-v-0be2008a" bindonClick="{{d}}" u-i="0be2008a-0" bind:__l="__l" u-p="{{e}}"/></view></view>
|
||||
@@ -1,59 +0,0 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.input-quote-container-h5.data-v-0be2008a, .input-quote-container-uni.data-v-0be2008a, .input-quote-container.data-v-0be2008a {
|
||||
margin: 5px 100px 5px 8px;
|
||||
display: flex;
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
.input-quote-container-h5 .input-quote-content.data-v-0be2008a, .input-quote-container-uni .input-quote-content.data-v-0be2008a, .input-quote-container .input-quote-content.data-v-0be2008a {
|
||||
display: flex;
|
||||
flex: 0 1 auto;
|
||||
background-color: #fafafa;
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
font-size: 12px;
|
||||
align-items: center;
|
||||
line-height: 16px;
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-width: 0;
|
||||
}
|
||||
.input-quote-container-h5 .input-quote-content .max-one-line.data-v-0be2008a, .input-quote-container-uni .input-quote-content .max-one-line.data-v-0be2008a, .input-quote-container .input-quote-content .max-one-line.data-v-0be2008a {
|
||||
flex: 0 1 auto;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.input-quote-container-h5 .input-quote-close-icon.data-v-0be2008a, .input-quote-container-uni .input-quote-close-icon.data-v-0be2008a, .input-quote-container .input-quote-close-icon.data-v-0be2008a {
|
||||
margin-left: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
.input-quote-container-uni.data-v-0be2008a {
|
||||
margin: 5px 60px 0 30px;
|
||||
}
|
||||
.input-quote-container-h5.data-v-0be2008a {
|
||||
margin: 5px 0 0;
|
||||
}
|
||||
Reference in New Issue
Block a user