优化页面
This commit is contained in:
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIContact/contact-search/index.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIContact/contact-search/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../../../common/vendor.js");require("../../../adapter-vue.js");const r=require("../../../../common/assets.js"),a=require("../../../utils/env.js"),t=require("../../../utils/lodash.js");Math||u();const u=()=>"../../common/Icon.js",n=e.defineComponent({__name:"index",setup(u){const n=e.Wt.t("TUIContact.输入ID"),c=e.ref(!1),s=e.ref(""),o=e.ref({user:{label:"联系人",list:[]},group:{label:"群聊",list:[]}}),i=t.debounce((function(e){c.value=e}),200),l=async()=>{s.value&&(e.R.callService({serviceName:e.E.TUISearch.SERVICE.NAME,method:e.E.TUISearch.SERVICE.METHOD.SEARCH_USER,params:{userID:s.value}}).then((e=>{o.value.user.list=e.data})).catch((e=>{o.value.user.list=[],console.warn("search user error",e)})),e.R.callService({serviceName:e.E.TUISearch.SERVICE.NAME,method:e.E.TUISearch.SERVICE.METHOD.SEARCH_GROUP,params:{groupID:s.value}}).then((e=>{o.value.group.list=[e.data.group]})).catch((e=>{o.value.group.list=[],console.warn("search group error",e)})))};return e.watch((()=>o.value),(()=>{e.Jt.update(e.o.CUSTOM,"currentContactSearchResult",o.value)}),{deep:!0,immediate:!0}),e.watch((()=>c.value),(()=>{e.Jt.update(e.o.CUSTOM,"currentContactSearchingStatus",c.value),c.value&&(s.value="",o.value.user.list=[],o.value.group.list=[])}),{deep:!0,immediate:!0}),e.i.updateContactSearch=l,e.i.closeSearching=()=>{c.value=!1},(t,u)=>e.e({a:!e.unref(c)||!e.unref(a.isPC)},e.unref(c)&&e.unref(a.isPC)?{}:{b:e.p({file:e.unref(c)?e.unref(r.backIcon):e.unref(r.addSVG),width:e.unref(c)?"20px":"14px",height:e.unref(c)?"20px":"14px"}),c:e.n(!e.unref(a.isPC)&&"tui-contact-search-h5-header-icon"),d:e.o$1((r=>e.unref(i)(!e.unref(c)))),e:e.t(e.unref(e.Wt).t("TUIContact.添加好友/群聊")),f:e.n(!e.unref(a.isPC)&&"tui-contact-search-h5-header-title"),g:e.n(!e.unref(a.isPC)&&"tui-contact-search-h5-header"),h:e.n(e.unref(c)&&"tui-contact-searching-h5-header"),i:e.o$1((r=>e.unref(i)(!0)))},{j:e.unref(c)},e.unref(c)?{k:e.unref(n),l:e.o$1(l),m:e.o$1(l),n:e.o$1(l),o:e.unref(s),p:e.o$1((r=>e.isRef(s)?s.value=r.detail.value:null)),q:e.t(e.unref(e.Wt).t("取消")),r:e.o$1((e=>c.value=!1)),s:e.n(!e.unref(a.isPC)&&"tui-contact-search-h5-main")}:{},{t:e.n(!e.unref(a.isPC)&&"tui-contact-search-h5")})}}),c=e._export_sfc(n,[["__scopeId","data-v-d5e20145"]]);wx.createComponent(c);
|
||||
6
unpackage/dist/build/mp-weixin/TUIKit/components/TUIContact/contact-search/index.json
vendored
Normal file
6
unpackage/dist/build/mp-weixin/TUIKit/components/TUIContact/contact-search/index.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../common/Icon"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIContact/contact-search/index.wxml
vendored
Normal file
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIContact/contact-search/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-d5e20145', 'tui-contact-search', t]}}"><view wx:if="{{a}}" class="{{['data-v-d5e20145', 'tui-contact-search-header', g, h]}}" bindtap="{{i}}"><view class="{{['data-v-d5e20145', 'tui-contact-search-header-icon', c]}}" catchtap="{{d}}"><icon wx:if="{{b}}" class="data-v-d5e20145" u-i="d5e20145-0" bind:__l="__l" u-p="{{b}}"/></view><view class="{{['data-v-d5e20145', 'tui-contact-search-header-title', f]}}">{{e}}</view></view><view wx:if="{{j}}" class="{{['data-v-d5e20145', 'tui-contact-search-main', s]}}"><input class="tui-contact-search-main-input data-v-d5e20145" type="text" placeholder="{{k}}" enterkeyhint="search" bindkeyup="{{l}}" bindblur="{{m}}" bindconfirm="{{n}}" value="{{o}}" bindinput="{{p}}"></input><view class="tui-contact-search-main-cancel data-v-d5e20145" bindtap="{{r}}">{{q}}</view></view></view>
|
||||
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIContact/contact-search/index.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/TUIKit/components/TUIContact/contact-search/index.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.tui-contact-search.data-v-d5e20145{position:-webkit-sticky;position:sticky;top:0;z-index:1;padding:12px;display:flex;justify-content:space-between;align-items:center;background:#fff;border-bottom:1px solid #f4f5f9;flex-direction:column}.tui-contact-search-header.data-v-d5e20145,.tui-contact-search-main.data-v-d5e20145{width:100%;height:30px;display:flex;flex-direction:row;align-items:center}.tui-contact-search-header.data-v-d5e20145{-webkit-user-select:none;user-select:none;cursor:pointer}.tui-contact-search-header-icon.data-v-d5e20145{padding-right:10px}.tui-contact-search-header-title.data-v-d5e20145{font-size:14px}.tui-contact-search-main.data-v-d5e20145{display:flex;flex-direction:row;flex:1;justify-content:center;align-items:center;width:100%}.tui-contact-search-main-input.data-v-d5e20145{flex:1;font-size:14px;border-radius:5px;padding:7px;border:1px solid #ddd}.tui-contact-search-main-input.data-v-d5e20145:focus{outline:none;border:1px solid #006eff}.tui-contact-search-main-cancel.data-v-d5e20145{padding-left:10px;-webkit-user-select:none;user-select:none;cursor:pointer}.tui-contact-search-h5-header.data-v-d5e20145{width:100%}.tui-contact-searching-h5-header.data-v-d5e20145{padding-bottom:10px;display:flex;flex-direction:row}.tui-contact-searching-h5-header .tui-contact-search-h5-header-title.data-v-d5e20145{flex:1;text-align:center;font-weight:500;font-size:14px;margin-right:30px}
|
||||
Reference in New Issue
Block a user