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