mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore(ImagePreview): improve watcher
This commit is contained in:
parent
90cc5744e2
commit
3bd9ef1d4c
@ -112,6 +112,8 @@ export default createComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
startPosition: 'setActive',
|
||||||
|
|
||||||
value(val) {
|
value(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.setActive(+this.startPosition);
|
this.setActive(+this.startPosition);
|
||||||
@ -126,10 +128,6 @@ export default createComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
startPosition(val) {
|
|
||||||
this.setActive(val);
|
|
||||||
},
|
|
||||||
|
|
||||||
shouldRender: {
|
shouldRender: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user