Skip to content

Commit

Permalink
Merge pull request #192 from airbnb/fix-baidu-flatten-text-template
Browse files Browse the repository at this point in the history
Fix an issue of Baidu flatten text template that cause missing text on production mode
  • Loading branch information
malash authored Feb 15, 2023
2 parents c7bc52e + 10a5266 commit 2e0ec90
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ export const FlattenText = () => {
return t`
<text wx:elif="{{${ids.meta}.${ids.type} === 'text'}}" data-goji-id="{{${ids.meta}.${ids.gojiId} || -1}}" id="{{${ids.meta}.${ids.props}.id}}" class="{{${ids.meta}.${ids.props}.className}}" style="{{${ids.meta}.${ids.props}.style || ''}}" selectable="{{${ids.meta}.${ids.props}.selectable}}" space="{{${ids.meta}.${ids.props}.space}}" decode="{{${ids.meta}.${ids.props}.decode}}" bindtouchstart="e" bindtouchmove="e" bindtouchcancel="e" bindtouchend="e" bindtap="e" bindlongpress="e" bindlongtap="e" bindtransitionend="e" bindanimationstart="e" bindanimationiteration="e" bindanimationend="e" bindtouchforcechange="e">
<block wx:for="{{${ids.meta}.${ids.children}}}" wx:key="${ids.gojiId}">
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.text}}</block>
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.${ids.text}}}</block>
<text wx:elif="item.${ids.type} === 'text'" data-goji-id="{{item.${ids.gojiId} || -1}}" id="{{${ids.meta}.${ids.props}.id}}" class="{{item.${ids.props}.className}}" style="{{item.${ids.props}.style || ''}}" selectable="{{item.${ids.props}.selectable}}" space="{{item.${ids.props}.space}}" decode="{{item.${ids.props}.decode}}" bindtouchstart="e" bindtouchmove="e" bindtouchcancel="e" bindtouchend="e" bindtap="e" bindlongpress="e" bindlongtap="e" bindtransitionend="e" bindanimationstart="e" bindanimationiteration="e" bindanimationend="e" bindtouchforcechange="e">
<block wx:for="{{item.${ids.children}}}" wx:key="${ids.gojiId}">
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.text}}</block>
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.${ids.text}}}</block>
<text wx:elif="item.${ids.type} === 'text'" data-goji-id="{{item.${ids.gojiId} || -1}}" id="{{${ids.meta}.${ids.props}.id}}" class="{{item.${ids.props}.className}}" style="{{item.${ids.props}.style || ''}}" selectable="{{item.${ids.props}.selectable}}" space="{{item.${ids.props}.space}}" decode="{{item.${ids.props}.decode}}" bindtouchstart="e" bindtouchmove="e" bindtouchcancel="e" bindtouchend="e" bindtap="e" bindlongpress="e" bindlongtap="e" bindtransitionend="e" bindanimationstart="e" bindanimationiteration="e" bindanimationend="e" bindtouchforcechange="e">
<block wx:for="{{item.${ids.children}}}" wx:key="${ids.gojiId}">
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.text}}</block>
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.${ids.text}}}</block>
<text wx:elif="item.${ids.type} === 'text'" data-goji-id="{{item.${ids.gojiId} || -1}}" id="{{${ids.meta}.${ids.props}.id}}" class="{{item.${ids.props}.className}}" style="{{item.${ids.props}.style || ''}}" selectable="{{item.${ids.props}.selectable}}" space="{{item.${ids.props}.space}}" decode="{{item.${ids.props}.decode}}" bindtouchstart="e" bindtouchmove="e" bindtouchcancel="e" bindtouchend="e" bindtap="e" bindlongpress="e" bindlongtap="e" bindtransitionend="e" bindanimationstart="e" bindanimationiteration="e" bindanimationend="e" bindtouchforcechange="e">
<block wx:for="{{item.${ids.children}}}" wx:key="${ids.gojiId}">
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.text}}</block>
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.${ids.text}}}</block>
<text wx:elif="item.${ids.type} === 'text'" data-goji-id="{{item.${ids.gojiId} || -1}}" id="{{${ids.meta}.${ids.props}.id}}" class="{{item.${ids.props}.className}}" style="{{item.${ids.props}.style || ''}}" selectable="{{item.${ids.props}.selectable}}" space="{{item.${ids.props}.space}}" decode="{{item.${ids.props}.decode}}" bindtouchstart="e" bindtouchmove="e" bindtouchcancel="e" bindtouchend="e" bindtap="e" bindlongpress="e" bindlongtap="e" bindtransitionend="e" bindanimationstart="e" bindanimationiteration="e" bindanimationend="e" bindtouchforcechange="e">
<block wx:for="{{item.${ids.children}}}" wx:key="${ids.gojiId}">
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.text}}</block>
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.${ids.text}}}</block>
<text wx:elif="item.${ids.type} === 'text'" data-goji-id="{{item.${ids.gojiId} || -1}}" id="{{${ids.meta}.${ids.props}.id}}" class="{{item.${ids.props}.className}}" style="{{item.${ids.props}.style || ''}}" selectable="{{item.${ids.props}.selectable}}" space="{{item.${ids.props}.space}}" decode="{{item.${ids.props}.decode}}" bindtouchstart="e" bindtouchmove="e" bindtouchcancel="e" bindtouchend="e" bindtap="e" bindlongpress="e" bindlongtap="e" bindtransitionend="e" bindanimationstart="e" bindanimationiteration="e" bindanimationend="e" bindtouchforcechange="e">
<block wx:for="{{item.${ids.children}}}" wx:key="${ids.gojiId}">
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.text}}</block>
<block wx:if="{{item.${ids.type} === 'GOJI_TYPE_TEXT'}}">{{item.${ids.text}}}</block>
<text wx:elif="item.${ids.type} === 'text'" data-goji-id="{{item.${ids.gojiId} || -1}}" id="{{${ids.meta}.${ids.props}.id}}" class="{{item.${ids.props}.className}}" style="{{item.${ids.props}.style || ''}}" selectable="{{item.${ids.props}.selectable}}" space="{{item.${ids.props}.space}}" decode="{{item.${ids.props}.decode}}" bindtouchstart="e" bindtouchmove="e" bindtouchcancel="e" bindtouchend="e" bindtap="e" bindlongpress="e" bindlongtap="e" bindtransitionend="e" bindanimationstart="e" bindanimationiteration="e" bindanimationend="e" bindtouchforcechange="e"></text>
</block>
</text>
Expand Down

0 comments on commit 2e0ec90

Please sign in to comment.