Skip to content

feat: grid-item用icon插槽时也能用info属性#12

Merged
levy9527 merged 4 commits intoFEMessage:devfrom
deep-han:feat/grid-info
Nov 12, 2019
Merged

feat: grid-item用icon插槽时也能用info属性#12
levy9527 merged 4 commits intoFEMessage:devfrom
deep-han:feat/grid-info

Conversation

@donaldshen
Copy link

@donaldshen donaldshen commented Nov 12, 2019

Why

原本的grid-item的info属性是直接传给内部的Icon组件的,这意味着你用了icon插槽就没法用dot和info属性了!

How

在grid-item内:

  1. 将dot和info属性传给一个独立的Info组件
  2. 将icon(van-icon或slot-icon)和Info放在同一个父容器内,使得Info相对于该父容器定位

image

另外,现在pre-push时会执行yarn test

Test

yarn lint

image

yarn test

image

yarn test src/grid

image

@auto-add-label auto-add-label bot added the enhancement New feature or request label Nov 12, 2019
Copy link
Author

@donaldshen donaldshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review完毕

@levy9527 levy9527 merged commit 2405bcc into FEMessage:dev Nov 12, 2019
@donaldshen donaldshen deleted the feat/grid-info branch November 12, 2019 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants