This commit is contained in:
Ling53666
2025-08-18 09:11:51 +08:00
commit 02554225da
2516 changed files with 133155 additions and 0 deletions

View File

@ -0,0 +1 @@
.ant-divider-horizontal{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;padding:8px 0}.ant-divider-horizontal-text{font-size:15px;color:#333;margin:0 16px}.ant-divider-horizontal-left,.ant-divider-horizontal-right{border-bottom:1px solid #eee}.ant-divider-vertical{margin:0 8px;height:16px;border-right:1px solid #eee}

View File

@ -0,0 +1,32 @@
<import-sjs
from="./index.sjs"
name="divider"
></import-sjs>
<view
a:if="{{direction === 'horizontal'}}"
class="ant-divider ant-divider-horizontal {{className || ''}}"
style="{{style || ''}}"
>
<view
class="ant-divider-horizontal-left"
style="flex: {{divider.getLineWidthFlex(textPosition, text)[0]}};{{lineHeight ? 'border-bottom-width:' + lineHeight + 'px;' : ''}}{{lineType ? 'border-bottom-style:' + lineType + ';' : ''}}{{lineColor ? 'border-bottom-color:' + lineColor + ';' : ''}}"
></view>
<slot name="text">
<view
a:if="{{text}}"
class="ant-divider-horizontal-text {{textClassName || ''}}"
style="{{textStyle || ''}}"
>
{{text}}
</view>
</slot>
<view
class="ant-divider-horizontal-right"
style="flex: {{divider.getLineWidthFlex(textPosition, text)[1]}};{{lineHeight ? 'border-bottom-width:' + lineHeight + 'px;' : ''}}{{lineType ? 'border-bottom-style:' + lineType + ';' : ''}}{{lineColor ? 'border-bottom-color:' + lineColor + ';' : ''}}"
></view>
</view>
<view
a:if="{{direction === 'vertical'}}"
class="ant-divider ant-divider-vertical {{className || ''}}"
style="{{style || ''}};{{lineWidth ? 'border-right-width:' + lineWidth + 'px;' : ''}}{{lineType ? 'border-right-style:' + lineType + ';' : ''}}{{lineColor ? 'border-right-color:' + lineColor + ';' : ''}}"
></view>

View File

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

View File

@ -0,0 +1,3 @@
import { Component } from '../_util/simply';
import { DividerFunctionalProps } from './props';
Component(DividerFunctionalProps);

View File

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

View File

@ -0,0 +1,15 @@
var getLineWidthFlex = function getLineWidthFlex(textPosition, text) {
if (!text) {
return [1, 0];
}
if (textPosition === 'left') {
return [1, 5];
}
if (textPosition === 'right') {
return [5, 1];
}
return [1, 1];
};
export default {
getLineWidthFlex: getLineWidthFlex
};

View File

@ -0,0 +1,14 @@
import { IBaseProps } from '../_util/base';
export interface IDividerProps extends IBaseProps {
lineColor: string;
lineHeight: number;
lineType: 'solid' | 'dashed' | 'dotted';
lineWidth: number;
text: string;
textStyle: string;
textClassName: string;
textPosition: 'left' | 'center' | 'right';
direction: 'horizontal' | 'vertical';
}
export declare const DividerDefaultProps: Partial<IDividerProps>;
export declare const DividerFunctionalProps: Partial<IDividerProps>;

View File

@ -0,0 +1,16 @@
export var DividerDefaultProps = {
textPosition: 'center',
direction: 'horizontal',
lineType: 'solid',
};
export var DividerFunctionalProps = {
lineColor: '',
lineHeight: 0,
lineType: 'solid',
lineWidth: 0,
text: '',
textStyle: '',
textClassName: '',
textPosition: 'center',
direction: 'horizontal',
};