@hsu-react/ui 2.0.1 → 2.0.2

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.
@@ -8,6 +8,8 @@
8
8
  // .row { @include r.hover { &:hover { background: …; } } } // 正确写法
9
9
  // =============================================================
10
10
 
11
+ @use "sass:map";
12
+
11
13
  $breakpoints: (
12
14
  sm: 640px,
13
15
  md: 768px,
@@ -17,10 +19,10 @@ $breakpoints: (
17
19
  );
18
20
 
19
21
  @function bp($name) {
20
- @if not map-has-key($breakpoints, $name) {
21
- @error "未知断点 #{$name},可用:#{map-keys($breakpoints)}";
22
+ @if not map.has-key($breakpoints, $name) {
23
+ @error "未知断点 #{$name},可用:#{map.keys($breakpoints)}";
22
24
  }
23
- @return map-get($breakpoints, $name);
25
+ @return map.get($breakpoints, $name);
24
26
  }
25
27
 
26
28
  /// 视口 < 断点(移动优先的「小屏覆盖」)
@@ -8,6 +8,8 @@
8
8
  // .row { @include r.hover { &:hover { background: …; } } } // 正确写法
9
9
  // =============================================================
10
10
 
11
+ @use "sass:map";
12
+
11
13
  $breakpoints: (
12
14
  sm: 640px,
13
15
  md: 768px,
@@ -17,10 +19,10 @@ $breakpoints: (
17
19
  );
18
20
 
19
21
  @function bp($name) {
20
- @if not map-has-key($breakpoints, $name) {
21
- @error "未知断点 #{$name},可用:#{map-keys($breakpoints)}";
22
+ @if not map.has-key($breakpoints, $name) {
23
+ @error "未知断点 #{$name},可用:#{map.keys($breakpoints)}";
22
24
  }
23
- @return map-get($breakpoints, $name);
25
+ @return map.get($breakpoints, $name);
24
26
  }
25
27
 
26
28
  /// 视口 < 断点(移动优先的「小屏覆盖」)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hsu-react/ui",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "一套基于 React + Ant Design 的中后台业务组件库",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -8,6 +8,8 @@
8
8
  // .row { @include r.hover { &:hover { background: …; } } } // 正确写法
9
9
  // =============================================================
10
10
 
11
+ @use "sass:map";
12
+
11
13
  $breakpoints: (
12
14
  sm: 640px,
13
15
  md: 768px,
@@ -17,10 +19,10 @@ $breakpoints: (
17
19
  );
18
20
 
19
21
  @function bp($name) {
20
- @if not map-has-key($breakpoints, $name) {
21
- @error "未知断点 #{$name},可用:#{map-keys($breakpoints)}";
22
+ @if not map.has-key($breakpoints, $name) {
23
+ @error "未知断点 #{$name},可用:#{map.keys($breakpoints)}";
22
24
  }
23
- @return map-get($breakpoints, $name);
25
+ @return map.get($breakpoints, $name);
24
26
  }
25
27
 
26
28
  /// 视口 < 断点(移动优先的「小屏覆盖」)