Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
ximai
mes-pad
Commits
969040e8
Commit
969040e8
authored
Apr 16, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改表格组件的问题
parent
6cf496fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
zb-table.vue
uni_modules/zb-table/components/zb-table/zb-table.vue
+21
-9
No files found.
uni_modules/zb-table/components/zb-table/zb-table.vue
View file @
969040e8
...
@@ -823,12 +823,12 @@ export default {
...
@@ -823,12 +823,12 @@ export default {
this
.
currentRow
=
{};
this
.
currentRow
=
{};
},
},
cellClick
(
row
,
index
,
column
)
{
cellClick
(
row
,
index
,
column
)
{
this
.
isDisable
=
true
;
//
this.isDisable = true;
setTimeout
(()
=>
{
//
setTimeout(() => {
this
.
isDisable
=
false
;
//
this.isDisable = false;
console
.
log
(
row
,
index
,
'rows'
);
console
.
log
(
row
,
index
,
'rows
cellClick
'
);
this
.
$emit
(
'cellClick'
,
row
,
index
,
column
);
this
.
$emit
(
'cellClick'
,
row
,
index
,
column
);
},
500
);
//
}, 500);
},
},
toggleRowSelection
(
row
)
{
toggleRowSelection
(
row
)
{
// console.log(row, 'rows99')
// console.log(row, 'rows99')
...
@@ -854,6 +854,18 @@ export default {
...
@@ -854,6 +854,18 @@ export default {
});
});
this
.
$emit
(
'toggleRowSelection'
,
true
,
this
.
selectArr
);
this
.
$emit
(
'toggleRowSelection'
,
true
,
this
.
selectArr
);
}
}
if
(
this
.
selectArr
.
length
===
this
.
transData
.
length
)
{
this
.
indeterminate
=
false
;
this
.
checkedAll
=
true
;
}
else
{
this
.
indeterminate
=
true
;
this
.
checkedAll
=
false
;
}
if
(
!
this
.
selectArr
.
length
)
{
this
.
checkedAll
=
false
;
this
.
indeterminate
=
false
;
}
},
},
handleRadio
(
event
)
{
handleRadio
(
event
)
{
const
items
=
this
.
data
.
find
((
v
)
=>
v
[
this
.
rowKey
]
==
event
.
target
.
value
);
const
items
=
this
.
data
.
find
((
v
)
=>
v
[
this
.
rowKey
]
==
event
.
target
.
value
);
...
@@ -862,16 +874,16 @@ export default {
...
@@ -862,16 +874,16 @@ export default {
this
.
$emit
(
'toggleRowSelection'
,
true
,
this
.
selectArr
);
this
.
$emit
(
'toggleRowSelection'
,
true
,
this
.
selectArr
);
},
},
rowClick
(
row
,
index
)
{
rowClick
(
row
,
index
)
{
this
.
isDisable
=
true
;
//
this.isDisable = true;
setTimeout
(()
=>
{
//
setTimeout(() => {
this
.
isDisable
=
false
;
//
this.isDisable = false;
if
(
this
.
highlight
)
{
if
(
this
.
highlight
)
{
this
.
currentRowIndex
=
index
;
this
.
currentRowIndex
=
index
;
this
.
currentRow
=
row
;
this
.
currentRow
=
row
;
this
.
$emit
(
'currentChange'
,
row
,
index
);
this
.
$emit
(
'currentChange'
,
row
,
index
);
}
}
this
.
$emit
(
'rowClick'
,
row
,
index
);
this
.
$emit
(
'rowClick'
,
row
,
index
);
},
500
);
//
}, 500);
},
},
checkboxSelectedAll
(
e
)
{
checkboxSelectedAll
(
e
)
{
this
.
indeterminate
=
false
;
this
.
indeterminate
=
false
;
...
...
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