tang-ui-x 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/TButton/index.uvue +2 -17
- package/components/TCell/index.uvue +2 -14
- package/components/TCell/type.uts +40 -0
- package/components/TCheckbox/index.uvue +3 -16
- package/components/TCheckbox/type.uts +64 -0
- package/components/TCol/index.uvue +2 -9
- package/components/TDateTimePicker/index.uvue +351 -40
- package/components/TDateTimePicker/type.uts +48 -1
- package/components/TDivider/index.uvue +2 -18
- package/components/TEmpty/index.uvue +2 -16
- package/components/TEmpty/type.uts +51 -0
- package/components/TErrorState/index.uvue +2 -17
- package/components/TErrorState/type.uts +60 -0
- package/components/TGrid/index.uvue +2 -15
- package/components/TGridItem/index.uvue +3 -15
- package/components/TIcon/index.uvue +18 -24
- package/components/TIcon/type.uts +70 -0
- package/components/TImage/index.uvue +5 -23
- package/components/TImage/type.uts +6 -0
- package/components/TInput/index.uvue +22 -3
- package/components/TNavBar/index.uvue +2 -14
- package/components/TNoticeBar/index.uvue +2 -13
- package/components/TNumberInput/index.uvue +2 -17
- package/components/TNumberInput/type.uts +59 -0
- package/components/TPopup/index.uvue +2 -29
- package/components/TPopup/type.uts +93 -0
- package/components/TRadioButton/index.uvue +2 -27
- package/components/TRadioButton/type.uts +81 -0
- package/components/TRate/index.uvue +2 -30
- package/components/TRate/type.uts +100 -0
- package/components/TRow/index.uvue +2 -12
- package/components/TSearchBar/index.uvue +25 -27
- package/components/TSearchBar/type.uts +3 -3
- package/components/TText/index.uvue +2 -21
- package/components/Tabs/index.uvue +2 -31
- package/components/Tabs/type.uts +108 -1
- package/components/Tags/index.uvue +7 -36
- package/components/Tags/type.uts +110 -3
- package/package.json +2 -1
- package/static/font/iconfont.css +23 -0
- package/static/font/iconfont.json +23 -0
- package/static/font/iconfont.ttf +0 -0
- package/static/font/iconfont.woff +0 -0
- package/static/font/iconfont.woff2 +0 -0
|
@@ -1,28 +1,13 @@
|
|
|
1
1
|
<script setup lang="uts" >
|
|
2
2
|
import { computed } from 'vue'
|
|
3
|
-
import type {
|
|
3
|
+
import type { TButtonProps } from './type.uts'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* TButton 按钮组件
|
|
7
7
|
* @description 支持多种类型、尺寸、形状的按钮组件
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
interface Props {
|
|
12
|
-
type?: ButtonType
|
|
13
|
-
size?: ButtonSize
|
|
14
|
-
shape?: ButtonShape
|
|
15
|
-
plain?: boolean
|
|
16
|
-
disabled?: boolean
|
|
17
|
-
loading?: boolean
|
|
18
|
-
block?: boolean
|
|
19
|
-
text?: string
|
|
20
|
-
icon?: string
|
|
21
|
-
customClass?: string
|
|
22
|
-
customStyle?: string
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
10
|
+
const props = withDefaults(defineProps<TButtonProps>(), {
|
|
26
11
|
type: 'default',
|
|
27
12
|
size: 'medium',
|
|
28
13
|
shape: 'square',
|
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
<script setup lang="uts" >
|
|
2
2
|
import Icon from '../TIcon'
|
|
3
|
+
import type { TCellProps } from './type.uts'
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
/**标题 */
|
|
8
|
-
title ?: string,
|
|
9
|
-
/** 内容 */
|
|
10
|
-
content? : string
|
|
11
|
-
/** 是否显示图标 */
|
|
12
|
-
showIcon ?: boolean
|
|
13
|
-
/** 图标 */
|
|
14
|
-
icon ?: string
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
withDefaults(defineProps<Props>(), {
|
|
5
|
+
withDefaults(defineProps<TCellProps>(), {
|
|
18
6
|
showIcon: true,
|
|
19
7
|
icon: "icon-youjiantou"
|
|
20
8
|
})
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TCell 组件类型定义
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* TCell Props 接口
|
|
7
|
+
*/
|
|
8
|
+
export interface TCellProps {
|
|
9
|
+
/**
|
|
10
|
+
* 标题
|
|
11
|
+
*/
|
|
12
|
+
title?: string
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 内容
|
|
16
|
+
*/
|
|
17
|
+
content?: string
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 是否显示图标
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
showIcon?: boolean
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 图标名称
|
|
27
|
+
* @default 'icon-youjiantou'
|
|
28
|
+
*/
|
|
29
|
+
icon?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* TCell 事件接口
|
|
34
|
+
*/
|
|
35
|
+
export interface TCellEmits {
|
|
36
|
+
/**
|
|
37
|
+
* 点击事件
|
|
38
|
+
*/
|
|
39
|
+
cell: () => void
|
|
40
|
+
}
|
|
@@ -3,22 +3,9 @@
|
|
|
3
3
|
* 复选框组件 - 适用于购物车、列表等场景
|
|
4
4
|
* 参考 RadioButton 和 CheckboxButton 组件设计
|
|
5
5
|
*/
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/** 尺寸大小 */
|
|
10
|
-
size?: 'small' | 'medium' | 'large'
|
|
11
|
-
/** 激活状态颜色 */
|
|
12
|
-
activeColor?: string
|
|
13
|
-
/** 未激活状态颜色 */
|
|
14
|
-
inactiveColor?: string
|
|
15
|
-
/** 是否为方形设计 */
|
|
16
|
-
square?: boolean
|
|
17
|
-
/** 自定义边框宽度 */
|
|
18
|
-
borderWidth?: number
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
6
|
+
import type { TCheckboxProps, CheckboxSize } from './type.uts'
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<TCheckboxProps>(), {
|
|
22
9
|
disabled: false,
|
|
23
10
|
size: 'medium',
|
|
24
11
|
activeColor: '#00bba7',
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TCheckbox 组件类型定义
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 复选框尺寸
|
|
7
|
+
*/
|
|
8
|
+
export type CheckboxSize = 'small' | 'medium' | 'large'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* TCheckbox Props 接口
|
|
12
|
+
*/
|
|
13
|
+
export interface TCheckboxProps {
|
|
14
|
+
/**
|
|
15
|
+
* 是否禁用
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 尺寸大小
|
|
22
|
+
* @default 'medium'
|
|
23
|
+
*/
|
|
24
|
+
size?: CheckboxSize
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 激活状态颜色
|
|
28
|
+
* @default '#00bba7'
|
|
29
|
+
*/
|
|
30
|
+
activeColor?: string
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 未激活状态颜色
|
|
34
|
+
* @default '#c8c9cc'
|
|
35
|
+
*/
|
|
36
|
+
inactiveColor?: string
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 是否为方形设计
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
square?: boolean
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 自定义边框宽度
|
|
46
|
+
* @default 2
|
|
47
|
+
*/
|
|
48
|
+
borderWidth?: number
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* TCheckbox 事件接口
|
|
53
|
+
*/
|
|
54
|
+
export interface TCheckboxEmits {
|
|
55
|
+
/**
|
|
56
|
+
* 值改变事件
|
|
57
|
+
*/
|
|
58
|
+
change: (value: boolean) => void
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 点击事件
|
|
62
|
+
*/
|
|
63
|
+
click: (event: any) => void
|
|
64
|
+
}
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
<script setup lang="uts">
|
|
2
2
|
import { inject, computed } from 'vue'
|
|
3
|
+
import type { TColProps } from './type.uts'
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* TCol 栅格列组件
|
|
6
7
|
* @description 基于 24 栅格系统的列组件,需配合 TRow 使用
|
|
7
8
|
*/
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
interface Props {
|
|
11
|
-
span?: number
|
|
12
|
-
offset?: number
|
|
13
|
-
customClass?: string
|
|
14
|
-
customStyle?: string
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
10
|
+
const props = withDefaults(defineProps<TColProps>(), {
|
|
18
11
|
span: 24,
|
|
19
12
|
offset: 0,
|
|
20
13
|
customClass: '',
|