0

当我在 Zebble 文档网站上阅读下面的代码时,我创建了一个新的空白页面,但我需要将它用于我的所有页面,并且我不想在我的所有页面上重复该设计。当我尝试构建我的项目时,会出现如下错误:

<z-Component z-type="Page1" z-base="Page" z-namespace="UI.Pages"
z-partial="true" Title="Page 1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./../.zebble-schema.xml">

  <Stack Id="Header" Direction="Horizontal">
     <Button  Text="MyToogleMenuBtn" />
     <TextView Text="MyPageTitle" />
     <Button Text="AddBtn" />
  </Stack>
  <Stack Id="Body">

  </Stack>
  <Stack Id="Footer">
     <Button Id="ConfirmBtn"  />
  </Stack>

/z-Component>

错误是:

错误截图

但我不知道应该在哪里添加 title 属性。

4

1 回答 1

0

要将此页面用作其他页面的模板,您只需将其指定为z-base

<z-Component z-type="MyChildPage" z-base="MyTemplate" ...

至于错误,您应该删除,因为当前页面Title="Page 1"中没有属性Title

于 2017-05-11T16:50:17.327 回答