first commit

This commit is contained in:
lingxiao865
2026-02-10 08:05:03 +08:00
commit c5af079d8c
1094 changed files with 97530 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
.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;
}

View File

@@ -0,0 +1,69 @@
<template>
<view>
<view
v-if="title"
:class="[
classPrefix + '__title ',
tClassTitle
]"
>
{{ title }}
</view>
<view
:style="tools._style([customStyle])"
:class="[
tools.cls(classPrefix, [['bordered', bordered], theme]),
tClass
]"
>
<slot />
</view>
</view>
</template>
<script>
import { uniComponent } from '../common/src/index';
import { prefix } from '../common/config';
import props from './props';
import tools from '../common/utils.wxs';
import { ParentMixin, RELATION_MAP } from '../common/relation';
const name = `${prefix}-cell-group`;
export default uniComponent({
name,
options: {
styleIsolation: 'shared',
},
externalClasses: [`${prefix}-class`, `${prefix}-class-title`],
mixins: [ParentMixin(RELATION_MAP.Cell)],
props: {
...props,
},
data() {
return {
prefix,
classPrefix: name,
tools,
};
},
methods: {
innerAfterLinked() {
this.updateLastChid();
},
innerAfterUnLinked() {
this.updateLastChid();
},
updateLastChid() {
const { children } = this;
children.forEach((child, index) => {
child.isLastChild = index === children.length - 1;
});
},
},
});
</script>
<style scoped>
@import './cell-group.css';
</style>

View File

@@ -0,0 +1,25 @@
/* eslint-disable */
/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */
import type { TdCellGroupProps } from './type';
export default {
/** 是否显示组边框 */
bordered: Boolean,
/** 单元格组风格 */
theme: {
type: String,
default: 'default' as TdCellGroupProps['theme'],
validator(val: TdCellGroupProps['theme']): boolean {
if (!val) return true;
return ['default', 'card'].includes(val);
},
},
/** 单元格组标题 */
title: {
type: String,
default: '',
},
};

View File

@@ -0,0 +1,23 @@
/* eslint-disable */
/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */
export interface TdCellGroupProps {
/**
* 是否显示组边框
* @default false
*/
bordered?: boolean;
/**
* 单元格组风格
* @default default
*/
theme?: 'default' | 'card';
/**
* 单元格组标题
* @default ''
*/
title?: string;
}