first commit

This commit is contained in:
lingxiao865
2026-02-10 08:05:03 +08:00
commit c5af079d8c
1094 changed files with 97530 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
"use strict";
const uni_modules_tdesignUniapp_components_common_utils = require("../common/utils.js");
const getActionClass = function(prefix, buttonLayout, actionItem, tClassAction) {
const cls = [`${prefix}__button`, `${prefix}__button--action`];
if (buttonLayout) {
cls.push(`${prefix}__button--${buttonLayout}`);
}
return `${cls.join(" ")} ${uni_modules_tdesignUniapp_components_common_utils.coalesce(actionItem.tClass, tClassAction)}`;
};
exports.getActionClass = getActionClass;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/tdesign-uniapp/components/dialog/computed.js.map

View File

@@ -0,0 +1,459 @@
"use strict";
const uni_modules_tdesignUniapp_components_common_validator = require("../common/validator.js");
const uni_modules_tdesignUniapp_components_common_src_instantiationDecorator = require("../common/src/instantiationDecorator.js");
const uni_modules_tdesignUniapp_components_common_config = require("../common/config.js");
const uni_modules_tdesignUniapp_components_dialog_props = require("./props.js");
const uni_modules_tdesignUniapp_components_common_utils = require("../common/utils.js");
const uni_modules_tdesignUniapp_components_mixins_usingCustomNavbar = require("../mixins/using-custom-navbar.js");
const uni_modules_tdesignUniapp_components_common_utils_wxs = require("../common/utils.wxs.js");
const uni_modules_tdesignUniapp_components_dialog_computed = require("./computed.js");
const uni_modules_tdesignUniapp_components_common_functional_mixin = require("../common/functional/mixin.js");
const uni_modules_tdesignUniapp_components_common_version = require("../common/version.js");
const common_vendor = require("../../../../common/vendor.js");
const TPopup = () => "../popup/popup.js";
const TIcon = () => "../icon/icon.js";
const TButton = () => "../button/button.js";
const name = `${uni_modules_tdesignUniapp_components_common_config.prefix}-dialog`;
const _sfc_main = uni_modules_tdesignUniapp_components_common_src_instantiationDecorator.uniComponent({
name,
options: {
styleIsolation: "shared"
},
externalClasses: [
`${uni_modules_tdesignUniapp_components_common_config.prefix}-class`,
`${uni_modules_tdesignUniapp_components_common_config.prefix}-class-content`,
`${uni_modules_tdesignUniapp_components_common_config.prefix}-class-confirm`,
`${uni_modules_tdesignUniapp_components_common_config.prefix}-class-cancel`,
`${uni_modules_tdesignUniapp_components_common_config.prefix}-class-action`
],
mixins: [uni_modules_tdesignUniapp_components_common_functional_mixin.getFunctionalMixin(uni_modules_tdesignUniapp_components_dialog_props.props), uni_modules_tdesignUniapp_components_mixins_usingCustomNavbar.useCustomNavbarBehavior],
components: {
TPopup,
TIcon,
TButton
},
props: {
...uni_modules_tdesignUniapp_components_dialog_props.props
},
data() {
return {
prefix: uni_modules_tdesignUniapp_components_common_config.prefix,
classPrefix: name,
buttonVariant: "text",
tools: uni_modules_tdesignUniapp_components_common_utils_wxs.tools,
_confirm: null,
_cancel: null,
useVirtualHost: uni_modules_tdesignUniapp_components_common_version.canUseVirtualHost()
};
},
watch: {
dataConfirmBtn: {
handler() {
this.onWatchBtn(this.dataConfirmBtn, this.dataCancelBtn);
},
immediate: true
},
dataCancelBtn: {
handler() {
this.onWatchBtn(this.dataConfirmBtn, this.dataCancelBtn);
},
immediate: true
}
},
methods: {
coalesce: uni_modules_tdesignUniapp_components_common_utils.coalesce,
getActionClass: uni_modules_tdesignUniapp_components_dialog_computed.getActionClass,
onWatchBtn(confirm, cancel) {
const { prefix, classPrefix, dataButtonLayout } = this;
const rect = { buttonVariant: "text" };
const useBaseVariant = [confirm, cancel].some((item) => uni_modules_tdesignUniapp_components_common_validator.isObject(item) && item.variant && item.variant !== "text");
const buttonMap = { confirm, cancel };
const cls = [`${classPrefix}__button`];
const externalCls = [];
if (useBaseVariant) {
rect.buttonVariant = "base";
cls.push(`${classPrefix}__button--${dataButtonLayout}`);
} else {
cls.push(`${classPrefix}__button--text`);
externalCls.push(`${classPrefix}-button`);
}
const useVirtualHost = uni_modules_tdesignUniapp_components_common_version.canUseVirtualHost();
Object.keys(buttonMap).forEach((key) => {
const btn = buttonMap[key];
const rootClass = [...cls, `${classPrefix}__button--${key}`];
const tClass = [...externalCls, this[uni_modules_tdesignUniapp_components_common_utils.toCamel(`${prefix}-class-${key}`)], ...rootClass].join(" ");
const base = {
block: true,
rootClass,
tClass: useVirtualHost ? tClass : "",
class: !useVirtualHost ? tClass : "",
variant: rect.buttonVariant,
openType: ""
};
if (key === "cancel" && rect.buttonVariant === "base") {
base.theme = "light";
}
if (typeof btn === "string") {
rect[`_${key}`] = { ...base, content: btn };
} else if (btn && typeof btn === "object") {
rect[`_${key}`] = { ...base, ...btn };
} else {
rect[`_${key}`] = null;
}
});
Object.keys(rect).forEach((key) => {
this[key] = rect[key];
});
},
onTplButtonTap(e, { type, extra }) {
var _a, _b, _c;
const evtType = e.type;
const button = this[`_${type}`];
const cbName = `bind${evtType}`;
if (type === "action") {
this.onActionTap(extra);
return;
}
if (typeof (button == null ? void 0 : button[cbName]) === "function") {
const closeFlag = button[cbName](e);
if (closeFlag) {
this.close();
}
}
const hasOpenType = !!(button == null ? void 0 : button.openType);
if (!hasOpenType && ["confirm", "cancel"].includes(type)) {
(_a = this[uni_modules_tdesignUniapp_components_common_utils.toCamel(`on-${type}`)]) == null ? void 0 : _a.call(this, type);
}
if (evtType !== "click") {
const success = ((_c = (_b = e.detail) == null ? void 0 : _b.errMsg) == null ? void 0 : _c.indexOf("ok")) > -1;
this.$emit(success ? "open-type-event" : "open-type-error-event", e.detail);
}
},
onConfirm(e) {
this.$emit("confirm", { e });
if (this._onConfirm) {
this._onConfirm({ trigger: "confirm" });
this.close();
}
},
onCancel(e) {
const trigger = { trigger: "cancel" };
this.$emit("cancel", { e });
this.$emit("close", trigger);
if (this._onCancel) {
this._onCancel(trigger);
this.close();
}
},
onClose() {
var _a;
const trigger = { trigger: "close-btn" };
this.$emit("close", trigger);
(_a = this._onCancel) == null ? void 0 : _a.call(this, trigger);
this.close();
},
close() {
this.dataVisible = false;
},
overlayClick(e) {
var _a;
this.$emit("overlay-click", { e });
if (this.dataCloseOnOverlayClick) {
const trigger = { trigger: "overlay" };
this.$emit("close", trigger);
(_a = this._onCancel) == null ? void 0 : _a.call(this, trigger);
this.close();
}
},
onActionTap(index) {
this.$emit("action", { index });
if (this._onAction) {
this._onAction({ index });
this.close();
}
}
}
});
if (!Array) {
const _easycom_t_icon2 = common_vendor.resolveComponent("t-icon");
const _easycom_t_button2 = common_vendor.resolveComponent("t-button");
const _easycom_t_popup2 = common_vendor.resolveComponent("t-popup");
(_easycom_t_icon2 + _easycom_t_button2 + _easycom_t_popup2)();
}
const _easycom_t_icon = () => "../icon/icon.js";
const _easycom_t_button = () => "../button/button.js";
const _easycom_t_popup = () => "../popup/popup.js";
if (!Math) {
(_easycom_t_icon + _easycom_t_button + _easycom_t_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: _ctx.dataCloseBtn
}, _ctx.dataCloseBtn ? common_vendor.e({
b: _ctx.tools.isObject(_ctx.dataCloseBtn)
}, _ctx.tools.isObject(_ctx.dataCloseBtn) ? {
c: common_vendor.p({
["custom-style"]: _ctx.dataCloseBtn.style || "",
prefix: _ctx.dataCloseBtn.prefix,
name: _ctx.dataCloseBtn.name || "close",
size: _ctx.dataCloseBtn.size || 22,
color: _ctx.dataCloseBtn.color,
["aria-hidden"]: true,
["aria-label"]: _ctx.dataCloseBtn.ariaLabel,
["aria-role"]: _ctx.dataCloseBtn.ariaRole
})
} : {
d: common_vendor.p({
name: "close",
size: "44rpx"
})
}, {
e: common_vendor.n(_ctx.classPrefix + "__close-btn"),
f: common_vendor.o((...args) => _ctx.onClose && _ctx.onClose(...args))
}) : {}, {
g: _ctx.dataTitle
}, _ctx.dataTitle ? {
h: common_vendor.t(_ctx.dataTitle),
i: common_vendor.n(_ctx.classPrefix + "__header")
} : {}, {
j: _ctx.dataContent
}, _ctx.dataContent ? {
k: common_vendor.t(_ctx.dataContent),
l: common_vendor.n(_ctx.classPrefix + "__body-text"),
m: common_vendor.n(_ctx.classPrefix + "__body")
} : {}, {
n: common_vendor.n(_ctx.classPrefix + "__content " + _ctx.tClassContent),
o: _ctx.dataActions
}, _ctx.dataActions ? {
p: common_vendor.f(_ctx.dataActions, (actionItem, index, i0) => {
return common_vendor.e({
a: actionItem.useDefaultSlot || false
}, actionItem.useDefaultSlot || false ? {} : {}, {
b: index,
c: common_vendor.n(!_ctx.useVirtualHost ? _ctx.getActionClass(_ctx.classPrefix, _ctx.dataButtonLayout, actionItem, _ctx.tClassAction) : ""),
d: _ctx.coalesce(actionItem.index, index),
e: common_vendor.o(($event) => _ctx.onTplButtonTap($event, {
type: "action",
extra: index
}), index),
f: common_vendor.o(($event) => _ctx.onTplButtonTap($event, {
type: "action",
extra: index
}), index),
g: common_vendor.o(($event) => _ctx.onTplButtonTap($event, {
type: "action",
extra: index
}), index),
h: common_vendor.o(($event) => _ctx.onTplButtonTap($event, {
type: "action",
extra: index
}), index),
i: common_vendor.o(($event) => _ctx.onTplButtonTap($event, {
type: "action",
extra: index
}), index),
j: common_vendor.o(($event) => _ctx.onTplButtonTap($event, {
type: "action",
extra: index
}), index),
k: common_vendor.o(($event) => _ctx.onTplButtonTap($event, {
type: "action",
extra: index
}), index),
l: common_vendor.o(($event) => _ctx.onTplButtonTap($event, {
type: "action",
extra: index
}), index),
m: "8dd4352e-3-" + i0 + ",8dd4352e-0",
n: common_vendor.p({
["t-id"]: actionItem.tId,
["custom-style"]: actionItem.style,
block: _ctx.coalesce(actionItem.block, true),
["t-class"]: _ctx.useVirtualHost ? _ctx.getActionClass(_ctx.classPrefix, _ctx.dataButtonLayout, actionItem, _ctx.tClassAction) : "",
disabled: actionItem.disabled,
["custom-dataset"]: actionItem.customDataset,
content: actionItem.content,
icon: actionItem.icon,
loading: actionItem.loading,
["loading-props"]: actionItem.loadingProps,
theme: actionItem.theme,
ghost: actionItem.ghost,
shape: actionItem.shape,
size: actionItem.size,
variant: actionItem.variant,
["open-type"]: actionItem.openType,
["hover-class"]: actionItem.hoverClass,
["hover-stop-propagation"]: actionItem.hoverStopPropagation,
["hover-start-time"]: actionItem.hoverStartTime,
["hover-stay-time"]: actionItem.hoverStayTime,
lang: actionItem.lang,
["session-from"]: actionItem.sessionFrom,
["send-message-title"]: actionItem.sendMessageTitle,
["send-message-path"]: actionItem.sendMessagePath,
["send-message-img"]: actionItem.sendMessageImg,
["app-parameter"]: actionItem.appParameter,
["show-message-card"]: actionItem.showMessageCard,
["aria-label"]: actionItem.ariaLabel
})
});
})
} : {}, {
q: _ctx._cancel
}, _ctx._cancel ? common_vendor.e({
r: _ctx._cancel.useDefaultSlot || false
}, _ctx._cancel.useDefaultSlot || false ? {} : {}, {
s: common_vendor.n(_ctx._cancel.class),
t: _ctx._cancel.index,
v: common_vendor.o(($event) => _ctx.onCancel($event, {
type: "action",
extra: 0
})),
w: common_vendor.o(($event) => _ctx.onCancel($event, {
type: "action",
extra: 0
})),
x: common_vendor.o(($event) => _ctx.onCancel($event, {
type: "action",
extra: 0
})),
y: common_vendor.o(($event) => _ctx.onCancel($event, {
type: "action",
extra: 0
})),
z: common_vendor.o(($event) => _ctx.onCancel($event, {
type: "action",
extra: 0
})),
A: common_vendor.o(($event) => _ctx.onCancel($event, {
type: "action",
extra: 0
})),
B: common_vendor.o(($event) => _ctx.onCancel($event, {
type: "action",
extra: 0
})),
C: common_vendor.o(($event) => _ctx.onCancel($event, {
type: "action",
extra: 0
})),
D: common_vendor.p({
["t-id"]: _ctx._cancel.tId,
["custom-style"]: _ctx._cancel.style,
block: _ctx._cancel.block,
["t-class"]: _ctx._cancel.tClass,
disabled: _ctx._cancel.disabled,
["custom-dataset"]: _ctx._cancel.customDataset,
content: _ctx._cancel.content,
icon: _ctx._cancel.icon,
loading: _ctx._cancel.loading,
["loading-props"]: _ctx._cancel.loadingProps,
theme: _ctx._cancel.theme,
ghost: _ctx._cancel.ghost,
shape: _ctx._cancel.shape,
size: _ctx._cancel.size,
variant: _ctx._cancel.variant,
["open-type"]: _ctx._cancel.openType,
["hover-class"]: _ctx._cancel.hoverClass,
["hover-stop-propagation"]: _ctx._cancel.hoverStopPropagation,
["hover-start-time"]: _ctx._cancel.hoverStartTime,
["hover-stay-time"]: _ctx._cancel.hoverStayTime,
lang: _ctx._cancel.lang,
["session-from"]: _ctx._cancel.sessionFrom,
["send-message-title"]: _ctx._cancel.sendMessageTitle,
["send-message-path"]: _ctx._cancel.sendMessagePath,
["send-message-img"]: _ctx._cancel.sendMessageImg,
["app-parameter"]: _ctx._cancel.appParameter,
["show-message-card"]: _ctx._cancel.showMessageCard,
["aria-label"]: _ctx._cancel.ariaLabel
})
}) : {}, {
E: _ctx._confirm
}, _ctx._confirm ? common_vendor.e({
F: _ctx._confirm.useDefaultSlot || false
}, _ctx._confirm.useDefaultSlot || false ? {} : {}, {
G: common_vendor.n(_ctx._confirm.class),
H: _ctx._confirm.index,
I: common_vendor.o(($event) => _ctx.onConfirm($event, {
type: "action",
extra: 0
})),
J: common_vendor.o(($event) => _ctx.onConfirm($event, {
type: "action",
extra: 0
})),
K: common_vendor.o(($event) => _ctx.onConfirm($event, {
type: "action",
extra: 0
})),
L: common_vendor.o(($event) => _ctx.onConfirm($event, {
type: "action",
extra: 0
})),
M: common_vendor.o(($event) => _ctx.onTplButtonConfirmonTap($event, {
type: "action",
extra: 0
})),
N: common_vendor.o(($event) => _ctx.onConfirm($event, {
type: "action",
extra: 0
})),
O: common_vendor.o(($event) => _ctx.onConfirm($event, {
type: "action",
extra: 0
})),
P: common_vendor.o(($event) => _ctx.onConfirm($event, {
type: "action",
extra: 0
})),
Q: common_vendor.p({
["t-id"]: _ctx._confirm.tId,
["custom-style"]: _ctx._confirm.style,
block: _ctx._confirm.block,
["t-class"]: _ctx._confirm.tClass,
disabled: _ctx._confirm.disabled,
["custom-dataset"]: _ctx._confirm.customDataset,
content: _ctx._confirm.content,
icon: _ctx._confirm.icon,
loading: _ctx._confirm.loading,
["loading-props"]: _ctx._confirm.loadingProps,
theme: _ctx._confirm.theme || "primary",
ghost: _ctx._confirm.ghost,
shape: _ctx._confirm.shape,
size: _ctx._confirm.size,
variant: _ctx._confirm.variant,
["open-type"]: _ctx._confirm.openType,
["hover-class"]: _ctx._confirm.hoverClass,
["hover-stop-propagation"]: _ctx._confirm.hoverStopPropagation,
["hover-start-time"]: _ctx._confirm.hoverStartTime,
["hover-stay-time"]: _ctx._confirm.hoverStayTime,
lang: _ctx._confirm.lang,
["session-from"]: _ctx._confirm.sessionFrom,
["send-message-title"]: _ctx._confirm.sendMessageTitle,
["send-message-path"]: _ctx._confirm.sendMessagePath,
["send-message-img"]: _ctx._confirm.sendMessageImg,
["app-parameter"]: _ctx._confirm.appParameter,
["show-message-card"]: _ctx._confirm.showMessageCard,
["aria-label"]: _ctx._confirm.ariaLabel
})
}) : {}, {
R: common_vendor.n(_ctx.tools.cls(_ctx.classPrefix + "__footer", [["column", _ctx.dataButtonLayout === "vertical"], ["full", _ctx.buttonVariant == "text" && (!_ctx.dataActions || _ctx.dataActions.length == 0)]])),
S: common_vendor.n(_ctx.classPrefix + " " + _ctx.tClass),
T: common_vendor.o(_ctx.overlayClick),
U: common_vendor.p({
name: "dialog",
["custom-style"]: _ctx.tools._style([_ctx.customStyle]),
["t-class"]: _ctx.classPrefix + "__wrapper",
visible: _ctx.dataVisible,
["show-overlay"]: _ctx.dataShowOverlay,
["close-on-overlay-click"]: _ctx.dataCloseOnOverlayClick,
["prevent-scroll-through"]: _ctx.dataPreventScrollThrough,
["overlay-props"]: _ctx.dataOverlayProps,
["z-index"]: _ctx.dataZIndex,
placement: "center",
["using-custom-navbar"]: _ctx.dataUsingCustomNavbar
})
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8dd4352e"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/tdesign-uniapp/components/dialog/dialog.js.map

View File

@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"t-popup": "../popup/popup",
"t-icon": "../icon/icon",
"t-button": "../button/button"
}
}

View File

@@ -0,0 +1 @@
<t-popup wx:if="{{U}}" class="data-v-8dd4352e" u-s="{{['content']}}" bindvisibleChange="{{T}}" u-i="8dd4352e-0" bind:__l="__l" u-p="{{U}}"><view class="{{['data-v-8dd4352e', S]}}" slot="content"><slot name="top"/><view wx:if="{{a}}" class="{{['data-v-8dd4352e', e]}}" bindtap="{{f}}"><block wx:if="{{b}}"><t-icon wx:if="{{c}}" class="data-v-8dd4352e" u-i="8dd4352e-1,8dd4352e-0" bind:__l="__l" u-p="{{c}}"/></block><t-icon wx:else class="data-v-8dd4352e" u-i="8dd4352e-2,8dd4352e-0" bind:__l="__l" u-p="{{d||''}}"/></view><view class="{{['data-v-8dd4352e', n]}}"><view wx:if="{{g}}" class="{{['data-v-8dd4352e', i]}}">{{h}}</view><slot name="title"/><view wx:if="{{j}}" class="{{['data-v-8dd4352e', m]}}"><text class="{{['data-v-8dd4352e', l]}}">{{k}}</text></view><slot name="content"/></view><slot name="middle"/><view class="{{['data-v-8dd4352e', R]}}"><block wx:if="{{o}}"><t-button wx:for="{{p}}" wx:for-item="actionItem" wx:key="b" u-s="{{['d']}}" class="{{['data-v-8dd4352e', actionItem.c]}}" data-type="{{'action'}}" data-extra="{{actionItem.d}}" bindclick="{{actionItem.e}}" bindgetuserinfo="{{actionItem.f}}" bindcontact="{{actionItem.g}}" bindgetphonenumber="{{actionItem.h}}" binderror="{{actionItem.i}}" bindopensetting="{{actionItem.j}}" bindlaunchapp="{{actionItem.k}}" bindagreeprivacyauthorization="{{actionItem.l}}" u-i="{{actionItem.m}}" bind:__l="__l" u-p="{{actionItem.n}}"><slot wx:if="{{actionItem.a}}"/></t-button></block><slot name="actions"/><block wx:if="{{q}}"><t-button wx:if="{{D}}" u-s="{{['d']}}" class="{{['data-v-8dd4352e', s]}}" data-type="{{'cancel'}}" data-extra="{{t}}" bindclick="{{v}}" bindgetuserinfo="{{w}}" bindcontact="{{x}}" bindgetphonenumber="{{y}}" binderror="{{z}}" bindopensetting="{{A}}" bindlaunchapp="{{B}}" bindagreeprivacyauthorization="{{C}}" u-i="8dd4352e-4,8dd4352e-0" bind:__l="__l" u-p="{{D}}"><slot wx:if="{{r}}"/></t-button></block><slot name="cancel-btn"/><block wx:if="{{E}}"><t-button wx:if="{{Q}}" u-s="{{['d']}}" class="{{['data-v-8dd4352e', G]}}" data-type="{{'confirm'}}" data-extra="{{H}}" bindclick="{{I}}" bindgetuserinfo="{{J}}" bindcontact="{{K}}" bindgetphonenumber="{{L}}" binderror="{{M}}" bindopensetting="{{N}}" bindlaunchapp="{{O}}" bindagreeprivacyauthorization="{{P}}" u-i="8dd4352e-5,8dd4352e-0" bind:__l="__l" u-p="{{Q}}"><slot wx:if="{{F}}"/></t-button></block><slot name="confirm-btn"/></view></view></t-popup>

View File

@@ -0,0 +1,102 @@
.t-dialog.data-v-8dd4352e {
overflow: hidden;
width: var(--td-dialog-width, 622rpx);
border-radius: var(--td-dialog-border-radius, var(--td-radius-extraLarge, 24rpx));
background-color: var(--td-bg-color-container, var(--td-font-white-1, #ffffff));
}
.t-dialog__wrapper.data-v-8dd4352e {
--td-popup-border-radius: var(--td-dialog-border-radius, var(--td-radius-extraLarge, 24rpx));
}
.t-dialog__close-btn.data-v-8dd4352e {
position: absolute;
top: var(--td-spacer, 16rpx);
right: var(--td-spacer, 16rpx);
color: var(--td-dialog-close-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
z-index: 1;
/* skyline适配新增 */
}
.t-dialog__content.data-v-8dd4352e {
padding-top: var(--td-spacer-3, 48rpx);
padding-right: var(--td-spacer-3, 48rpx);
padding-bottom: 0;
padding-left: var(--td-spacer-3, 48rpx);
max-height: var(--td-dialog-body-max-height, 912rpx);
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
font-size: var(--td-font-size-m, 32rpx);
}
.t-dialog__content.data-v-8dd4352e:empty {
display: none;
}
.t-dialog__header.data-v-8dd4352e {
text-align: center;
font: var(--td-dialog-title-font, var(--td-font-title-large, 600 36rpx / 52rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
color: var(--td-dialog-title-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 0, 0, 0.9))));
}
.t-dialog__header + .t-dialog__body.data-v-8dd4352e {
margin-top: var(--td-spacer, 16rpx);
}
.t-dialog__body.data-v-8dd4352e {
overflow-y: scroll;
text-align: center;
-webkit-overflow-scrolling: touch;
font: var(--td-dialog-content-font, var(--td-font-body-large, 32rpx / 48rpx var(--td-font-family, PingFang SC, Microsoft YaHei, Arial Regular)));
color: var(--td-dialog-content-color, var(--td-text-color-secondary, var(--td-font-gray-2, rgba(0, 0, 0, 0.6))));
}
.t-dialog__body-text.data-v-8dd4352e {
word-wrap: break-word;
}
.t-dialog__body--left.data-v-8dd4352e {
text-align: left;
}
.t-dialog__body--right.data-v-8dd4352e {
text-align: right;
}
.t-dialog__footer.data-v-8dd4352e {
display: flex;
padding: var(--td-spacer-3, 48rpx);
}
.t-dialog__footer--column.data-v-8dd4352e {
flex-flow: column-reverse;
}
.t-dialog__footer--column.data-v-8dd4352e .t-dialog__button {
width: 100%;
}
.t-dialog__footer--full.data-v-8dd4352e {
padding: var(--td-spacer-4, 64rpx) 0 0;
}
.data-v-8dd4352e .t-dialog__button {
position: relative;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.data-v-8dd4352e .t-dialog__button--horizontal:not(:first-child) {
margin-left: var(--td-spacer-1, 24rpx);
}
.data-v-8dd4352e .t-dialog__button--vertical:not(:first-child) {
margin-bottom: var(--td-spacer-1, 24rpx);
}
.data-v-8dd4352e .t-dialog__button--text {
flex: 1;
--td-button-border-radius: 0;
--td-button-medium-height: 112rpx;
border-radius: 0;
}
.data-v-8dd4352e .t-dialog__button--text:before {
content: ' ';
position: absolute;
box-sizing: border-box;
top: 0;
left: 0;
border-top: 1px solid var(--td-border-level-1-color, var(--td-gray-color-3, #e7e7e7));
border-left: 1px solid var(--td-border-level-1-color, var(--td-gray-color-3, #e7e7e7));
transform: scale(0.5);
transform-origin: 0 0;
width: 200%;
height: 200%;
border-radius: 0;
}

View File

@@ -0,0 +1,91 @@
"use strict";
const props = {
/** 操作栏 */
actions: {
type: Array
},
/** 多按钮排列方式 */
buttonLayout: {
type: String,
default: "horizontal",
validator(val) {
if (!val)
return true;
return ["horizontal", "vertical"].includes(val);
}
},
/** 取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 Slot 自定义按钮时,需自行控制取消事件 */
cancelBtn: {
type: [String, Object]
},
/** 是否展示关闭按钮,值为 `true` 显示默认关闭按钮;值为 `false` 则不显示关闭按钮;使用 Object 时透传至图标组件 */
closeBtn: {
type: [Boolean, Object],
default: false
},
/** 点击蒙层时是否触发关闭事件 */
closeOnOverlayClick: Boolean,
/** 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 Slot 自定义按钮时,需自行控制确认事件 */
confirmBtn: {
type: [String, Object]
},
/** 内容 */
content: {
type: String
},
/** 透传至 Overlay 组件 */
overlayProps: {
type: Object,
default: () => ({})
},
/** 防止滚动穿透 */
preventScrollThrough: {
type: Boolean,
default: true
},
/** 是否显示遮罩层 */
showOverlay: {
type: Boolean,
default: true
},
/** 标题 */
title: {
type: String
},
/** 是否使用了自定义导航栏 */
usingCustomNavbar: Boolean,
/** 控制对话框是否显示 */
visible: Boolean,
/** 对话框层级Web 侧样式默认为 2500移动端样式默认 2500小程序样式默认为 11500 */
zIndex: {
type: Number,
default: 11500
},
/** 点击多按钮中的其中一个时触发 */
onAction: {
type: Function,
default: () => ({})
},
/** 如果“取消”按钮存在,则点击“取消”按钮时触发,同时触发关闭事件 */
onCancel: {
type: Function,
default: () => ({})
},
/** 关闭事件,点击 取消按钮 或 点击蒙层 时触发 */
onClose: {
type: Function,
default: () => ({})
},
/** 如果“确认”按钮存在,则点击“确认”按钮时触发 */
onConfirm: {
type: Function,
default: () => ({})
},
/** 如果蒙层存在,点击蒙层时触发 */
onOverlayClick: {
type: Function,
default: () => ({})
}
};
exports.props = props;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/tdesign-uniapp/components/dialog/props.js.map