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

组件不支持kebab-case的写法 #242

Closed
Atuna opened this issue Jul 6, 2017 · 2 comments
Closed

组件不支持kebab-case的写法 #242

Atuna opened this issue Jul 6, 2017 · 2 comments

Comments

@Atuna
Copy link

Atuna commented Jul 6, 2017

// index.wpy
<template>
  <bottom-tab index="1"></bottom-tab>
</template>

<script>
import wepy from 'wepy'
import tab from '../components/tab'

export default class ProfileForm extends wepy.page {
  components = {
    'bottom-tab': tab
  }
}
</script>
// tab.wpy
<template>
  <view>
    {{index}}
  </view>
</template>

<script>
import wepy from 'wepy'

export default class Counter extends wepy.component {
  props = {
    index: String
  }
}
</script>

screen shot 2017-07-06 at 6 26 47 pm

还是希望能像vue里,将camelCase自动转换成kebab-case。
这点文档里没有写出来(文档里都是单个词的组件),编译时,运行时也都没有报错。
花了好多时间debug。

如果可能,希望至少可以有提醒代码有错误。

@Gcaufy Gcaufy self-assigned this Jul 6, 2017
@Gcaufy Gcaufy added the bug label Jul 6, 2017
@Gcaufy
Copy link
Collaborator

Gcaufy commented Jul 17, 2017

#201

@Gcaufy Gcaufy added enhancement and removed bug labels Jul 17, 2017
@Gcaufy
Copy link
Collaborator

Gcaufy commented Aug 5, 2017

fixed in 1.5.8

@Gcaufy Gcaufy closed this as completed Aug 5, 2017
dlhandsome pushed a commit to dlhandsome/wepy that referenced this issue Aug 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants