消息
This commit is contained in:
4
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/index.js
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/index.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
const TUIKit_components_index = require("../index.js");
|
||||
wx.createPage(TUIKit_components_index.MiniProgramPage$4);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/index.js.map
|
||||
9
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/index.json
vendored
Normal file
9
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/index.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "聊天记录",
|
||||
"usingComponents": {
|
||||
"search-input": "./search-input/index",
|
||||
"search-container": "./search-container/index",
|
||||
"search-result": "./search-result/index",
|
||||
"search-more": "./search-more/index"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view wx:if="{{a}}" class="{{['data-v-fdde69b1', 'tui-search', q, r, s]}}"><view wx:if="{{b}}" ref="globalSearchRef" class="{{['data-v-fdde69b1', 'tui-search-global', j]}}"><view class="{{['data-v-fdde69b1', 'tui-search-global-header', f]}}"><search-input wx:if="{{c}}" class="search-input data-v-fdde69b1" u-i="fdde69b1-0" bind:__l="__l" u-p="{{c}}"/><search-more wx:if="{{d}}" class="search-more data-v-fdde69b1" u-i="fdde69b1-1" bind:__l="__l" u-p="{{e}}"/></view><search-container wx:if="{{g}}" u-s="{{['result']}}" class="search-container data-v-fdde69b1" u-i="fdde69b1-2" bind:__l="__l" u-p="{{i}}"><search-result class="search-result data-v-fdde69b1" u-i="fdde69b1-3,fdde69b1-2" bind:__l="__l" u-p="{{h}}" slot="result"/></search-container></view><view wx:elif="{{k}}" class="{{['data-v-fdde69b1', 'tui-search-conversation', p]}}"><search-container wx:if="{{o}}" u-s="{{['input','result']}}" class="search-container data-v-fdde69b1" bindcloseInConversationSearch="{{n}}" u-i="fdde69b1-4" bind:__l="__l" u-p="{{o}}"><search-input class="data-v-fdde69b1" u-i="fdde69b1-5,fdde69b1-4" bind:__l="__l" u-p="{{l}}" slot="input"/><search-result class="search-result data-v-fdde69b1" u-i="fdde69b1-6,fdde69b1-4" bind:__l="__l" u-p="{{m}}" slot="result"/></search-container></view></view>
|
||||
129
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/index.wxss
vendored
Normal file
129
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/index.wxss
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-fdde69b1, div.data-v-fdde69b1, ul.data-v-fdde69b1, ol.data-v-fdde69b1, dt.data-v-fdde69b1, dd.data-v-fdde69b1, li.data-v-fdde69b1, dl.data-v-fdde69b1, h1.data-v-fdde69b1, h2.data-v-fdde69b1, h3.data-v-fdde69b1, h4.data-v-fdde69b1, p.data-v-fdde69b1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-fdde69b1, ul.data-v-fdde69b1, li.data-v-fdde69b1 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-fdde69b1 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-fdde69b1 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-fdde69b1 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-fdde69b1 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-fdde69b1:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-fdde69b1, textarea.data-v-fdde69b1 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-fdde69b1:focus, input.data-v-fdde69b1:active, textarea.data-v-fdde69b1:focus, textarea.data-v-fdde69b1:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-fdde69b1 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.tui-search-main-global.data-v-fdde69b1 {
|
||||
width: 100%;
|
||||
height: -webkit-fit-content;
|
||||
height: fit-content;
|
||||
}
|
||||
.tui-search-main-conversation.data-v-fdde69b1 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 10px 0 rgba(2, 16, 43, 0.15);
|
||||
}
|
||||
.tui-search .tui-search-global-header.data-v-fdde69b1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tui-search .tui-search-conversation.data-v-fdde69b1 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-search-h5-full-screen.data-v-fdde69b1 {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 1000;
|
||||
background: #fff;
|
||||
}
|
||||
.tui-search-h5-global.data-v-fdde69b1, .tui-search-h5-conversation.data-v-fdde69b1 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tui-search-h5-conversation.data-v-fdde69b1 {
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-search-h5.tui-search-main-conversation.data-v-fdde69b1 {
|
||||
box-shadow: none;
|
||||
}
|
||||
.tui-search-h5 .search-input.data-v-fdde69b1,
|
||||
.tui-search-h5 .search-container.data-v-fdde69b1,
|
||||
.tui-search-h5 .search-result.data-v-fdde69b1 {
|
||||
min-width: 0;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
4
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/index2.js
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/index2.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
const TUIKit_components_index = require("../index.js");
|
||||
wx.createPage(TUIKit_components_index.MiniProgramPage$4);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/index2.js.map
|
||||
206
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-container/index.js
vendored
Normal file
206
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-container/index.js
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
require("../../../adapter-vue.js");
|
||||
const TUIKit_components_TUISearch_searchTypeList = require("../search-type-list.js");
|
||||
const TUIKit_components_TUISearch_searchTimeList = require("../search-time-list.js");
|
||||
const common_assets = require("../../../../common/assets.js");
|
||||
const TUIKit_utils_env = require("../../../utils/env.js");
|
||||
if (!Math) {
|
||||
(Icon + DatePicker)();
|
||||
}
|
||||
const Icon = () => "../../common/Icon.js";
|
||||
const DatePicker = () => "../../common/DatePicker/index.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
popupPosition: {
|
||||
type: String,
|
||||
// "bottom" / "aside"
|
||||
default: "bottom"
|
||||
},
|
||||
searchType: {
|
||||
type: String,
|
||||
default: "global",
|
||||
// "global" / "conversation"
|
||||
validator(value) {
|
||||
return ["global", "conversation"].includes(value);
|
||||
}
|
||||
}
|
||||
},
|
||||
emits: ["searchConfigChange", "closeInConversationSearch"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const props = __props;
|
||||
const emits = __emit;
|
||||
const searchTypeList = common_vendor.computed(
|
||||
() => (props == null ? void 0 : props.searchType) === "conversation" ? TUIKit_components_TUISearch_searchTypeList.conversationSearchTypeList : TUIKit_components_TUISearch_searchTypeList.globalSearchTypeList
|
||||
);
|
||||
const currentSearchMessageType = common_vendor.ref(TUIKit_components_TUISearch_searchTypeList.searchMessageTypeDefault[props == null ? void 0 : props.searchType]);
|
||||
const currentSearchMessageTime = common_vendor.ref(TUIKit_components_TUISearch_searchTimeList.searchMessageTimeDefault);
|
||||
const isTimeTabsShow = common_vendor.computed(() => {
|
||||
return currentSearchMessageType.value.key !== "contact" && currentSearchMessageType.value.key !== "group";
|
||||
});
|
||||
const datePickerRangeDisplayType = common_vendor.computed(
|
||||
() => TUIKit_utils_env.isPC && props.searchType === "global" && !TUIKit_utils_env.isUniFrameWork ? "two" : "one"
|
||||
);
|
||||
const isDatePickerShow = common_vendor.ref(false);
|
||||
function onCurrentSearchMessageTypeChange(typeObject) {
|
||||
if ((typeObject == null ? void 0 : typeObject.searchType) === (props == null ? void 0 : props.searchType)) {
|
||||
currentSearchMessageType.value = (typeObject == null ? void 0 : typeObject.value) || TUIKit_components_TUISearch_searchTypeList.searchMessageTypeDefault[props == null ? void 0 : props.searchType];
|
||||
}
|
||||
}
|
||||
function onCurrentSearchMessageTimeChange(timeObject) {
|
||||
if ((timeObject == null ? void 0 : timeObject.searchType) === (props == null ? void 0 : props.searchType)) {
|
||||
currentSearchMessageTime.value = (timeObject == null ? void 0 : timeObject.value) || TUIKit_components_TUISearch_searchTimeList.searchMessageTimeDefault;
|
||||
}
|
||||
}
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.Jt.watch(common_vendor.o.SEARCH, {
|
||||
currentSearchMessageType: onCurrentSearchMessageTypeChange,
|
||||
currentSearchMessageTime: onCurrentSearchMessageTimeChange
|
||||
});
|
||||
});
|
||||
common_vendor.onUnmounted(() => {
|
||||
common_vendor.Jt.unwatch(common_vendor.o.SEARCH, {
|
||||
currentSearchMessageType: onCurrentSearchMessageTypeChange,
|
||||
currentSearchMessageTime: onCurrentSearchMessageTimeChange
|
||||
});
|
||||
});
|
||||
const selectSearchType = (item) => {
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchMessageType", {
|
||||
value: item,
|
||||
searchType: props.searchType
|
||||
});
|
||||
};
|
||||
const selectSearchTime = (item) => {
|
||||
if (isDatePickerShow.value && item.key === "all") {
|
||||
isDatePickerShow.value = false;
|
||||
} else {
|
||||
isDatePickerShow.value = false;
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchMessageTime", {
|
||||
value: item,
|
||||
searchType: props.searchType
|
||||
});
|
||||
}
|
||||
};
|
||||
const handleSelectAllTimeClicked = () => {
|
||||
var _a;
|
||||
if (((_a = currentSearchMessageTime.value) == null ? void 0 : _a.key) !== "all") {
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchMessageTime", {
|
||||
value: TUIKit_components_TUISearch_searchTimeList.searchMessageTimeDefault,
|
||||
searchType: props.searchType
|
||||
});
|
||||
} else {
|
||||
isDatePickerShow.value = true;
|
||||
}
|
||||
};
|
||||
const pickTimePeriod = (time) => {
|
||||
var _a, _b, _c;
|
||||
if (((_a = currentSearchMessageTime.value) == null ? void 0 : _a.key) === "all") {
|
||||
const { startDate, endDate } = time;
|
||||
const timePosition = Number((((_b = endDate == null ? void 0 : endDate.toDate()) == null ? void 0 : _b.getTime()) / 1e3).toFixed(0));
|
||||
const timePeriod = timePosition - Number((((_c = startDate == null ? void 0 : startDate.toDate()) == null ? void 0 : _c.getTime()) / 1e3).toFixed(0));
|
||||
const newSearchMessageTime = {
|
||||
key: currentSearchMessageTime.value.key,
|
||||
label: currentSearchMessageTime.value.label,
|
||||
value: {
|
||||
timePosition,
|
||||
timePeriod
|
||||
}
|
||||
};
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchMessageTime", {
|
||||
value: newSearchMessageTime,
|
||||
searchType: props.searchType
|
||||
});
|
||||
}
|
||||
};
|
||||
const clearTimePicker = () => {
|
||||
var _a;
|
||||
isDatePickerShow.value = false;
|
||||
if (((_a = currentSearchMessageTime.value) == null ? void 0 : _a.key) === "all") {
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchMessageTime", {
|
||||
value: TUIKit_components_TUISearch_searchTimeList.searchMessageTimeDefault,
|
||||
searchType: props.searchType
|
||||
});
|
||||
}
|
||||
};
|
||||
const closeSearchContainer = () => {
|
||||
emits("closeInConversationSearch");
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: props.searchType === "conversation" && !common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
|
||||
}, props.searchType === "conversation" && !common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? {
|
||||
b: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUISearch.搜索会话内容")),
|
||||
c: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.closeIcon$1),
|
||||
width: "14px",
|
||||
height: "14px"
|
||||
}),
|
||||
d: common_vendor.o$1(closeSearchContainer)
|
||||
} : {}, {
|
||||
e: common_vendor.f(common_vendor.unref(searchTypeList), (tabItem, tabKey, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`TUISearch.${tabItem.label}`)),
|
||||
b: tabKey,
|
||||
c: common_vendor.n(common_vendor.unref(currentSearchMessageType).key === tabItem.key && "tui-search-tabs-item-selected"),
|
||||
d: common_vendor.o$1(($event) => selectSearchType(tabItem), tabKey)
|
||||
};
|
||||
}),
|
||||
f: common_vendor.unref(isTimeTabsShow)
|
||||
}, common_vendor.unref(isTimeTabsShow) ? {
|
||||
g: common_vendor.f(common_vendor.unref(TUIKit_components_TUISearch_searchTimeList.searchMessageTimeList), (tabItem, tabKey, i0) => {
|
||||
return common_vendor.e({
|
||||
a: tabItem.key === "all"
|
||||
}, tabItem.key === "all" ? common_vendor.e({
|
||||
b: !common_vendor.unref(isDatePickerShow)
|
||||
}, !common_vendor.unref(isDatePickerShow) ? {
|
||||
c: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`TUISearch.选择时间`) + ": " + common_vendor.unref(common_vendor.Wt).t(`TUISearch.全部`)),
|
||||
d: "0764f731-1-" + i0,
|
||||
e: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.downSVG),
|
||||
width: "14px",
|
||||
height: "14px"
|
||||
}),
|
||||
f: common_vendor.o$1(handleSelectAllTimeClicked, tabKey)
|
||||
} : {}, {
|
||||
g: common_vendor.unref(isDatePickerShow)
|
||||
}, common_vendor.unref(isDatePickerShow) ? {
|
||||
h: common_vendor.o$1(pickTimePeriod, tabKey),
|
||||
i: "0764f731-2-" + i0,
|
||||
j: common_vendor.p({
|
||||
type: "range",
|
||||
rangeTableType: common_vendor.unref(datePickerRangeDisplayType)
|
||||
})
|
||||
} : {}, {
|
||||
k: common_vendor.o$1(() => {
|
||||
}, tabKey),
|
||||
l: common_vendor.unref(isDatePickerShow)
|
||||
}, common_vendor.unref(isDatePickerShow) ? {
|
||||
m: "0764f731-3-" + i0,
|
||||
n: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.closeIcon),
|
||||
width: "14px",
|
||||
height: "14px"
|
||||
}),
|
||||
o: common_vendor.o$1(clearTimePicker, tabKey)
|
||||
} : {}) : {
|
||||
p: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`TUISearch.${tabItem.label}`))
|
||||
}, {
|
||||
q: tabKey,
|
||||
r: common_vendor.n(common_vendor.unref(currentSearchMessageTime).key === tabItem.key && "tui-search-time-item-selected"),
|
||||
s: common_vendor.o$1(($event) => selectSearchTime(tabItem), tabKey)
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
h: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isPC) && `tui-search-container-${props.popupPosition}`),
|
||||
i: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-search-container-h5-main"),
|
||||
j: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-search-container-h5"),
|
||||
k: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isPC) && `container-${props.popupPosition}`),
|
||||
l: common_vendor.n(`container-${props.searchType}`)
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-0764f731"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-container/index.js.map
|
||||
7
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-container/index.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-container/index.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../common/Icon",
|
||||
"date-picker": "../../common/DatePicker/index"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-container/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-container/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-0764f731', 'tui-search-container', j, k, l]}}"><view class="{{['data-v-0764f731', h, i]}}"><view wx:if="{{a}}" class="tui-search-header data-v-0764f731"><view class="tui-search-header-title data-v-0764f731">{{b}}</view><view class="tui-search-header-close data-v-0764f731" bindtap="{{d}}"><icon wx:if="{{c}}" class="data-v-0764f731" u-i="0764f731-0" bind:__l="__l" u-p="{{c}}"/></view></view><view class="tui-search-tabs data-v-0764f731"><view wx:for="{{e}}" wx:for-item="tabItem" wx:key="b" class="{{['data-v-0764f731', 'tui-search-tabs-item', tabItem.c]}}" bindtap="{{tabItem.d}}">{{tabItem.a}}</view></view><slot name="input"/><view wx:if="{{f}}" class="tui-search-time data-v-0764f731"><view wx:for="{{g}}" wx:for-item="tabItem" wx:key="q" class="{{['data-v-0764f731', 'tui-search-time-item', tabItem.r]}}" bindtap="{{tabItem.s}}"><view wx:if="{{tabItem.a}}" class="tui-search-time-item-picker data-v-0764f731"><view wx:if="{{tabItem.b}}" class="tui-search-time-item-all data-v-0764f731" catchtap="{{tabItem.f}}">{{tabItem.c}} <icon wx:if="{{tabItem.e}}" class="data-v-0764f731" u-i="{{tabItem.d}}" bind:__l="__l" u-p="{{tabItem.e}}"/></view><view class="data-v-0764f731" catchtap="{{tabItem.k}}"><date-picker wx:if="{{tabItem.g}}" class="data-v-0764f731" bindpick="{{tabItem.h}}" u-i="{{tabItem.i}}" bind:__l="__l" u-p="{{tabItem.j}}"/></view><view wx:if="{{tabItem.l}}" class="tui-search-time-item-close data-v-0764f731" bindtap="{{tabItem.o}}"><icon wx:if="{{tabItem.n}}" class="icon data-v-0764f731" u-i="{{tabItem.m}}" bind:__l="__l" u-p="{{tabItem.n}}"/></view></view><view wx:else class="data-v-0764f731">{{tabItem.p}}</view></view></view><slot name="result"/></view></view>
|
||||
204
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-container/index.wxss
vendored
Normal file
204
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-container/index.wxss
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-0764f731, div.data-v-0764f731, ul.data-v-0764f731, ol.data-v-0764f731, dt.data-v-0764f731, dd.data-v-0764f731, li.data-v-0764f731, dl.data-v-0764f731, h1.data-v-0764f731, h2.data-v-0764f731, h3.data-v-0764f731, h4.data-v-0764f731, p.data-v-0764f731 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-0764f731, ul.data-v-0764f731, li.data-v-0764f731 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-0764f731 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-0764f731 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-0764f731 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-0764f731 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-0764f731:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-0764f731, textarea.data-v-0764f731 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-0764f731:focus, input.data-v-0764f731:active, textarea.data-v-0764f731:focus, textarea.data-v-0764f731:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-0764f731 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.container-bottom.data-v-0764f731 {
|
||||
margin: 0 10px;
|
||||
position: relative;
|
||||
}
|
||||
.container-conversation.data-v-0764f731 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-search-container-bottom.data-v-0764f731 {
|
||||
position: absolute;
|
||||
min-width: 400px;
|
||||
width: -webkit-fit-content;
|
||||
width: fit-content;
|
||||
height: 453px;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: rgba(0, 0, 0, 0.16) 0 3px 6px, rgba(0, 0, 0, 0.23) 0 3px 6px;
|
||||
left: 0;
|
||||
top: -5px;
|
||||
}
|
||||
.tui-search-container-aside.data-v-0764f731 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-search-container .tui-search-header.data-v-0764f731 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16px 20px 10px;
|
||||
}
|
||||
.tui-search-container .tui-search-header-title.data-v-0764f731 {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
line-height: 19.6px;
|
||||
font-family: "PingFang SC", sans-serif;
|
||||
}
|
||||
.tui-search-container .tui-search-header-close.data-v-0764f731 {
|
||||
cursor: pointer;
|
||||
}
|
||||
.tui-search-container .tui-search-tabs.data-v-0764f731 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.tui-search-container .tui-search-tabs-item.data-v-0764f731 {
|
||||
padding: 10px 0;
|
||||
margin: 0 10px;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tui-search-container .tui-search-tabs-item-selected.data-v-0764f731 {
|
||||
color: #007aff;
|
||||
border-bottom: 2px solid #007aff;
|
||||
}
|
||||
.tui-search-container .tui-search-time.data-v-0764f731 {
|
||||
width: 100%;
|
||||
height: 43px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.tui-search-container .tui-search-time-item.data-v-0764f731 {
|
||||
height: calc(100% - 20px);
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tui-search-container .tui-search-time-item-picker.data-v-0764f731 {
|
||||
display: flex;
|
||||
}
|
||||
.tui-search-container .tui-search-time-item-close.data-v-0764f731, .tui-search-container .tui-search-time-item-all.data-v-0764f731 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tui-search-container .tui-search-time-item-selected.data-v-0764f731 {
|
||||
background-color: rgba(0, 122, 255, 0.2);
|
||||
}
|
||||
.tui-search-container-h5.data-v-0764f731 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tui-search-container-h5 .tui-search-container-h5-main.data-v-0764f731 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tui-search-container-h5 .tui-search-container-h5-main .tui-search-tabs .tui-search-tabs-item.data-v-0764f731 {
|
||||
cursor: none;
|
||||
}
|
||||
.tui-search-container-h5 .tui-search-container-h5-main .tui-search-time.data-v-0764f731 {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
.tui-search-container-h5 .tui-search-container-h5-main .tui-search-time .tui-search-time-item.data-v-0764f731 {
|
||||
cursor: none;
|
||||
background-color: #fff;
|
||||
}
|
||||
.tui-search-container-h5 .tui-search-container-h5-main .tui-search-time .tui-search-time-item-selected.data-v-0764f731 {
|
||||
background-color: rgba(0, 122, 255, 0.2);
|
||||
}
|
||||
122
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-input/index.js
vendored
Normal file
122
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-input/index.js
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
"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");
|
||||
if (!Math) {
|
||||
Icon();
|
||||
}
|
||||
const Icon = () => "../../common/Icon.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: () => common_vendor.Wt.t("TUISearch.搜索")
|
||||
},
|
||||
searchType: {
|
||||
type: String,
|
||||
default: "global",
|
||||
// "global" / "conversation"
|
||||
validator(value) {
|
||||
return ["global", "conversation"].includes(value);
|
||||
}
|
||||
}
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const searchValueModel = common_vendor.ref("");
|
||||
const currentSearchInputValue = common_vendor.ref("");
|
||||
const searchingStatus = common_vendor.ref(false);
|
||||
function onCurrentSearchInputValueChange(obj) {
|
||||
if ((obj == null ? void 0 : obj.searchType) === (props == null ? void 0 : props.searchType)) {
|
||||
currentSearchInputValue.value = obj == null ? void 0 : obj.value;
|
||||
searchValueModel.value = obj == null ? void 0 : obj.value;
|
||||
}
|
||||
}
|
||||
function onCurrentSearchingStatusChange(obj) {
|
||||
if ((obj == null ? void 0 : obj.searchType) === (props == null ? void 0 : props.searchType)) {
|
||||
searchingStatus.value = obj == null ? void 0 : obj.isSearching;
|
||||
}
|
||||
}
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.Jt.watch(common_vendor.o.SEARCH, {
|
||||
currentSearchInputValue: onCurrentSearchInputValueChange,
|
||||
currentSearchingStatus: onCurrentSearchingStatusChange
|
||||
});
|
||||
});
|
||||
common_vendor.onUnmounted(() => {
|
||||
common_vendor.Jt.unwatch(common_vendor.o.SEARCH, {
|
||||
currentSearchInputValue: onCurrentSearchInputValueChange,
|
||||
currentSearchingStatus: onCurrentSearchingStatusChange
|
||||
});
|
||||
});
|
||||
const search = () => {
|
||||
if (searchValueModel.value === currentSearchInputValue.value) {
|
||||
return;
|
||||
}
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchInputValue", {
|
||||
value: searchValueModel.value,
|
||||
searchType: props.searchType
|
||||
});
|
||||
};
|
||||
const endSearching = () => {
|
||||
searchingStatus.value = false;
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchingStatus", {
|
||||
isSearching: false,
|
||||
searchType: props.searchType
|
||||
});
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchInputValue", {
|
||||
value: "",
|
||||
searchType: props.searchType
|
||||
});
|
||||
};
|
||||
const onSearchInputClick = () => {
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchingStatus", {
|
||||
isSearching: true,
|
||||
searchType: props.searchType
|
||||
});
|
||||
};
|
||||
const onBlur = () => {
|
||||
var _a, _b;
|
||||
(_b = (_a = common_vendor.i) == null ? void 0 : _a.hideKeyboard) == null ? void 0 : _b.call(_a);
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.searchIcon),
|
||||
width: "14px",
|
||||
height: "14px"
|
||||
}),
|
||||
b: props.placeholder,
|
||||
c: common_vendor.o$1(onBlur),
|
||||
d: common_vendor.o$1(search),
|
||||
e: common_vendor.o$1(search),
|
||||
f: common_vendor.o$1(onSearchInputClick),
|
||||
g: common_vendor.unref(searchValueModel),
|
||||
h: common_vendor.o$1(($event) => common_vendor.isRef(searchValueModel) ? searchValueModel.value = $event.detail.value : null),
|
||||
i: common_vendor.unref(searchingStatus)
|
||||
}, common_vendor.unref(searchingStatus) ? {
|
||||
j: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.closeIcon),
|
||||
width: "14px",
|
||||
height: "14px"
|
||||
}),
|
||||
k: common_vendor.o$1(endSearching)
|
||||
} : {}, {
|
||||
l: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-search-input-h5"),
|
||||
m: !common_vendor.unref(TUIKit_utils_env.isPC) && common_vendor.unref(searchingStatus) && props.searchType === "global"
|
||||
}, !common_vendor.unref(TUIKit_utils_env.isPC) && common_vendor.unref(searchingStatus) && props.searchType === "global" ? {
|
||||
n: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUISearch.取消")),
|
||||
o: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-search-input-h5-cancel"),
|
||||
p: common_vendor.o$1(endSearching)
|
||||
} : {}, {
|
||||
q: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-search-input-container-h5"),
|
||||
r: common_vendor.n(props.searchType === "global" ? "tui-search-input-container-global" : "tui-search-input-container-conversation")
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9c7789a6"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-input/index.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-input/index.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-input/index.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../common/Icon"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-input/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-input/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-9c7789a6', 'tui-search-input-container', q, r]}}"><view class="{{['data-v-9c7789a6', 'tui-search-input', l]}}"><view class="tui-search-input-left data-v-9c7789a6"><icon wx:if="{{a}}" class="icon data-v-9c7789a6" u-i="9c7789a6-0" bind:__l="__l" u-p="{{a}}"/></view><input class="tui-search-input-main data-v-9c7789a6" type="text" placeholder="{{b}}" focus="{{false}}" enterkeyhint="search" bindblur="{{c}}" bindkeyup="{{d}}" bindconfirm="{{e}}" catchtap="{{f}}" value="{{g}}" bindinput="{{h}}"></input><view wx:if="{{i}}" class="tui-search-input-right data-v-9c7789a6" bindtap="{{k}}"><icon wx:if="{{j}}" class="icon data-v-9c7789a6" u-i="9c7789a6-1" bind:__l="__l" u-p="{{j}}"/></view></view><view wx:if="{{m}}" class="{{['data-v-9c7789a6', 'tui-search-input-cancel', o]}}" bindtap="{{p}}">{{n}}</view></view>
|
||||
83
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-input/index.wxss
vendored
Normal file
83
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-input/index.wxss
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.tui-search-input-container.data-v-9c7789a6 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.tui-search-input-container-global.data-v-9c7789a6 {
|
||||
flex: 1;
|
||||
}
|
||||
.tui-search-input-container .tui-search-input.data-v-9c7789a6 {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: calc(100% - 20px);
|
||||
margin: 10px;
|
||||
background: #ededed;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 28px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.tui-search-input-container .tui-search-input-main.data-v-9c7789a6 {
|
||||
flex: 1;
|
||||
background: transparent;
|
||||
border: none;
|
||||
caret-color: #007aff;
|
||||
font-size: 14px;
|
||||
}
|
||||
.tui-search-input-container .tui-search-input-main.data-v-9c7789a6:focus {
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
.tui-search-input-container .tui-search-input-main.data-v-9c7789a6::-webkit-input-placeholder {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
.tui-search-input-container .tui-search-input-main.data-v-9c7789a6::placeholder {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
.tui-search-input-container .tui-search-input-left.data-v-9c7789a6, .tui-search-input-container .tui-search-input-right.data-v-9c7789a6 {
|
||||
display: flex;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
padding: 0 7px;
|
||||
}
|
||||
.tui-search-input-container-h5 .tui-search-input-h5.data-v-9c7789a6 {
|
||||
height: 34px;
|
||||
}
|
||||
.tui-search-input-container-h5 .tui-search-input-cancel.data-v-9c7789a6 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #007aff;
|
||||
font-size: 16px;
|
||||
padding: 7px 10px 7px 3px;
|
||||
font-family: "PingFang SC", sans-serif;
|
||||
}
|
||||
99
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-more/index.js
vendored
Normal file
99
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-more/index.js
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
"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");
|
||||
if (!Math) {
|
||||
Icon();
|
||||
}
|
||||
const Icon = () => "../../common/Icon.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
searchType: {
|
||||
type: String,
|
||||
default: "global",
|
||||
// "global" / "conversation"
|
||||
validator(value) {
|
||||
return ["global", "conversation"].includes(value);
|
||||
}
|
||||
}
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const searchMoreRef = common_vendor.ref();
|
||||
const isListShow = common_vendor.ref(false);
|
||||
const toggleMore = () => {
|
||||
isListShow.value = !isListShow.value;
|
||||
if (!TUIKit_utils_env.isUniFrameWork && isListShow.value) {
|
||||
common_vendor.O.listen({
|
||||
domRefs: searchMoreRef.value,
|
||||
handler: closeSearchMore
|
||||
});
|
||||
}
|
||||
};
|
||||
const extensionList = common_vendor.ref([]);
|
||||
const handleMenu = (item) => {
|
||||
var _a;
|
||||
const { listener = { onClicked: () => {
|
||||
} } } = item;
|
||||
(_a = listener == null ? void 0 : listener.onClicked) == null ? void 0 : _a.call(listener, item);
|
||||
toggleMore();
|
||||
};
|
||||
const closeSearchMore = () => {
|
||||
isListShow.value = false;
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
extensionList.value = [
|
||||
...common_vendor.R.getExtensionList(common_vendor.E.TUISearch.EXTENSION.SEARCH_MORE.EXT_ID)
|
||||
];
|
||||
common_vendor.R.callService({
|
||||
serviceName: common_vendor.E.TUIConversation.SERVICE.NAME,
|
||||
method: common_vendor.E.TUIConversation.SERVICE.METHOD.HIDE_CONVERSATION_HEADER,
|
||||
params: {}
|
||||
});
|
||||
});
|
||||
common_vendor.watch(
|
||||
() => isListShow.value,
|
||||
() => {
|
||||
if (isListShow.value) {
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchingStatus", {
|
||||
isSearching: false,
|
||||
searchType: props.searchType
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.searchMoreSVG),
|
||||
width: common_vendor.unref(TUIKit_utils_env.isPC) ? "28px" : "34px",
|
||||
height: common_vendor.unref(TUIKit_utils_env.isPC) ? "28px" : "34px"
|
||||
}),
|
||||
b: common_vendor.o$1(($event) => toggleMore()),
|
||||
c: common_vendor.unref(isListShow)
|
||||
}, common_vendor.unref(isListShow) ? {
|
||||
d: common_vendor.f(common_vendor.unref(extensionList), (extension, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: extension.icon
|
||||
}, extension.icon ? {
|
||||
b: "ea46662f-1-" + i0,
|
||||
c: common_vendor.p({
|
||||
file: extension.icon
|
||||
})
|
||||
} : {}, {
|
||||
d: common_vendor.t(extension.text),
|
||||
e: index,
|
||||
f: common_vendor.o$1(($event) => handleMenu(extension), index)
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
e: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-search-more-h5")
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ea46662f"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-more/index.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-more/index.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-more/index.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../common/Icon"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-more/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-more/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view ref="searchMoreRef" class="{{['data-v-ea46662f', 'tui-search-more', e]}}"><view class="more data-v-ea46662f" bindtap="{{b}}"><icon wx:if="{{a}}" class="more-icon data-v-ea46662f" u-i="ea46662f-0" bind:__l="__l" u-p="{{a}}"/></view><view wx:if="{{c}}" class="tui-search-more-list data-v-ea46662f"><view wx:for="{{d}}" wx:for-item="extension" wx:key="e" class="list-item data-v-ea46662f" bindtap="{{extension.f}}"><icon wx:if="{{extension.a}}" class="list-item-icon data-v-ea46662f" u-i="{{extension.b}}" bind:__l="__l" u-p="{{extension.c}}"/><view class="list-item-title data-v-ea46662f">{{extension.d}}</view></view></view></view>
|
||||
71
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-more/index.wxss
vendored
Normal file
71
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-more/index.wxss
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.tui-search-more.data-v-ea46662f {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
}
|
||||
.tui-search-more .more.data-v-ea46662f {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
.tui-search-more-list.data-v-ea46662f {
|
||||
margin: 10px 0;
|
||||
position: absolute;
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
right: 6px;
|
||||
top: 20px;
|
||||
z-index: 1000;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
padding: 0;
|
||||
box-shadow: rgba(0, 0, 0, 0.16) 0 3px 6px, rgba(0, 0, 0, 0.23) 0 3px 6px;
|
||||
}
|
||||
.tui-search-more-list .list-item.data-v-ea46662f {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
.tui-search-more-list .list-item-icon.data-v-ea46662f {
|
||||
margin-right: 2px;
|
||||
}
|
||||
.tui-search-more-list .list-item-title.data-v-ea46662f {
|
||||
font-size: 14px;
|
||||
text-wrap: nowrap;
|
||||
word-break: keep-all;
|
||||
}
|
||||
.tui-search-more-h5 .more.data-v-ea46662f {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
}
|
||||
446
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/index.js
vendored
Normal file
446
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/index.js
vendored
Normal file
@@ -0,0 +1,446 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
require("../../../adapter-vue.js");
|
||||
const TUIKit_components_TUISearch_searchTypeList = require("../search-type-list.js");
|
||||
const common_assets = require("../../../../common/assets.js");
|
||||
const TUIKit_components_TUISearch_utils = require("../utils.js");
|
||||
const TUIKit_utils_enableSampleTaskStatus = require("../../../utils/enableSampleTaskStatus.js");
|
||||
const TUIKit_utils_env = require("../../../utils/env.js");
|
||||
if (!Math) {
|
||||
(SearchResultLoading + SearchResultDefault + SearchResultItem + Icon)();
|
||||
}
|
||||
const SearchResultItem = () => "./search-result-item/index.js";
|
||||
const SearchResultDefault = () => "./search-result-default/index.js";
|
||||
const SearchResultLoading = () => "./search-result-loading/index.js";
|
||||
const Icon = () => "../../common/Icon.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
searchType: {
|
||||
type: String,
|
||||
default: "global",
|
||||
// "global" / "conversation"
|
||||
validator(value) {
|
||||
return ["global", "conversation"].includes(value);
|
||||
}
|
||||
}
|
||||
},
|
||||
setup(__props) {
|
||||
var _a, _b;
|
||||
const props = __props;
|
||||
const keywordList = common_vendor.ref([]);
|
||||
const messageTypeList = common_vendor.ref(
|
||||
(_a = TUIKit_components_TUISearch_searchTypeList.searchMessageTypeDefault[props.searchType]) == null ? void 0 : _a.value
|
||||
);
|
||||
const timePosition = common_vendor.ref(0);
|
||||
const timePeriod = common_vendor.ref(0);
|
||||
const keywordListMatchType = common_vendor.ref("and");
|
||||
const currentSearchTabKey = common_vendor.ref(
|
||||
(_b = TUIKit_components_TUISearch_searchTypeList.searchMessageTypeDefault[props.searchType]) == null ? void 0 : _b.key
|
||||
);
|
||||
const searchResult = common_vendor.ref({});
|
||||
const searchAllMessageList = common_vendor.ref([]);
|
||||
const searchAllMessageTotalCount = common_vendor.ref(0);
|
||||
const currentSearchConversationID = common_vendor.ref("");
|
||||
const searchConversationResult = common_vendor.ref();
|
||||
const searchConversationMessageList = common_vendor.ref([]);
|
||||
const searchConversationMessageTotalCount = common_vendor.ref();
|
||||
const searchConversationResultGroupByDate = common_vendor.ref([]);
|
||||
const isResultDetailShow = common_vendor.ref(false);
|
||||
const isLoading = common_vendor.ref(false);
|
||||
const isSearchDetailLoading = common_vendor.ref(false);
|
||||
const isSearchDefaultShow = common_vendor.computed(() => {
|
||||
var _a2, _b2, _c;
|
||||
if (isLoading.value) {
|
||||
return false;
|
||||
}
|
||||
if (props.searchType === "global") {
|
||||
if (!((_a2 = keywordList == null ? void 0 : keywordList.value) == null ? void 0 : _a2.length) || ((_b2 = Object == null ? void 0 : Object.keys(searchResult.value)) == null ? void 0 : _b2.length)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if ((_c = searchConversationMessageList == null ? void 0 : searchConversationMessageList.value) == null ? void 0 : _c.length) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
function onCurrentConversationIDUpdate(id) {
|
||||
props.searchType === "conversation" && (currentSearchConversationID.value = id);
|
||||
}
|
||||
function onCurrentSearchInputValueUpdate(obj) {
|
||||
if ((obj == null ? void 0 : obj.searchType) === (props == null ? void 0 : props.searchType)) {
|
||||
keywordList.value = (obj == null ? void 0 : obj.value) ? obj.value.trim().split(/\s+/) : [];
|
||||
}
|
||||
}
|
||||
function onCurrentSearchMessageTypeUpdate(typeObject) {
|
||||
var _a2, _b2, _c, _d;
|
||||
if ((typeObject == null ? void 0 : typeObject.searchType) === (props == null ? void 0 : props.searchType)) {
|
||||
currentSearchTabKey.value = ((_a2 = typeObject == null ? void 0 : typeObject.value) == null ? void 0 : _a2.key) || ((_b2 = TUIKit_components_TUISearch_searchTypeList.searchMessageTypeDefault[props.searchType]) == null ? void 0 : _b2.key);
|
||||
messageTypeList.value = ((_c = typeObject == null ? void 0 : typeObject.value) == null ? void 0 : _c.value) || ((_d = TUIKit_components_TUISearch_searchTypeList.searchMessageTypeDefault[props.searchType]) == null ? void 0 : _d.value);
|
||||
}
|
||||
}
|
||||
function onCurrentSearchMessageTimeUpdate(timeObject) {
|
||||
var _a2, _b2, _c, _d;
|
||||
if ((timeObject == null ? void 0 : timeObject.searchType) === (props == null ? void 0 : props.searchType)) {
|
||||
timePosition.value = (_b2 = (_a2 = timeObject == null ? void 0 : timeObject.value) == null ? void 0 : _a2.value) == null ? void 0 : _b2.timePosition;
|
||||
timePeriod.value = (_d = (_c = timeObject == null ? void 0 : timeObject.value) == null ? void 0 : _c.value) == null ? void 0 : _d.timePeriod;
|
||||
}
|
||||
}
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.Jt.watch(common_vendor.o.CONV, {
|
||||
currentConversationID: onCurrentConversationIDUpdate
|
||||
});
|
||||
common_vendor.Jt.watch(common_vendor.o.SEARCH, {
|
||||
currentSearchInputValue: onCurrentSearchInputValueUpdate,
|
||||
currentSearchMessageType: onCurrentSearchMessageTypeUpdate,
|
||||
currentSearchMessageTime: onCurrentSearchMessageTimeUpdate
|
||||
});
|
||||
});
|
||||
common_vendor.onUnmounted(() => {
|
||||
common_vendor.Jt.unwatch(common_vendor.o.CONV, {
|
||||
currentConversationID: onCurrentConversationIDUpdate
|
||||
});
|
||||
common_vendor.Jt.unwatch(common_vendor.o.SEARCH, {
|
||||
currentSearchInputValue: onCurrentSearchInputValueUpdate,
|
||||
currentSearchMessageType: onCurrentSearchMessageTypeUpdate,
|
||||
currentSearchMessageTime: onCurrentSearchMessageTimeUpdate
|
||||
});
|
||||
});
|
||||
const setMessageSearchResultList = (option) => {
|
||||
var _a2;
|
||||
TUIKit_components_TUISearch_utils.searchCloudMessages(
|
||||
{
|
||||
keywordList: ((_a2 = keywordList == null ? void 0 : keywordList.value) == null ? void 0 : _a2.length) ? keywordList.value : void 0,
|
||||
messageTypeList: typeof messageTypeList.value === "string" ? [messageTypeList.value] : messageTypeList.value,
|
||||
timePosition: timePosition.value,
|
||||
timePeriod: timePeriod.value,
|
||||
conversationID: (option == null ? void 0 : option.conversationID) || void 0,
|
||||
cursor: (option == null ? void 0 : option.cursor) || void 0,
|
||||
keywordListMatchType: keywordListMatchType.value
|
||||
}
|
||||
).then((res) => {
|
||||
var _a3, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
|
||||
TUIKit_utils_enableSampleTaskStatus.enableSampleTaskStatus("searchCloudMessage");
|
||||
if (!(option == null ? void 0 : option.conversationID)) {
|
||||
(option == null ? void 0 : option.cursor) ? searchAllMessageList.value = [
|
||||
...searchAllMessageList.value,
|
||||
...res.data.searchResultList
|
||||
] : searchAllMessageList.value = (_a3 = res == null ? void 0 : res.data) == null ? void 0 : _a3.searchResultList;
|
||||
searchAllMessageTotalCount.value = (_b2 = res == null ? void 0 : res.data) == null ? void 0 : _b2.totalCount;
|
||||
const key = currentSearchTabKey.value === "all" ? "allMessage" : currentSearchTabKey.value;
|
||||
if (((_c = searchAllMessageList == null ? void 0 : searchAllMessageList.value) == null ? void 0 : _c.length) && currentSearchTabKey.value !== "contact" && currentSearchTabKey.value !== "group") {
|
||||
searchResult.value = Object.assign({}, searchResult.value, {
|
||||
[key]: {
|
||||
key,
|
||||
label: TUIKit_components_TUISearch_searchTypeList.searchMessageTypeList[key].label,
|
||||
list: currentSearchTabKey.value === "all" ? (_d = searchAllMessageList == null ? void 0 : searchAllMessageList.value) == null ? void 0 : _d.slice(0, 3) : searchAllMessageList == null ? void 0 : searchAllMessageList.value,
|
||||
cursor: ((_e = res == null ? void 0 : res.data) == null ? void 0 : _e.cursor) || null
|
||||
}
|
||||
});
|
||||
} else {
|
||||
searchResult == null ? true : delete searchResult.value[key];
|
||||
}
|
||||
} else {
|
||||
searchConversationResult.value = res == null ? void 0 : res.data;
|
||||
(option == null ? void 0 : option.cursor) ? searchConversationMessageList.value = [
|
||||
...searchConversationMessageList.value,
|
||||
...(_g = (_f = res == null ? void 0 : res.data) == null ? void 0 : _f.searchResultList[0]) == null ? void 0 : _g.messageList
|
||||
] : searchConversationMessageList.value = (_i = (_h = res == null ? void 0 : res.data) == null ? void 0 : _h.searchResultList[0]) == null ? void 0 : _i.messageList;
|
||||
searchConversationMessageTotalCount.value = (_j = res == null ? void 0 : res.data) == null ? void 0 : _j.totalCount;
|
||||
if ((props == null ? void 0 : props.searchType) === "conversation" && (currentSearchTabKey.value === "fileMessage" || currentSearchTabKey.value === "imageMessage")) {
|
||||
searchConversationResultGroupByDate.value = groupResultListByDate(
|
||||
searchConversationMessageList.value
|
||||
);
|
||||
} else {
|
||||
searchConversationResultGroupByDate.value = [];
|
||||
}
|
||||
}
|
||||
isLoading.value = false;
|
||||
isSearchDetailLoading.value = false;
|
||||
});
|
||||
};
|
||||
const setMessageSearchResultListDebounce = TUIKit_components_TUISearch_utils.debounce(setMessageSearchResultList, 500);
|
||||
const resetSearchResult = () => {
|
||||
searchResult.value = {};
|
||||
searchConversationResult.value = {};
|
||||
searchConversationMessageList.value = [];
|
||||
searchConversationResultGroupByDate.value = [];
|
||||
};
|
||||
common_vendor.watch(
|
||||
() => [keywordList.value, currentSearchTabKey.value, timePosition.value, timePeriod.value],
|
||||
(newValue, oldValue) => {
|
||||
var _a2, _b2, _c;
|
||||
if (newValue === oldValue) {
|
||||
return;
|
||||
}
|
||||
if (!((_a2 = keywordList == null ? void 0 : keywordList.value) == null ? void 0 : _a2.length) && (props == null ? void 0 : props.searchType) === "global") {
|
||||
resetSearchResult();
|
||||
return;
|
||||
}
|
||||
isLoading.value = true;
|
||||
if (props.searchType === "conversation") {
|
||||
resetSearchResult();
|
||||
setMessageSearchResultList({
|
||||
conversationID: currentSearchConversationID.value
|
||||
});
|
||||
} else {
|
||||
if (oldValue && oldValue[1] === "all" && newValue && newValue[1] === "allMessage") {
|
||||
((_b2 = searchResult == null ? void 0 : searchResult.value["allMessage"]) == null ? void 0 : _b2.list) && (searchResult.value["allMessage"].list = searchAllMessageList == null ? void 0 : searchAllMessageList.value);
|
||||
(_c = Object == null ? void 0 : Object.keys(searchResult == null ? void 0 : searchResult.value)) == null ? void 0 : _c.forEach((key) => {
|
||||
if (key !== "allMessage") {
|
||||
searchResult == null ? true : delete searchResult.value[key];
|
||||
}
|
||||
});
|
||||
isLoading.value = false;
|
||||
return;
|
||||
} else {
|
||||
isResultDetailShow.value = false;
|
||||
resetSearchResult();
|
||||
}
|
||||
setMessageSearchResultListDebounce();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
const getMoreResult = (result) => {
|
||||
if (currentSearchTabKey.value === "all") {
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchMessageType", {
|
||||
value: TUIKit_components_TUISearch_searchTypeList.searchMessageTypeList[result.key],
|
||||
searchType: props.searchType
|
||||
});
|
||||
} else {
|
||||
setMessageSearchResultList({ cursor: (result == null ? void 0 : result.cursor) || void 0 });
|
||||
}
|
||||
};
|
||||
const getMoreResultInConversation = () => {
|
||||
var _a2;
|
||||
setMessageSearchResultList({
|
||||
cursor: (_a2 = searchConversationResult == null ? void 0 : searchConversationResult.value) == null ? void 0 : _a2.cursor,
|
||||
conversationID: currentSearchConversationID == null ? void 0 : currentSearchConversationID.value
|
||||
});
|
||||
};
|
||||
const showResultDetail = (isShow, targetType, targetResult) => {
|
||||
var _a2;
|
||||
isResultDetailShow.value = isShow;
|
||||
if (targetType) {
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchMessageType", {
|
||||
value: TUIKit_components_TUISearch_searchTypeList.searchMessageTypeList[targetType],
|
||||
searchType: props.searchType
|
||||
});
|
||||
}
|
||||
currentSearchConversationID.value = ((_a2 = targetResult == null ? void 0 : targetResult.conversation) == null ? void 0 : _a2.conversationID) || "";
|
||||
searchConversationMessageTotalCount.value = targetResult == null ? void 0 : targetResult.messageCount;
|
||||
if (targetResult) {
|
||||
isSearchDetailLoading.value = true;
|
||||
setMessageSearchResultListDebounce({
|
||||
conversationID: currentSearchConversationID.value
|
||||
});
|
||||
}
|
||||
};
|
||||
const generateListItemClass = (item) => {
|
||||
var _a2;
|
||||
return currentSearchConversationID.value === ((_a2 = item == null ? void 0 : item.conversation) == null ? void 0 : _a2.conversationID) ? ["list-item", "list-item-selected"] : ["list-item"];
|
||||
};
|
||||
const generateResultItemDisplayType = () => {
|
||||
if (props.searchType === "conversation" && currentSearchTabKey.value === "fileMessage") {
|
||||
return "file";
|
||||
} else if (props.searchType === "conversation" && currentSearchTabKey.value === "imageMessage") {
|
||||
return "image";
|
||||
} else if (TUIKit_utils_env.isPC) {
|
||||
return "bubble";
|
||||
} else {
|
||||
return "info";
|
||||
}
|
||||
};
|
||||
const groupResultListByDate = (messageList) => {
|
||||
var _a2, _b2, _c, _d;
|
||||
const result = [];
|
||||
if (!(messageList == null ? void 0 : messageList.length)) {
|
||||
return result;
|
||||
} else if ((messageList == null ? void 0 : messageList.length) === 1) {
|
||||
result.push({ date: TUIKit_components_TUISearch_utils.generateSearchResultYMD((_a2 = messageList[0]) == null ? void 0 : _a2.time), list: messageList });
|
||||
return result;
|
||||
}
|
||||
let prevYMD = "";
|
||||
let currYMD = "";
|
||||
for (let i = 0; i < (messageList == null ? void 0 : messageList.length); i++) {
|
||||
currYMD = TUIKit_components_TUISearch_utils.generateSearchResultYMD((_b2 = messageList[i]) == null ? void 0 : _b2.time);
|
||||
if (prevYMD !== currYMD) {
|
||||
result.push({ date: currYMD, list: [messageList[i]] });
|
||||
} else {
|
||||
(_d = (_c = result[(result == null ? void 0 : result.length) - 1]) == null ? void 0 : _c.list) == null ? void 0 : _d.push(messageList[i]);
|
||||
}
|
||||
prevYMD = currYMD;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
const navigateToChatPosition = (message) => {
|
||||
var _a2;
|
||||
if (props.searchType === "global") {
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchingStatus", {
|
||||
isSearching: false,
|
||||
searchType: props.searchType
|
||||
});
|
||||
common_vendor.Xt.switchConversation(message == null ? void 0 : message.conversationID).then(() => {
|
||||
var _a3;
|
||||
common_vendor.Jt.update(common_vendor.o.CHAT, "messageSource", message);
|
||||
TUIKit_utils_env.isUniFrameWork && ((_a3 = common_vendor.i) == null ? void 0 : _a3.navigateTo({
|
||||
url: "/TUIKit/components/TUIChat/index"
|
||||
}));
|
||||
});
|
||||
} else if (props.searchType === "conversation") {
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "isShowInConversationSearch", false);
|
||||
common_vendor.Jt.update(common_vendor.o.CHAT, "messageSource", message);
|
||||
TUIKit_utils_env.isUniFrameWork && ((_a2 = common_vendor.i) == null ? void 0 : _a2.navigateBack());
|
||||
}
|
||||
};
|
||||
const generateVueRenderKey = (value) => {
|
||||
return `${currentSearchTabKey}-${value}`;
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.unref(isLoading)
|
||||
}, common_vendor.unref(isLoading) ? {
|
||||
b: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "search-result-loading-h5")
|
||||
} : common_vendor.unref(isSearchDefaultShow) ? {
|
||||
d: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "search-result-default-h5")
|
||||
} : common_vendor.e({
|
||||
e: props.searchType !== "conversation" && (common_vendor.unref(TUIKit_utils_env.isPC) || !common_vendor.unref(isResultDetailShow))
|
||||
}, props.searchType !== "conversation" && (common_vendor.unref(TUIKit_utils_env.isPC) || !common_vendor.unref(isResultDetailShow)) ? {
|
||||
f: common_vendor.f(common_vendor.unref(searchResult), (result, k0, i0) => {
|
||||
return common_vendor.e(props.searchType === "global" ? {
|
||||
a: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`TUISearch.${result.label}`))
|
||||
} : {}, {
|
||||
b: common_vendor.f(result.list, (item, k1, i1) => {
|
||||
return common_vendor.e({
|
||||
a: result.key === "contact" || result.key === "group" || item.conversation
|
||||
}, result.key === "contact" || result.key === "group" || item.conversation ? {
|
||||
b: common_vendor.o$1(showResultDetail, item.conversation.conversationID),
|
||||
c: common_vendor.o$1(navigateToChatPosition, item.conversation.conversationID),
|
||||
d: "90555b56-2-" + i0 + "-" + i1,
|
||||
e: common_vendor.p({
|
||||
listItem: item,
|
||||
type: result.key,
|
||||
displayType: "info",
|
||||
keywordList: common_vendor.unref(keywordList)
|
||||
})
|
||||
} : {}, {
|
||||
f: item.conversation.conversationID,
|
||||
g: common_vendor.n(generateListItemClass(item))
|
||||
});
|
||||
}),
|
||||
c: common_vendor.unref(currentSearchTabKey) === "all" || result.cursor
|
||||
}, common_vendor.unref(currentSearchTabKey) === "all" || result.cursor ? {
|
||||
d: "90555b56-3-" + i0,
|
||||
e: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.searchIcon),
|
||||
width: "12px",
|
||||
height: "12px"
|
||||
}),
|
||||
f: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUISearch.查看更多")),
|
||||
g: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`TUISearch.${result.label}`)),
|
||||
h: common_vendor.o$1(($event) => getMoreResult(result), result.key)
|
||||
} : {}, {
|
||||
i: result.key
|
||||
});
|
||||
}),
|
||||
g: props.searchType === "global"
|
||||
} : {}, {
|
||||
h: common_vendor.unref(isResultDetailShow) || props.searchType === "conversation"
|
||||
}, common_vendor.unref(isResultDetailShow) || props.searchType === "conversation" ? common_vendor.e({
|
||||
i: common_vendor.unref(isSearchDetailLoading)
|
||||
}, common_vendor.unref(isSearchDetailLoading) ? {
|
||||
j: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "search-result-loading-h5")
|
||||
} : {}, {
|
||||
k: !common_vendor.unref(isSearchDetailLoading) && common_vendor.unref(isResultDetailShow) && props.searchType !== "conversation"
|
||||
}, !common_vendor.unref(isSearchDetailLoading) && common_vendor.unref(isResultDetailShow) && props.searchType !== "conversation" ? {
|
||||
l: common_vendor.t(common_vendor.unref(searchConversationMessageTotalCount)),
|
||||
m: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUISearch.条与")),
|
||||
n: common_vendor.f(common_vendor.unref(keywordList), (keyword, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(keyword),
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
o: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUISearch.相关的")),
|
||||
p: common_vendor.t(common_vendor.unref(common_vendor.Wt).t(`TUISearch.${common_vendor.unref(currentSearchTabKey) === "allMessage" ? "结果" : common_vendor.unref(TUIKit_components_TUISearch_searchTypeList.searchMessageTypeList)[common_vendor.unref(currentSearchTabKey)].label}`)),
|
||||
q: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUISearch.进入聊天")),
|
||||
r: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.rightIcon),
|
||||
width: "14px",
|
||||
height: "14px"
|
||||
}),
|
||||
s: common_vendor.o$1(($event) => common_vendor.unref(TUIKit_components_TUISearch_utils.enterConversation)({
|
||||
conversationID: common_vendor.unref(currentSearchConversationID)
|
||||
}))
|
||||
} : {}, {
|
||||
t: !common_vendor.unref(isSearchDetailLoading) && common_vendor.unref(searchConversationMessageList) && common_vendor.unref(searchConversationMessageList)[0]
|
||||
}, !common_vendor.unref(isSearchDetailLoading) && common_vendor.unref(searchConversationMessageList) && common_vendor.unref(searchConversationMessageList)[0] ? common_vendor.e({
|
||||
v: props.searchType === "global" || common_vendor.unref(currentSearchTabKey) !== "imageMessage" && common_vendor.unref(currentSearchTabKey) !== "fileMessage"
|
||||
}, props.searchType === "global" || common_vendor.unref(currentSearchTabKey) !== "imageMessage" && common_vendor.unref(currentSearchTabKey) !== "fileMessage" ? {
|
||||
w: common_vendor.f(common_vendor.unref(searchConversationMessageList), (item, k0, i0) => {
|
||||
return {
|
||||
a: common_vendor.o$1(showResultDetail, generateVueRenderKey(item.ID)),
|
||||
b: common_vendor.o$1(navigateToChatPosition, generateVueRenderKey(item.ID)),
|
||||
c: "90555b56-6-" + i0,
|
||||
d: common_vendor.p({
|
||||
listItem: item,
|
||||
listItemContent: item.getMessageContent(),
|
||||
type: common_vendor.unref(currentSearchTabKey),
|
||||
displayType: generateResultItemDisplayType(),
|
||||
keywordList: common_vendor.unref(keywordList)
|
||||
}),
|
||||
e: generateVueRenderKey(item.ID)
|
||||
};
|
||||
})
|
||||
} : {
|
||||
x: common_vendor.f(common_vendor.unref(searchConversationResultGroupByDate), (group, k0, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(group.date),
|
||||
b: common_vendor.f(group.list, (item, k1, i1) => {
|
||||
return {
|
||||
a: common_vendor.o$1(showResultDetail, generateVueRenderKey(item.ID)),
|
||||
b: common_vendor.o$1(navigateToChatPosition, generateVueRenderKey(item.ID)),
|
||||
c: "90555b56-7-" + i0 + "-" + i1,
|
||||
d: common_vendor.p({
|
||||
listItem: item,
|
||||
listItemContent: item.getMessageContent(),
|
||||
type: common_vendor.unref(currentSearchTabKey),
|
||||
displayType: generateResultItemDisplayType(),
|
||||
keywordList: common_vendor.unref(keywordList)
|
||||
}),
|
||||
e: generateVueRenderKey(item.ID)
|
||||
};
|
||||
}),
|
||||
c: generateVueRenderKey(group.date)
|
||||
};
|
||||
}),
|
||||
y: common_vendor.n(common_vendor.unref(currentSearchTabKey) === "fileMessage" ? "list-group-file" : "list-group-image")
|
||||
}, {
|
||||
z: common_vendor.unref(searchConversationResult) && common_vendor.unref(searchConversationResult).cursor
|
||||
}, common_vendor.unref(searchConversationResult) && common_vendor.unref(searchConversationResult).cursor ? {
|
||||
A: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.searchIcon),
|
||||
width: "12px",
|
||||
height: "12px"
|
||||
}),
|
||||
B: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUISearch.查看更多历史记录")),
|
||||
C: common_vendor.o$1(getMoreResultInConversation)
|
||||
} : {}) : {}, {
|
||||
D: common_vendor.n(props.searchType === "conversation" && "tui-search-result-in-conversation")
|
||||
}) : {}, {
|
||||
E: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "tui-search-result-h5"),
|
||||
F: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isPC) && common_vendor.unref(isResultDetailShow) && "tui-search-result-with-border")
|
||||
}), {
|
||||
c: common_vendor.unref(isSearchDefaultShow)
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-90555b56"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-result/index.js.map
|
||||
9
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/index.json
vendored
Normal file
9
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/index.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"search-result-item": "./search-result-item/index",
|
||||
"search-result-default": "./search-result-default/index",
|
||||
"search-result-loading": "./search-result-loading/index",
|
||||
"icon": "../../common/Icon"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<search-result-loading wx:if="{{a}}" class="{{['data-v-90555b56', 'search-result-loading', b]}}" u-i="90555b56-0" bind:__l="__l"/><search-result-default wx:elif="{{c}}" class="{{['data-v-90555b56', 'search-result-default', d]}}" u-i="90555b56-1" bind:__l="__l"/><view wx:else class="{{['data-v-90555b56', 'tui-search-result', E, F]}}"><view wx:if="{{e}}" class="tui-search-result-main data-v-90555b56"><view class="tui-search-result-list data-v-90555b56"><view wx:for="{{f}}" wx:for-item="result" wx:key="i" class="tui-search-result-list-item data-v-90555b56"><view wx:if="{{g}}" class="header data-v-90555b56">{{result.a}}</view><view class="list data-v-90555b56"><view wx:for="{{result.b}}" wx:for-item="item" wx:key="f" class="{{['data-v-90555b56', item.g]}}"><search-result-item wx:if="{{item.a}}" class="data-v-90555b56" bindshowResultDetail="{{item.b}}" bindnavigateToChatPosition="{{item.c}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"/></view></view><view wx:if="{{result.c}}" class="more data-v-90555b56" bindtap="{{result.h}}"><icon wx:if="{{result.e}}" class="more-icon data-v-90555b56" u-i="{{result.d}}" bind:__l="__l" u-p="{{result.e}}"/><view class="more-text data-v-90555b56"><label class="data-v-90555b56">{{result.f}}</label><label class="data-v-90555b56">{{result.g}}</label></view></view></view></view></view><view wx:if="{{h}}" class="{{['data-v-90555b56', 'tui-search-result-detail', D]}}"><search-result-loading wx:if="{{i}}" class="{{['data-v-90555b56', 'search-result-loading', j]}}" u-i="90555b56-4" bind:__l="__l"/><view wx:if="{{k}}" class="tui-search-message-header data-v-90555b56"><view class="header-content data-v-90555b56"><view class="header-content-count normal data-v-90555b56"><label class="data-v-90555b56">{{l}}</label><label class="data-v-90555b56">{{m}}</label></view><view class="header-content-keyword data-v-90555b56"><label wx:for="{{n}}" wx:for-item="keyword" wx:key="b" class="data-v-90555b56"><label class="normal data-v-90555b56">"</label><label class="highlight data-v-90555b56">{{keyword.a}}</label><label class="normal data-v-90555b56">"</label></label></view><view class="header-content-type normal data-v-90555b56"><label class="data-v-90555b56">{{o}}</label><label class="data-v-90555b56">{{p}}</label></view></view><view class="header-enter data-v-90555b56" bindtap="{{s}}"><label class="data-v-90555b56">{{q}}</label><icon wx:if="{{r}}" class="enter-icon data-v-90555b56" u-i="90555b56-5" bind:__l="__l" u-p="{{r}}"/></view></view><view wx:if="{{t}}" class="tui-search-message-list data-v-90555b56"><block wx:if="{{v}}"><view wx:for="{{w}}" wx:for-item="item" wx:key="e" class="{{['data-v-90555b56', 'list-item']}}"><search-result-item wx:if="{{item.d}}" class="data-v-90555b56" bindshowResultDetail="{{item.a}}" bindnavigateToChatPosition="{{item.b}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"/></view></block><block wx:else><view wx:for="{{x}}" wx:for-item="group" wx:key="c" class="{{['data-v-90555b56', 'list-group', y]}}"><view class="{{['data-v-90555b56', 'list-group-date']}}">{{group.a}}</view><view wx:for="{{group.b}}" wx:for-item="item" wx:key="e" class="{{['data-v-90555b56', 'list-group-item']}}"><search-result-item wx:if="{{item.d}}" class="data-v-90555b56" bindshowResultDetail="{{item.a}}" bindnavigateToChatPosition="{{item.b}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"/></view></view></block><view wx:if="{{z}}" class="more data-v-90555b56" bindtap="{{C}}"><icon wx:if="{{A}}" class="more-icon data-v-90555b56" u-i="90555b56-8" bind:__l="__l" u-p="{{A}}"/><view class="more-text data-v-90555b56">{{B}}</view></view></view></view></view>
|
||||
276
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/index.wxss
vendored
Normal file
276
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/index.wxss
vendored
Normal file
@@ -0,0 +1,276 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-90555b56, div.data-v-90555b56, ul.data-v-90555b56, ol.data-v-90555b56, dt.data-v-90555b56, dd.data-v-90555b56, li.data-v-90555b56, dl.data-v-90555b56, h1.data-v-90555b56, h2.data-v-90555b56, h3.data-v-90555b56, h4.data-v-90555b56, p.data-v-90555b56 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-90555b56, ul.data-v-90555b56, li.data-v-90555b56 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-90555b56 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-90555b56 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-90555b56 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-90555b56 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-90555b56:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-90555b56, textarea.data-v-90555b56 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-90555b56:focus, input.data-v-90555b56:active, textarea.data-v-90555b56:focus, textarea.data-v-90555b56:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-90555b56 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.tui-search-result.data-v-90555b56 {
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.tui-search-result-with-border.data-v-90555b56 {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.tui-search-result-detail.data-v-90555b56 {
|
||||
width: 360px;
|
||||
overflow-y: hidden;
|
||||
border-left: 1px solid rgba(0, 0, 0, 0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-header.data-v-90555b56 {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
place-content: space-between space-between;
|
||||
font-size: 14px;
|
||||
align-items: center;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-header .header-content.data-v-90555b56 {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-header .header-content .header-content-count.data-v-90555b56 {
|
||||
width: -webkit-fit-content;
|
||||
width: fit-content;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-header .header-content .header-content-keyword.data-v-90555b56 {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-header .header-content .header-content-type.data-v-90555b56 {
|
||||
width: 110px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-header .header-content .normal.data-v-90555b56 {
|
||||
color: #666;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-header .header-content .highlight.data-v-90555b56 {
|
||||
color: #007aff;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-header .header-enter.data-v-90555b56 {
|
||||
margin-left: 10px;
|
||||
width: 70px;
|
||||
color: #666;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-list.data-v-90555b56 {
|
||||
overflow-y: auto;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-list .list-item.data-v-90555b56 {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-list .list-group.list-group-image.data-v-90555b56 {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-list .list-group.list-group-image .list-group-item.data-v-90555b56 {
|
||||
width: 111px;
|
||||
height: 111px;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-list .list-group .list-group-date.data-v-90555b56 {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
font-family: "PingFang SC", sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
letter-spacing: 0;
|
||||
text-align: left;
|
||||
padding: 10px 10px 2px;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-list .more.data-v-90555b56 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
font-size: 14px;
|
||||
padding: 8px 0;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tui-search-result-detail .tui-search-message-list .more .more-text.data-v-90555b56 {
|
||||
padding-left: 8px;
|
||||
font-size: 12px;
|
||||
color: #007aff;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.tui-search-result-main.data-v-90555b56 {
|
||||
width: 350px;
|
||||
padding: 10px;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
.tui-search-result-main .tui-search-result-list-item .header.data-v-90555b56 {
|
||||
font-size: 14px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
.tui-search-result-main .tui-search-result-list-item .list.data-v-90555b56 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tui-search-result-main .tui-search-result-list-item .list .list-item.data-v-90555b56 {
|
||||
cursor: pointer;
|
||||
}
|
||||
.tui-search-result-main .tui-search-result-list-item .list .list-item-selected.data-v-90555b56 {
|
||||
background: #f2f2f2;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.tui-search-result-main .tui-search-result-list-item .more.data-v-90555b56 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
font-size: 14px;
|
||||
padding-top: 10px;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tui-search-result-main .tui-search-result-list-item .more .more-text.data-v-90555b56 {
|
||||
padding-left: 8px;
|
||||
font-size: 12px;
|
||||
color: #007aff;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.tui-search-result .tui-search-result-in-conversation.data-v-90555b56 {
|
||||
border: none;
|
||||
}
|
||||
.tui-search-result-h5.data-v-90555b56 {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
.tui-search-result-h5 .tui-search-result-main.data-v-90555b56 {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
.tui-search-result-h5 .tui-search-result-main .tui-search-result-list .tui-search-result-list-item.data-v-90555b56 {
|
||||
background-color: #fff;
|
||||
padding: 0 10px 10px;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.tui-search-result-h5 .tui-search-result-detail.data-v-90555b56 {
|
||||
background-color: #f4f4f4;
|
||||
border: none;
|
||||
}
|
||||
.tui-search-result-h5 .tui-search-result-detail .list-item.data-v-90555b56 {
|
||||
margin: 0 10px;
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
.tui-search-result-h5 .tui-search-result-detail .list-group-date.data-v-90555b56 {
|
||||
padding: 10px;
|
||||
}
|
||||
.tui-search-result-h5 .tui-search-result-detail .list-group-image .list-group-item .search-result-list-item-h5.data-v-90555b56 {
|
||||
padding: 0;
|
||||
}
|
||||
.tui-search-result-h5 .tui-search-result-detail .list-group-file .list-group-item.data-v-90555b56 {
|
||||
background-color: #fff;
|
||||
padding: 0 10px;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
.tui-search-result-h5 .tui-search-result-detail .list-group-file .list-group-item .search-result-list-item-h5.data-v-90555b56 {
|
||||
padding: 0 0 10px;
|
||||
}
|
||||
.tui-search-result-h5 .tui-search-result-detail .list-group-file .list-group-item.data-v-90555b56:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.search-result-loading.data-v-90555b56,
|
||||
.search-result-default.data-v-90555b56 {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.search-result-loading-h5.data-v-90555b56,
|
||||
.search-result-default-h5.data-v-90555b56 {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
const common_assets = require("../../../../../common/assets.js");
|
||||
if (!Math) {
|
||||
Icon();
|
||||
}
|
||||
const Icon = () => "../../../common/Icon.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.SearchDefaultIcon),
|
||||
width: "88px",
|
||||
height: "75px"
|
||||
}),
|
||||
b: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUISearch.暂无搜索结果")),
|
||||
c: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "search-result-default-h5")
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ad49c7f2"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-default/index.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../../common/Icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-ad49c7f2', 'search-result-default', c]}}"><view class="search-result-default-main data-v-ad49c7f2"><icon wx:if="{{a}}" class="data-v-ad49c7f2" u-i="ad49c7f2-0" bind:__l="__l" u-p="{{a}}"/><view class="default-text data-v-ad49c7f2">{{b}}</view></view></view>
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.search-result-default.data-v-ad49c7f2 {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.search-result-default-h5.data-v-ad49c7f2 {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
.search-result-default-main.data-v-ad49c7f2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.search-result-default-main .default-text.data-v-ad49c7f2 {
|
||||
font-family: "PingFang SC", sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
color: #666;
|
||||
}
|
||||
168
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-item/index.js
vendored
Normal file
168
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-item/index.js
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
require("../../../../adapter-vue.js");
|
||||
const TUIKit_components_TUISearch_utils = require("../../utils.js");
|
||||
const TUIKit_components_TUISearch_type = require("../../type.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
if (!Math) {
|
||||
(MessageAbstractText + MessageAbstractFile + MessageAbstractCustom + MessageAbstractImage + MessageAbstractVideo)();
|
||||
}
|
||||
const MessageAbstractText = () => "./message-abstract/message-abstract-text.js";
|
||||
const MessageAbstractFile = () => "./message-abstract/message-abstract-file.js";
|
||||
const MessageAbstractCustom = () => "./message-abstract/message-abstract-custom.js";
|
||||
const MessageAbstractImage = () => "./message-abstract/message-abstract-image.js";
|
||||
const MessageAbstractVideo = () => "./message-abstract/message-abstract-video.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
listItem: { default: () => ({}) },
|
||||
listItemContent: { default: () => ({}) },
|
||||
type: { default: "allMessage" },
|
||||
displayType: { default: "info" },
|
||||
keywordList: { default: () => [] }
|
||||
},
|
||||
emits: ["showResultDetail", "navigateToChatPosition"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const props = __props;
|
||||
const emits = __emit;
|
||||
const TYPES = common_vendor.ref(common_vendor.qt.TYPES);
|
||||
const avatarForShow = common_vendor.ref("");
|
||||
const nameForShow = common_vendor.ref("");
|
||||
const contentForShow = common_vendor.ref([]);
|
||||
const timeForShow = common_vendor.ref("");
|
||||
const isHovering = common_vendor.ref(false);
|
||||
common_vendor.watchEffect(() => {
|
||||
var _a, _b;
|
||||
avatarForShow.value = TUIKit_components_TUISearch_utils.generateSearchResultAvatar(props.listItem);
|
||||
nameForShow.value = TUIKit_components_TUISearch_utils.generateSearchResultShowName(props.listItem, props == null ? void 0 : props.listItemContent);
|
||||
contentForShow.value = TUIKit_components_TUISearch_utils.generateSearchResultShowContent(
|
||||
props.listItem,
|
||||
props.type,
|
||||
props.keywordList,
|
||||
(props == null ? void 0 : props.displayType) === "info"
|
||||
);
|
||||
timeForShow.value = ((_a = props.listItem) == null ? void 0 : _a.time) ? TUIKit_components_TUISearch_utils.generateSearchResultTime(((_b = props.listItem) == null ? void 0 : _b.time) * 1e3) : "";
|
||||
});
|
||||
const onResultItemClicked = () => {
|
||||
var _a;
|
||||
if (props.type === "contact" || props.type === "group") {
|
||||
TUIKit_components_TUISearch_utils.enterConversation(props.listItem);
|
||||
} else {
|
||||
if (props.displayType === "info" && !((_a = props.listItem) == null ? void 0 : _a.ID)) {
|
||||
emits("showResultDetail", true, props.type, props.listItem);
|
||||
} else {
|
||||
navigateToChatPosition();
|
||||
}
|
||||
}
|
||||
};
|
||||
const setHoverStatus = (status) => {
|
||||
isHovering.value = status;
|
||||
};
|
||||
const navigateToChatPosition = () => {
|
||||
emits("navigateToChatPosition", props.listItem);
|
||||
};
|
||||
const getMessageAbstractType = (message) => {
|
||||
return (message == null ? void 0 : message.type) ? common_vendor.Wt.t(`TUISearch.${TUIKit_components_TUISearch_type.messageTypeAbstractMap[message.type]}`) : common_vendor.Wt.t(`TUISearch.[合并消息]`);
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: _ctx.displayType === "info" || _ctx.displayType === "bubble"
|
||||
}, _ctx.displayType === "info" || _ctx.displayType === "bubble" ? common_vendor.e({
|
||||
b: common_vendor.n(_ctx.displayType + "-left-avatar"),
|
||||
c: common_vendor.unref(avatarForShow) || "",
|
||||
d: common_vendor.n(_ctx.displayType + "-left"),
|
||||
e: common_vendor.t(common_vendor.unref(nameForShow)),
|
||||
f: common_vendor.n(_ctx.displayType + "-main-name"),
|
||||
g: _ctx.displayType === "info" || _ctx.listItem.type === common_vendor.unref(TYPES).MSG_TEXT
|
||||
}, _ctx.displayType === "info" || _ctx.listItem.type === common_vendor.unref(TYPES).MSG_TEXT ? {
|
||||
h: common_vendor.p({
|
||||
content: common_vendor.unref(contentForShow),
|
||||
highlightType: _ctx.displayType === "info" ? "font" : "background",
|
||||
displayType: _ctx.displayType
|
||||
})
|
||||
} : _ctx.listItem.type === common_vendor.unref(TYPES).MSG_FILE ? {
|
||||
j: common_vendor.p({
|
||||
contentText: common_vendor.unref(contentForShow),
|
||||
messageContent: _ctx.listItemContent,
|
||||
displayType: _ctx.displayType
|
||||
})
|
||||
} : _ctx.listItem.type === common_vendor.unref(TYPES).MSG_IMAGE ? {} : _ctx.listItem.type === common_vendor.unref(TYPES).MSG_VIDEO ? {} : _ctx.listItem.type === common_vendor.unref(TYPES).MSG_CUSTOM ? {
|
||||
n: common_vendor.p({
|
||||
contentText: common_vendor.unref(contentForShow),
|
||||
message: _ctx.listItem,
|
||||
messageContent: _ctx.listItemContent
|
||||
})
|
||||
} : {
|
||||
o: common_vendor.t(getMessageAbstractType(_ctx.listItem))
|
||||
}, {
|
||||
i: _ctx.listItem.type === common_vendor.unref(TYPES).MSG_FILE,
|
||||
k: _ctx.listItem.type === common_vendor.unref(TYPES).MSG_IMAGE,
|
||||
l: _ctx.listItem.type === common_vendor.unref(TYPES).MSG_VIDEO,
|
||||
m: _ctx.listItem.type === common_vendor.unref(TYPES).MSG_CUSTOM,
|
||||
p: common_vendor.n(_ctx.displayType + "-main-content"),
|
||||
q: common_vendor.n(_ctx.displayType + "-main"),
|
||||
r: common_vendor.t(common_vendor.unref(timeForShow)),
|
||||
s: common_vendor.n(_ctx.displayType + "-right-time"),
|
||||
t: _ctx.displayType === "bubble" && common_vendor.unref(isHovering)
|
||||
}, _ctx.displayType === "bubble" && common_vendor.unref(isHovering) ? {
|
||||
v: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUISearch.定位到聊天位置")),
|
||||
w: common_vendor.n(_ctx.displayType + "-right-to"),
|
||||
x: common_vendor.o$1(navigateToChatPosition)
|
||||
} : {}, {
|
||||
y: common_vendor.n(_ctx.displayType + "-right"),
|
||||
z: common_vendor.n(_ctx.displayType)
|
||||
}) : _ctx.displayType === "file" ? common_vendor.e({
|
||||
B: common_vendor.n(_ctx.displayType + "-header-avatar"),
|
||||
C: common_vendor.unref(avatarForShow),
|
||||
D: common_vendor.t(common_vendor.unref(nameForShow)),
|
||||
E: common_vendor.n(_ctx.displayType + "-header-name"),
|
||||
F: common_vendor.unref(isHovering)
|
||||
}, common_vendor.unref(isHovering) ? {
|
||||
G: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUISearch.定位到聊天位置")),
|
||||
H: common_vendor.n(_ctx.displayType + "-header-to"),
|
||||
I: common_vendor.o$1(navigateToChatPosition)
|
||||
} : {}, {
|
||||
J: common_vendor.t(common_vendor.unref(timeForShow)),
|
||||
K: common_vendor.n(_ctx.displayType + "-header-time"),
|
||||
L: common_vendor.n(_ctx.displayType + "-header"),
|
||||
M: common_vendor.p({
|
||||
contentText: common_vendor.unref(contentForShow),
|
||||
messageContent: _ctx.listItemContent,
|
||||
displayType: "bubble"
|
||||
}),
|
||||
N: common_vendor.n(_ctx.displayType + "-main-content"),
|
||||
O: common_vendor.n(_ctx.displayType)
|
||||
}) : _ctx.displayType === "image" ? common_vendor.e({
|
||||
Q: _ctx.listItem.type === common_vendor.unref(TYPES).MSG_IMAGE
|
||||
}, _ctx.listItem.type === common_vendor.unref(TYPES).MSG_IMAGE ? {
|
||||
R: common_vendor.p({
|
||||
messageContent: _ctx.listItemContent
|
||||
})
|
||||
} : _ctx.listItem.type === common_vendor.unref(TYPES).MSG_VIDEO ? {
|
||||
T: common_vendor.p({
|
||||
messageContent: _ctx.listItemContent
|
||||
})
|
||||
} : {}, {
|
||||
S: _ctx.listItem.type === common_vendor.unref(TYPES).MSG_VIDEO,
|
||||
U: common_vendor.unref(isHovering)
|
||||
}, common_vendor.unref(isHovering) ? {
|
||||
V: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("TUISearch.定位到聊天位置"))
|
||||
} : {}, {
|
||||
W: common_vendor.o$1(navigateToChatPosition),
|
||||
X: common_vendor.n(_ctx.displayType)
|
||||
}) : {}, {
|
||||
A: _ctx.displayType === "file",
|
||||
P: _ctx.displayType === "image",
|
||||
Y: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "search-result-list-item-h5"),
|
||||
Z: common_vendor.n("search-result-list-item-" + _ctx.displayType),
|
||||
aa: common_vendor.n(common_vendor.unref(isHovering) && "hover-" + _ctx.displayType),
|
||||
ab: common_vendor.o$1(onResultItemClicked),
|
||||
ac: common_vendor.o$1(($event) => setHoverStatus(true)),
|
||||
ad: common_vendor.o$1(($event) => setHoverStatus(false))
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-64f261e1"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-item/index.js.map
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"message-abstract-text": "./message-abstract/message-abstract-text",
|
||||
"message-abstract-file": "./message-abstract/message-abstract-file",
|
||||
"message-abstract-custom": "./message-abstract/message-abstract-custom",
|
||||
"message-abstract-image": "./message-abstract/message-abstract-image",
|
||||
"message-abstract-video": "./message-abstract/message-abstract-video"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-64f261e1', 'search-result-list-item', Y, Z, aa]}}" bindtap="{{ab}}" bindmouseenter="{{ac}}" bindmouseleave="{{ad}}"><view wx:if="{{a}}" class="{{['data-v-64f261e1', z]}}"><view class="{{['data-v-64f261e1', d]}}"><image class="{{['data-v-64f261e1', b]}}" src="{{c}}" onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"></image></view><view class="{{['data-v-64f261e1', q]}}"><view class="{{['data-v-64f261e1', f]}}">{{e}}</view><view class="{{['data-v-64f261e1', p]}}"><message-abstract-text wx:if="{{g}}" class="data-v-64f261e1" u-i="64f261e1-0" bind:__l="__l" u-p="{{h}}"/><message-abstract-file wx:elif="{{i}}" class="data-v-64f261e1" u-i="64f261e1-1" bind:__l="__l" u-p="{{j}}"/><view wx:elif="{{k}}" class="data-v-64f261e1"/><view wx:elif="{{l}}" class="data-v-64f261e1"/><message-abstract-custom wx:elif="{{m}}" class="data-v-64f261e1" u-i="64f261e1-2" bind:__l="__l" u-p="{{n}}"/><view wx:else class="data-v-64f261e1">{{o}}</view></view></view><view class="{{['data-v-64f261e1', y]}}"><view class="{{['data-v-64f261e1', s]}}">{{r}}</view><view wx:if="{{t}}" class="{{['data-v-64f261e1', w]}}" catchtap="{{x}}">{{v}}</view></view></view><view wx:elif="{{A}}" class="{{['data-v-64f261e1', O]}}"><view class="{{['data-v-64f261e1', L]}}"><image class="{{['data-v-64f261e1', B]}}" src="{{C}}" onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"></image><view class="{{['data-v-64f261e1', E]}}">{{D}}</view><view wx:if="{{F}}" class="{{['data-v-64f261e1', H]}}" catchtap="{{I}}">{{G}}</view><view class="{{['data-v-64f261e1', K]}}">{{J}}</view></view><view class="{{['data-v-64f261e1', N]}}"><message-abstract-file wx:if="{{M}}" class="data-v-64f261e1" u-i="64f261e1-3" bind:__l="__l" u-p="{{M}}"/></view></view><view wx:elif="{{P}}" class="{{['data-v-64f261e1', X]}}"><view class="image-container data-v-64f261e1" catchtap="{{W}}"><message-abstract-image wx:if="{{Q}}" class="data-v-64f261e1" u-i="64f261e1-4" bind:__l="__l" u-p="{{R}}"/><message-abstract-video wx:elif="{{S}}" class="data-v-64f261e1" u-i="64f261e1-5" bind:__l="__l" u-p="{{T}}"/><view wx:if="{{U}}" class="image-container-hover data-v-64f261e1"><view class="image-container-hover-text data-v-64f261e1">{{V}}</view></view></view></view></view>
|
||||
315
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-item/index.wxss
vendored
Normal file
315
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-item/index.wxss
vendored
Normal file
@@ -0,0 +1,315 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-64f261e1, div.data-v-64f261e1, ul.data-v-64f261e1, ol.data-v-64f261e1, dt.data-v-64f261e1, dd.data-v-64f261e1, li.data-v-64f261e1, dl.data-v-64f261e1, h1.data-v-64f261e1, h2.data-v-64f261e1, h3.data-v-64f261e1, h4.data-v-64f261e1, p.data-v-64f261e1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-64f261e1, ul.data-v-64f261e1, li.data-v-64f261e1 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-64f261e1 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-64f261e1 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-64f261e1 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-64f261e1 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-64f261e1:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-64f261e1, textarea.data-v-64f261e1 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-64f261e1:focus, input.data-v-64f261e1:active, textarea.data-v-64f261e1:focus, textarea.data-v-64f261e1:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-64f261e1 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.search-result-list-item.data-v-64f261e1 {
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
cursor: pointer;
|
||||
}
|
||||
.search-result-list-item-image.data-v-64f261e1 {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
max-width: 100px;
|
||||
max-height: 100px;
|
||||
overflow: hidden;
|
||||
box-sizing: content-box;
|
||||
border: 1px solid #f1f1f1;
|
||||
padding: 0;
|
||||
margin: 5px;
|
||||
}
|
||||
.search-result-list-item-file.data-v-64f261e1 {
|
||||
border: none;
|
||||
}
|
||||
.search-result-list-item .info.data-v-64f261e1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
.search-result-list-item .info-left-avatar.data-v-64f261e1 {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.search-result-list-item .info-main.data-v-64f261e1 {
|
||||
flex: 1;
|
||||
padding: 0 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.search-result-list-item .info-main-name.data-v-64f261e1, .search-result-list-item .info-main-content.data-v-64f261e1 {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.search-result-list-item .info-main-name.data-v-64f261e1 {
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
height: 20px;
|
||||
}
|
||||
.search-result-list-item .info-main-content.data-v-64f261e1 {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
.search-result-list-item .info-main-content .highlight.data-v-64f261e1 {
|
||||
color: #007aff;
|
||||
}
|
||||
.search-result-list-item .info-main-content .normal.data-v-64f261e1 {
|
||||
color: #999;
|
||||
}
|
||||
.search-result-list-item .info-right.data-v-64f261e1 {
|
||||
width: -webkit-fit-content;
|
||||
width: fit-content;
|
||||
}
|
||||
.search-result-list-item .info-right-time.data-v-64f261e1 {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
letter-spacing: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.search-result-list-item .bubble.data-v-64f261e1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
.search-result-list-item .bubble-left-avatar.data-v-64f261e1 {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.search-result-list-item .bubble-main.data-v-64f261e1 {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.search-result-list-item .bubble-main-name.data-v-64f261e1 {
|
||||
max-width: 100%;
|
||||
width: -webkit-fit-content;
|
||||
width: fit-content;
|
||||
padding-bottom: 4px;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
letter-spacing: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.search-result-list-item .bubble-main-content.data-v-64f261e1 {
|
||||
max-width: 100%;
|
||||
width: -webkit-fit-content;
|
||||
width: fit-content;
|
||||
box-sizing: border-box;
|
||||
padding: 12px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
letter-spacing: 0;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
background: #eff0f1;
|
||||
border-radius: 0 10px 10px;
|
||||
}
|
||||
.search-result-list-item .bubble-main-content .highlight.data-v-64f261e1 {
|
||||
background-color: #007aff33;
|
||||
}
|
||||
.search-result-list-item .bubble-main-content .normal.data-v-64f261e1 {
|
||||
color: #1f2329;
|
||||
}
|
||||
.search-result-list-item .bubble-right.data-v-64f261e1 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.search-result-list-item .bubble-right-time.data-v-64f261e1 {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
letter-spacing: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.search-result-list-item .bubble-right-to.data-v-64f261e1 {
|
||||
cursor: pointer;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #007aff;
|
||||
letter-spacing: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.search-result-list-item .file.data-v-64f261e1 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.search-result-list-item .file-header.data-v-64f261e1 {
|
||||
flex: 1;
|
||||
padding: 10px 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.search-result-list-item .file-header-avatar.data-v-64f261e1 {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 4px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
.search-result-list-item .file-header-name.data-v-64f261e1 {
|
||||
flex: 1;
|
||||
}
|
||||
.search-result-list-item .file-header-name.data-v-64f261e1, .search-result-list-item .file-header-time.data-v-64f261e1, .search-result-list-item .file-header-to.data-v-64f261e1 {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
height: 24px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.search-result-list-item .file-header-to.data-v-64f261e1 {
|
||||
cursor: pointer;
|
||||
font-weight: 400;
|
||||
color: #007aff;
|
||||
letter-spacing: 0;
|
||||
white-space: nowrap;
|
||||
padding-right: 3px;
|
||||
}
|
||||
.search-result-list-item .file-main-content.data-v-64f261e1 {
|
||||
padding: 10px;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
.search-result-list-item .image.data-v-64f261e1 {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
max-width: 100px;
|
||||
max-height: 100px;
|
||||
overflow: hidden;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.search-result-list-item .image .image-container.data-v-64f261e1 {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
max-width: 100px;
|
||||
max-height: 100px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.search-result-list-item .image .image-container .image-container-hover.data-v-64f261e1 {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 40%;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.search-result-list-item .image .image-container .image-container-hover .image-container-hover-text.data-v-64f261e1 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.hover-info.data-v-64f261e1 {
|
||||
border-radius: 5px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.hover-bubble.data-v-64f261e1 {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.search-result-list-item-h5.data-v-64f261e1 {
|
||||
padding: 10px 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.search-result-list-item-h5 .bubble .bubble-left .bubble-left-avatar.data-v-64f261e1 {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
.search-result-list-item-h5 .bubble .bubble-left .bubble-main .bubble-main-name.data-v-64f261e1 {
|
||||
color: #333;
|
||||
font-family: "PingFang SC", sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0;
|
||||
text-align: left;
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../../common/vendor.js");
|
||||
require("../../../../../adapter-vue.js");
|
||||
const TUIKit_constant = require("../../../../../constant.js");
|
||||
const TUIKit_utils_typeCheck = require("../../../../../utils/type-check.js");
|
||||
const common_assets = require("../../../../../../common/assets.js");
|
||||
if (!Math) {
|
||||
Icon();
|
||||
}
|
||||
const Icon = () => "../../../../common/Icon.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "message-abstract-custom",
|
||||
props: {
|
||||
contentText: { default: () => [] },
|
||||
message: { default: () => ({}) },
|
||||
messageContent: { default: () => ({}) }
|
||||
},
|
||||
setup(__props) {
|
||||
var _a, _b;
|
||||
const props = __props;
|
||||
const custom = common_vendor.ref(
|
||||
(_a = props == null ? void 0 : props.message) == null ? void 0 : _a.payload
|
||||
);
|
||||
const extensionJSON = common_vendor.computed(() => {
|
||||
var _a2, _b2;
|
||||
return ((_a2 = custom == null ? void 0 : custom.value) == null ? void 0 : _a2.data) ? TUIKit_utils_typeCheck.JSONToObject(custom.value.data) : (_b2 = custom == null ? void 0 : custom.value) == null ? void 0 : _b2.data;
|
||||
});
|
||||
const businessID = common_vendor.computed(() => {
|
||||
var _a2;
|
||||
return (_a2 = extensionJSON == null ? void 0 : extensionJSON.value) == null ? void 0 : _a2.businessID;
|
||||
});
|
||||
const descriptionForShow = common_vendor.ref(props == null ? void 0 : props.contentText);
|
||||
const defaultMessageContent = common_vendor.ref(((_b = props == null ? void 0 : props.messageContent) == null ? void 0 : _b.custom) || "[自定义消息]");
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.unref(businessID) === common_vendor.unref(TUIKit_constant.CHAT_MSG_CUSTOM_TYPE).SERVICE
|
||||
}, common_vendor.unref(businessID) === common_vendor.unref(TUIKit_constant.CHAT_MSG_CUSTOM_TYPE).SERVICE ? common_vendor.e({
|
||||
b: common_vendor.t(common_vendor.unref(extensionJSON).title),
|
||||
c: common_vendor.unref(extensionJSON).hyperlinks_text
|
||||
}, common_vendor.unref(extensionJSON).hyperlinks_text ? {
|
||||
d: common_vendor.t(common_vendor.unref(extensionJSON).hyperlinks_text.key),
|
||||
e: common_vendor.unref(extensionJSON).hyperlinks_text.value
|
||||
} : {}, {
|
||||
f: common_vendor.unref(extensionJSON).item && common_vendor.unref(extensionJSON).item.length > 0
|
||||
}, common_vendor.unref(extensionJSON).item && common_vendor.unref(extensionJSON).item.length > 0 ? {
|
||||
g: common_vendor.f(common_vendor.unref(extensionJSON).item, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.unref(TUIKit_utils_typeCheck.isUrl)(item.value)
|
||||
}, common_vendor.unref(TUIKit_utils_typeCheck.isUrl)(item.value) ? {
|
||||
b: common_vendor.t(item.key),
|
||||
c: item.value
|
||||
} : {
|
||||
d: common_vendor.t(item.key)
|
||||
}, {
|
||||
e: index
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
h: common_vendor.f(common_vendor.unref(descriptionForShow), (contentItem, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(contentItem.text),
|
||||
b: index,
|
||||
c: common_vendor.n(contentItem && contentItem.isHighlight ? "highlight" : "normal")
|
||||
};
|
||||
})
|
||||
}) : common_vendor.unref(businessID) === common_vendor.unref(TUIKit_constant.CHAT_MSG_CUSTOM_TYPE).EVALUATE ? common_vendor.e({
|
||||
j: common_vendor.f(common_vendor.unref(descriptionForShow), (contentItem, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(contentItem.text),
|
||||
b: index,
|
||||
c: common_vendor.n(contentItem && contentItem.isHighlight ? "highlight" : "normal")
|
||||
};
|
||||
}),
|
||||
k: common_vendor.unref(extensionJSON).score
|
||||
}, common_vendor.unref(extensionJSON).score ? {
|
||||
l: common_vendor.f(Math.max(common_vendor.unref(extensionJSON).score, 0), (item, index, i0) => {
|
||||
return {
|
||||
a: "88d2ba7b-0-" + i0,
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.star)
|
||||
})
|
||||
} : {}, {
|
||||
n: common_vendor.t(common_vendor.unref(extensionJSON).comment)
|
||||
}) : common_vendor.unref(businessID) === common_vendor.unref(TUIKit_constant.CHAT_MSG_CUSTOM_TYPE).ORDER ? {
|
||||
p: common_vendor.unref(extensionJSON).imageUrl,
|
||||
q: common_vendor.t(common_vendor.unref(extensionJSON).title),
|
||||
r: common_vendor.f(common_vendor.unref(descriptionForShow), (contentItem, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(contentItem.text),
|
||||
b: index,
|
||||
c: common_vendor.n(contentItem && contentItem.isHighlight ? "highlight" : "normal")
|
||||
};
|
||||
}),
|
||||
s: common_vendor.t(common_vendor.unref(extensionJSON).price)
|
||||
} : common_vendor.unref(businessID) === common_vendor.unref(TUIKit_constant.CHAT_MSG_CUSTOM_TYPE).LINK ? {
|
||||
v: common_vendor.t(common_vendor.unref(extensionJSON).text),
|
||||
w: common_vendor.t(common_vendor.unref(common_vendor.Wt).t("message.custom.查看详情>>")),
|
||||
x: common_vendor.unref(extensionJSON).link
|
||||
} : {
|
||||
y: common_vendor.t(common_vendor.unref(defaultMessageContent))
|
||||
}, {
|
||||
i: common_vendor.unref(businessID) === common_vendor.unref(TUIKit_constant.CHAT_MSG_CUSTOM_TYPE).EVALUATE,
|
||||
o: common_vendor.unref(businessID) === common_vendor.unref(TUIKit_constant.CHAT_MSG_CUSTOM_TYPE).ORDER,
|
||||
t: common_vendor.unref(businessID) === common_vendor.unref(TUIKit_constant.CHAT_MSG_CUSTOM_TYPE).LINK,
|
||||
z: common_vendor.o$1(() => {
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-88d2ba7b"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-item/message-abstract/message-abstract-custom.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../../../common/Icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-88d2ba7b', 'message-abstract-custom']}}" capture-catch:tap="{{z}}"><block wx:if="{{a}}"><view class="{{['data-v-88d2ba7b', 'service']}}"><view class="{{['data-v-88d2ba7b', 'service-header']}}"><label class="{{['data-v-88d2ba7b', 'service-header-title']}}">{{b}}</label><navigator wx:if="{{c}}" class="{{['data-v-88d2ba7b', 'service-header-link', 'link']}}" href="{{e}}" target="view_window">{{d}}</navigator></view><view wx:if="{{f}}" class="{{['data-v-88d2ba7b', 'service-list']}}"><view wx:for="{{g}}" wx:for-item="item" wx:key="e" class="{{['data-v-88d2ba7b', 'service-list-item']}}"><navigator wx:if="{{item.a}}" class="{{['data-v-88d2ba7b', 'service-list-item-link', 'link']}}" href="{{item.c}}" target="view_window">{{item.b}}</navigator><view wx:else class="{{['data-v-88d2ba7b', 'service-list-item-key']}}">{{item.d}}</view></view></view><view class="{{['data-v-88d2ba7b', 'service-description', 'description']}}"><label wx:for="{{h}}" wx:for-item="contentItem" wx:key="b" class="{{['data-v-88d2ba7b', contentItem.c]}}">{{contentItem.a}}</label></view></view></block><block wx:elif="{{i}}"><view class="evaluate data-v-88d2ba7b"><view class="{{['data-v-88d2ba7b', 'evaluate-description', 'description']}}"><label wx:for="{{j}}" wx:for-item="contentItem" wx:key="b" class="{{['data-v-88d2ba7b', contentItem.c]}}">{{contentItem.a}}</label></view><view wx:if="{{k}}" class="evaluate-list data-v-88d2ba7b"><view wx:for="{{l}}" wx:for-item="item" wx:key="b" class="evaluate-list-item data-v-88d2ba7b"><icon wx:if="{{m}}" class="file-icon data-v-88d2ba7b" u-i="{{item.a}}" bind:__l="__l" u-p="{{m}}"/></view></view><view class="data-v-88d2ba7b">{{n}}</view></view></block><block wx:elif="{{o}}"><view class="order data-v-88d2ba7b"><image class="order-image data-v-88d2ba7b" src="{{p}}" alt=""></image><view class="order-main data-v-88d2ba7b"><view class="order-main-title data-v-88d2ba7b">{{q}}</view><view class="{{['data-v-88d2ba7b', 'order-main-description', 'description']}}"><label wx:for="{{r}}" wx:for-item="contentItem" wx:key="b" class="{{['data-v-88d2ba7b', contentItem.c]}}">{{contentItem.a}}</label></view><label class="order-main-price data-v-88d2ba7b">{{s}}</label></view></view></block><block wx:elif="{{t}}"><view class="text-link data-v-88d2ba7b"><view class="{{['data-v-88d2ba7b', 'text-link-description', 'description']}}"><view class="data-v-88d2ba7b">{{v}}</view></view><navigator class="{{['data-v-88d2ba7b', 'link']}}" href="{{x}}" target="view_window">{{w}}</navigator></view></block><block wx:else><label class="data-v-88d2ba7b">{{y}}</label></block></view>
|
||||
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-88d2ba7b, div.data-v-88d2ba7b, ul.data-v-88d2ba7b, ol.data-v-88d2ba7b, dt.data-v-88d2ba7b, dd.data-v-88d2ba7b, li.data-v-88d2ba7b, dl.data-v-88d2ba7b, h1.data-v-88d2ba7b, h2.data-v-88d2ba7b, h3.data-v-88d2ba7b, h4.data-v-88d2ba7b, p.data-v-88d2ba7b {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-88d2ba7b, ul.data-v-88d2ba7b, li.data-v-88d2ba7b {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-88d2ba7b {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-88d2ba7b {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-88d2ba7b {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-88d2ba7b {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-88d2ba7b:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-88d2ba7b, textarea.data-v-88d2ba7b {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-88d2ba7b:focus, input.data-v-88d2ba7b:active, textarea.data-v-88d2ba7b:focus, textarea.data-v-88d2ba7b:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-88d2ba7b {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.message-abstract-custom .service .service-header.data-v-88d2ba7b {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
}
|
||||
.message-abstract-custom .service .service-list .service-list-item.data-v-88d2ba7b {
|
||||
font-size: 14px;
|
||||
}
|
||||
.message-abstract-custom .evaluate .evaluate-list.data-v-88d2ba7b {
|
||||
padding: 5px 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.message-abstract-custom .evaluate .evaluate-list .evaluate-item.data-v-88d2ba7b {
|
||||
padding: 0 2px;
|
||||
}
|
||||
.message-abstract-custom .order.data-v-88d2ba7b {
|
||||
display: flex;
|
||||
}
|
||||
.message-abstract-custom .order .order-main.data-v-88d2ba7b {
|
||||
padding-left: 5px;
|
||||
}
|
||||
.message-abstract-custom .order .order-main .order-main-title.data-v-88d2ba7b {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
}
|
||||
.message-abstract-custom .order .order-main .order-main-description.data-v-88d2ba7b {
|
||||
font-family: PingFangSC-Regular, sans-serif;
|
||||
width: 145px;
|
||||
line-height: 17px;
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
letter-spacing: 0;
|
||||
margin-bottom: 6px;
|
||||
word-break: break-word;
|
||||
}
|
||||
.message-abstract-custom .order .order-main .order-main-price.data-v-88d2ba7b {
|
||||
font-family: PingFangSC-Regular, sans-serif;
|
||||
line-height: 25px;
|
||||
color: #ff7201;
|
||||
}
|
||||
.message-abstract-custom .order .order-img.data-v-88d2ba7b {
|
||||
width: 67px;
|
||||
height: 67px;
|
||||
}
|
||||
.message-abstract-custom .link.data-v-88d2ba7b {
|
||||
font-size: 14px;
|
||||
color: #679ce1;
|
||||
}
|
||||
.message-abstract-custom .description.data-v-88d2ba7b {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
}
|
||||
.message-abstract-custom .description .highlight.data-v-88d2ba7b {
|
||||
background-color: #007aff33;
|
||||
}
|
||||
.message-abstract-custom .description .normal.data-v-88d2ba7b {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../../common/vendor.js");
|
||||
require("../../../../../adapter-vue.js");
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "message-abstract-file",
|
||||
props: {
|
||||
contentText: { default: () => [] },
|
||||
messageContent: { default: () => ({}) },
|
||||
displayType: { default: "bubble" }
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const contentText = common_vendor.ref(props.contentText);
|
||||
const typeIcon = common_vendor.computed(() => {
|
||||
var _a;
|
||||
const fileUrl = (_a = props == null ? void 0 : props.messageContent) == null ? void 0 : _a.url;
|
||||
const index = fileUrl == null ? void 0 : fileUrl.lastIndexOf(".");
|
||||
const type = fileUrl == null ? void 0 : fileUrl.substring(index + 1);
|
||||
return handleFileIconForShow(type);
|
||||
});
|
||||
const fileSize = common_vendor.computed(() => {
|
||||
var _a;
|
||||
return (_a = props == null ? void 0 : props.messageContent) == null ? void 0 : _a.size;
|
||||
});
|
||||
const handleFileIconForShow = (type) => {
|
||||
const urlBase = "https://web.sdk.qcloud.com/component/TUIKit/assets/file-";
|
||||
const fileTypes = [
|
||||
"image",
|
||||
"pdf",
|
||||
"text",
|
||||
"ppt",
|
||||
"presentation",
|
||||
"sheet",
|
||||
"zip",
|
||||
"word",
|
||||
"video",
|
||||
"unknown"
|
||||
];
|
||||
let url = "";
|
||||
let iconType = "";
|
||||
fileTypes == null ? void 0 : fileTypes.forEach((typeName) => {
|
||||
if (type == null ? void 0 : type.includes(typeName)) {
|
||||
url = urlBase + typeName + ".svg";
|
||||
iconType = typeName;
|
||||
}
|
||||
});
|
||||
return {
|
||||
iconSrc: url ? url : urlBase + "unknown.svg",
|
||||
iconType: iconType ? iconType : "unknown"
|
||||
};
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.unref(typeIcon).iconSrc,
|
||||
b: common_vendor.f(common_vendor.unref(contentText), (contentItem, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(contentItem.text),
|
||||
b: index,
|
||||
c: common_vendor.n(contentItem && contentItem.isHighlight ? "highlight" : "normal")
|
||||
};
|
||||
}),
|
||||
c: common_vendor.t(common_vendor.unref(fileSize)),
|
||||
d: common_vendor.n(`message-abstract-file-${_ctx.displayType}`)
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e3774db0"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-item/message-abstract/message-abstract-file.js.map
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-e3774db0', 'message-abstract-file', d]}}"><view class="{{['data-v-e3774db0', 'message-abstract-file-left']}}"><image class="{{['data-v-e3774db0', 'message-abstract-file-left-icon']}}" src="{{a}}"></image></view><view class="{{['data-v-e3774db0', 'message-abstract-file-main']}}"><view class="{{['data-v-e3774db0', 'message-abstract-file-main-name']}}"><label wx:for="{{b}}" wx:for-item="contentItem" wx:key="b" class="{{['data-v-e3774db0', contentItem.c]}}">{{contentItem.a}}</label></view><view class="{{['data-v-e3774db0', 'message-abstract-file-main-size']}}">{{c}}</view></view></view>
|
||||
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-e3774db0, div.data-v-e3774db0, ul.data-v-e3774db0, ol.data-v-e3774db0, dt.data-v-e3774db0, dd.data-v-e3774db0, li.data-v-e3774db0, dl.data-v-e3774db0, h1.data-v-e3774db0, h2.data-v-e3774db0, h3.data-v-e3774db0, h4.data-v-e3774db0, p.data-v-e3774db0 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-e3774db0, ul.data-v-e3774db0, li.data-v-e3774db0 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-e3774db0 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-e3774db0 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-e3774db0 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-e3774db0 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-e3774db0:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-e3774db0, textarea.data-v-e3774db0 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-e3774db0:focus, input.data-v-e3774db0:active, textarea.data-v-e3774db0:focus, textarea.data-v-e3774db0:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-e3774db0 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.message-abstract-file.data-v-e3774db0 {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.message-abstract-file-left.data-v-e3774db0 {
|
||||
width: 42px;
|
||||
height: 32px;
|
||||
}
|
||||
.message-abstract-file-left-icon.data-v-e3774db0 {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-right: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.message-abstract-file-main.data-v-e3774db0 {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.message-abstract-file-main-name.data-v-e3774db0 {
|
||||
width: 100%;
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.message-abstract-file-main-name .highlight.data-v-e3774db0 {
|
||||
background-color: #007aff33;
|
||||
}
|
||||
.message-abstract-file-main-name .normal.data-v-e3774db0 {
|
||||
color: #000;
|
||||
}
|
||||
.message-abstract-file-main-size.data-v-e3774db0 {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
}
|
||||
.message-abstract-file-bubble.data-v-e3774db0 {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
.message-abstract-file-bubble .message-abstract-file-main .message-abstract-file-main-name.data-v-e3774db0 {
|
||||
color: #1f2329;
|
||||
}
|
||||
.message-abstract-file-bubble .message-abstract-file-main .message-abstract-file-main-name .normal.data-v-e3774db0 {
|
||||
color: #1f2329;
|
||||
}
|
||||
.message-abstract-file-file.data-v-e3774db0 {
|
||||
margin: 8px 10px 5px;
|
||||
padding: 10px;
|
||||
background-color: #f1f1f1;
|
||||
height: 51px;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../../common/vendor.js");
|
||||
require("../../../../../adapter-vue.js");
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "message-abstract-image",
|
||||
props: {
|
||||
messageContent: { default: () => ({}) }
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const imageUrl = common_vendor.computed(() => props.messageContent.url || "");
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.unref(imageUrl)
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9a7df6f1"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-item/message-abstract/message-abstract-image.js.map
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-9a7df6f1', 'message-abstract-image-container']}}"><image class="{{['data-v-9a7df6f1', 'message-abstract-image']}}" src="{{a}}"></image></view>
|
||||
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-9a7df6f1, div.data-v-9a7df6f1, ul.data-v-9a7df6f1, ol.data-v-9a7df6f1, dt.data-v-9a7df6f1, dd.data-v-9a7df6f1, li.data-v-9a7df6f1, dl.data-v-9a7df6f1, h1.data-v-9a7df6f1, h2.data-v-9a7df6f1, h3.data-v-9a7df6f1, h4.data-v-9a7df6f1, p.data-v-9a7df6f1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-9a7df6f1, ul.data-v-9a7df6f1, li.data-v-9a7df6f1 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-9a7df6f1 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-9a7df6f1 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-9a7df6f1 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-9a7df6f1 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-9a7df6f1:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-9a7df6f1, textarea.data-v-9a7df6f1 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-9a7df6f1:focus, input.data-v-9a7df6f1:active, textarea.data-v-9a7df6f1:focus, textarea.data-v-9a7df6f1:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-9a7df6f1 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.message-abstract-image-container.data-v-9a7df6f1 {
|
||||
max-width: 100px;
|
||||
max-height: 100px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
}
|
||||
.message-abstract-image-container .message-abstract-image.data-v-9a7df6f1 {
|
||||
max-width: 100px;
|
||||
max-height: 100px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
object-fit: contain;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../../common/vendor.js");
|
||||
require("../../../../../adapter-vue.js");
|
||||
const TUIKit_components_TUIChat_emojiConfig_index = require("../../../../TUIChat/emoji-config/index.js");
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "message-abstract-text",
|
||||
props: {
|
||||
content: { default: () => [] },
|
||||
highlightType: { default: "font" },
|
||||
displayType: { default: "info" }
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const contentText = common_vendor.ref(props.content);
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.f(common_vendor.unref(contentText), (contentItem, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(common_vendor.unref(TUIKit_components_TUIChat_emojiConfig_index.transformTextWithKeysToEmojiNames)(contentItem.text)),
|
||||
b: index,
|
||||
c: common_vendor.n(contentItem && contentItem.isHighlight ? "highlight" : "normal")
|
||||
};
|
||||
}),
|
||||
b: common_vendor.n(`message-abstract-text-${_ctx.highlightType}`),
|
||||
c: common_vendor.n(`message-abstract-text-${_ctx.displayType}`)
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-94825845"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-item/message-abstract/message-abstract-text.js.map
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-94825845', 'message-abstract-text', b, c]}}"><label wx:for="{{a}}" wx:for-item="contentItem" wx:key="b" class="{{['data-v-94825845', contentItem.c]}}">{{contentItem.a}}</label></view>
|
||||
@@ -0,0 +1,117 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-94825845, div.data-v-94825845, ul.data-v-94825845, ol.data-v-94825845, dt.data-v-94825845, dd.data-v-94825845, li.data-v-94825845, dl.data-v-94825845, h1.data-v-94825845, h2.data-v-94825845, h3.data-v-94825845, h4.data-v-94825845, p.data-v-94825845 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-94825845, ul.data-v-94825845, li.data-v-94825845 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-94825845 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-94825845 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-94825845 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-94825845 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-94825845:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-94825845, textarea.data-v-94825845 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-94825845:focus, input.data-v-94825845:active, textarea.data-v-94825845:focus, textarea.data-v-94825845:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-94825845 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.message-abstract-text.data-v-94825845 {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.message-abstract-text-font.data-v-94825845 {
|
||||
color: #999;
|
||||
}
|
||||
.message-abstract-text-font .highlight.data-v-94825845 {
|
||||
color: #007aff;
|
||||
}
|
||||
.message-abstract-text-font .normal.data-v-94825845 {
|
||||
color: #999;
|
||||
}
|
||||
.message-abstract-text-background.data-v-94825845 {
|
||||
color: #1f2329;
|
||||
}
|
||||
.message-abstract-text-background .highlight.data-v-94825845 {
|
||||
background-color: #007aff33;
|
||||
}
|
||||
.message-abstract-text-background .normal.data-v-94825845 {
|
||||
font-size: 14px;
|
||||
}
|
||||
.message-abstract-text-info.data-v-94825845 {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
}
|
||||
.message-abstract-text-info .highlight.data-v-94825845 {
|
||||
font-size: 12px;
|
||||
}
|
||||
.message-abstract-text-info .normal.data-v-94825845 {
|
||||
font-size: 12px;
|
||||
}
|
||||
.message-abstract-text-bubble.data-v-94825845 {
|
||||
font-size: 14px;
|
||||
}
|
||||
.message-abstract-text-bubble .highlight.data-v-94825845 {
|
||||
font-size: 14px;
|
||||
}
|
||||
.message-abstract-text-bubble .normal.data-v-94825845 {
|
||||
font-size: 14px;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../../common/vendor.js");
|
||||
require("../../../../../adapter-vue.js");
|
||||
const common_assets = require("../../../../../../common/assets.js");
|
||||
if (!Math) {
|
||||
Icon();
|
||||
}
|
||||
const Icon = () => "../../../../common/Icon.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "message-abstract-video",
|
||||
props: {
|
||||
messageContent: { default: () => ({}) }
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const videoUrl = common_vendor.computed(() => {
|
||||
return props.messageContent.snapshotUrl || props.messageContent.url;
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.unref(videoUrl),
|
||||
b: common_vendor.p({
|
||||
file: common_vendor.unref(common_assets.playIcon)
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-15182b71"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-item/message-abstract/message-abstract-video.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../../../common/Icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-15182b71', 'message-abstract-video']}}"><view class="message-abstract-video-box data-v-15182b71"><image src="{{a}}" class="{{['data-v-15182b71', 'video-snapshot']}}"></image><icon wx:if="{{b}}" class="video-play data-v-15182b71" u-i="15182b71-0" bind:__l="__l" u-p="{{b}}"/></view></view>
|
||||
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-15182b71, div.data-v-15182b71, ul.data-v-15182b71, ol.data-v-15182b71, dt.data-v-15182b71, dd.data-v-15182b71, li.data-v-15182b71, dl.data-v-15182b71, h1.data-v-15182b71, h2.data-v-15182b71, h3.data-v-15182b71, h4.data-v-15182b71, p.data-v-15182b71 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-15182b71, ul.data-v-15182b71, li.data-v-15182b71 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-15182b71 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-15182b71 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-15182b71 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-15182b71 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-15182b71:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-15182b71, textarea.data-v-15182b71 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-15182b71:focus, input.data-v-15182b71:active, textarea.data-v-15182b71:focus, textarea.data-v-15182b71:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-15182b71 {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
width: 360px !important;
|
||||
border-radius: 8px 0 0 8px;
|
||||
z-index: 9999;
|
||||
max-height: calc(100% - 50px);
|
||||
}
|
||||
.message-abstract-video.data-v-15182b71 {
|
||||
max-width: 100px;
|
||||
max-height: 100px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
}
|
||||
.message-abstract-video-box.data-v-15182b71 {
|
||||
max-width: 100px;
|
||||
max-height: 100px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
}
|
||||
.message-abstract-video-box .video-snapshot.data-v-15182b71 {
|
||||
max-width: 100px;
|
||||
max-height: 100px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
object-fit: contain;
|
||||
}
|
||||
.message-abstract-video-box .video-play.data-v-15182b71 {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 3;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
margin: auto;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
if (!Math) {
|
||||
Loading();
|
||||
}
|
||||
const Loading = () => "../../../common/Loading/index.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
width: "40px",
|
||||
height: "40px"
|
||||
}),
|
||||
b: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "search-result-loading-h5")
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a295db57"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-result/search-result-loading/index.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"loading": "../../../common/Loading/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-a295db57', 'search-result-loading', b]}}"><loading wx:if="{{a}}" class="data-v-a295db57" u-i="a295db57-0" bind:__l="__l" u-p="{{a}}"/></view>
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.search-result-loading.data-v-a295db57 {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.search-result-loading-h5.data-v-a295db57 {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
40
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-time-list.js
vendored
Normal file
40
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-time-list.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
const oneDay = 24 * 60 * 60;
|
||||
const searchMessageTimeList = {
|
||||
all: {
|
||||
key: "all",
|
||||
label: "全部",
|
||||
value: {
|
||||
timePosition: 0,
|
||||
timePeriod: 0
|
||||
}
|
||||
},
|
||||
oneDay: {
|
||||
key: "today",
|
||||
label: "今天",
|
||||
value: {
|
||||
timePosition: 0,
|
||||
timePeriod: oneDay
|
||||
}
|
||||
},
|
||||
threeDay: {
|
||||
key: "threeDays",
|
||||
label: "近三天",
|
||||
value: {
|
||||
timePosition: 0,
|
||||
timePeriod: 3 * oneDay
|
||||
}
|
||||
},
|
||||
sevenDay: {
|
||||
key: "sevenDays",
|
||||
label: "近七天",
|
||||
value: {
|
||||
timePosition: 0,
|
||||
timePeriod: 7 * oneDay
|
||||
}
|
||||
}
|
||||
};
|
||||
const searchMessageTimeDefault = searchMessageTimeList["all"];
|
||||
exports.searchMessageTimeDefault = searchMessageTimeDefault;
|
||||
exports.searchMessageTimeList = searchMessageTimeList;
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-time-list.js.map
|
||||
73
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-type-list.js
vendored
Normal file
73
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/search-type-list.js
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const allMessageTypeList = [
|
||||
common_vendor.qt.TYPES.MSG_TEXT,
|
||||
common_vendor.qt.TYPES.MSG_FILE,
|
||||
common_vendor.qt.TYPES.MSG_IMAGE,
|
||||
common_vendor.qt.TYPES.MSG_VIDEO,
|
||||
common_vendor.qt.TYPES.MSG_AUDIO,
|
||||
common_vendor.qt.TYPES.MSG_LOCATION,
|
||||
common_vendor.qt.TYPES.MSG_CUSTOM,
|
||||
common_vendor.qt.TYPES.MSG_MERGER
|
||||
];
|
||||
const searchMessageTypeList = {
|
||||
allMessage: {
|
||||
key: "allMessage",
|
||||
label: "全部",
|
||||
value: allMessageTypeList
|
||||
},
|
||||
textMessage: {
|
||||
key: "textMessage",
|
||||
label: "文本",
|
||||
value: [common_vendor.qt.TYPES.MSG_TEXT]
|
||||
},
|
||||
fileMessage: {
|
||||
key: "fileMessage",
|
||||
label: "文件",
|
||||
value: [common_vendor.qt.TYPES.MSG_FILE]
|
||||
},
|
||||
imageMessage: {
|
||||
key: "imageMessage",
|
||||
label: "图片/视频",
|
||||
value: [common_vendor.qt.TYPES.MSG_IMAGE, common_vendor.qt.TYPES.MSG_VIDEO]
|
||||
},
|
||||
otherMessage: {
|
||||
key: "otherMessage",
|
||||
label: "其他",
|
||||
value: [
|
||||
common_vendor.qt.TYPES.MSG_AUDIO,
|
||||
common_vendor.qt.TYPES.MSG_LOCATION,
|
||||
common_vendor.qt.TYPES.MSG_CUSTOM,
|
||||
common_vendor.qt.TYPES.MSG_MERGER
|
||||
]
|
||||
}
|
||||
};
|
||||
Object.keys(searchMessageTypeList).filter(
|
||||
(key) => key !== "all"
|
||||
);
|
||||
const searchInGlobalDefaultType = searchMessageTypeList["allMessage"];
|
||||
const searchInConversationDefaultType = searchMessageTypeList["textMessage"];
|
||||
const searchMessageTypeDefault = {
|
||||
global: searchInGlobalDefaultType,
|
||||
conversation: searchInConversationDefaultType
|
||||
};
|
||||
const globalSearchTypeKeys = ["allMessage", "textMessage", "fileMessage", "otherMessage"];
|
||||
const globalSearchTypeList = Object.keys(searchMessageTypeList).filter((key) => globalSearchTypeKeys == null ? void 0 : globalSearchTypeKeys.includes(key)).reduce((obj, key) => {
|
||||
obj[key] = searchMessageTypeList[key];
|
||||
return obj;
|
||||
}, {});
|
||||
const conversationSearchTypeKeys = [
|
||||
"textMessage",
|
||||
"fileMessage",
|
||||
"imageMessage",
|
||||
"otherMessage"
|
||||
];
|
||||
const conversationSearchTypeList = Object.keys(searchMessageTypeList).filter((key) => conversationSearchTypeKeys == null ? void 0 : conversationSearchTypeKeys.includes(key)).reduce((obj, key) => {
|
||||
obj[key] = searchMessageTypeList[key];
|
||||
return obj;
|
||||
}, {});
|
||||
exports.conversationSearchTypeList = conversationSearchTypeList;
|
||||
exports.globalSearchTypeList = globalSearchTypeList;
|
||||
exports.searchMessageTypeDefault = searchMessageTypeDefault;
|
||||
exports.searchMessageTypeList = searchMessageTypeList;
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/search-type-list.js.map
|
||||
62
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/server.js
vendored
Normal file
62
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/server.js
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const TUIKit_utils_env = require("../../utils/env.js");
|
||||
class TUISearchServer {
|
||||
constructor() {
|
||||
common_vendor.R.registerService(common_vendor.E.TUISearch.SERVICE.NAME, this);
|
||||
common_vendor.R.registerExtension(common_vendor.E.TUIChat.EXTENSION.INPUT_MORE.EXT_ID, this);
|
||||
}
|
||||
onCall(method, params) {
|
||||
switch (method) {
|
||||
case common_vendor.E.TUISearch.SERVICE.METHOD.SEARCH_GROUP:
|
||||
return this.searchGroup(params == null ? void 0 : params.groupID);
|
||||
case common_vendor.E.TUISearch.SERVICE.METHOD.SEARCH_USER:
|
||||
return this.searchUser(params == null ? void 0 : params.userID);
|
||||
case common_vendor.E.TUISearch.SERVICE.METHOD.SEARCH_FRIEND:
|
||||
return this.searchFriend(params == null ? void 0 : params.userID);
|
||||
case common_vendor.E.TUISearch.SERVICE.METHOD.SEARCH_GROUP_MEMBER:
|
||||
return this.searchGroupMember(params == null ? void 0 : params.groupID, params == null ? void 0 : params.userID);
|
||||
}
|
||||
}
|
||||
onGetExtension(extensionID) {
|
||||
if (extensionID === common_vendor.E.TUIChat.EXTENSION.INPUT_MORE.EXT_ID) {
|
||||
const list = [];
|
||||
const searchExtension = {
|
||||
weight: 3e3,
|
||||
text: "搜索",
|
||||
icon: "https://web.sdk.qcloud.com/component/TUIKit/assets/message-search.svg",
|
||||
data: {
|
||||
name: "search"
|
||||
},
|
||||
listener: {
|
||||
onClicked: () => {
|
||||
var _a;
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "isShowInConversationSearch", true);
|
||||
TUIKit_utils_env.isUniFrameWork && ((_a = common_vendor.i) == null ? void 0 : _a.navigateTo({
|
||||
url: "/TUIKit/components/TUISearch/index"
|
||||
}));
|
||||
}
|
||||
}
|
||||
};
|
||||
list.push(searchExtension);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
async searchFriend(userID) {
|
||||
return common_vendor.ts.getFriendProfile({ userIDList: [userID] });
|
||||
}
|
||||
async searchUser(userID) {
|
||||
return common_vendor.Zt.getUserProfile({ userIDList: [userID] });
|
||||
}
|
||||
async searchGroup(groupID) {
|
||||
return common_vendor.es.searchGroupByID(groupID);
|
||||
}
|
||||
async searchGroupMember(groupID, userID) {
|
||||
return common_vendor.es.getGroupMemberProfile({
|
||||
groupID,
|
||||
userIDList: [userID]
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.TUISearchServer = TUISearchServer;
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/server.js.map
|
||||
15
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/type.js
vendored
Normal file
15
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/type.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const messageTypeAbstractMap = {
|
||||
[common_vendor.qt.TYPES.MSG_TEXT]: "[文本]",
|
||||
[common_vendor.qt.TYPES.MSG_IMAGE]: "[图片]",
|
||||
[common_vendor.qt.TYPES.MSG_AUDIO]: "[语音]",
|
||||
[common_vendor.qt.TYPES.MSG_VIDEO]: "[视频]",
|
||||
[common_vendor.qt.TYPES.MSG_FILE]: "[文件]",
|
||||
[common_vendor.qt.TYPES.MSG_CUSTOM]: "[自定义消息]",
|
||||
[common_vendor.qt.TYPES.MSG_SYSTEM]: "[系统消息]",
|
||||
[common_vendor.qt.TYPES.MSG_MERGER]: "[合并消息]",
|
||||
[common_vendor.qt.TYPES.MSG_LOCATION]: "[位置消息]"
|
||||
};
|
||||
exports.messageTypeAbstractMap = messageTypeAbstractMap;
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/type.js.map
|
||||
235
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/utils.js
vendored
Normal file
235
unpackage/dist/dev/mp-weixin/TUIKit/components/TUISearch/utils.js
vendored
Normal file
@@ -0,0 +1,235 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const TUIKit_components_TUISearch_searchTypeList = require("./search-type-list.js");
|
||||
const TUIKit_components_common_Toast_index = require("../common/Toast/index.js");
|
||||
const TUIKit_components_TUISearch_type = require("./type.js");
|
||||
const TUIKit_utils_env = require("../../utils/env.js");
|
||||
const TUIKit_components_common_Toast_type = require("../common/Toast/type.js");
|
||||
const searchCloudMessages = (params) => {
|
||||
return common_vendor.Qt.searchCloudMessages(params).then((imResponse) => {
|
||||
return imResponse;
|
||||
}).catch((error) => {
|
||||
TUIKit_components_common_Toast_index.Toast({
|
||||
message: common_vendor.Wt.t("TUISearch.消息云端搜索失败:") + (error == null ? void 0 : error.message),
|
||||
type: TUIKit_components_common_Toast_type.TOAST_TYPE.ERROR,
|
||||
duration: 3e3
|
||||
});
|
||||
return null;
|
||||
});
|
||||
};
|
||||
const enterConversation = (item) => {
|
||||
const conversationID = (item == null ? void 0 : item.conversationID) || ((item == null ? void 0 : item.groupID) ? `GROUP${item == null ? void 0 : item.groupID}` : `C2C${item == null ? void 0 : item.userID}`);
|
||||
common_vendor.Xt.switchConversation(conversationID).then(() => {
|
||||
var _a;
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchingStatus", {
|
||||
isSearching: false,
|
||||
searchType: "global"
|
||||
});
|
||||
common_vendor.Jt.update(common_vendor.o.SEARCH, "currentSearchInputValue", {
|
||||
value: "",
|
||||
searchType: "global"
|
||||
});
|
||||
TUIKit_utils_env.isUniFrameWork && ((_a = common_vendor.i) == null ? void 0 : _a.navigateTo({
|
||||
url: "/TUIKit/components/TUIChat/index"
|
||||
}));
|
||||
}).catch((error) => {
|
||||
common_vendor.index.__f__("warn", "at TUIKit/components/TUISearch/utils.ts:110", "switch conversation failed:", error == null ? void 0 : error.message);
|
||||
TUIKit_components_common_Toast_index.Toast({
|
||||
message: common_vendor.Wt.t("TUISearch.进入会话失败"),
|
||||
type: TUIKit_components_common_Toast_type.TOAST_TYPE.ERROR,
|
||||
duration: 1e3
|
||||
});
|
||||
});
|
||||
};
|
||||
const generateSearchResultShowName = (result, resultContent) => {
|
||||
var _a, _b, _c;
|
||||
if (!result) {
|
||||
return "";
|
||||
}
|
||||
if (result.ID) {
|
||||
return resultContent == null ? void 0 : resultContent.showName;
|
||||
}
|
||||
if (result.groupID) {
|
||||
return result.name || result.groupID;
|
||||
}
|
||||
if (result.userID) {
|
||||
return result.remark || result.nick || result.userID || "";
|
||||
}
|
||||
if ((_a = result.conversation) == null ? void 0 : _a.conversationID) {
|
||||
if (typeof result.conversation.getShowName === "function") {
|
||||
return result.conversation.getShowName();
|
||||
} else {
|
||||
return ((_c = (_b = common_vendor.Jt.getConversationModel(result.conversation.conversationID)) == null ? void 0 : _b.getShowName) == null ? void 0 : _c.call(_b)) || result.conversation.conversationID;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
};
|
||||
const generateSearchResultAvatar = (result) => {
|
||||
var _a, _b, _c, _d;
|
||||
if (!result) {
|
||||
return "";
|
||||
}
|
||||
if (result.ID) {
|
||||
return result.avatar || "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png";
|
||||
}
|
||||
if (result.groupID) {
|
||||
return result.avatar || `https://web.sdk.qcloud.com/im/assets/images/${result == null ? void 0 : result.type}.svg`;
|
||||
}
|
||||
if (result.userID) {
|
||||
return result.avatar || "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png";
|
||||
}
|
||||
if ((_a = result == null ? void 0 : result.conversation) == null ? void 0 : _a.conversationID) {
|
||||
if (typeof result.conversation.getAvatar === "function") {
|
||||
return (_b = result.conversation) == null ? void 0 : _b.getAvatar();
|
||||
} else {
|
||||
return (_d = (_c = common_vendor.Jt.getConversationModel(result.conversation.conversationID)) == null ? void 0 : _c.getAvatar) == null ? void 0 : _d.call(_c);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
};
|
||||
const generateSearchResultShowContent = (result, resultType, keywordList, isTypeShow = true) => {
|
||||
var _a, _b, _c, _d;
|
||||
if (result == null ? void 0 : result.groupID) {
|
||||
return [
|
||||
{ text: "groupID: ", isHighlight: false },
|
||||
{ text: result.groupID, isHighlight: true }
|
||||
];
|
||||
}
|
||||
if (result == null ? void 0 : result.userID) {
|
||||
return [
|
||||
{ text: "userID: ", isHighlight: false },
|
||||
{ text: result.userID, isHighlight: true }
|
||||
];
|
||||
}
|
||||
if ((result == null ? void 0 : result.conversation) || (result == null ? void 0 : result.flow)) {
|
||||
if ((result == null ? void 0 : result.messageCount) === 1 || (result == null ? void 0 : result.flow)) {
|
||||
const message = (result == null ? void 0 : result.flow) ? result : result == null ? void 0 : result.messageList[0];
|
||||
const text = ((_a = message == null ? void 0 : message.payload) == null ? void 0 : _a.text) || ((_b = message == null ? void 0 : message.payload) == null ? void 0 : _b.fileName) || ((_c = message == null ? void 0 : message.payload) == null ? void 0 : _c.description);
|
||||
const abstract = [];
|
||||
if ((message == null ? void 0 : message.type) && isTypeShow && message.type !== common_vendor.qt.TYPES.MSG_TEXT) {
|
||||
abstract.push({
|
||||
text: common_vendor.Wt.t(`TUISearch.${TUIKit_components_TUISearch_type.messageTypeAbstractMap[message.type]}`),
|
||||
isHighlight: false
|
||||
});
|
||||
}
|
||||
abstract.push(...generateMessageContentHighlight(text, keywordList));
|
||||
return abstract;
|
||||
} else {
|
||||
return [
|
||||
{
|
||||
text: `${result == null ? void 0 : result.messageCount}${common_vendor.Wt.t(
|
||||
"TUISearch.条相关"
|
||||
)}${common_vendor.Wt.t(
|
||||
`TUISearch.${resultType === "allMessage" ? "结果" : (_d = TUIKit_components_TUISearch_searchTypeList.searchMessageTypeList[resultType]) == null ? void 0 : _d.label}`
|
||||
)}`,
|
||||
isHighlight: false
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
return [];
|
||||
};
|
||||
const generateMessageContentHighlight = (content, keywordList) => {
|
||||
var _a;
|
||||
if (!content || !keywordList || !keywordList.length) {
|
||||
return [{ text: content || "", isHighlight: false }];
|
||||
}
|
||||
const matches = [];
|
||||
for (let i = 0; i < keywordList.length; i++) {
|
||||
const substring = (_a = keywordList[i]) == null ? void 0 : _a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
const regex = new RegExp(substring, "gi");
|
||||
let match;
|
||||
while ((match = regex.exec(content)) !== null) {
|
||||
const start2 = match.index;
|
||||
const end = match.index + match[0].length - 1;
|
||||
matches.push([start2, end]);
|
||||
}
|
||||
}
|
||||
const mergedRanges = [matches[0]];
|
||||
if (matches.length > 1) {
|
||||
matches.sort((a, b) => a[0] - b[0]);
|
||||
for (let i = 1; i < matches.length; i++) {
|
||||
const currentRange = matches[i];
|
||||
const lastMergedRange = mergedRanges[mergedRanges.length - 1];
|
||||
if (currentRange[0] - 1 <= lastMergedRange[1]) {
|
||||
lastMergedRange[1] = Math.max(lastMergedRange[1], currentRange[1]);
|
||||
} else {
|
||||
mergedRanges.push(currentRange);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!mergedRanges[0]) {
|
||||
return [{ text: content, isHighlight: false }];
|
||||
}
|
||||
const contentArray = [];
|
||||
let start = 0;
|
||||
for (let i = 0; i < mergedRanges.length; i++) {
|
||||
const str1 = content.substring(start, mergedRanges[i][0]);
|
||||
str1 && contentArray.push({ text: str1, isHighlight: false });
|
||||
const str2 = content.substring(mergedRanges[i][0], mergedRanges[i][1] + 1);
|
||||
str2 && contentArray.push({ text: str2, isHighlight: true });
|
||||
start = mergedRanges[i][1] + 1;
|
||||
}
|
||||
const lastStr = content.substring(start);
|
||||
lastStr && contentArray.push({ text: lastStr, isHighlight: false });
|
||||
return contentArray;
|
||||
};
|
||||
const generateSearchResultTime = (timestamp) => {
|
||||
const todayZero = (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0);
|
||||
const thisYear = new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 1, 0, 0, 0, 0).getTime();
|
||||
const target = new Date(timestamp);
|
||||
const oneDay = 24 * 60 * 60 * 1e3;
|
||||
const oneWeek = 7 * oneDay;
|
||||
const diff = todayZero - target.getTime();
|
||||
function formatNum(num) {
|
||||
return num < 10 ? "0" + num : num.toString();
|
||||
}
|
||||
if (diff <= 0) {
|
||||
return `${formatNum(target.getHours())}:${formatNum(target.getMinutes())}`;
|
||||
} else if (diff <= oneDay) {
|
||||
return `${common_vendor.Wt.t("time.昨天")} ${formatNum(target.getHours())}:${formatNum(
|
||||
target.getMinutes()
|
||||
)}`;
|
||||
} else if (diff <= oneWeek - oneDay) {
|
||||
const weekdays = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
|
||||
const weekday = weekdays[target.getDay()];
|
||||
return `${common_vendor.Wt.t("time." + weekday)} ${formatNum(target.getHours())}:${formatNum(
|
||||
target.getMinutes()
|
||||
)}`;
|
||||
} else if (target.getTime() >= thisYear) {
|
||||
return `${target.getMonth() + 1}/${target.getDate()} ${formatNum(
|
||||
target.getHours()
|
||||
)}:${formatNum(target.getMinutes())}`;
|
||||
} else {
|
||||
return `${target.getFullYear()}/${target.getMonth() + 1}/${target.getDate()} ${formatNum(
|
||||
target.getHours()
|
||||
)}:${formatNum(target.getMinutes())}`;
|
||||
}
|
||||
};
|
||||
const generateSearchResultYMD = (timestamp) => {
|
||||
const date = new Date(timestamp * 1e3);
|
||||
const year = date.getFullYear();
|
||||
const month = ("0" + (date.getMonth() + 1)).slice(-2);
|
||||
const day = ("0" + date.getDate()).slice(-2);
|
||||
return `${year}-${month}-${day}`;
|
||||
};
|
||||
const debounce = (func, waitFor) => {
|
||||
let timeout = null;
|
||||
const debounced = (...args) => {
|
||||
if (timeout !== null) {
|
||||
clearTimeout(timeout);
|
||||
timeout = null;
|
||||
}
|
||||
timeout = setTimeout(() => func(...args), waitFor);
|
||||
};
|
||||
return debounced;
|
||||
};
|
||||
exports.debounce = debounce;
|
||||
exports.enterConversation = enterConversation;
|
||||
exports.generateSearchResultAvatar = generateSearchResultAvatar;
|
||||
exports.generateSearchResultShowContent = generateSearchResultShowContent;
|
||||
exports.generateSearchResultShowName = generateSearchResultShowName;
|
||||
exports.generateSearchResultTime = generateSearchResultTime;
|
||||
exports.generateSearchResultYMD = generateSearchResultYMD;
|
||||
exports.searchCloudMessages = searchCloudMessages;
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUISearch/utils.js.map
|
||||
Reference in New Issue
Block a user