sard-uniapp 1.21.0 → 1.21.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [1.21.1](https://github.com/sutras/sard-uniapp/compare/v1.21.0...v1.21.1) (2025-07-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 修复 request 查询参数拼接问题 ([53df30d](https://github.com/sutras/sard-uniapp/commit/53df30d0e8bf0a3c362ca97f06cc8a178458d359))
7
+ * 替代废弃的 uni.getSystemInfoSync 接口 ([7b7d391](https://github.com/sutras/sard-uniapp/commit/7b7d391e86e0baf2fce8b550f7d9b5441c2cb40a))
8
+
9
+
10
+
1
11
  # [1.21.0](https://github.com/sutras/sard-uniapp/compare/v1.20.2...v1.21.0) (2025-07-04)
2
12
 
3
13
 
@@ -25,6 +25,10 @@ import {
25
25
  } from "../../utils";
26
26
  import { waterfallContextKey } from "../waterfall/common";
27
27
  import { useTimeout } from "../../use";
28
+ /**
29
+ * @property {string} rootClass 组件根元素类名,默认值:-。
30
+ * @property {StyleValue} rootStyle 组件根元素样式,默认值:-。
31
+ */
28
32
  export default _defineComponent({
29
33
  ...{
30
34
  options: {
@@ -11,6 +11,13 @@ import { defineComponent as _defineComponent } from "vue";
11
11
  import { computed, onMounted, ref } from "vue";
12
12
  import { classNames, createBem, stringifyStyle } from "../../utils";
13
13
  import { useTimeout } from "../../use";
14
+ /**
15
+ * @property {string} rootClass 组件根元素类名,默认值:-。
16
+ * @property {StyleValue} rootStyle 组件根元素样式,默认值:-。
17
+ * @property {number} maxWait 最大等待时间,单位ms,默认值:0。
18
+ * @property {number} width 自定义宽度,默认值:320。
19
+ * @property {number} height 自定义高度,默认值:240。
20
+ */
14
21
  export default _defineComponent({
15
22
  ...{
16
23
  options: {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "sard-uniapp",
3
3
  "name": "sard-uniapp",
4
4
  "displayName": "sard-uniapp",
5
- "version": "1.21.0",
5
+ "version": "1.21.1",
6
6
  "description": "sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库",
7
7
  "main": "index.js",
8
8
  "scripts": {
package/utils/request.js CHANGED
@@ -84,12 +84,12 @@ function mergeUrl(options) {
84
84
  const query = new URLQuery(params);
85
85
  const index = mergedUrl.indexOf('?');
86
86
  if (index !== -1) {
87
- const originPath = mergedUrl.slice(index);
87
+ const originPath = mergedUrl.slice(0, index);
88
88
  const search = mergedUrl.slice(index);
89
- mergedUrl +=
89
+ mergedUrl =
90
90
  originPath +
91
91
  '?' +
92
- new URLQuery([...query, ...new URLQuery(search)]).toString();
92
+ new URLQuery([...new URLQuery(search), ...query]).toString();
93
93
  }
94
94
  else {
95
95
  mergedUrl += '?' + query.toString();
package/utils/system.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- export declare const systemInfo: UniApp.GetSystemInfoResult;
2
- export declare const isApp: boolean;
3
1
  export declare const isWeb: boolean;
2
+ export declare const isApp: boolean;
4
3
  export declare const isMp: boolean;
5
- export declare const isAlipay: boolean;
6
4
  export declare const isWeixin: boolean;
5
+ export declare const isAlipay: boolean;
package/utils/system.js CHANGED
@@ -1,7 +1,18 @@
1
- export const systemInfo = uni.getSystemInfoSync();
2
- const platform = systemInfo.uniPlatform;
3
- export const isApp = platform === 'app';
1
+ let platform = '';
2
+ // #ifdef APP
3
+ platform = 'app';
4
+ // #endif
5
+ // #ifdef MP-WEIXIN
6
+ platform = 'mp-weixin';
7
+ // #endif
8
+ // #ifdef MP-ALIPAY
9
+ platform = 'mp-alipay';
10
+ // #endif
11
+ // #ifdef WEB
12
+ platform = 'web';
13
+ // #endif
4
14
  export const isWeb = platform === 'web';
15
+ export const isApp = platform === 'app';
5
16
  export const isMp = platform.startsWith('mp-');
6
- export const isAlipay = platform === 'mp-alipay';
7
17
  export const isWeixin = platform === 'mp-weixin';
18
+ export const isAlipay = platform === 'mp-alipay';