初始化项目, 添加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,9 @@
import { SuperComponent } from '../common/src/index';
export default class Footer extends SuperComponent {
externalClasses: string[];
properties: import("./type").TdFooterProps;
data: {
prefix: string;
classPrefix: string;
};
}

View File

@@ -0,0 +1 @@
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-footer`;let Footer=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`],this.properties=props,this.data={prefix:prefix,classPrefix:name}}};Footer=__decorate([wxComponent()],Footer);export default Footer;

View File

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

View File

@@ -0,0 +1 @@
<wxs src="../common/utils.wxs" module="_"/><view style="{{_._style([style, customStyle])}}" class="{{classPrefix}} class {{prefix}}-class"><block wx:if="{{logo}}"><view class="{{classPrefix}}__logo"><t-image t-class="{{classPrefix}}__icon" src="{{logo.icon}}" wx:if="{{logo.icon}}"/><view class="{{classPrefix}}__title" wx:if="{{logo.title}}">{{logo.title}}</view><t-image t-class="{{classPrefix}}__title-url" src="{{logo.url}}" mode="widthFix" wx:elif="{{logo.url}}"/></view></block><block wx:else><view wx:if="{{links.length > 0}}" class="{{classPrefix}}__link-list"><block wx:for="{{links}}" wx:key="name" wx:for-item="item"><navigator url="{{item.url}}" open-type="{{item.openType}}" hover-class="none" class="{{classPrefix}}__link-item">{{item.name}}</navigator><view aria-hidden="{{true}}" wx:if="{{index !== (links.length - 1)}}" class="{{classPrefix}}__link-line">|</view></block></view><view class="{{classPrefix}}__text">{{text}}</view></block></view>

View File

@@ -0,0 +1,10 @@
@import '../common/style/index.wxss';.t-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;}
.t-footer__text{font-size:var(--td-footer-text-font-size,var(--td-font-size-s,24rpx));line-height:var(--td-footer-text-line-height,40rpx);color:var(--td-footer-text-color,var(--td-text-color-placeholder,var(--td-font-gray-3,rgba(0,0,0,.4))));}
.t-footer__link-list+.t-footer__text:not(:empty){margin-top:var(--td-footer-text-margin-top,8rpx);}
.t-footer__link-list{display:flex;justify-content:center;align-items:center;}
.t-footer__link-item{color:var(--td-footer-link-color,var(--td-brand-color,var(--td-primary-color-7,#0052d9)));font-size:var(--td-footer-link-font-size,var(--td-font-size-s,24rpx));line-height:var(--td-footer-link-line-height,40rpx);text-decoration:underline;}
.t-footer__link-line{font-size:24rpx;color:var(--td-footer-link-dividing-line-color,var(--td-text-color-placeholder,var(--td-font-gray-3,rgba(0,0,0,.4))));display:inline-block;padding:0 var(--td-footer-link-dividing-line-padding,var(--td-spacer-1,24rpx));}
.t-footer__logo{display:flex;justify-content:center;align-items:center;}
.t-footer__icon{width:var(--td-footer-logo-icon-width,48rpx);height:var(--td-footer-logo-icon-height,48rpx);margin-right:var(--td-footer-logo-icon-margin-right,var(--td-spacer,16rpx));}
.t-footer__title{color:var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9)));font-weight:700;font-size:var(--td-footer-logo-title-font-size,var(--td-font-size-m,32rpx));line-height:var(--td-footer-logo-title-line-height,48rpx);font-style:italic;}
.t-footer__title-url{width:var(--td-footer-logo-title-url-width,256rpx);}

View File

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

View File

@@ -0,0 +1 @@
const props={links:{type:Array,value:[]},logo:{type:Object},text:{type:String,value:""}};export default props;

View File

@@ -0,0 +1,24 @@
export interface TdFooterProps {
links?: {
type: ArrayConstructor;
value?: Array<LinkObj>;
};
logo?: {
type: ObjectConstructor;
value?: FooterLogo;
};
text?: {
type: StringConstructor;
value?: string;
};
}
export interface LinkObj {
name: string;
url?: string;
openType?: 'navigate' | 'redirect' | 'relaunch' | 'switchTab' | 'navigateBack';
}
export interface FooterLogo {
icon: string;
title?: string;
url?: string;
}

View File

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