Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
29c9e685
authored
2023-07-27 17:22:10 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:table
1 parent
3d72b588
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
src/components/selectTable/index.vue
src/components/selectTable/index.vue
View file @
29c9e68
...
...
@@ -4,7 +4,7 @@
* @Author: sakuya
* @Date: 2021年6月10日10:04:07
* @LastEditors: Please set LastEditors
* @LastEditTime: 2023-07-
05 10:39:17
* @LastEditTime: 2023-07-
27 17:21:52
-->
<
template
>
...
...
@@ -32,7 +32,7 @@
import
config
from
"./tableSelect"
;
export
default
{
props
:
{
modelV
alue
:
null
,
v
alue
:
null
,
apiObj
:
{
type
:
Object
,
default
:
()
=>
{
}
},
placeholder
:
{
type
:
String
,
default
:
"请选择"
},
size
:
{
type
:
String
,
default
:
"small"
},
...
...
@@ -63,9 +63,10 @@
computed
:
{
},
watch
:
{
modelV
alue
:
{
v
alue
:
{
handler
()
{
this
.
defaultValue
=
this
.
modelValue
this
.
defaultValue
=
this
.
value
console
.
log
(
this
.
value
,
'this.value'
);
this
.
autoCurrentLabel
()
},
deep
:
true
...
...
@@ -73,7 +74,7 @@
},
mounted
()
{
this
.
defaultProps
=
Object
.
assign
(
this
.
defaultProps
,
this
.
props
);
this
.
defaultValue
=
this
.
modelV
alue
this
.
defaultValue
=
this
.
v
alue
this
.
autoCurrentLabel
()
},
methods
:
{
...
...
@@ -149,7 +150,7 @@
this
.
defaultValue
.
splice
(
this
.
defaultValue
.
findIndex
(
item
=>
item
[
this
.
defaultProps
.
value
]
==
row
[
this
.
defaultProps
.
value
]),
1
)
}
this
.
autoCurrentLabel
()
this
.
$emit
(
'update:
modelV
alue'
,
this
.
defaultValue
);
this
.
$emit
(
'update:
v
alue'
,
this
.
defaultValue
);
this
.
$emit
(
'change'
,
this
.
defaultValue
);
},
/**
...
...
@@ -175,7 +176,7 @@
})
}
this
.
autoCurrentLabel
()
this
.
$emit
(
'update:
modelV
alue'
,
this
.
defaultValue
);
this
.
$emit
(
'update:
v
alue'
,
this
.
defaultValue
);
this
.
$emit
(
'change'
,
this
.
defaultValue
);
},
/**
...
...
@@ -191,7 +192,7 @@
this
.
$refs
.
select
.
blur
()
this
.
autoCurrentLabel
()
this
.
$refs
.
table
.
setCurrentRow
(
row
);
this
.
$emit
(
'update:
modelV
alue'
,
this
.
defaultValue
);
this
.
$emit
(
'update:
v
alue'
,
this
.
defaultValue
);
this
.
$emit
(
'change'
,
this
.
defaultValue
);
}
},
...
...
@@ -203,14 +204,14 @@
removeTag
(
tag
)
{
var
row
=
this
.
findRowByKey
(
tag
[
this
.
defaultProps
.
value
])
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
false
);
this
.
$emit
(
'update:
modelV
alue'
,
this
.
defaultValue
);
this
.
$emit
(
'update:
v
alue'
,
this
.
defaultValue
);
},
/**
* @description: 清空后的回调
* @author: renchao
*/
clear
()
{
this
.
$emit
(
'update:
modelV
alue'
,
this
.
defaultValue
);
this
.
$emit
(
'update:
v
alue'
,
this
.
defaultValue
);
},
/**
* @description: 关键值查询表格数据行
...
...
Please
register
or
sign in
to post a comment