JS:错误错误:未捕获(承诺中):错误:无效值:文本JS:错误:无效值:文本

时间:2018-06-22 10:32:29

标签: angular nativescript text-alignment

我用

编写此代码
  

JS:错误错误:未捕获(按承诺):错误:无效值:文本JS:   错误:值无效:文本

<ActionBar title="All cocktails"></ActionBar>
    <GridLayout rows="*,60">
        <ScrollView row="0">
            <WrapLayout orientation="horizontal">
            </WrapLayout>
        </ScrollView>
        <StackLayout row="1" orientation="horizontal">
            <Button textWrap="true" width="25%" textAlignment="text">
                <FormattedString>
                    <Span text="&#xf015;\n" fontFamily="FontAwesome"></Span>
                    <Span text="Home"></Span>
                </FormattedString>
            </Button>
            <Button textWrap="true" width="25%" textAlignment="text">
                <FormattedString>
                    <Span text="&#xf000;\n" fontFamily="FontAwesome"></Span>
                    <Span text="All Cocktails"></Span>
                </FormattedString>
            </Button>
            <Button textWrap="true" width="25%" textAlignment="text">
                <FormattedString>
                    <Span text="&#xf005;\n" fontFamily="FontAwesome"></Span>
                    <Span text="Favorite"></Span>
                </FormattedString>
            </Button>
            <Button textWrap="true" width="25%" textAlignment="text">
                <FormattedString>
                    <Span text="&#xf007;\n" fontFamily="FontAwesome"></Span>
                    <Span text="Profile"></Span>
                </FormattedString>
            </Button>
        </StackLayout>
    </GridLayout>

当我删除textAlignment="text"时,错误也随之删除,但是模板中未显示图标text="&#xf007;\n"。拜托,您能建议我如何解决这个问题吗?

Thnx

0 个答案:

没有答案