mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
chore(ImagePreview): improve watcher
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user