tang-ui-x 1.3.5 → 1.3.7

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.
@@ -1,31 +1,31 @@
1
- <script setup lang="uts" >
2
- import { computed } from 'vue'
3
- import type { TCardProps } from './type.uts'
4
-
5
- /**
6
- * TCard 卡片组件
7
- * @description 通用卡片容器组件,用于展示内容块
8
- */
9
-
10
- // 定义 props
11
- const props = withDefaults(defineProps<TCardProps>(), {
12
- title: '',
13
- subtitle: '',
14
- shadow: true,
15
- border: false,
16
- padding: 'medium',
17
- radius: 'medium',
18
- customClass: ''
19
- })
20
-
21
- // 定义 emits
22
- const emit = defineEmits<{
23
- click: []
24
- }>()
25
-
26
- /**
27
- * 计算卡片样式类
28
- */
1
+ <script setup lang="uts" >
2
+ import { computed } from 'vue'
3
+ import type { TCardProps } from './type.uts'
4
+
5
+ /**
6
+ * TCard 卡片组件
7
+ * @description 通用卡片容器组件,用于展示内容块
8
+ */
9
+
10
+ // 定义 props
11
+ const props = withDefaults(defineProps<TCardProps>(), {
12
+ title: '',
13
+ subtitle: '',
14
+ shadow: true,
15
+ border: false,
16
+ padding: 'medium',
17
+ radius: 'medium',
18
+ customClass: ''
19
+ })
20
+
21
+ // 定义 emits
22
+ const emit = defineEmits<{
23
+ click: []
24
+ }>()
25
+
26
+ /**
27
+ * 计算卡片样式类
28
+ */
29
29
  const cardClass = computed(() => {
30
30
  const classes: string[] = [
31
31
  't-card',
@@ -66,11 +66,11 @@ const cardClass = computed(() => {
66
66
  classes.push('rounded-lg')
67
67
  break
68
68
  }
69
-
70
- if (props.customClass !== '') {
71
- classes.push(props.customClass)
72
- }
73
-
69
+
70
+ if (props.customClass !== '') {
71
+ classes.push(props.customClass)
72
+ }
73
+
74
74
  return classes.join(' ')
75
75
  })
76
76
 
@@ -92,18 +92,18 @@ const cardStyle = computed((): string => {
92
92
 
93
93
  return styles.join('; ')
94
94
  })
95
-
96
- /**
97
- * 处理卡片点击
98
- */
99
- const handleClick = (): void => {
100
- emit('click')
101
- }
102
- </script>
103
-
104
- <template>
95
+
96
+ /**
97
+ * 处理卡片点击
98
+ */
99
+ const handleClick = (): void => {
100
+ emit('click')
101
+ }
102
+ </script>
103
+
104
+ <template>
105
105
  <view :class="cardClass" :style="cardStyle" @click="handleClick">
106
- <!-- 卡片头部 -->
106
+ <!-- 卡片头部 -->
107
107
  <view
108
108
  v-if="title !== '' || subtitle !== ''"
109
109
  class="t-card__header mb-4 flex flex-row items-center justify-between border-b border-border-soft pb-4"
@@ -123,8 +123,6 @@ const handleClick = (): void => {
123
123
  </view>
124
124
 
125
125
  <!-- 卡片底部 -->
126
- <view class="t-card__footer mt-4 border-t border-border-soft pt-4">
127
- <slot name="footer"></slot>
128
- </view>
126
+ <slot name="footer"/>
129
127
  </view>
130
128
  </template>
@@ -6,7 +6,7 @@ export type NoticeBarMode = 'closeable' | 'link'
6
6
 
7
7
  export type TNoticeBarProps = {
8
8
  text?: string
9
- mode?: NoticeBarMode | null
9
+ mode?: NoticeBarMode | undefined
10
10
  color?: string
11
11
  background?: string
12
12
  leftIcon?: string
@@ -38,7 +38,7 @@ const hasItemIcon = (item: TabItem): boolean => {
38
38
  }
39
39
 
40
40
  const hasItemBadge = (item: TabItem): boolean => {
41
- return item.badge !== null && item.badge !== ''
41
+ return item.badge != null && item.badge !== ''
42
42
  }
43
43
 
44
44
  /** 获取默认激活项的 key */
package/index.uts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Tang UI - UniApp X UI 组件库
3
3
  * @description 基于 uni-app x 的移动端 UI 组件库
4
- * @version 1.0.2
4
+ * @version 1.3.5
5
5
  * @author sugar258596
6
6
  */
7
7
 
@@ -54,7 +54,7 @@ export type {
54
54
  } from './composables/i18n/types.uts'
55
55
 
56
56
  // 版本信息
57
- export const version: string = '1.0.5'
57
+ export const version: string = '1.3.5'
58
58
 
59
59
  // 组件列表(用于文档和类型提示)
60
60
  export const components: string[] = [
package/package.json CHANGED
@@ -1,28 +1,38 @@
1
1
  {
2
2
  "name": "tang-ui-x",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "UniApp X UI 组件库 - 基于 uni-app x 的移动端 UI 组件库",
5
- "main": "index.uts",
6
- "module": "index.uts",
7
- "types": "types/index.d.ts",
8
- "style": "static/tailwind.css",
9
- "sass": "uni.scss",
10
- "exports": {
11
- ".": {
12
- "types": "./types/index.d.ts",
13
- "import": "./index.uts",
14
- "default": "./index.uts"
15
- },
16
- "./components/*": "./components/*/index.uvue",
17
- "./components/*/index.uvue": "./components/*/index.uvue",
18
- "./composables/*": "./composables/*.uts",
19
- "./composables/i18n/*": "./composables/i18n/*.uts",
20
- "./locales": "./locales/index.uts",
21
- "./locales/*": "./locales/*",
22
- "./static/*": "./static/*",
23
- "./uni.scss": "./uni.scss",
24
- "./package.json": "./package.json"
25
- },
5
+ "main": "index.uts",
6
+ "module": "index.uts",
7
+ "types": "types/index.d.ts",
8
+ "style": "static/tailwind.css",
9
+ "sass": "uni.scss",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./types/index.d.ts",
13
+ "import": "./index.uts",
14
+ "default": "./index.uts"
15
+ },
16
+ "./components/*": {
17
+ "types": "./types/component.d.ts",
18
+ "import": "./components/*/index.uvue",
19
+ "default": "./components/*/index.uvue"
20
+ },
21
+ "./components/*/index.uvue": {
22
+ "types": "./types/component.d.ts",
23
+ "import": "./components/*/index.uvue",
24
+ "default": "./components/*/index.uvue"
25
+ },
26
+ "./composables/*": "./composables/*.uts",
27
+ "./composables/i18n/*": "./composables/i18n/*.uts",
28
+ "./utils/*": "./utils/*.uts",
29
+ "./utils": "./utils/index.uts",
30
+ "./locales": "./locales/index.uts",
31
+ "./locales/*": "./locales/*",
32
+ "./static/*": "./static/*",
33
+ "./uni.scss": "./uni.scss",
34
+ "./package.json": "./package.json"
35
+ },
26
36
  "files": [
27
37
  "components",
28
38
  "composables/useI18n.uts",
@@ -58,22 +68,22 @@
58
68
  "tang-ui"
59
69
  ],
60
70
  "author": "sugar258596",
61
- "license": "MIT",
62
- "packageManager": "pnpm@10.26.0",
63
- "engines": {
64
- "node": ">=18"
65
- },
66
- "publishConfig": {
67
- "access": "public"
68
- },
69
- "sideEffects": [
70
- "*.scss",
71
- "*.css",
72
- "*.uvue",
73
- "static/**",
74
- "uni.scss"
75
- ],
76
- "repository": {
71
+ "license": "MIT",
72
+ "packageManager": "pnpm@10.26.0",
73
+ "engines": {
74
+ "node": ">=18"
75
+ },
76
+ "publishConfig": {
77
+ "access": "public"
78
+ },
79
+ "sideEffects": [
80
+ "*.scss",
81
+ "*.css",
82
+ "*.uvue",
83
+ "static/**",
84
+ "uni.scss"
85
+ ],
86
+ "repository": {
77
87
  "type": "git",
78
88
  "url": "https://github.com/sugar258596/tang-ui.git"
79
89
  },
@@ -102,12 +112,12 @@
102
112
  "lint-staged": "^16.2.7",
103
113
  "prettier": "^3.7.4",
104
114
  "vue-eslint-parser": "^10.2.0"
105
- },
106
- "scripts": {
107
- "prepare": "husky",
108
- "prepublishOnly": "pnpm run lint",
109
- "prepack": "pnpm run build",
110
- "build": "pnpm run tailwind:build",
115
+ },
116
+ "scripts": {
117
+ "prepare": "husky",
118
+ "prepublishOnly": "pnpm run lint",
119
+ "prepack": "pnpm run build",
120
+ "build": "pnpm run tailwind:build",
111
121
  "lint": "pnpm exec eslint .",
112
122
  "lint:staged": "pnpm exec lint-staged --relative --concurrent false --max-arg-length 5000",
113
123
  "tailwind:build": "pnpm exec postcss ./tailwind.css -o ./static/tailwind.css",
@@ -119,4 +129,4 @@
119
129
  "pnpm exec eslint"
120
130
  ]
121
131
  }
122
- }
132
+ }
@@ -61,9 +61,6 @@
61
61
  .top-1\/2 {
62
62
  top: 50%
63
63
  }
64
- .top-2 {
65
- top: 8px
66
- }
67
64
  .top-3 {
68
65
  top: 12px
69
66
  }
@@ -93,10 +90,6 @@
93
90
  margin-left: auto;
94
91
  margin-right: auto
95
92
  }
96
- .mx-sm {
97
- margin-left: 8px;
98
- margin-right: 8px
99
- }
100
93
  .my-0 {
101
94
  margin-top: 0px;
102
95
  margin-bottom: 0px
@@ -170,9 +163,6 @@
170
163
  .mt-3 {
171
164
  margin-top: 12px
172
165
  }
173
- .mt-4 {
174
- margin-top: 16px
175
- }
176
166
  .mt-5 {
177
167
  margin-top: 20px
178
168
  }
@@ -332,9 +322,6 @@
332
322
  .min-w-10 {
333
323
  min-width: 40px
334
324
  }
335
- .min-w-7 {
336
- min-width: 28px
337
- }
338
325
  .min-w-theme {
339
326
  min-width: 74px
340
327
  }
@@ -797,10 +784,6 @@
797
784
  padding-left: 4px;
798
785
  padding-right: 4px
799
786
  }
800
- .px-10 {
801
- padding-left: 40px;
802
- padding-right: 40px
803
- }
804
787
  .px-2 {
805
788
  padding-left: 8px;
806
789
  padding-right: 8px
@@ -809,10 +792,6 @@
809
792
  padding-left: 10px;
810
793
  padding-right: 10px
811
794
  }
812
- .px-2xl {
813
- padding-left: 32px;
814
- padding-right: 32px
815
- }
816
795
  .px-3 {
817
796
  padding-left: 12px;
818
797
  padding-right: 12px
@@ -825,10 +804,6 @@
825
804
  padding-left: 20px;
826
805
  padding-right: 20px
827
806
  }
828
- .px-7 {
829
- padding-left: 28px;
830
- padding-right: 28px
831
- }
832
807
  .px-8 {
833
808
  padding-left: 32px;
834
809
  padding-right: 32px
@@ -837,10 +812,6 @@
837
812
  padding-left: 16px;
838
813
  padding-right: 16px
839
814
  }
840
- .px-xl {
841
- padding-left: 24px;
842
- padding-right: 24px
843
- }
844
815
  .py-0\.5 {
845
816
  padding-top: 2px;
846
817
  padding-bottom: 2px
@@ -881,10 +852,6 @@
881
852
  padding-top: 16px;
882
853
  padding-bottom: 16px
883
854
  }
884
- .py-5 {
885
- padding-top: 20px;
886
- padding-bottom: 20px
887
- }
888
855
  .py-8 {
889
856
  padding-top: 32px;
890
857
  padding-bottom: 32px
@@ -893,10 +860,6 @@
893
860
  padding-top: 16px;
894
861
  padding-bottom: 16px
895
862
  }
896
- .py-md {
897
- padding-top: 12px;
898
- padding-bottom: 12px
899
- }
900
863
  .py-sm {
901
864
  padding-top: 8px;
902
865
  padding-bottom: 8px
@@ -1007,9 +970,6 @@
1007
970
  .leading-6 {
1008
971
  line-height: 24px
1009
972
  }
1010
- .leading-7 {
1011
- line-height: 28px
1012
- }
1013
973
  .leading-\[1\.5\] {
1014
974
  line-height: 1.5
1015
975
  }
@@ -0,0 +1,5 @@
1
+ import type { DefineComponent } from 'vue';
2
+
3
+ declare const component: DefineComponent<any, any, any>;
4
+
5
+ export default component;