New Huajishe Check ChaoXing

This commit is contained in:
e2hang
2025-10-01 10:01:52 +08:00
parent 240b884eac
commit 80be8ae3cf
1094 changed files with 61709 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
:: BASE_DOC ::
## API
### IndexesAnchor Props
name | type | default | description | required
-- | -- | -- | -- | --
external-classes | Array | - | `['t-class']` | N
index | String / Number | - | \- | N

View File

@@ -0,0 +1,13 @@
:: BASE_DOC ::
## API
### IndexesAnchor Props
名称 | 类型 | 默认值 | 说明 | 必传
-- | -- | -- | -- | --
index | String / Number | - | 索引字符 | N
### IndexesAnchor 外部样式类
类名 | 说明
-- | --
t-class | 根节点样式类

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,34 @@
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { SuperComponent, wxComponent } from '../common/src/index';
import config from '../common/config';
import props from './props';
const { prefix } = config;
const name = `${prefix}-indexes-anchor`;
let IndexesAnchor = class IndexesAnchor extends SuperComponent {
constructor() {
super(...arguments);
this.externalClasses = [`${prefix}-class`];
this.properties = props;
this.data = {
prefix,
classPrefix: name,
anchorStyle: '',
sticky: false,
active: false,
};
this.relations = {
'../indexes/indexes': {
type: 'parent',
},
};
}
};
IndexesAnchor = __decorate([
wxComponent()
], IndexesAnchor);
export default IndexesAnchor;

View File

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

View File

@@ -0,0 +1,10 @@
<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,77 @@
.t-float-left {
float: left;
}
.t-float-right {
float: right;
}
@keyframes tdesign-fade-out {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
.hotspot-expanded.relative {
position: relative;
}
.hotspot-expanded::after {
content: '';
display: block;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
transform: scale(1.5);
}
.t-indexes-anchor {
color: var(--td-indexes-anchor-color, var(--td-text-color-primary, var(--td-font-gray-1, rgba(0, 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: 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, #ffffff)));
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-component-border, var(--td-gray-color-4, #dcdcdc));
}
.t-indexes-anchor__header--active::after {
height: 1px;
left: 0;
right: 0;
transform: scaleY(0.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: 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,6 @@
const props = {
index: {
type: null,
},
};
export default props;

View File

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