初始化项目, 添加TDesign等包

This commit is contained in:
zhengw
2025-11-28 16:49:36 +08:00
commit 3e53beb7bb
980 changed files with 39201 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
import { SuperComponent, RelationsOptions } from '../common/src/index';
export default class Col extends SuperComponent {
externalClasses: string[];
properties: import("./type").TdColProps;
data: {
prefix: string;
classPrefix: string;
};
relations: RelationsOptions;
}

View File

@@ -0,0 +1 @@
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-col`;let Col=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`],this.properties=props,this.data={prefix:prefix,classPrefix:name},this.relations={"../row/row":{type:"parent"}}}};Col=__decorate([wxComponent()],Col);export default Col;

View File

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

View File

@@ -0,0 +1 @@
<wxs src="../common/utils.wxs" module="_"/><wxs src="./col.wxs" module="utils"/><view class="class {{prefix}}-class {{ _.cls(classPrefix, [span]) }} {{ offset ? classPrefix + '--offset-' + offset : '' }}" style="{{ utils.getColStyles(gutter, style, customStyle) }}"><slot/></view>

View File

@@ -0,0 +1,17 @@
var utils = require('../common/utils.wxs');
function getColStyles(gutter, style, customStyle) {
var _style = '';
if (gutter) {
_style = utils._style({
'padding-right': utils.addUnit(gutter / 2),
'padding-left': utils.addUnit(gutter / 2),
});
}
return utils._style([style, customStyle]) + _style;
}
module.exports = {
getColStyles: getColStyles,
};

View File

@@ -0,0 +1,49 @@
@import '../common/style/index.wxss';.t-col{display:block;box-sizing:border-box;min-height:1px;}
.t-col--1{width:4.16666667%;}
.t-col--offset-1{margin-left:4.16666667%;}
.t-col--2{width:8.33333333%;}
.t-col--offset-2{margin-left:8.33333333%;}
.t-col--3{width:12.5%;}
.t-col--offset-3{margin-left:12.5%;}
.t-col--4{width:16.66666667%;}
.t-col--offset-4{margin-left:16.66666667%;}
.t-col--5{width:20.83333333%;}
.t-col--offset-5{margin-left:20.83333333%;}
.t-col--6{width:25%;}
.t-col--offset-6{margin-left:25%;}
.t-col--7{width:29.16666667%;}
.t-col--offset-7{margin-left:29.16666667%;}
.t-col--8{width:33.33333333%;}
.t-col--offset-8{margin-left:33.33333333%;}
.t-col--9{width:37.5%;}
.t-col--offset-9{margin-left:37.5%;}
.t-col--10{width:41.66666667%;}
.t-col--offset-10{margin-left:41.66666667%;}
.t-col--11{width:45.83333333%;}
.t-col--offset-11{margin-left:45.83333333%;}
.t-col--12{width:50%;}
.t-col--offset-12{margin-left:50%;}
.t-col--13{width:54.16666667%;}
.t-col--offset-13{margin-left:54.16666667%;}
.t-col--14{width:58.33333333%;}
.t-col--offset-14{margin-left:58.33333333%;}
.t-col--15{width:62.5%;}
.t-col--offset-15{margin-left:62.5%;}
.t-col--16{width:66.66666667%;}
.t-col--offset-16{margin-left:66.66666667%;}
.t-col--17{width:70.83333333%;}
.t-col--offset-17{margin-left:70.83333333%;}
.t-col--18{width:75%;}
.t-col--offset-18{margin-left:75%;}
.t-col--19{width:79.16666667%;}
.t-col--offset-19{margin-left:79.16666667%;}
.t-col--20{width:83.33333333%;}
.t-col--offset-20{margin-left:83.33333333%;}
.t-col--21{width:87.5%;}
.t-col--offset-21{margin-left:87.5%;}
.t-col--22{width:91.66666667%;}
.t-col--offset-22{margin-left:91.66666667%;}
.t-col--23{width:95.83333333%;}
.t-col--offset-23{margin-left:95.83333333%;}
.t-col--24{width:100%;}
.t-col--offset-24{margin-left:100%;}

View File

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

View File

@@ -0,0 +1 @@
const props={offset:{type:null},span:{type:null}};export default props;

View File

@@ -0,0 +1,10 @@
export interface TdColProps {
offset?: {
type: null;
value?: string | number;
};
span?: {
type: null;
value?: string | number;
};
}

View File

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