Skip to content

Instantly share code, notes, and snippets.

@zhangkn
Created May 17, 2018 07:25
Show Gist options
  • Save zhangkn/c944bffe04fdaad8e30777203c1db83f to your computer and use it in GitHub Desktop.
Save zhangkn/c944bffe04fdaad8e30777203c1db83f to your computer and use it in GitHub Desktop.
import可以在该文件中使用目标文件定义的template,如:
引用了 item.wxml,就可以使用item模板:
<import src="item.wxml"/>
<template is="item" data="{{text: 'forbar'}}"/>
定义了一个叫item的template:
<!-- item.wxml -->
<template name="item">
<text>{{text}}</text>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment