Skip to content

Commit 97a63d6

Browse files
committed
1. str-replace 方法重命名并增加示例;2. 删除 calculate 文件多余空行;
1 parent 17fa754 commit 97a63d6

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

qmui/helper/mixin/tool/_calculate.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,3 @@
148148
}
149149
@return $result;
150150
}
151-
152-
153-

qmui/helper/mixin/tool/_enhance.scss

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,23 @@
22

33
////
44
/// 原生增强,补充 SASS 原生语法缺少的能力
5-
/// @author Kayo
6-
/// @group Sass 原生增强
5+
/// @author Kayo
6+
/// @group Sass 原生增强
77
/// @date 2016-06-18
88
////
99

1010

1111
/// 字符串 replace 方法,用于在字符串中用一些字符替换另一些字符
1212
///
13-
/// @name replace
14-
/// @param {String} $string - 需要进行查找的字符串
15-
/// @param {String} $search - 规定需要被替换的子字符串
16-
/// @param {String} $replace [''] - 替换文本
17-
@function str_replace($string, $search, $replace: '') {
13+
/// @name str-replace
14+
/// @param {String} $string - 需要进行查找的字符串
15+
/// @param {String} $search - 规定需要被替换的子字符串
16+
/// @param {String} $replace [''] - 替换文本
17+
/// @example
18+
/// str-replace("QMUI Web", " Web") => "QMUI"
19+
/// str-replace("QMUI Web", "Web", "iOS") => "QMUI iOS"
20+
/// str-replace("QMUI Web", "Web", "Android") => "QMUI Android"
21+
@function str-replace($string, $search, $replace: '') {
1822
$index: str-index($string, $search);
1923

2024
@if $index {

0 commit comments

Comments
 (0)