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

omi-mp对is解析出错 #220

Open
askie opened this issue Dec 14, 2018 · 5 comments
Open

omi-mp对is解析出错 #220

askie opened this issue Dec 14, 2018 · 5 comments

Comments

@askie
Copy link

askie commented Dec 14, 2018

No description provided.

@askie askie changed the title omi-mp对is Dec 14, 2018
@askie
Copy link
Author

askie commented Dec 14, 2018

is="{{configData._comName=='pintuanlist'?'discountlist':configData._comName}}"
这种语法,gulp直接报错

@dntzhang
Copy link
Collaborator

下午看下

@dntzhang
Copy link
Collaborator

dntzhang commented Dec 14, 2018

wxml

<view class="container">
  <view class="usermotto" is="{{configData._comName=='pintuanlist'?'discountlist':configData._comName}}">
    <text class="user-motto">{{motto}}</text>
  </view>
</view>

���译后:

function render() {
  const { configData,motto } = Object.assign({}, this.data, this.props)
  return h('div',{'class': `container`},[h('div',{'class': `usermotto`,'is': configData._comName=='pintuanlist'?'discountlist':configData._comName},[h('span',{'class': `user-motto`},[`${motto}`])])])
}

试了下没问题。你更新下 omi-cli。你可能用了老的~~

@askie
Copy link
Author

askie commented Dec 14, 2018

<template wx:if="{{configData._comName == 'tuangou'}}" is="{{configData._comName}}" data="{{...(_comConfig['Dazhe_'+configData.data.item.value.item_id+'_']),comName:configData.trueName,_comConfig,device,moneyFuhao:moneyFuhao,pageStyle,store_id}}"></template>

应该是这句解析引起的

@dntzhang
Copy link
Collaborator

好。

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