[bugfix] Address & Contact list style (#230)

* [bugfix] Checkbox border render error in weixin browser

* [bugfix] TreeSelect dependency path error

* [bugfix] Swipe should clear autoplay timer when destroyed

* [bugfix] Optimize component dependency analyze when build style entry

* merge

* update yarn.lock

* update README.md

* update README.md

* update README.md

* update README.md

* update README.md

* [Doc] add more badges in README.md

* update README.md

* [bugfix] Address & Contact list style

* fix: contact test cases
This commit is contained in:
neverland 2017-10-22 21:01:30 -05:00 committed by GitHub
parent c1923bc87d
commit 0884cad227
5 changed files with 13 additions and 5 deletions

View File

@ -24,13 +24,14 @@ function analyzeDependencies(componentName, libDir) {
}) })
const checkList = ['base']; const checkList = ['base'];
search(dependencies, checkList); search(dependencies, checkList);
console.log(componentName ,checkList);
return checkList.filter(component => checkComponentHasStyle(component)); return checkList.filter(component => checkComponentHasStyle(component));
} }
function search(tree, checkList) { function search(tree, checkList) {
tree && Object.keys(tree).forEach(key => { tree && Object.keys(tree).forEach(key => {
search(tree[key], checkList); search(tree[key], checkList);
const component = key.split('/vant/lib/')[1].replace('/index.js', ''); const component = key.split('/vant/lib/')[1].replace('/index.js', '').replace('mixins/', '');
if (checkList.indexOf(component) === -1) { if (checkList.indexOf(component) === -1) {
checkList.push(component); checkList.push(component);
} }

View File

@ -8,8 +8,8 @@
<template v-else-if="type === 'edit'"> <template v-else-if="type === 'edit'">
<van-icon class="van-contact-card__icon" name="contact" /> <van-icon class="van-contact-card__icon" name="contact" />
<div class="van-contact-card__text"> <div class="van-contact-card__text">
<p>联系人{{ name }}</p> <div>联系人{{ name }}</div>
<p>联系电话{{ tel }}</p> <div>联系电话{{ tel }}</div>
</div> </div>
</template> </template>
</div> </div>

View File

@ -27,7 +27,10 @@
&__group { &__group {
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: scroll;
padding-bottom: 40px;
box-sizing: border-box;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
background-color: $background-color;
} }
&__name { &__name {

View File

@ -2,6 +2,10 @@
.van-contact-list { .van-contact-list {
height: 100%; height: 100%;
overflow-y: auto;
padding-bottom: 55px;
box-sizing: border-box;
background-color: $background-color;
.van-cell__value { .van-cell__value {
color: $text-color; color: $text-color;

View File

@ -41,8 +41,8 @@ describe('ContactCard', () => {
}); });
expect(wrapper.hasClass('van-contact-card')).to.be.true; expect(wrapper.hasClass('van-contact-card')).to.be.true;
expect(wrapper.find('.van-contact-card__text p')[0].text()).to.equal('联系人:测试姓名'); expect(wrapper.find('.van-contact-card__text div')[0].text()).to.equal('联系人:测试姓名');
expect(wrapper.find('.van-contact-card__text p')[1].text()).to.equal('联系电话13000000000'); expect(wrapper.find('.van-contact-card__text div')[1].text()).to.equal('联系电话13000000000');
}); });
}); });