Step 12: Shell Control as Container && Step 13:Margins and Paddings 使用CSS类对页面美化

一、基本概念

Shell 控件作为应用程序的主要容器。这是一个比较旧但功能强大的布局控件,用于创建企业级应用程序的壳(Shell)结构。

二、练习

相同操作,先新建文件夹12,复制上一步骤UI5_Walkthrough_Step 11: Pages and Panels

内容到12文件夹

2.1 App.view.xml

XML 复制代码
<mvc:View
   controllerName="sap.ui5.walkthrough.controller.App"
	xmlns="sap.m"
	xmlns:mvc="sap.ui.core.mvc" 
   displayBlock="true">
 <Shell>
      <App>
         <pages>
            <Page title="{i18n>homePageTitle}">
               <content>
                  <Panel
                     headerText="{i18n>panelTitle1}">
                     <content>
                        <Button
                        text="{i18n>ButtonText}"
                        press="onPress"
                        class="sapUiSmallMarginEnd"/>
                        <Input 
                        id="input2"
                        value="{/recipient/name}"
                        valueLiveUpdate="true"
                        width="60%"/>
                        <Text
                        text="{i18n>textDesc} {/recipient/name}"                       
                        class="sapUiSmallMargin"/>
                     </content>
                  </Panel>
               </content>
            </Page>
         </pages>
      </App>
   </Shell>
</mvc:View>

与Step_11相比,

2.1.1 新增了根标签 <Shell>

2.2.2 Button标签新增class="sapUiSmallMarginEnd",的主要作用是在元素的右侧(结束方向)添加一个标准的小间距。

2.2.3 Input标签去掉了 description属性,

2.2.4新增Text标签显示内容即上一练习中的 description,且新增 class="sapUiSmallMargin"

作用是文本框四方添加统一的小间距。

2.2 运行结果

相关推荐
gis分享者5 小时前
Shell 脚本中如何使用 here document 实现多行文本输入? (中等)
shell·脚本·document·多行·文本输入·here
柏木乃一6 小时前
基础IO(上)
linux·服务器·c语言·c++·shell
angushine21 小时前
CPU脚本并远程部署
shell
赵民勇6 天前
Linux/Unix中install命令全面用法解析
linux·shell
gis分享者6 天前
Shell 脚本中如何使用 trap 命令捕捉和处理信号(中等)
shell·脚本·信号·处理·trap·捕捉
IT 乔峰7 天前
脚本部署MHA集群
linux·shell
牛奶咖啡139 天前
shell脚本编程(一)
linux·shell·shell脚本·shell脚本解析·grep命令语法·grep选项详解·正则表达式解析
gis分享者11 天前
请解释 Shell 脚本中的重定向(redirection)操作及其用途(中等)
shell·脚本·重定向·操作·用途·redirection
我是koten11 天前
K8s启动pod失败,日志报非法的Jar包排查思路(Invalid or corrupt jarfile /app/xxxx,jar)
java·docker·容器·kubernetes·bash·jar·shell
Huazzi.13 天前
PowerShell 配置以及使用指南
windows·git·编辑器·shell·powershell·效率