Created
May 17, 2018 07:25
-
-
Save zhangkn/c944bffe04fdaad8e30777203c1db83f to your computer and use it in GitHub Desktop.
import可以在该文件中使用目标文件定义的template,如:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
引用了 item.wxml,就可以使用item模板: | |
<import src="item.wxml"/> | |
<template is="item" data="{{text: 'forbar'}}"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
定义了一个叫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