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,13 @@
import utils from '../common/utils.wxs';
export function getRowStyles(gutter, customStyle) {
let _style = '';
if (gutter) {
_style = utils._style({
'margin-right': utils.addUnit(-gutter / 2),
'margin-left': utils.addUnit(-gutter / 2),
});
}
return utils._style([customStyle]) + _style;
}

View File

@@ -0,0 +1,12 @@
/* eslint-disable */
/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */
export default {
/** 列之间的间距默认单位px */
gutter: {
type: [String, Number],
},
};

View File

@@ -0,0 +1,6 @@
.t-row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
box-sizing: border-box;
}

View File

@@ -0,0 +1,63 @@
<template>
<view
:class="prefix + '-row'"
:style="getRowStyles(gutter, customStyle)"
>
<slot />
</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 { getRowStyles } from './computed.js';
import { ParentMixin, RELATION_MAP } from '../common/relation';
const name = `${prefix}-row`;
export default uniComponent({
name,
options: {
styleIsolation: 'shared',
},
mixins: [ParentMixin(RELATION_MAP.Col)],
props: {
...props,
},
data() {
return {
prefix,
tools,
};
},
watch: {
gutter: {
handler() {
this.setGutter();
},
immediate: true,
},
},
methods: {
getRowStyles,
innerAfterLinked() {
this.setGutter();
},
setGutter() {
const {
gutter,
} = this;
this.children?.forEach((o) => {
o.gutter = gutter;
});
},
},
});
</script>
<style scoped>
@import './row.css';
</style>

View File

@@ -0,0 +1,12 @@
/* eslint-disable */
/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */
export interface TdRowProps {
/**
* 列之间的间距默认单位px
*/
gutter?: string | number;
}