Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 lang="pug" 时,props 传值不生效 #186

Closed
wulunyi opened this issue Jun 10, 2017 · 2 comments
Closed

使用 lang="pug" 时,props 传值不生效 #186

wulunyi opened this issue Jun 10, 2017 · 2 comments
Labels

Comments

@wulunyi
Copy link

wulunyi commented Jun 10, 2017

当使用 template 默认 lang 时

<template>
<view>
    <child :prop="list"/>
</view>
</template>

子组件能正常接收到 prop 在 child 中使用 this.prop 能获取到值

当使用 template lang="pug"

<template>
view
    child(:prop="list")
</template>

子组件无法接收到 prop this.prop 为 undefined
对比了下生成的 dist 发现少了类似如下的代码片段

_this.$props = { "ProductList": { "v-bind:prop.once": "list" } }, _this.$events = {},
@Gcaufy Gcaufy self-assigned this Jun 10, 2017
@Gcaufy Gcaufy added the bug label Jun 10, 2017
Gcaufy added a commit that referenced this issue Jun 12, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@Gcaufy
Copy link
Collaborator

Gcaufy commented Jun 12, 2017

已修复,可以参看上述commit修改本地cli代码或者等待新版本发布修复这个问题。

@Gcaufy
Copy link
Collaborator

Gcaufy commented Jun 15, 2017

已发布,请升级cli看看这个问题是否还存在。

@wulunyi wulunyi closed this as completed Jun 15, 2017
dlhandsome pushed a commit to dlhandsome/wepy that referenced this issue Aug 16, 2017

Verified

This commit was signed with the committer’s verified signature.
b1ek blek!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants