初始化项目, 添加TDesign等包
This commit is contained in:
3
miniprogram/miniprogram_npm/tdesign-miniprogram/side-bar/props.d.ts
vendored
Normal file
3
miniprogram/miniprogram_npm/tdesign-miniprogram/side-bar/props.d.ts
vendored
Normal file
@@ -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;
|
||||
24
miniprogram/miniprogram_npm/tdesign-miniprogram/side-bar/side-bar.d.ts
vendored
Normal file
24
miniprogram/miniprogram_npm/tdesign-miniprogram/side-bar/side-bar.d.ts
vendored
Normal 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;
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
@@ -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
miniprogram/miniprogram_npm/tdesign-miniprogram/side-bar/type.d.ts
vendored
Normal file
10
miniprogram/miniprogram_npm/tdesign-miniprogram/side-bar/type.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export interface TdSideBarProps {
|
||||
value?: {
|
||||
type: null;
|
||||
value?: string | number;
|
||||
};
|
||||
defaultValue?: {
|
||||
type: null;
|
||||
value?: string | number;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export{};
|
||||
Reference in New Issue
Block a user