project init & fix ui

This commit is contained in:
2023-01-06 14:24:11 +08:00
parent abc4f65a8e
commit ac9b479805
866 changed files with 39916 additions and 53 deletions

View File

@@ -0,0 +1,12 @@
:: BASE_DOC ::
## API
### CellGroup Props
name | type | default | description | required
-- | -- | -- | -- | --
bordered | Boolean | - | \- | N
custom-style `v0.25.0` | String | - | \- | N
external-classes | Array | - | `['t-class']` | N
theme | String | default | optionsdefault/card | N
title | String | - | \- | N

View File

@@ -0,0 +1,12 @@
:: BASE_DOC ::
## API
### CellGroup Props
名称 | 类型 | 默认值 | 说明 | 必传
-- | -- | -- | -- | --
bordered | Boolean | - | 是否显示组边框 | N
custom-style `v0.25.0` | String | - | 自定义组件样式 | N
external-classes | Array | - | 组件类名。`['t-class']` | N
theme | String | default | 单元格风格。可选项default/card | N
title | String | - | 单元格组标题 | N

View File

@@ -0,0 +1,12 @@
import { SuperComponent } from '../common/src/index';
export default class CellGroup extends SuperComponent {
externalClasses: string[];
options: {
addGlobalClass: boolean;
};
properties: import("./type").TdCellGroupProps;
data: {
prefix: string;
classPrefix: string;
};
}

View File

@@ -0,0 +1,29 @@
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.options = {
addGlobalClass: true,
};
this.properties = props;
this.data = {
prefix,
classPrefix: name,
};
}
};
CellGroup = __decorate([
wxComponent()
], CellGroup);
export default CellGroup;

View File

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

View File

@@ -0,0 +1,6 @@
<wxs src="../common/utils.wxs" module="_" />
<view wx:if="{{ title }}" class="{{ classPrefix }}__title {{prefix}}-class-title"> {{ title }} </view>
<view style="{{ customStyle }}" class="{{_.cls(classPrefix, [[bordered, 'bordered'], theme])}} {{prefix}}-class">
<slot />
</view>

View File

@@ -0,0 +1,68 @@
.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-level-3-color, #888888));
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-fade, #fbfbfb));
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-border-level-1-color, #e6e6e6));
transform: scaleY(0.5);
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-border-level-1-color, #e6e6e6));
transform: scaleY(0.5);
z-index: 1;
}
.t-cell-group--card {
margin: 0 32rpx;
border-radius: var(--td-radius-large, 18rpx);
overflow: hidden;
}

View File

@@ -0,0 +1,3 @@
import { TdCellGroupProps } from './type';
declare const props: TdCellGroupProps;
export default props;

View File

@@ -0,0 +1,21 @@
const props = {
bordered: {
type: Boolean,
},
customStyle: {
type: String,
value: '',
},
externalClasses: {
type: Array,
},
theme: {
type: String,
value: 'default',
},
title: {
type: String,
value: '',
},
};
export default props;

View File

@@ -0,0 +1,22 @@
export interface TdCellGroupProps {
bordered?: {
type: BooleanConstructor;
value?: boolean;
};
customStyle?: {
type: StringConstructor;
value?: string;
};
externalClasses?: {
type: ArrayConstructor;
value?: ['t-class'];
};
theme?: {
type: StringConstructor;
value?: 'default' | 'card';
};
title?: {
type: StringConstructor;
value?: string;
};
}

View File

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