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

修改repeat中组件不能使用静态属性的bug #605

Merged
merged 1 commit into from
Dec 11, 2017

Conversation

khejing
Copy link

@khejing khejing commented Dec 5, 2017

用目前的代码会输出:

<image mode="aspectFit" src="{{../icons/icon_sound.png}}" />

会导致微信开发者工具文件编译错误

@Gcaufy
Copy link
Collaborator

Gcaufy commented Dec 5, 2017

什么代码能复现问题?

@khejing
Copy link
Author

khejing commented Dec 5, 2017

index.wpy中:

    <panel>
      <view class="title" slot="title">测试组件Repeat</view>
      <repeat for="{{groupList}}" index="index" item="item" key="key">
        <group :grouplist="item" :indexa="index" myattr="abc"></group>
      </repeat>
    </panel>

group.wpy中:

<template>
  <view class="group {{myattr}}"></view>
</template>
<script>
  import wepy from 'wepy'

  export default class Group extends wepy.component {
    props = {
      myattr: ''
    }
  }
</script>

输出结果会是:

  <view class="group {{abc}}"></view>

@khejing
Copy link
Author

khejing commented Dec 9, 2017

@Gcaufy 可以复现问题么?

@Gcaufy
Copy link
Collaborator

Gcaufy commented Dec 11, 2017

复现了,这是一个无心为之的功能,被你发现了,哈哈

@Gcaufy Gcaufy merged commit bcc9137 into Tencent:master Dec 11, 2017
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

Successfully merging this pull request may close these issues.

2 participants