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,3 @@
import { TdTabPanelProps } from './type';
declare const props: TdTabPanelProps;
export default props;

View File

@@ -0,0 +1,23 @@
const props = {
badgeProps: {
type: Object,
},
disabled: {
type: Boolean,
value: false,
},
icon: {
type: null,
},
label: {
type: String,
value: '',
},
panel: {
type: String,
},
value: {
type: null,
},
};
export default props;

View File

@@ -0,0 +1,24 @@
/// <reference types="miniprogram-api-typings" />
import { SuperComponent, RelationsOptions } from '../common/src/index';
export default class TabPanel extends SuperComponent {
externalClasses: string[];
relations: RelationsOptions;
options: {
multipleSlots: boolean;
};
properties: import("./type").TdTabPanelProps;
data: {
prefix: string;
classPrefix: string;
active: boolean;
hide: boolean;
id: string;
};
setId(id: any): void;
observers: {
'label, badgeProps, disabled, icon, panel, value'(): void;
};
getComputedName(): string;
update(): void;
render(active: Boolean, parent: WechatMiniprogram.Component.TrivialInstance): void;
}

View File

@@ -0,0 +1,62 @@
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 props from './props';
import config from '../common/config';
const { prefix } = config;
const name = `${prefix}-tab-panel`;
let TabPanel = class TabPanel extends SuperComponent {
constructor() {
super(...arguments);
this.externalClasses = [`${prefix}-class`];
this.relations = {
'../tabs/tabs': {
type: 'ancestor',
},
};
this.options = {
multipleSlots: true,
};
this.properties = props;
this.data = {
prefix,
classPrefix: name,
active: false,
hide: true,
id: '',
};
this.observers = {
'label, badgeProps, disabled, icon, panel, value'() {
this.update();
},
};
}
setId(id) {
this.setData({ id });
}
getComputedName() {
if (this.properties.value != null) {
return `${this.properties.value}`;
}
return `${this.index}`;
}
update() {
var _a;
(_a = this.$parent) === null || _a === void 0 ? void 0 : _a.updateTabs();
}
render(active, parent) {
this.initialized = this.initialized || active;
this.setData({
active,
hide: !parent.data.animation && !active,
});
}
};
TabPanel = __decorate([
wxComponent()
], TabPanel);
export default TabPanel;

View File

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

View File

@@ -0,0 +1,12 @@
<wxs src="../common/utils.wxs" module="_" />
<view
class="class {{prefix}}-class {{classPrefix}} {{active ? classPrefix + '--active': classPrefix + '--inactive'}}"
style="{{_._style([style, customStyle, (hide ? 'display: none' : '')])}}"
id="{{id}}"
aria-role="tabpanel"
>
<view wx:if="{{panel}}">{{panel}}</view>
<slot />
<slot name="panel" />
</view>

View File

@@ -0,0 +1,42 @@
.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-tab-panel {
flex-shrink: 0;
width: 100%;
height: 100%;
box-sizing: border-box;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.t-tab-panel--active {
height: auto;
}
.t-tab-panel--inactive {
height: 0;
overflow: visible;
}

View File

@@ -0,0 +1,27 @@
import { TabValue } from '../tabs/index';
export interface TdTabPanelProps {
badgeProps?: {
type: ObjectConstructor;
value?: object;
};
disabled?: {
type: BooleanConstructor;
value?: boolean;
};
icon?: {
type: null;
value?: string | object;
};
label?: {
type: StringConstructor;
value?: string;
};
panel?: {
type: StringConstructor;
value?: string;
};
value?: {
type: null;
value?: TabValue;
};
}

View File

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