New Huajishe Check ChaoXing
This commit is contained in:
13
HuajisheCheckChaoXing/miniprogram_npm/tdesign-miniprogram/cell-group/cell-group.d.ts
vendored
Normal file
13
HuajisheCheckChaoXing/miniprogram_npm/tdesign-miniprogram/cell-group/cell-group.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { SuperComponent, RelationsOptions } from '../common/src/index';
|
||||
export default class CellGroup extends SuperComponent {
|
||||
externalClasses: string[];
|
||||
relations: RelationsOptions;
|
||||
properties: import("./type").TdCellGroupProps;
|
||||
data: {
|
||||
prefix: string;
|
||||
classPrefix: string;
|
||||
};
|
||||
methods: {
|
||||
updateLastChid(): void;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
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}-cell-group`;
|
||||
let CellGroup = class CellGroup extends SuperComponent {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.externalClasses = [`${prefix}-class`, `${prefix}-class-title`];
|
||||
this.relations = {
|
||||
'../cell/cell': {
|
||||
type: 'child',
|
||||
linked() {
|
||||
this.updateLastChid();
|
||||
},
|
||||
unlinked() {
|
||||
this.updateLastChid();
|
||||
},
|
||||
},
|
||||
};
|
||||
this.properties = props;
|
||||
this.data = {
|
||||
prefix,
|
||||
classPrefix: name,
|
||||
};
|
||||
this.methods = {
|
||||
updateLastChid() {
|
||||
const items = this.$children;
|
||||
items.forEach((child, index) => child.setData({ isLastChild: index === items.length - 1 }));
|
||||
},
|
||||
};
|
||||
}
|
||||
};
|
||||
CellGroup = __decorate([
|
||||
wxComponent()
|
||||
], CellGroup);
|
||||
export default CellGroup;
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<wxs src="../common/utils.wxs" module="_" />
|
||||
|
||||
<view wx:if="{{ title }}" class="class {{ classPrefix }}__title {{prefix}}-class-title"> {{ title }} </view>
|
||||
<view
|
||||
style="{{_._style([style, customStyle])}}"
|
||||
class="{{_.cls(classPrefix, [['bordered', bordered], theme])}} class {{prefix}}-class"
|
||||
>
|
||||
<slot />
|
||||
</view>
|
||||
@@ -0,0 +1,71 @@
|
||||
.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-cell-group {
|
||||
position: relative;
|
||||
}
|
||||
.t-cell-group__title {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: var(--td-cell-group-title-font-size, 28rpx);
|
||||
color: var(--td-cell-group-title-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
|
||||
text-align: left;
|
||||
line-height: var(--td-cell-group-title-line-height, 90rpx);
|
||||
background-color: var(--td-cell-group-title-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
|
||||
padding-left: var(--td-cell-group-title-padding-left, 32rpx);
|
||||
}
|
||||
.t-cell-group--bordered::before {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
content: ' ';
|
||||
pointer-events: none;
|
||||
right: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-top: 1px solid var(--td-cell-group-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
|
||||
transform: scaleY(0.5);
|
||||
transform-origin: 0 0;
|
||||
transform-origin: top;
|
||||
z-index: 1;
|
||||
}
|
||||
.t-cell-group--bordered::after {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
content: ' ';
|
||||
pointer-events: none;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-bottom: 1px solid var(--td-cell-group-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
|
||||
transform: scaleY(0.5);
|
||||
transform-origin: bottom;
|
||||
z-index: 1;
|
||||
}
|
||||
.t-cell-group--card {
|
||||
margin: 0 32rpx;
|
||||
border-radius: var(--td-radius-large, 18rpx);
|
||||
overflow: hidden;
|
||||
}
|
||||
3
HuajisheCheckChaoXing/miniprogram_npm/tdesign-miniprogram/cell-group/props.d.ts
vendored
Normal file
3
HuajisheCheckChaoXing/miniprogram_npm/tdesign-miniprogram/cell-group/props.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { TdCellGroupProps } from './type';
|
||||
declare const props: TdCellGroupProps;
|
||||
export default props;
|
||||
@@ -0,0 +1,15 @@
|
||||
const props = {
|
||||
bordered: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
theme: {
|
||||
type: String,
|
||||
value: 'default',
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
value: '',
|
||||
},
|
||||
};
|
||||
export default props;
|
||||
14
HuajisheCheckChaoXing/miniprogram_npm/tdesign-miniprogram/cell-group/type.d.ts
vendored
Normal file
14
HuajisheCheckChaoXing/miniprogram_npm/tdesign-miniprogram/cell-group/type.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
export interface TdCellGroupProps {
|
||||
bordered?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
theme?: {
|
||||
type: StringConstructor;
|
||||
value?: 'default' | 'card';
|
||||
};
|
||||
title?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
Reference in New Issue
Block a user