chore(ImagePreview): improve watcher

This commit is contained in:
chenjiahan 2020-03-22 07:26:00 +08:00
parent 90cc5744e2
commit 3bd9ef1d4c

View File

@ -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) {