Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uview-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李晖
uview-ui
Commits
da02ce39
Commit
da02ce39
authored
Sep 28, 2021
by
xiaoxin
Committed by
童皓
Apr 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复部分代码注释里英文单词拼写错误的问题
parent
24b1e5b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
guid.js
uview-ui/libs/function/guid.js
+2
-2
mixin.js
uview-ui/libs/mixin/mixin.js
+1
-1
async-validator.js
uview-ui/libs/util/async-validator.js
+1
-1
No files found.
uview-ui/libs/function/guid.js
View file @
da02ce39
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* v-for的时候,推荐使用后端返回的id而不是循环的index
* v-for的时候,推荐使用后端返回的id而不是循环的index
* @param {Number} len uuid的长度
* @param {Number} len uuid的长度
* @param {Boolean} firstU 将返回的首字母置为"u"
* @param {Boolean} firstU 将返回的首字母置为"u"
* @param {Nu
bm
er} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
* @param {Nu
mb
er} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
*/
*/
function
guid
(
len
=
32
,
firstU
=
true
,
radix
=
null
)
{
function
guid
(
len
=
32
,
firstU
=
true
,
radix
=
null
)
{
let
chars
=
'
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
'
.
split
(
''
);
let
chars
=
'
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
'
.
split
(
''
);
...
@@ -29,7 +29,7 @@ function guid(len = 32, firstU = true, radix = null) {
...
@@ -29,7 +29,7 @@ function guid(len = 32, firstU = true, radix = null) {
}
}
}
}
}
}
// 移除第一个字符,并用u替代,因为第一个字符为数值时,该gu
u
id不能用作id或者class
// 移除第一个字符,并用u替代,因为第一个字符为数值时,该guid不能用作id或者class
if
(
firstU
)
{
if
(
firstU
)
{
uuid
.
shift
();
uuid
.
shift
();
return
'
u
'
+
uuid
.
join
(
''
);
return
'
u
'
+
uuid
.
join
(
''
);
...
...
uview-ui/libs/mixin/mixin.js
View file @
da02ce39
...
@@ -48,7 +48,7 @@ module.exports = {
...
@@ -48,7 +48,7 @@ module.exports = {
uni
.
$emit
(
'
uOnReachBottom
'
)
uni
.
$emit
(
'
uOnReachBottom
'
)
},
},
beforeDestroy
()
{
beforeDestroy
()
{
// 判断当前页面是否存在parent和chldren,一般在checkbox和checkbox-group父子联动的场景会有此情况
// 判断当前页面是否存在parent和ch
i
ldren,一般在checkbox和checkbox-group父子联动的场景会有此情况
// 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
// 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
if
(
this
.
parent
&&
uni
.
$u
.
test
.
array
(
this
.
parent
.
children
))
{
if
(
this
.
parent
&&
uni
.
$u
.
test
.
array
(
this
.
parent
.
children
))
{
// 组件销毁时,移除父组件中的children数组中对应的实例
// 组件销毁时,移除父组件中的children数组中对应的实例
...
...
uview-ui/libs/util/async-validator.js
View file @
da02ce39
...
@@ -437,7 +437,7 @@ function range(rule, value, source, errors, options) {
...
@@ -437,7 +437,7 @@ function range(rule, value, source, errors, options) {
}
}
if
(
str
)
{
if
(
str
)
{
// 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".leng
ht
!== 3
// 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".leng
th
!== 3
val
=
value
.
replace
(
spRegexp
,
'
_
'
).
length
;
val
=
value
.
replace
(
spRegexp
,
'
_
'
).
length
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment