Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4c09faa2
authored
Aug 21, 2021
by
limin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
树实例增checkNode方法
1 parent
b53ee7d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
js/gtree.js
js/gtree.js
View file @
4c09faa
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Author: limin
* @Date: 2021-07-19 16:37:36
* @Date: 2021-07-19 16:37:36
* @LastEditors: limin
* @LastEditors: limin
* @LastEditTime: 2021-08-2
0 12:06:31
* @LastEditTime: 2021-08-2
1 15:10:33
* @FilePath: \account\js\gtree.js
* @FilePath: \account\js\gtree.js
*/
*/
layui
.
define
([
'ztree'
],
function
(
exports
)
{
layui
.
define
([
'ztree'
],
function
(
exports
)
{
...
@@ -64,6 +64,19 @@ layui.define(['ztree'], function (exports) {
...
@@ -64,6 +64,19 @@ layui.define(['ztree'], function (exports) {
if
(
check
==
0
)
setting
.
check
.
enable
=
false
if
(
check
==
0
)
setting
.
check
.
enable
=
false
inst
=
tree
.
init
(
$treeDom
,
setting
,
nodes
)
inst
=
tree
.
init
(
$treeDom
,
setting
,
nodes
)
inst
.
expandAll
(
true
)
inst
.
expandAll
(
true
)
inst
.
checkNodes
=
function
(
checked
){
var
nodesLevel1
=
this
.
getNodes
()
var
nodesAll
=
this
.
transformToArray
(
nodesLevel1
)
for
(
var
i
=
0
;
i
<=
nodesAll
.
length
;
i
++
)
{
var
node
=
nodesAll
[
i
]
if
(
node
&&
checked
.
indexOf
(
node
.
id
)
!=
-
1
)
{
node
.
checked
=
true
this
.
updateNode
(
node
)
}
}
}
return
inst
return
inst
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment