init: initial commit
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
||||
export * from './props';
|
||||
export * from './type';
|
||||
+1
@@ -0,0 +1 @@
|
||||
export*from"./props";export*from"./type";
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import { TdTransitionProps } from './type';
|
||||
declare const props: TdTransitionProps;
|
||||
export default props;
|
||||
+1
@@ -0,0 +1 @@
|
||||
const props={appear:{type:Boolean,value:!1},destoryOnHide:{type:Boolean,value:!1},durations:{type:null},name:{type:String,value:"t-transition"},visible:{type:Boolean,value:!1}};export default props;
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
/// <reference types="miniprogram-api-typings" />
|
||||
/// <reference types="miniprogram-api-typings" />
|
||||
import { SuperComponent } from '../common/src/index';
|
||||
export default class Transition 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>[];
|
||||
data: {
|
||||
classPrefix: string;
|
||||
};
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import transition from"../mixins/transition";import config from"../common/config";const{prefix:prefix}=config,name=`${prefix}-transition`;let Transition=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`],this.behaviors=[transition()],this.data={classPrefix:name}}};Transition=__decorate([wxComponent()],Transition);export default Transition;
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"component":true,"styleIsolation":"apply-shared","usingComponents":{}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<wxs src="../common/utils.wxs" module="_"/><view class="class {{prefix}}-class {{classPrefix}} {{ transitionClass }}" style="{{_._style([visible ? '' : 'display: none', style, customStyle])}}" bind:transitionend="onTransitionEnd"><slot/></view>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
@import '../common/style/index.wxss';.t-transition-enter{opacity:0;}
|
||||
.t-transition-enter-to{opacity:1;transition:opacity 1s;}
|
||||
.t-transition-leave{opacity:1;}
|
||||
.t-transition-leave-to{opacity:0;transition:opacity 1s;}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
export interface TdTransitionProps {
|
||||
appear?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
destoryOnHide?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
durations?: {
|
||||
type: null;
|
||||
value?: number | number[];
|
||||
};
|
||||
name?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
visible?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export{};
|
||||
Reference in New Issue
Block a user