升级package, 以及更新声明文件

This commit is contained in:
zhengw
2026-01-09 16:33:18 +08:00
parent 0c4b2a886c
commit cf461d33f9
238 changed files with 46252 additions and 5857 deletions

View File

@@ -1 +1 @@
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import transition from"../mixins/transition";import{calcIcon}from"../common/utils";import useCustomNavbar from"../mixins/using-custom-navbar";const{prefix:prefix}=config,name=`${prefix}-toast`;let Toast=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`],this.options={multipleSlots:!0},this.behaviors=[transition(),useCustomNavbar],this.hideTimer=null,this.data={prefix:prefix,classPrefix:name,typeMapIcon:""},this.properties=props,this.lifetimes={detached(){this.destroyed()}},this.pageLifetimes={hide(){this.hide()}},this.methods={show(e){this.hideTimer&&clearTimeout(this.hideTimer);const i={loading:"loading",success:"check-circle",warning:"error-circle",error:"close-circle"}[null==e?void 0:e.theme],t={direction:props.direction.value,duration:props.duration.value,icon:props.icon.value,message:props.message.value,placement:props.placement.value,preventScrollThrough:props.preventScrollThrough.value,theme:props.theme.value},o=Object.assign(Object.assign(Object.assign({},t),e),{visible:!0,isLoading:"loading"===(null==e?void 0:e.theme),_icon:calcIcon(null!=i?i:e.icon)}),{duration:s}=o;this.setData(o),s>0&&(this.hideTimer=setTimeout(()=>{this.hide()},s))},hide(){var e,i;this.data.visible&&(this.setData({visible:!1}),null===(i=null===(e=this.data)||void 0===e?void 0:e.close)||void 0===i||i.call(e),this.triggerEvent("close"))},destroyed(){this.hideTimer&&(clearTimeout(this.hideTimer),this.hideTimer=null),this.triggerEvent("destory")},loop(){}}}};Toast=__decorate([wxComponent()],Toast);export default Toast;
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import transition from"../mixins/transition";import{calcIcon}from"../common/utils";import useCustomNavbar from"../mixins/using-custom-navbar";const{prefix:prefix}=config,name=`${prefix}-toast`;let Toast=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`],this.options={multipleSlots:!0},this.behaviors=[transition(),useCustomNavbar],this.hideTimer=null,this.data={prefix:prefix,classPrefix:name,typeMapIcon:""},this.properties=props,this.lifetimes={detached(){this.destroyed()}},this.pageLifetimes={hide(){this.hide()}},this.methods={show(e){this.hideTimer&&clearTimeout(this.hideTimer);const i={loading:"loading",success:"check-circle",warning:"error-circle",error:"close-circle"}[null==e?void 0:e.theme],t={direction:props.direction.value,duration:props.duration.value,icon:props.icon.value,message:props.message.value,placement:props.placement.value,preventScrollThrough:props.preventScrollThrough.value,theme:props.theme.value,close:null},o=Object.assign(Object.assign(Object.assign({},t),e),{visible:!0,isLoading:"loading"===(null==e?void 0:e.theme),_icon:calcIcon(null!=i?i:e.icon)}),{duration:s}=o;this.setData(o),s>0&&(this.hideTimer=setTimeout(()=>{this.hide()},s))},hide(){var e,i;this.data.visible&&(this.setData({visible:!1}),null===(i=null===(e=this.data)||void 0===e?void 0:e.close)||void 0===i||i.call(e),this.triggerEvent("close"))},destroyed(){this.hideTimer&&(clearTimeout(this.hideTimer),this.hideTimer=null),this.triggerEvent("destory")},loop(){}}}};Toast=__decorate([wxComponent()],Toast);export default Toast;

View File

@@ -1 +1 @@
<import src="../common/template/icon.wxml"/><wxs src="../common/utils.wxs" module="_"/><view wx:if="{{realVisible}}" class="{{_.cls(classPrefix, [direction, theme, ['with-text', message]])}} class {{prefix}}-class {{transitionClass}}" style="{{_._style([ 'top:' + (placement === 'top' ? '25%' : placement === 'bottom' ? '75%': '45%'), style, customStyle])}}" bind:transitionend="onTransitionEnd" catch:touchstart="loop"><view class="{{classPrefix}}__content {{classPrefix}}__content--{{direction}}"><t-loading wx:if="{{isLoading}}" theme="circular" size="{{direction === 'row' ? '48rpx' : '64rpx'}}" loading inherit-color layout="vertical"/><template wx:elif="{{_icon}}" is="icon" data="{{ ariaHidden: true, tClass: classPrefix + '__icon ' + classPrefix + '__icon--' + direction, ..._icon }}"/><slot name="icon"/><view aria-role="alert" class="{{classPrefix}}__text {{classPrefix}}__text--{{direction}}">{{message}}</view><slot name="message"/></view></view><t-overlay style="{{ overlayProps && overlayProps.style || ''}}" visible="{{realVisible && (showOverlay || preventScrollThrough)}}" z-index="{{overlayProps && overlayProps.zIndex || 11000}}" duration="{{overlayProps && overlayProps.duration || 300}}" usingCustomNavbar="{{overlayProps && overlayProps.usingCustomNavbar || usingCustomNavbar}}" backgroundColor="{{!showOverlay && preventScrollThrough ? 'transparent' : overlayProps && overlayProps.backgroundColor || ''}}" preventScrollThrough="{{preventScrollThrough || overlayProps && overlayProps.preventScrollThrough}}"/>
<import src="../common/template/icon.wxml"/><wxs src="../common/utils.wxs" module="_"/><view wx:if="{{realVisible}}" class="{{_.cls(classPrefix, [direction, theme, ['with-text', message]])}} class {{prefix}}-class {{transitionClass}}" style="{{_._style([ 'top:' + (placement === 'top' ? '25%' : placement === 'bottom' ? '75%': '45%'), style, customStyle])}}" bind:transitionend="onTransitionEnd" catch:touchstart="loop"><view class="{{classPrefix}}__content {{classPrefix}}__content--{{direction}}"><t-loading wx:if="{{isLoading}}" theme="circular" size="{{direction === 'row' ? '48rpx' : '64rpx'}}" loading inherit-color layout="vertical"/><template wx:elif="{{_icon}}" is="icon" data="{{ ariaHidden: true, tClass: classPrefix + '__icon ' + classPrefix + '__icon--' + direction, ..._icon }}"/><slot name="icon"/><view aria-role="alert" class="{{classPrefix}}__text {{classPrefix}}__text--{{direction}}">{{message}}</view><slot name="message"/></view></view><t-overlay style="{{ overlayProps && overlayProps.style || ''}}" visible="{{visible && (showOverlay || preventScrollThrough)}}" z-index="{{overlayProps && overlayProps.zIndex || 11000}}" duration="{{overlayProps && overlayProps.duration || 300}}" usingCustomNavbar="{{overlayProps && overlayProps.usingCustomNavbar || usingCustomNavbar}}" backgroundColor="{{!showOverlay && preventScrollThrough ? 'transparent' : overlayProps && overlayProps.backgroundColor || ''}}" preventScrollThrough="{{preventScrollThrough || overlayProps && overlayProps.preventScrollThrough}}"/>

View File

@@ -1,7 +1,7 @@
@import '../common/style/index.wxss';.t-toast{position:fixed;left:50%;transform:translate(-50%,-50%);z-index:12001;opacity:1;transition:opacity .3s ease;background-color:var(--td-toast-bg-color,var(--td-mask-active,rgba(0,0,0,.6)));border-radius:var(--td-toast-radius,var(--td-radius-default,12rpx));font-size:28rpx;color:var(--td-toast-color,var(--td-text-color-anti,var(--td-font-white-1,#fff)));max-width:var(--td-toast-max-width,370rpx);min-height:0;width:auto;display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box;}
@import '../common/style/index.wxss';.t-toast{position:fixed;left:50%;transform:translate(-50%,-50%);z-index:12001;opacity:1;transition:opacity .3s ease;background-color:var(--td-toast-bg-color,var(--td-mask-active,rgba(0,0,0,.6)));border-radius:var(--td-toast-radius,var(--td-radius-default,12rpx));color:var(--td-toast-color,var(--td-text-color-anti,var(--td-font-white-1,#fff)));max-width:var(--td-toast-max-width,370rpx);min-height:0;width:auto;display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box;}
.t-toast--column{padding:48rpx;min-width:160rpx;min-height:160rpx;border-radius:16rpx;display:flex;align-items:center;justify-content:center;}
.t-toast--loading.t-toast--with-text{min-width:204rpx;min-height:204rpx;padding-top:0;padding-bottom:0;}
.t-toast__content{align-items:center;line-height:44rpx;}
.t-toast__content{align-items:center;font:var(--td-font-body-medium,28rpx / 44rpx var(--td-font-family,PingFang SC,Microsoft YaHei,Arial Regular));}
.t-toast__content--row{display:flex;text-align:left;padding:28rpx 44rpx;}
.t-toast__content--column{display:flex;flex-direction:column;justify-content:center;align-items:center;}
.t-toast__icon--row{display:flex;font-size:var(--td-toast-row-icon-size,48rpx);}