init: initial commit

This commit is contained in:
Blizzard
2026-02-04 14:02:31 +08:00
commit 6ceda92e9d
2234 changed files with 38231 additions and 0 deletions
@@ -0,0 +1,3 @@
import { TdSideBarProps } from './type';
declare const props: TdSideBarProps;
export default props;
@@ -0,0 +1 @@
const props={value:{type:null,value:null},defaultValue:{type:null}};export default props;
@@ -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;
};
}
@@ -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`;let SideBar=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`],this.children=[],this.relations={"../side-bar-item/side-bar-item":{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){const i=this.$children;i.forEach((r,t)=>{r.updateActive(e),r.setData({isFirstChild:0===t,isLastChild:t===i.length-1})})}},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;
@@ -0,0 +1 @@
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"t-side-bar-item":"../side-bar-item/side-bar-item"}}
@@ -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>
@@ -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)));}
+10
View File
@@ -0,0 +1,10 @@
export interface TdSideBarProps {
value?: {
type: null;
value?: string | number;
};
defaultValue?: {
type: null;
value?: string | number;
};
}
@@ -0,0 +1 @@
export{};