白色主题

This commit is contained in:
2023-02-12 19:05:37 +08:00
parent 57ab6fbb49
commit a0b72a542a
104 changed files with 3942 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,32 @@
const props = {
badgeProps: {
type: Object,
value: null,
},
style: {
type: String,
value: '',
},
destroyOnHide: {
type: Boolean,
value: true,
},
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,19 @@
import { SuperComponent, RelationsOptions } from '../common/src/index';
export default class TabPanel extends SuperComponent {
relations: RelationsOptions;
properties: import("./type").TdTabPanelProps;
data: {
prefix: string;
classPrefix: string;
active: boolean;
hide: boolean;
id: string;
};
setId(id: any): void;
observers: {
label(): void;
};
getComputedName(): string;
update(): void;
render(active: Boolean, parent: any): void;
}

View File

@@ -0,0 +1,57 @@
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.relations = {
'../tabs/tabs': {
type: 'ancestor',
},
};
this.properties = props;
this.data = {
prefix,
classPrefix: name,
active: false,
hide: true,
id: '',
};
this.observers = {
label() {
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.setData({
active,
hide: !parent.animated && !active,
});
}
};
TabPanel = __decorate([
wxComponent()
], TabPanel);
export default TabPanel;

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,10 @@
<wxs src="../common/utils.wxs" module="utils" />
<view
class="{{classPrefix}} {{active ? prefix + '-is-active': ''}}"
style="{{ style }}; {{ hide ? 'display: none' : ''}}"
id="{{id}}"
aria-role="tabpanel"
>
<view wx:if="{{panel}}">{{panel}}</view>
<slot />
</view>

View File

@@ -0,0 +1,37 @@
.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);
}
:host {
flex-shrink: 0;
width: 100%;
height: 100%;
box-sizing: border-box;
}
.t-tab-panel {
height: inherit;
width: inherit;
}

View File

@@ -0,0 +1,35 @@
import { TabValue } from '../tabs/index';
export interface TdTabPanelProps {
badgeProps?: {
type: ObjectConstructor;
value?: object;
};
style?: {
type: StringConstructor;
value?: string;
};
destroyOnHide?: {
type: BooleanConstructor;
value?: boolean;
};
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 {};