初始化项目, 添加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,13 @@
import { RelationsOptions, SuperComponent } from '../common/src/index';
export default class IndexesAnchor extends SuperComponent {
externalClasses: string[];
properties: import("./type").TdIndexesAnchorProps;
data: {
prefix: string;
classPrefix: string;
anchorStyle: string;
sticky: boolean;
active: boolean;
};
relations: RelationsOptions;
}

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}-indexes-anchor`;let IndexesAnchor=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`],this.properties=props,this.data={prefix:prefix,classPrefix:name,anchorStyle:"",sticky:!1,active:!1},this.relations={"../indexes/indexes":{type:"parent"}}}};IndexesAnchor=__decorate([wxComponent()],IndexesAnchor);export default IndexesAnchor;

View File

@@ -0,0 +1 @@
{"component":true,"styleIsolation":"apply-shared"}

View File

@@ -0,0 +1 @@
<wxs src="../common/utils.wxs" module="_"/><view class="{{classPrefix}} class {{prefix}}-class" style="{{_._style([style, customStyle])}}"><view class="{{_.cls(classPrefix + '__wrapper', [['sticky', sticky], ['active', active]])}}" style="{{anchorStyle}}"><view class="{{classPrefix}}__slot"><slot/></view><view class="{{_.cls(classPrefix + '__header', [['active', active]])}}">{{index}}</view></view></view>

View File

@@ -0,0 +1,10 @@
@import '../common/style/index.wxss';.t-indexes-anchor{color:var(--td-indexes-anchor-color,var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9))));font-size:var(--td-indexes-anchor-font-size,28rpx);line-height:var(--td-indexes-anchor-line-height,44rpx);}
.t-indexes-anchor__header{display:none;padding:var(--td-indexes-anchor-padding,8rpx 32rpx);background-color:var(--td-indexes-anchor-bg-color,var(--td-bg-color-secondarycontainer,var(--td-gray-color-1,#f3f3f3)));}
.t-indexes-anchor__header--active{background-color:var(--td-indexes-anchor-active-bg-color,var(--td-bg-color-container,var(--td-font-white-1,#fff)));position:relative;}
.t-indexes-anchor__header--active::after{content:'';display:block;position:absolute;top:unset;bottom:0;left:unset;right:unset;background-color:var(--td-indexes-anchor-border-color,var(--td-component-border,var(--td-gray-color-4,#dcdcdc)));}
.t-indexes-anchor__header--active::after{height:1px;left:0;right:0;transform:scaleY(.5);}
.t-indexes-anchor__slot{overflow:hidden;}
.t-indexes-anchor__slot:empty+.t-indexes-anchor__header{display:block;}
.t-indexes-anchor__wrapper{will-change:transform;}
.t-indexes-anchor__wrapper--sticky{position:fixed;top:var(--td-indexes-anchor-top,0);left:0;width:100%;z-index:1;}
.t-indexes-anchor__wrapper--active{color:var(--td-indexes-anchor-active-color,var(--td-brand-color,var(--td-primary-color-7,#0052d9)));font-weight:var(--td-indexes-anchor-active-font-weight,600);}

View File

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

View File

@@ -0,0 +1 @@
const props={index:{type:null}};export default props;

View File

@@ -0,0 +1,6 @@
export interface TdIndexesAnchorProps {
index?: {
type: null;
value?: string | number;
};
}

View File

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