Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into feat/react-devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen-jj committed Jul 19, 2021
2 parents 171e89b + 732b96a commit dbc313f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/taro-swan/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ export class Template extends RecursiveTemplate {
</picker-view-column>`
}

if (nodeName === 'video') {
const adComponent = this.miniComponents.ad

const attributesStr = Object.keys(adComponent)
.map(k => `${k}="${k.startsWith('bind') || k.startsWith('on') || k.startsWith('catch') ? adComponent[k] : `{{${adComponent[k].replace('i.', 'item.')}}}`}" `)
.join('')
return `<ad s-if={{item.nn==='ad'}} ${attributesStr} id="{{item.uid}}"></ad>
<template s-if={{item.nn!='ad'}} is="{{xs.e(0)}}" data="{{{ i:item }}}" />`
}

return child
}

Expand Down

0 comments on commit dbc313f

Please sign in to comment.