tang-ui-x 1.0.4 → 1.0.6

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/index.uts CHANGED
@@ -31,7 +31,7 @@ export { useToast } from './composables/useToast.uts'
31
31
  export { useModal } from './composables/useModal.uts'
32
32
 
33
33
  // 版本信息
34
- export const version: string = '1.0.3'
34
+ export const version: string = '1.0.5'
35
35
 
36
36
  // 组件列表(用于文档和类型提示)
37
37
  export const components: string[] = [
@@ -90,3 +90,18 @@ export const components: string[] = [
90
90
  'Tabs',
91
91
  'TNavBar'
92
92
  ]
93
+
94
+ /**
95
+ * Tang UI 插件
96
+ */
97
+ const TangUI = {
98
+ install(app: any) {
99
+ // uni-app x 使用 easycom 自动导入组件,这里不需要注册组件
100
+ console.log('Tang UI X installed, version:', version)
101
+ },
102
+ version,
103
+ components
104
+ }
105
+
106
+ // 默认导出
107
+ export default TangUI
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tang-ui-x",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "UniApp X UI 组件库 - 基于 uni-app x 的移动端 UI 组件库",
5
5
  "main": "index.uts",
6
6
  "module": "index.uts",
@@ -41,8 +41,8 @@
41
41
  "vue": "^3.0.0"
42
42
  },
43
43
  "scripts": {
44
- "prepublishOnly": "npm run build",
44
+ "preinstall": "npx only-allow pnpm",
45
45
  "build": "echo 'Build completed'",
46
- "version": "npm run build"
46
+ "version": "pnpm run build"
47
47
  }
48
48
  }
package/types/index.uts CHANGED
@@ -105,3 +105,46 @@ export type ThemeConfig = {
105
105
  */
106
106
  fontSize: string
107
107
  }
108
+
109
+ /**
110
+ * 模态框选项类型
111
+ */
112
+ export type ModalOptions = {
113
+ /**
114
+ * 标题
115
+ */
116
+ title?: string
117
+
118
+ /**
119
+ * 内容
120
+ */
121
+ content: string
122
+
123
+ /**
124
+ * 是否显示取消按钮
125
+ * @default true
126
+ */
127
+ showCancel?: boolean
128
+
129
+ /**
130
+ * 取消按钮文字
131
+ * @default '取消'
132
+ */
133
+ cancelText?: string
134
+
135
+ /**
136
+ * 确认按钮文字
137
+ * @default '确定'
138
+ */
139
+ confirmText?: string
140
+
141
+ /**
142
+ * 确认回调
143
+ */
144
+ onConfirm?: () => void
145
+
146
+ /**
147
+ * 取消回调
148
+ */
149
+ onCancel?: () => void
150
+ }