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

props只能正确传递首个属性 #68

Closed
wangzexi opened this issue Mar 15, 2017 · 2 comments
Closed

props只能正确传递首个属性 #68

wangzexi opened this issue Mar 15, 2017 · 2 comments

Comments

@wangzexi
Copy link

更新v1.4.6后,props只能正确传递首个属性。

问题重现:
修改自带例程,
颠倒<list pear="梨子啊" apple="苹果啊"></list>pearapple的顺序,分别编译测试,
发现只能正确传递html标签中书写的首个props,其余props均为undefined

// index.wpy
<panel>
    <view class="title" slot="title">测试列表</view>
    <list pear="梨子啊" apple="苹果啊"></list>
</panel>
// list.wpy
<template>
    <view>apple: {{apple}}</view>
    <view>pear: {{pear}}</view>
...
// list.wpy
import wepy from 'wepy';

    export default class List extends wepy.component {
        props = {
            apple: String,
            pear: String
        };
@Gcaufy
Copy link
Collaborator

Gcaufy commented Mar 15, 2017

已知问题,目前只能通过手动修改C:\Users\{username}\AppData\Roaming\npm\node_modules\wepy-cli\lib\compile-wpy.js 来修复。请先参考commit修复问题。抱歉。

@wangzexi
Copy link
Author

@Gcaufy 谢谢你在午餐时间如此及时的修复,辛苦辛苦🎉。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants