sard-uniapp 1.10.1 → 1.10.3
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/README.md +7 -3
- package/changelog.md +10 -0
- package/components/_template/_template.vue +1 -1
- package/components/accordion/accordion.vue +1 -1
- package/components/accordion-item/accordion-item.vue +1 -1
- package/components/action-sheet/action-sheet.vue +1 -1
- package/components/alert/alert.vue +1 -1
- package/components/avatar/avatar.vue +1 -1
- package/components/back-top/back-top.vue +1 -1
- package/components/badge/badge.vue +1 -1
- package/components/button/button.vue +1 -1
- package/components/calendar/calendar.vue +1 -1
- package/components/calendar-month/calendar-month.vue +1 -1
- package/components/card/card.vue +1 -1
- package/components/cascader/cascader.vue +2 -2
- package/components/cascader-input/cascader-input.d.ts +4 -4
- package/components/cascader-input/cascader-input.vue +8 -5
- package/components/cascader-input/common.d.ts +2 -2
- package/components/check-icon/check-icon.vue +1 -1
- package/components/checkbox/checkbox.vue +1 -1
- package/components/checkbox-group/checkbox-group.vue +1 -1
- package/components/checkbox-input/checkbox-input.vue +2 -1
- package/components/col/col.vue +1 -1
- package/components/collapse/collapse.vue +1 -1
- package/components/datetime-picker-input/datetime-picker-input.vue +3 -2
- package/components/dialog/dialog.vue +1 -1
- package/components/dropdown/dropdown.vue +1 -1
- package/components/dropdown-item/dropdown-item.vue +1 -1
- package/components/empty/empty.vue +1 -1
- package/components/fab/fab.vue +1 -1
- package/components/floating-bubble/floating-bubble.vue +1 -1
- package/components/form/form.vue +1 -1
- package/components/form-item/form-item.vue +1 -1
- package/components/grid/grid.vue +1 -1
- package/components/grid-item/grid-item.vue +1 -1
- package/components/icon/icon.vue +1 -1
- package/components/indexes/indexes.vue +1 -1
- package/components/indexes-anchor/indexes-anchor.vue +1 -1
- package/components/indexes-nav/indexes-nav.vue +1 -1
- package/components/input/input.vue +1 -1
- package/components/keyboard/keyboard.vue +1 -1
- package/components/list/list.vue +1 -1
- package/components/list-item/list-item.vue +1 -1
- package/components/load-more/load-more.vue +1 -1
- package/components/loading/loading.vue +1 -1
- package/components/marquee/marquee.vue +1 -1
- package/components/menu/menu.vue +1 -1
- package/components/menu-item/menu-item.vue +1 -1
- package/components/navbar/navbar.vue +1 -1
- package/components/navbar-item/navbar-item.vue +1 -1
- package/components/notice-bar/notice-bar.vue +1 -1
- package/components/notify/notify.vue +1 -1
- package/components/overlay/overlay.vue +1 -1
- package/components/pagination/pagination.vue +1 -1
- package/components/password-input/password-input.vue +1 -1
- package/components/picker/picker.vue +1 -1
- package/components/popout/popout.vue +1 -1
- package/components/popout-input/popout-input.vue +1 -1
- package/components/popover/popover.vue +1 -1
- package/components/popup/popup.vue +1 -1
- package/components/progress-bar/progress-bar.vue +1 -1
- package/components/progress-circle/progress-circle.vue +1 -1
- package/components/pull-down-refresh/pull-down-refresh.vue +1 -1
- package/components/qrcode/qrcode.vue +1 -1
- package/components/radio/radio.vue +1 -1
- package/components/radio-group/radio-group.vue +1 -1
- package/components/radio-input/radio-input.vue +1 -1
- package/components/rate/rate.vue +1 -1
- package/components/result/result.vue +1 -1
- package/components/row/row.vue +1 -1
- package/components/search/search.vue +1 -1
- package/components/share-sheet/share-sheet.vue +1 -1
- package/components/skeleton/skeleton.vue +1 -1
- package/components/skeleton-avatar/skeleton-avatar.vue +1 -1
- package/components/skeleton-block/skeleton-block.vue +1 -1
- package/components/skeleton-paragraph/skeleton-paragraph.vue +1 -1
- package/components/skeleton-title/skeleton-title.vue +1 -1
- package/components/slider/slider.vue +1 -1
- package/components/space/space.vue +1 -1
- package/components/stepper/stepper.vue +1 -1
- package/components/steps/steps.vue +1 -1
- package/components/style/functions.scss +61 -16
- package/components/style/variables.scss +21 -21
- package/components/swiper-dot/swiper-dot.vue +1 -1
- package/components/switch/switch.vue +1 -1
- package/components/tab/tab.vue +1 -1
- package/components/tabbar/tabbar.vue +1 -1
- package/components/tabbar-item/tabbar-item.vue +1 -1
- package/components/table/table.vue +1 -1
- package/components/table-cell/table-cell.vue +1 -1
- package/components/table-fixation/table-fixation.vue +1 -1
- package/components/table-row/table-row.vue +1 -1
- package/components/tabs/tabs.vue +1 -1
- package/components/tag/index.scss +4 -3
- package/components/tag/tag.vue +1 -1
- package/components/timeline/timeline.vue +1 -1
- package/components/timeline-item/timeline-item.vue +1 -1
- package/components/toast/toast.vue +1 -1
- package/components/tree/tree.vue +1 -1
- package/components/tree-node/tree-node.vue +1 -1
- package/components/upload/upload.vue +1 -1
- package/components/upload-preview/upload-preview.vue +1 -1
- package/package.json +6 -3
package/components/rate/rate.vue
CHANGED
package/components/row/row.vue
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
2
|
@use 'sass:math';
|
|
3
|
+
@use 'sass:string';
|
|
4
|
+
@use 'sass:list';
|
|
5
|
+
@use 'sass:map';
|
|
3
6
|
@use './configuration' as *;
|
|
4
7
|
|
|
5
8
|
// scss原生并没有提供字符串的替换函数,需自己编写函数来实现这个功能
|
|
6
9
|
@function str-replace($string, $search, $replace) {
|
|
7
|
-
$index:
|
|
10
|
+
$index: string.index($string, $search);
|
|
8
11
|
|
|
9
12
|
@if $index {
|
|
10
|
-
@return
|
|
13
|
+
@return string.slice($string, 1, $index - 1) + $replace +
|
|
11
14
|
str-replace(
|
|
12
|
-
|
|
15
|
+
string.slice($string, $index + string.length($search)),
|
|
13
16
|
$search,
|
|
14
17
|
$replace
|
|
15
18
|
);
|
|
@@ -25,13 +28,10 @@
|
|
|
25
28
|
|
|
26
29
|
// 把一个数四舍五入到指定位数小数
|
|
27
30
|
@function tofixed($n, $digits: 0) {
|
|
28
|
-
@return math.div(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// 以便将此变量和一个透明度组成一个rgba从而实现自定义一个颜色的透明度。
|
|
33
|
-
@function extractRGB($color) {
|
|
34
|
-
@return '#{color.red($color)},#{color.green($color)},#{color.blue($color)}';
|
|
31
|
+
@return math.div(
|
|
32
|
+
math.round($n * math.pow(10, $digits)),
|
|
33
|
+
math.pow(10, $digits)
|
|
34
|
+
);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
@function bem-ns($str) {
|
|
@@ -49,24 +49,69 @@
|
|
|
49
49
|
@return $result;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
// 兼容旧版本
|
|
52
53
|
@function str-split($string, $separator) {
|
|
53
54
|
// empty array/list
|
|
54
55
|
$split-arr: ();
|
|
55
56
|
// first index of separator in string
|
|
56
|
-
$index:
|
|
57
|
+
$index: string.index($string, $separator);
|
|
57
58
|
// loop through string
|
|
58
59
|
@while $index != null {
|
|
59
60
|
// get the substring from the first character to the separator
|
|
60
|
-
$item:
|
|
61
|
+
$item: string.slice($string, 1, $index - 1);
|
|
61
62
|
// push item to array
|
|
62
|
-
$split-arr: append($split-arr, $item);
|
|
63
|
+
$split-arr: list.append($split-arr, $item);
|
|
63
64
|
// remove item and separator from string
|
|
64
|
-
$string:
|
|
65
|
+
$string: string.slice($string, $index + 1);
|
|
65
66
|
// find new index of separator
|
|
66
|
-
$index:
|
|
67
|
+
$index: string.index($string, $separator);
|
|
67
68
|
}
|
|
68
69
|
// add the remaining string to list (the last item)
|
|
69
|
-
$split-arr: append($split-arr, $string);
|
|
70
|
+
$split-arr: list.append($split-arr, $string);
|
|
70
71
|
|
|
71
72
|
@return $split-arr;
|
|
72
73
|
}
|
|
74
|
+
|
|
75
|
+
@function three-to-six($str) {
|
|
76
|
+
$first: string.slice($str, 1, 1);
|
|
77
|
+
$second: string.slice($str, 2, 2);
|
|
78
|
+
$three: string.slice($str, 3, 3);
|
|
79
|
+
|
|
80
|
+
@return $first + $first + $second + $second + $three + $three;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
$map-hex-decimal: (
|
|
84
|
+
'0': 0,
|
|
85
|
+
'1': 1,
|
|
86
|
+
'2': 2,
|
|
87
|
+
'3': 3,
|
|
88
|
+
'4': 4,
|
|
89
|
+
'5': 5,
|
|
90
|
+
'6': 6,
|
|
91
|
+
'7': 7,
|
|
92
|
+
'8': 8,
|
|
93
|
+
'9': 9,
|
|
94
|
+
'a': 10,
|
|
95
|
+
'b': 11,
|
|
96
|
+
'c': 12,
|
|
97
|
+
'd': 13,
|
|
98
|
+
'e': 14,
|
|
99
|
+
'f': 15,
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
@function hex-to-decimal($hex) {
|
|
103
|
+
$hex: string.to-lower-case($hex);
|
|
104
|
+
@return map.get($map-hex-decimal, string.slice($hex, 1, 1)) * 16 +
|
|
105
|
+
map.get($map-hex-decimal, string.slice($hex, 2, 2));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@function hex-to-rgb($hex) {
|
|
109
|
+
$hex: str-replace(#{$hex}, '#', '');
|
|
110
|
+
$hex: if(string.length($hex) == 3, three-to-six($hex), $hex);
|
|
111
|
+
|
|
112
|
+
$first: string.slice($hex, 1, 2);
|
|
113
|
+
$second: string.slice($hex, 3, 4);
|
|
114
|
+
$three: string.slice($hex, 5, 6);
|
|
115
|
+
|
|
116
|
+
@return '#{hex-to-decimal($first)},#{hex-to-decimal($second)},#{hex-to-decimal($three)}';
|
|
117
|
+
}
|
|
@@ -18,17 +18,17 @@ page {
|
|
|
18
18
|
--sar-black: #{$sar-black};
|
|
19
19
|
|
|
20
20
|
// # 灰度值 rgb
|
|
21
|
-
--sar-white-rgb: #{
|
|
22
|
-
--sar-gray-100-rgb: #{
|
|
23
|
-
--sar-gray-200-rgb: #{
|
|
24
|
-
--sar-gray-300-rgb: #{
|
|
25
|
-
--sar-gray-400-rgb: #{
|
|
26
|
-
--sar-gray-500-rgb: #{
|
|
27
|
-
--sar-gray-600-rgb: #{
|
|
28
|
-
--sar-gray-700-rgb: #{
|
|
29
|
-
--sar-gray-800-rgb: #{
|
|
30
|
-
--sar-gray-900-rgb: #{
|
|
31
|
-
--sar-black-rgb: #{
|
|
21
|
+
--sar-white-rgb: #{hex-to-rgb($sar-white)};
|
|
22
|
+
--sar-gray-100-rgb: #{hex-to-rgb($sar-gray-100)};
|
|
23
|
+
--sar-gray-200-rgb: #{hex-to-rgb($sar-gray-200)};
|
|
24
|
+
--sar-gray-300-rgb: #{hex-to-rgb($sar-gray-300)};
|
|
25
|
+
--sar-gray-400-rgb: #{hex-to-rgb($sar-gray-400)};
|
|
26
|
+
--sar-gray-500-rgb: #{hex-to-rgb($sar-gray-500)};
|
|
27
|
+
--sar-gray-600-rgb: #{hex-to-rgb($sar-gray-600)};
|
|
28
|
+
--sar-gray-700-rgb: #{hex-to-rgb($sar-gray-700)};
|
|
29
|
+
--sar-gray-800-rgb: #{hex-to-rgb($sar-gray-800)};
|
|
30
|
+
--sar-gray-900-rgb: #{hex-to-rgb($sar-gray-900)};
|
|
31
|
+
--sar-black-rgb: #{hex-to-rgb($sar-black)};
|
|
32
32
|
|
|
33
33
|
// # 基础颜色
|
|
34
34
|
--sar-blue: #{$sar-blue};
|
|
@@ -43,16 +43,16 @@ page {
|
|
|
43
43
|
--sar-cyan: #{$sar-cyan};
|
|
44
44
|
|
|
45
45
|
// # 基础颜色 rgb
|
|
46
|
-
--sar-blue-rgb: #{
|
|
47
|
-
--sar-indigo-rgb: #{
|
|
48
|
-
--sar-purple-rgb: #{
|
|
49
|
-
--sar-pink-rgb: #{
|
|
50
|
-
--sar-red-rgb: #{
|
|
51
|
-
--sar-orange-rgb: #{
|
|
52
|
-
--sar-yellow-rgb: #{
|
|
53
|
-
--sar-green-rgb: #{
|
|
54
|
-
--sar-teal-rgb: #{
|
|
55
|
-
--sar-cyan-rgb: #{
|
|
46
|
+
--sar-blue-rgb: #{hex-to-rgb($sar-blue)};
|
|
47
|
+
--sar-indigo-rgb: #{hex-to-rgb($sar-indigo)};
|
|
48
|
+
--sar-purple-rgb: #{hex-to-rgb($sar-purple)};
|
|
49
|
+
--sar-pink-rgb: #{hex-to-rgb($sar-pink)};
|
|
50
|
+
--sar-red-rgb: #{hex-to-rgb($sar-red)};
|
|
51
|
+
--sar-orange-rgb: #{hex-to-rgb($sar-orange)};
|
|
52
|
+
--sar-yellow-rgb: #{hex-to-rgb($sar-yellow)};
|
|
53
|
+
--sar-green-rgb: #{hex-to-rgb($sar-green)};
|
|
54
|
+
--sar-teal-rgb: #{hex-to-rgb($sar-teal)};
|
|
55
|
+
--sar-cyan-rgb: #{hex-to-rgb($sar-cyan)};
|
|
56
56
|
|
|
57
57
|
// # 主题色
|
|
58
58
|
--sar-primary: var(--sar-blue);
|
package/components/tab/tab.vue
CHANGED
package/components/tabs/tabs.vue
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:list';
|
|
2
|
+
@use 'sass:map';
|
|
2
3
|
@use '../style/base' as *;
|
|
3
4
|
|
|
4
5
|
$sar-tag-sizes: (
|
|
@@ -53,9 +54,9 @@ $sar-tag-sizes: (
|
|
|
53
54
|
// 尺寸
|
|
54
55
|
@each $size, $value in $sar-tag-sizes {
|
|
55
56
|
@include m($size) {
|
|
56
|
-
padding: map
|
|
57
|
-
font-size: map
|
|
58
|
-
border-radius: map
|
|
57
|
+
padding: map.get($value, padding);
|
|
58
|
+
font-size: map.get($value, font-size);
|
|
59
|
+
border-radius: map.get($value, border-radius);
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
|
package/components/tag/tag.vue
CHANGED
package/components/tree/tree.vue
CHANGED
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.10.
|
|
5
|
+
"version": "1.10.3",
|
|
6
6
|
"description": "sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"scripts": {
|
|
@@ -115,8 +115,8 @@
|
|
|
115
115
|
"lodash-es": "^4.17.21",
|
|
116
116
|
"prettier": "^2.8.8",
|
|
117
117
|
"region-data": "^1.2.3",
|
|
118
|
-
"sard-cli": "^1.0.
|
|
119
|
-
"sass": "^1.
|
|
118
|
+
"sard-cli": "^1.0.9",
|
|
119
|
+
"sass": "^1.85.0",
|
|
120
120
|
"tel-area-code": "^1.0.1",
|
|
121
121
|
"ts-custom-error": "^3.3.1",
|
|
122
122
|
"tsx": "^4.19.2",
|
|
@@ -216,5 +216,8 @@
|
|
|
216
216
|
},
|
|
217
217
|
"engines": {
|
|
218
218
|
"HBuilderX": "^3.6.0"
|
|
219
|
+
},
|
|
220
|
+
"pnpm": {
|
|
221
|
+
"overrides": {}
|
|
219
222
|
}
|
|
220
223
|
}
|