chore: rename variables and comments

This commit is contained in:
chenjiahan
2021-03-02 17:55:22 +08:00
parent a0addef294
commit 6e5329cbe0
50 changed files with 85 additions and 82 deletions
+5 -5
View File
@@ -1,10 +1,10 @@
import { nextTick, onMounted, PropType, reactive, ref, watch } from 'vue';
import { ref, watch, nextTick, onMounted, PropType, reactive } from 'vue';
// Utils
import { ComponentInstance, UnknownProp, createNamespace } from '../utils';
import { callInterceptor, Interceptor } from '../utils/interceptor';
// Composition
// Composables
import { useWindowSize } from '@vant/use';
import { useExpose } from '../composables/use-expose';
@@ -98,13 +98,13 @@ export default createComponent({
const emitScale = (args: ImagePreviewScaleEventParams) =>
emit('scale', args);
const toggle = (show: boolean) => emit('update:show', show);
const updateShow = (show: boolean) => emit('update:show', show);
const emitClose = () => {
callInterceptor({
interceptor: props.beforeClose,
args: [state.active],
done: () => toggle(false),
done: () => updateShow(false),
});
};
@@ -221,7 +221,7 @@ export default createComponent({
overlayClass={bem('overlay')}
closeOnPopstate={props.closeOnPopstate}
onClosed={onClosed}
{...{ 'onUpdate:show': toggle }}
{...{ 'onUpdate:show': updateShow }}
>
{renderClose()}
{renderImages()}
+1 -1
View File
@@ -3,7 +3,7 @@ import { watch, computed, reactive, CSSProperties, defineComponent } from 'vue';
// Utils
import { range, preventDefault, createNamespace } from '../utils';
// Composition
// Composables
import { useTouch } from '../composables/use-touch';
// Component