[bugfix] GoodsAction: info position (#1074)

This commit is contained in:
neverland 2018-05-15 21:44:26 +08:00 committed by GitHub
parent 1da5e3637c
commit 509a75f438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View File

@ -0,0 +1,17 @@
import BigBtn from '../../goods-action-big-btn';
import SmallBtn from '../../goods-action-mini-btn';
import { mount } from '@vue/test-utils';
test('big btn click event', () => {
const wrapper = mount(BigBtn);
wrapper.trigger('click');
expect(wrapper.emitted('click')).toBeTruthy();
});
test('small btn click event', () => {
const wrapper = mount(SmallBtn);
wrapper.trigger('click');
expect(wrapper.emitted('click')).toBeTruthy();
});

View File

@ -41,8 +41,9 @@
}
&__icon {
width: 1em;
font-size: 20px;
margin-bottom: 5px;
margin: 0 auto 5px;
}
}
}

View File

@ -16,10 +16,9 @@
&__info {
color: #fff;
left: 50%;
left: 100%;
top: -.5em;
font-size: .5em;
margin-left: .8em;
padding: 0 .3em;
text-align: center;
min-width: 1.2em;
@ -28,6 +27,7 @@
border-radius: .6em;
box-sizing: border-box;
background-color: $red;
transform: translateX(-50%);
font-family: PingFang SC, Helvetica Neue, Arial, sans-serif;
}