初始化项目, 添加TDesign等包
This commit is contained in:
13
miniprogram/miniprogram_npm/tdesign-miniprogram/indexes-anchor/indexes-anchor.d.ts
vendored
Normal file
13
miniprogram/miniprogram_npm/tdesign-miniprogram/indexes-anchor/indexes-anchor.d.ts
vendored
Normal 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;
|
||||
}
|
||||
@@ -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;
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"styleIsolation":"apply-shared"}
|
||||
@@ -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>
|
||||
@@ -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);}
|
||||
3
miniprogram/miniprogram_npm/tdesign-miniprogram/indexes-anchor/props.d.ts
vendored
Normal file
3
miniprogram/miniprogram_npm/tdesign-miniprogram/indexes-anchor/props.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { TdIndexesAnchorProps } from './type';
|
||||
declare const props: TdIndexesAnchorProps;
|
||||
export default props;
|
||||
@@ -0,0 +1 @@
|
||||
const props={index:{type:null}};export default props;
|
||||
6
miniprogram/miniprogram_npm/tdesign-miniprogram/indexes-anchor/type.d.ts
vendored
Normal file
6
miniprogram/miniprogram_npm/tdesign-miniprogram/indexes-anchor/type.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export interface TdIndexesAnchorProps {
|
||||
index?: {
|
||||
type: null;
|
||||
value?: string | number;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export{};
|
||||
Reference in New Issue
Block a user