定义的 template 如何在提其他页面中引用

发布于 6 年前作者 caowei2257 次浏览最后编辑 6 年前来自 ask

定义的  template 如何在提其他页面中引用,貌似我目前没有在 API文档中看到这方面的解释

A文件夹中的  main.wxml  定义,

B文件夹中的  index.wxml  中引用

4 回复
yinxia
yinxia1 楼6 年前

同意楼上

tao44
tao442 楼6 年前

好的我试试

zouqiang
zouqiang3 楼6 年前

<import src=‘a.wxml’>

<template is=‘A’/>

xfang
xfang4 楼4 年前

看文档里关于模块化的描述