feat: login rest

This commit is contained in:
Blizzard
2026-02-12 09:26:39 +08:00
parent e97fd30fa3
commit 5553e2711a
115 changed files with 4090 additions and 3499 deletions
+1 -44
View File
@@ -1,52 +1,9 @@
/// <reference types="miniprogram-api-typings" />
/// <reference types="miniprogram-api-typings" />
import { TdPopupProps } from './type';
import { SuperComponent } from '../common/src/index';
export declare type PopupProps = TdPopupProps;
export default class Popup extends SuperComponent {
externalClasses: string[];
behaviors: (WechatMiniprogram.Behavior.BehaviorIdentifier<{
transitionClass: string;
transitionDurations: number;
className: string;
realVisible: boolean;
}, {
visible: {
type: BooleanConstructor;
value: any;
observer: string;
};
appear: BooleanConstructor;
name: {
type: StringConstructor;
value: string;
};
durations: {
type: NumberConstructor;
optionalTypes: ArrayConstructor[];
};
}, {
watchVisible(curr: any, prev: any): void;
getDurations(): number[];
enter(): void;
entered(): void;
leave(): void;
leaved(): void;
onTransitionEnd(): void;
}, WechatMiniprogram.Component.BehaviorOption> | WechatMiniprogram.Behavior.BehaviorIdentifier<{
distanceTop: number;
}, {
usingCustomNavbar: {
type: BooleanConstructor;
value: false;
};
customNavbarHeight: {
type: NumberConstructor;
value: number;
};
}, {
calculateCustomNavbarDistanceTop(): void;
}, WechatMiniprogram.Component.BehaviorOption>)[];
behaviors: string[];
options: {
multipleSlots: boolean;
};
+1 -1
View File
@@ -1 +1 @@
<wxs src="./popup.wxs" module="popup"/><wxs src="../common/utils.wxs" module="_"/><view wx:if="{{realVisible}}" style="{{_._style([popup.getPopupStyles(zIndex, distanceTop, placement), style, customStyle])}}" class="{{_.cls(classPrefix, [placement])}} {{transitionClass}} class {{prefix}}-class" bind:transitionend="onTransitionEnd"><view data-prevention="{{preventScrollThrough || (overlayProps ? !!overlayProps.preventScrollThrough : false)}}" bind:touchmove="{{popup.onContentTouchMove}}" class="{{classPrefix}}__content {{prefix}}-class-content"><slot name="content"/><slot/><view class="{{classPrefix}}__close" bind:tap="handleClose"><t-icon name="close" wx:if="{{closeBtn}}" size="64rpx"/><slot name="close-btn" class="{{classPrefix}}-slot"/></view></view></view><t-overlay id="popup-overlay" wx:if="{{showOverlay}}" visible="{{visible}}" usingCustomNavbar="{{usingCustomNavbar}}" z-index="{{overlayProps && overlayProps.zIndex || 11000}}" duration="{{overlayProps && overlayProps.duration || 300}}" background-color="{{overlayProps && overlayProps.backgroundColor || ''}}" prevent-scroll-through="{{preventScrollThrough || (overlayProps ? !!overlayProps.preventScrollThrough : false)}}" bind:tap="handleOverlayClick" custom-style="{{overlayProps && overlayProps.style || ''}}"/>
<wxs src="./popup.wxs" module="popup"/><wxs src="../common/utils.wxs" module="_"/><view wx:if="{{realVisible}}" style="{{_._style([popup.getPopupStyles(zIndex, distanceTop, placement, duration), style, customStyle])}}" class="{{_.cls(classPrefix, [placement])}} {{transitionClass}} class {{prefix}}-class" bind:transitionend="onTransitionEnd"><view data-prevention="{{preventScrollThrough || (overlayProps ? !!overlayProps.preventScrollThrough : false)}}" bind:touchmove="{{popup.onContentTouchMove}}" class="{{classPrefix}}__content {{prefix}}-class-content"><slot name="content"/><slot/><view class="{{classPrefix}}__close" bind:tap="handleClose"><t-icon name="close" wx:if="{{closeBtn}}" size="64rpx"/><slot name="close-btn" class="{{classPrefix}}-slot"/></view></view></view><t-overlay id="popup-overlay" wx:if="{{showOverlay}}" visible="{{visible}}" usingCustomNavbar="{{usingCustomNavbar}}" z-index="{{overlayProps && overlayProps.zIndex || 11000}}" duration="{{overlayProps && overlayProps.duration || duration || 300}}" background-color="{{overlayProps && overlayProps.backgroundColor || ''}}" prevent-scroll-through="{{preventScrollThrough || (overlayProps ? !!overlayProps.preventScrollThrough : false)}}" bind:tap="handleOverlayClick" custom-style="{{overlayProps && overlayProps.style || ''}}"/>
+4 -1
View File
@@ -1,8 +1,11 @@
function getPopupStyles(zIndex, distanceTop, placement) {
function getPopupStyles(zIndex, distanceTop, placement, duration) {
var zIndexStyle = zIndex ? 'z-index:' + zIndex + ';' : '';
if ((placement === 'top' || placement === 'left' || placement === 'right') && distanceTop) {
zIndexStyle = zIndexStyle + 'top:' + distanceTop + 'px;' + '--td-popup-distance-top:' + distanceTop + 'px;';
}
if (duration) {
zIndexStyle = zIndexStyle + '--td-popup-transition:all ' + duration + 'ms ease;';
}
return zIndexStyle;
}