优化页面
This commit is contained in:
@@ -1,119 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../../common/vendor.js");
|
||||
require("../../../../adapter-vue.js");
|
||||
const TUIKit_utils_env = require("../../../../utils/env.js");
|
||||
const TUIKit_components_TUIChat_config = require("../../config.js");
|
||||
if (!Math) {
|
||||
(Icon + BottomPopup)();
|
||||
}
|
||||
const Icon = () => "../../../common/Icon.js";
|
||||
const BottomPopup = () => "../../../common/BottomPopup/index.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
props: {
|
||||
iconFile: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
needDialog: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
iconWidth: {
|
||||
type: String,
|
||||
default: "20px"
|
||||
},
|
||||
iconHeight: {
|
||||
type: String,
|
||||
default: "20px"
|
||||
},
|
||||
// Whether to display the bottom popup dialog on mobile devices
|
||||
// Invalid on PC
|
||||
needBottomPopup: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
emits: ["onIconClick", "onDialogClose", "onDialogShow"],
|
||||
setup(__props, { expose: __expose, emit: __emit }) {
|
||||
const props = __props;
|
||||
const emits = __emit;
|
||||
const isDark = common_vendor.ref(TUIKit_components_TUIChat_config.ChatConfig.getTheme() === "dark");
|
||||
const showDialog = common_vendor.ref(false);
|
||||
const toolbarItemRef = common_vendor.ref();
|
||||
const dialogRef = common_vendor.ref();
|
||||
const toggleToolbarItem = () => {
|
||||
emits("onIconClick", dialogRef);
|
||||
if (TUIKit_utils_env.isPC) {
|
||||
common_vendor.O.listen({
|
||||
domRefs: toolbarItemRef.value,
|
||||
handler: closeToolbarItem
|
||||
});
|
||||
}
|
||||
if (!props.needDialog) {
|
||||
return;
|
||||
}
|
||||
toggleDialogDisplay(!showDialog.value);
|
||||
};
|
||||
const closeToolbarItem = () => {
|
||||
showDialog.value = false;
|
||||
emits("onDialogClose", dialogRef);
|
||||
};
|
||||
const toggleDialogDisplay = (showStatus) => {
|
||||
if (showDialog.value === showStatus) {
|
||||
return;
|
||||
}
|
||||
showDialog.value = showStatus;
|
||||
switch (showStatus) {
|
||||
case true:
|
||||
emits("onDialogShow", dialogRef);
|
||||
break;
|
||||
case false:
|
||||
emits("onDialogClose", dialogRef);
|
||||
}
|
||||
};
|
||||
const onPopupClose = () => {
|
||||
showDialog.value = false;
|
||||
};
|
||||
__expose({
|
||||
toggleDialogDisplay
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
file: props.iconFile,
|
||||
width: props.iconWidth,
|
||||
height: props.iconHeight
|
||||
}),
|
||||
b: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "toolbar-item-container-uni-icon"),
|
||||
c: common_vendor.o$1(toggleToolbarItem),
|
||||
d: common_vendor.unref(TUIKit_utils_env.isUniFrameWork)
|
||||
}, common_vendor.unref(TUIKit_utils_env.isUniFrameWork) ? {
|
||||
e: common_vendor.t(props.title)
|
||||
} : {}, {
|
||||
f: props.needBottomPopup && !common_vendor.unref(TUIKit_utils_env.isPC)
|
||||
}, props.needBottomPopup && !common_vendor.unref(TUIKit_utils_env.isPC) ? {
|
||||
g: common_vendor.o$1(() => {
|
||||
}),
|
||||
h: common_vendor.o$1(onPopupClose),
|
||||
i: common_vendor.p({
|
||||
show: common_vendor.unref(showDialog)
|
||||
})
|
||||
} : {}, {
|
||||
j: common_vendor.unref(showDialog),
|
||||
k: common_vendor.n(common_vendor.unref(isDark) && "toolbar-item-container-dialog-dark"),
|
||||
l: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "toolbar-item-container-h5-dialog"),
|
||||
m: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "toolbar-item-container-uni-dialog"),
|
||||
n: common_vendor.n(!common_vendor.unref(TUIKit_utils_env.isPC) && "toolbar-item-container-h5"),
|
||||
o: common_vendor.n(common_vendor.unref(TUIKit_utils_env.isUniFrameWork) && "toolbar-item-container-uni")
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-bf58df78"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/message-input-toolbar/toolbar-item-container/index.js.map
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"icon": "../../../common/Icon",
|
||||
"bottom-popup": "../../../common/BottomPopup/index"
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<view ref="toolbarItemRef" class="{{['data-v-bf58df78', 'toolbar-item-container', n, o]}}"><view class="{{['data-v-bf58df78', 'toolbar-item-container-icon', b]}}" bindtap="{{c}}"><icon wx:if="{{a}}" class="icon data-v-bf58df78" u-i="bf58df78-0" bind:__l="__l" u-p="{{a}}"/></view><view wx:if="{{d}}" class="{{['data-v-bf58df78', 'toolbar-item-container-uni-title']}}">{{e}}</view><view hidden="{{!j}}" ref="dialogRef" class="{{['data-v-bf58df78', 'toolbar-item-container-dialog', k, l, m]}}"><bottom-popup wx:if="{{f}}" u-s="{{['d']}}" class="toolbar-bottom-popup data-v-bf58df78" catchtouchmove="{{g}}" bindonClose="{{h}}" u-i="bf58df78-1" bind:__l="__l" u-p="{{i}}"><slot/></bottom-popup><slot wx:else/></view></view>
|
||||
@@ -1,140 +0,0 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
body.data-v-bf58df78, div.data-v-bf58df78, ul.data-v-bf58df78, ol.data-v-bf58df78, dt.data-v-bf58df78, dd.data-v-bf58df78, li.data-v-bf58df78, dl.data-v-bf58df78, h1.data-v-bf58df78, h2.data-v-bf58df78, h3.data-v-bf58df78, h4.data-v-bf58df78, p.data-v-bf58df78 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-style: normal;
|
||||
/* font:12px/22px"\5B8B\4F53",Arial,Helvetica,sans-serif; */
|
||||
}
|
||||
ol.data-v-bf58df78, ul.data-v-bf58df78, li.data-v-bf58df78 {
|
||||
list-style: none;
|
||||
}
|
||||
img.data-v-bf58df78 {
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
body.data-v-bf58df78 {
|
||||
color: #000;
|
||||
background: #FFF;
|
||||
}
|
||||
.clear.data-v-bf58df78 {
|
||||
clear: both;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: -1px;
|
||||
}
|
||||
a.data-v-bf58df78 {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
a.data-v-bf58df78:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
input.data-v-bf58df78, textarea.data-v-bf58df78 {
|
||||
-webkit-user-select: auto;
|
||||
user-select: auto;
|
||||
}
|
||||
input.data-v-bf58df78:focus, input.data-v-bf58df78:active, textarea.data-v-bf58df78:focus, textarea.data-v-bf58df78:active {
|
||||
outline: none;
|
||||
}
|
||||
.chat-aside.data-v-bf58df78 {
|
||||
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);
|
||||
}
|
||||
.toolbar-item-container-dialog.data-v-bf58df78 {
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.toolbar-item-container.data-v-bf58df78 {
|
||||
position: relative;
|
||||
}
|
||||
.toolbar-item-container-icon.data-v-bf58df78 {
|
||||
padding: 8px;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.toolbar-item-container-dialog.data-v-bf58df78 {
|
||||
z-index: 5;
|
||||
position: absolute;
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 4px -3px rgba(32, 77, 141, 0.03), 0 6px 10px 1px rgba(32, 77, 141, 0.06), 0 3px 14px 2px rgba(32, 77, 141, 0.05);
|
||||
width: -webkit-fit-content;
|
||||
width: fit-content;
|
||||
height: -webkit-fit-content;
|
||||
height: fit-content;
|
||||
bottom: 35px;
|
||||
}
|
||||
.toolbar-item-container-dialog-dark.data-v-bf58df78 {
|
||||
background: #22262E;
|
||||
box-shadow: 0 8px 40px 0 rgba(23, 25, 31, 0.6), 0 4px 12px 0 rgba(23, 25, 31, 0.8);
|
||||
}
|
||||
.toolbar-item-container-h5-dialog.data-v-bf58df78 {
|
||||
position: static !important;
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
}
|
||||
.toolbar-item-container-uni.data-v-bf58df78 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: static;
|
||||
}
|
||||
.toolbar-item-container-uni-icon.data-v-bf58df78 {
|
||||
background: #fff;
|
||||
border-radius: 15px;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.toolbar-item-container-uni-title.data-v-bf58df78 {
|
||||
font-size: 14px;
|
||||
color: #8F959D;
|
||||
}
|
||||
.toolbar-item-container-uni-dialog.data-v-bf58df78 {
|
||||
position: absolute !important;
|
||||
background: transparent;
|
||||
left: -10px;
|
||||
bottom: -5px;
|
||||
}
|
||||
.toolbar-item-container-uni-dialog .toolbar-bottom-popup.data-v-bf58df78 {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
}
|
||||
Reference in New Issue
Block a user