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分享者2 天前
Bash 中如何使用正则表达式进行文本处理?(中等)
正则表达式·bash·shell·文本·处理
gis分享者3 天前
请编写一个 Bash 脚本检查系统中的所有服务状态(中等)
bash·shell·服务·状态·检查·所有
_OP_CHEN3 天前
【Linux系统编程】(十七)揭秘 Linux 进程创建与终止:从 fork 到 exit 的底层逻辑全解析
linux·运维·服务器·操作系统·shell·进程·进程创建与终止
pr_note4 天前
via ladder
shell·tcl
import_random7 天前
[macos系统]我用的是苹果电脑, 终端的shell是zsh,而不是bash, 那我在执行.sh文件的时候, 是bash xxx.sh还是zsh xxx.sh
shell
gis分享者7 天前
如何在 Shell 脚本中如何使用条件判断语句?(中等)
面试·shell·脚本·语法·使用·判断·条件
zfj3218 天前
sshd除了远程shell外还有哪些功能
linux·ssh·sftp·shell
刘某的Cloud9 天前
shell脚本-read-输入
linux·运维·bash·shell·read
柏木乃一10 天前
进程(2)进程概念与基本操作
linux·服务器·开发语言·性能优化·shell·进程
pr_note10 天前
Vim 常用快捷键速查
shell·tcl