Merge branch '1.x' into 'dev'
This commit is contained in:
+1
-1
@@ -80,7 +80,7 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
const version = '1.6.16';
|
||||
const version = '1.6.17';
|
||||
const components = [
|
||||
ActionSheet,
|
||||
AddressEdit,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { use } from '../utils';
|
||||
import { emit, inherit } from '../utils/functional';
|
||||
import { inherit } from '../utils/functional';
|
||||
|
||||
// Types
|
||||
import { CreateElement, RenderContext } from 'vue/types';
|
||||
@@ -39,9 +39,6 @@ function Overlay(
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}}
|
||||
onClick={(event: Event) => {
|
||||
emit(ctx, 'click', event);
|
||||
}}
|
||||
{...inherit(ctx, true)}
|
||||
/>
|
||||
</transition>
|
||||
|
||||
@@ -146,12 +146,18 @@ test('watch overlay prop', () => {
|
||||
expect(div.querySelector('.van-overlay')).toBeTruthy();
|
||||
});
|
||||
|
||||
test('close on click modal', () => {
|
||||
test('close on click overlay', () => {
|
||||
const div = document.createElement('div');
|
||||
const onClickOverlay = jest.fn();
|
||||
|
||||
wrapper = mount({
|
||||
template: `
|
||||
<div>
|
||||
<popup v-model="value" :get-container="getContainer" />
|
||||
<popup
|
||||
v-model="value"
|
||||
:get-container="getContainer"
|
||||
@click-overlay="onClickOverlay"
|
||||
/>
|
||||
</div>
|
||||
`,
|
||||
components: {
|
||||
@@ -162,13 +168,18 @@ test('close on click modal', () => {
|
||||
value: true,
|
||||
getContainer: () => div
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onClickOverlay
|
||||
}
|
||||
});
|
||||
|
||||
const modal = div.querySelector('.van-overlay');
|
||||
triggerDrag(modal, 0, -30);
|
||||
modal.click();
|
||||
|
||||
expect(wrapper.vm.value).toBeFalsy();
|
||||
expect(onClickOverlay).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
test('open & close event', () => {
|
||||
|
||||
@@ -5,7 +5,9 @@ const [sfc, bem] = use('step');
|
||||
|
||||
export default sfc({
|
||||
beforeCreate() {
|
||||
this.$parent.steps.push(this);
|
||||
const { steps } = this.$parent;
|
||||
const index = this.$parent.slots().indexOf(this.$vnode);
|
||||
steps.splice(index === -1 ? steps.length : index, 0, this);
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
&:last-child {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
right: 1px;
|
||||
width: auto;
|
||||
|
||||
.van-step__title {
|
||||
@@ -55,6 +55,10 @@
|
||||
font-size: 12px;
|
||||
margin-left: 3px;
|
||||
transform: translateX(-50%);
|
||||
|
||||
@media(max-width: 321px) {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
.van-step__line {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
.van-steps__items {
|
||||
display: flex;
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
padding-bottom: 22px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user