初始化项目, 添加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 { TdSideBarProps } from './type';
declare const props: TdSideBarProps;
export default props;

View File

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

View File

@@ -0,0 +1,24 @@
import { SuperComponent, RelationsOptions } from '../common/src/index';
export default class SideBar extends SuperComponent {
externalClasses: string[];
children: any[];
relations: RelationsOptions;
controlledProps: {
key: string;
event: string;
}[];
properties: import("./type").TdSideBarProps;
observers: {
value(v: any): void;
};
data: {
classPrefix: string;
prefix: string;
};
methods: {
doChange({ value, label }: {
value: any;
label: any;
}): void;
};
}

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}-side-bar`,relationsPath="../side-bar-item/side-bar-item";let SideBar=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`],this.children=[],this.relations={[relationsPath]:{type:"child",linked(e){this.children.push(e)},unlinked(e){const i=this.children.findIndex(i=>i===e);this.children.splice(i,1)}}},this.controlledProps=[{key:"value",event:"change"}],this.properties=props,this.observers={value(e){this.$children.forEach(i=>{i.updateActive(e)})}},this.data={classPrefix:name,prefix:prefix},this.methods={doChange({value:e,label:i}){this._trigger("change",{value:e,label:i})}}}};SideBar=__decorate([wxComponent()],SideBar);export default SideBar;

View File

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

View File

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

View File

@@ -0,0 +1,3 @@
@import '../common/style/index.wxss';.t-side-bar{display:flex;flex-direction:column;width:var(--td-side-bar-width,206rpx);height:var(--td-side-bar-height,100%);overflow-y:auto;}
.t-side-bar::-webkit-scrollbar{display:none;}
.t-side-bar__padding{flex:1;background-color:var(--td-side-bar-bg-color,var(--td-bg-color-secondarycontainer,var(--td-gray-color-1,#f3f3f3)));}

View File

@@ -0,0 +1,10 @@
export interface TdSideBarProps {
value?: {
type: null;
value?: string | number;
};
defaultValue?: {
type: null;
value?: string | number;
};
}

View File

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