uview-pro 0.0.8 → 0.0.9

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.
Files changed (3) hide show
  1. package/changelog.md +6 -0
  2. package/index.ts +45 -9
  3. package/package.json +1 -1
package/changelog.md CHANGED
@@ -1,8 +1,14 @@
1
+ ## 0.0.9(2025-08-25)
2
+ ### ♻️ Code Refactoring | 代码重构
3
+
4
+ - 优化全局工具导出方式 ([7a80b6f](https://gitee.com/anyup/uView-Pro/commit/7a80b6f99ad3022ca995f99f8ec6803af7941eb9))
1
5
  ## 0.0.8(2025-08-25)
6
+
2
7
  ### ♻️ Code Refactoring | 代码重构
3
8
 
4
9
  - 重构组件 Props 属性定义,每个组件具有完善的 ts 类型定义 ([8cc0de7](https://gitee.com/anyup/uView-Pro/commit/8cc0de7c1527b48dd223d89207135eea01766294))
5
10
  - 重构类型定义并统一到全局类型文件 global types ([b0fd010](https://gitee.com/anyup/uView-Pro/commit/b0fd0107289eb1c6df2f58d91b63d9b25902caee))
11
+
6
12
  ## 0.0.7(2025-08-21)
7
13
 
8
14
  ### 🐛 Bug Fixes | Bug 修复
package/index.ts CHANGED
@@ -9,7 +9,7 @@ import timeFormat from './libs/function/timeFormat';
9
9
  // 时间戳格式化,返回多久之前
10
10
  import timeFrom from './libs/function/timeFrom';
11
11
  // 颜色渐变相关,colorGradient-颜色渐变,hexToRgb-十六进制颜色转rgb颜色,rgbToHex-rgb转十六进制
12
- import colorGradient from './libs/function/colorGradient';
12
+ import colorGradients from './libs/function/colorGradient';
13
13
  // 生成全局唯一guid字符串
14
14
  import guid from './libs/function/guid';
15
15
  // 主题相关颜色,info|success|warning|primary|default|error,此颜色已在uview.scss中定义,但是为js中也能使用,故也定义一份
@@ -75,8 +75,8 @@ export interface UViewUtils {
75
75
  timeFormat: typeof timeFormat;
76
76
  date: typeof timeFormat;
77
77
  timeFrom: typeof timeFrom;
78
- colorGradient: typeof colorGradient.colorGradient;
79
- colorToRgba: typeof colorGradient.colorToRgba;
78
+ colorGradient: typeof colorGradients.colorGradient;
79
+ colorToRgba: typeof colorGradients.colorToRgba;
80
80
  guid: typeof guid;
81
81
  color: typeof color;
82
82
  sys: typeof sys;
@@ -89,8 +89,8 @@ export interface UViewUtils {
89
89
  post: typeof http.post;
90
90
  put: typeof http.put;
91
91
  delete: typeof http.delete;
92
- hexToRgb: typeof colorGradient.hexToRgb;
93
- rgbToHex: typeof colorGradient.rgbToHex;
92
+ hexToRgb: typeof colorGradients.hexToRgb;
93
+ rgbToHex: typeof colorGradients.rgbToHex;
94
94
  test: typeof test;
95
95
  random: typeof random;
96
96
  deepClone: typeof deepClone;
@@ -118,8 +118,8 @@ export const $u: UViewUtils = {
118
118
  timeFormat: timeFormat,
119
119
  date: timeFormat, // 另名date
120
120
  timeFrom,
121
- colorGradient: colorGradient.colorGradient,
122
- colorToRgba: colorGradient.colorToRgba,
121
+ colorGradient: colorGradients.colorGradient,
122
+ colorToRgba: colorGradients.colorToRgba,
123
123
  guid,
124
124
  color,
125
125
  sys,
@@ -132,8 +132,8 @@ export const $u: UViewUtils = {
132
132
  post: http.post,
133
133
  put: http.put,
134
134
  delete: http.delete,
135
- hexToRgb: colorGradient.hexToRgb,
136
- rgbToHex: colorGradient.rgbToHex,
135
+ hexToRgb: colorGradients.hexToRgb,
136
+ rgbToHex: colorGradients.rgbToHex,
137
137
  test,
138
138
  random,
139
139
  deepClone,
@@ -164,3 +164,39 @@ const install = (): void => {
164
164
  export default {
165
165
  install
166
166
  };
167
+
168
+ // 工具方法单独导出,支持 import { deepClone } from 'uview-pro'
169
+ export {
170
+ queryParams,
171
+ route,
172
+ timeFormat,
173
+ timeFrom,
174
+ guid,
175
+ color,
176
+ sys,
177
+ os,
178
+ type2icon,
179
+ randomArray,
180
+ deepClone,
181
+ deepMerge,
182
+ addUnit,
183
+ test,
184
+ random,
185
+ trim,
186
+ toast,
187
+ debounce,
188
+ throttle,
189
+ getRect,
190
+ getParent,
191
+ $parent,
192
+ parent,
193
+ parentData,
194
+ dispatch,
195
+ broadcast,
196
+ http,
197
+ config,
198
+ zIndex
199
+ };
200
+
201
+ // 颜色相关方法单独导出
202
+ export const { colorGradient, colorToRgba, hexToRgb, rgbToHex } = colorGradients;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-pro",
3
3
  "name": "uview-pro",
4
4
  "displayName": "uView Pro 基于Vue3+TS全面重构的UI组件库,拥有70+精选组件",
5
- "version": "0.0.8",
5
+ "version": "0.0.9",
6
6
  "description": "uView Pro,是全面支持Vue3的uni-app生态框架,70+精选组件已使用TypeScript重构,已全面支持uni-app Vue3.0",
7
7
  "main": "index.ts",
8
8
  "module": "index.ts",