mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] GoodsAction: info position (#1074)
This commit is contained in:
parent
1da5e3637c
commit
509a75f438
17
packages/goods-action/test/index.spec.js
Normal file
17
packages/goods-action/test/index.spec.js
Normal 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();
|
||||
});
|
@ -41,8 +41,9 @@
|
||||
}
|
||||
|
||||
&__icon {
|
||||
width: 1em;
|
||||
font-size: 20px;
|
||||
margin-bottom: 5px;
|
||||
margin: 0 auto 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user