Compare commits

...

4 Commits

Author SHA1 Message Date
FunkyZc
0b764b6347 fix(ContactList): fix nodes type 2021-04-12 19:07:50 +08:00
FunkyZc
44c97003ec test(ContactList): add default-tag-text test 2021-04-12 19:07:50 +08:00
FunkyZc
2aea635652 fix(ContactList): fix TS type check error 2021-04-12 19:07:50 +08:00
炽翎
11e641c88e
docs(Steps): fix typo of basic usage (#8512)
* fix: typo of "Steps" docs

* fix: typo of "Steps" docs
2021-04-12 19:07:05 +08:00
5 changed files with 10 additions and 3 deletions

View File

@ -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(

View File

@ -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">
jack12345678
<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"

View File

@ -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();

View File

@ -34,7 +34,7 @@ app.use(Steps);
import { ref } from 'vue';
export default {
steup() {
setup() {
const active = ref(1);
return { active };
},

View File

@ -36,7 +36,7 @@ app.use(Steps);
import { ref } from 'vue';
export default {
steup() {
setup() {
const active = ref(1);
return { active };
},