初始化项目, 添加TDesign等包

This commit is contained in:
zhengw
2025-11-28 16:49:36 +08:00
commit 3e53beb7bb
980 changed files with 39201 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
import { TdStepsProps } from './type';
declare const props: TdStepsProps;
export default props;

View File

@@ -0,0 +1 @@
const props={current:{type:null,value:null},defaultCurrent:{type:null},currentStatus:{type:String,value:"process"},layout:{type:String,value:"horizontal"},readonly:{type:null,value:void 0},sequence:{type:String,value:"positive"},theme:{type:String,value:"default"}};export default props;

View File

@@ -0,0 +1,22 @@
import { SuperComponent, RelationsOptions } from '../common/src/index';
export default class Steps extends SuperComponent {
relations: RelationsOptions;
externalClasses: string[];
properties: import("./type").TdStepsProps;
controlledProps: {
key: string;
event: string;
}[];
data: {
prefix: string;
classPrefix: string;
};
observers: {
'current, theme, sequence'(): void;
};
methods: {
updateChildren(): void;
updateLastChid(): void;
handleClick(index: any): void;
};
}

View File

@@ -0,0 +1 @@
import{__decorate}from"tslib";import{wxComponent,SuperComponent}from"../common/src/index";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-steps`;let Steps=class extends SuperComponent{constructor(){super(...arguments),this.relations={"../step-item/step-item":{type:"child",linked(e){this.updateChildren();const{readonly:t}=this.data;e.setData({readonly:t})},unlinked(){this.updateLastChid()}}},this.externalClasses=[`${prefix}-class`],this.properties=props,this.controlledProps=[{key:"current",event:"change"}],this.data={prefix:prefix,classPrefix:name},this.observers={"current, theme, sequence"(){this.updateChildren()}},this.methods={updateChildren(){const e=this.$children;e.forEach((t,s)=>{t.updateStatus(Object.assign({index:s,items:e},this.data))})},updateLastChid(){const e=this.$children;e.forEach((t,s)=>t.setData({isLastChild:s===e.length-1}))},handleClick(e){if(!this.data.readonly){const t=this.data.current;this._trigger("change",{previous:t,current:e})}}}}};Steps=__decorate([wxComponent()],Steps);export default Steps;

View File

@@ -0,0 +1 @@
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"t-step":"../step-item/step-item"}}

View File

@@ -0,0 +1 @@
<wxs src="../common/utils.wxs" module="_"/><view style="{{_._style([style, customStyle])}}" class="{{_.cls(classPrefix, [layout, ['readonly', readonly], sequence])}} class {{prefix}}-class"><slot/></view>

View File

@@ -0,0 +1,6 @@
@import '../common/style/index.wxss';:host{display:flex;}
.t-step--vertical{padding-right:32rpx;}
.t-steps{display:flex;width:100%;}
.t-steps--vertical{flex-direction:column;}
.t-steps--reverse{flex-direction:row-reverse;}
.t-steps--vertical.t-steps--reverse{flex-direction:column-reverse;}

View File

@@ -0,0 +1,30 @@
export interface TdStepsProps {
current?: {
type: null;
value?: string | number;
};
defaultCurrent?: {
type: null;
value?: string | number;
};
currentStatus?: {
type: StringConstructor;
value?: 'default' | 'process' | 'finish' | 'error';
};
layout?: {
type: StringConstructor;
value?: 'horizontal' | 'vertical';
};
readonly?: {
type: BooleanConstructor;
value?: boolean;
};
sequence?: {
type: StringConstructor;
value?: 'positive' | 'reverse';
};
theme?: {
type: StringConstructor;
value?: 'default' | 'dot';
};
}

View File

@@ -0,0 +1 @@
export{};