mirror of
https://gitee.com/vant-contrib/vant.git
synced 2026-04-29 18:15:40 +08:00
Compare commits
4 Commits
fd25328e5c
...
0b764b6347
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b764b6347 | ||
|
|
44c97003ec | ||
|
|
2aea635652 | ||
|
|
11e641c88e |
@ -55,7 +55,7 @@ export default defineComponent({
|
||||
);
|
||||
|
||||
const renderContent = () => {
|
||||
const nodes: JSX.Element[] = [`${item.name},${item.tel}`];
|
||||
const nodes: (JSX.Element | string)[] = [`${item.name},${item.tel}`];
|
||||
|
||||
if (item.isDefault && props.defaultTagText) {
|
||||
nodes.push(
|
||||
|
||||
@ -13,6 +13,11 @@ exports[`should render ContactList correctly 1`] = `
|
||||
</i>
|
||||
<div class="van-cell__value van-cell__value--alone van-contact-list__item-value">
|
||||
jack,12345678
|
||||
<transition-stub class="van-contact-list__item-tag">
|
||||
<span class="van-tag van-tag--round van-tag--danger">
|
||||
默认
|
||||
</span>
|
||||
</transition-stub>
|
||||
</div>
|
||||
<div role="radio"
|
||||
class="van-radio van-contact-list__radio"
|
||||
|
||||
@ -4,12 +4,14 @@ import { mount } from '../../../test';
|
||||
const contactInfo = {
|
||||
name: 'jack',
|
||||
tel: '12345678',
|
||||
isDefault: true,
|
||||
};
|
||||
|
||||
test('should render ContactList correctly', () => {
|
||||
const wrapper = mount(ContactList, {
|
||||
props: {
|
||||
list: [contactInfo],
|
||||
defaultTagText: '默认',
|
||||
},
|
||||
});
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
|
||||
@ -34,7 +34,7 @@ app.use(Steps);
|
||||
import { ref } from 'vue';
|
||||
|
||||
export default {
|
||||
steup() {
|
||||
setup() {
|
||||
const active = ref(1);
|
||||
return { active };
|
||||
},
|
||||
|
||||
@ -36,7 +36,7 @@ app.use(Steps);
|
||||
import { ref } from 'vue';
|
||||
|
||||
export default {
|
||||
steup() {
|
||||
setup() {
|
||||
const active = ref(1);
|
||||
return { active };
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user