当前位置: 首页 > news >正文

[UI5 常用控件] 07.SplitApp,SplitContainer

文章目录

  • 前言
  • 1. SplitApp
    • 1.1 组件结构
    • 1.2 Demo
    • 1.3 mode属性
  • 2. SplitContainer


前言

本章节记录常用控件SplitApp,SplitContainer。主要功能是在左侧显示Master页面,右侧显示Detail页面。
Master页面和Detail页面可以由多个Page组成,并支持相互跳转。
其路径分别是:

  • sap.m.SplitApp
  • sap.m.SplitContainer

1. SplitApp

1.1 组件结构

SplitApp包含masterPages和detailPages,masterPages包含多个Page并且detailPages也包含多个Page。每个Page由id区分其路径。初始化时需要initialMaster和initialDetail两个属性中指定需要呈现的Page。

  • 示例
<SplitAppid="SplitAppDemo"initialMaster="master"initialDetail="detail"><masterPages><Page id="master"/><Page id="master2"/></masterPages><detailPages><Page id="detail"/><Page id="detail2"/></detailPages>
</SplitApp>

1.2 Demo

在这里插入图片描述

  • View
    <Pageid="page"title="{i18n>title}"><SplitAppid="SplitAppDemo"initialDetail="detail"initialMaster="master"><masterPages><Pageid="master"title="Master 1"backgroundDesign="List"><List><StandardListItemtitle="To Master2"type="Navigation"press=".onPressGoToMaster"/></List></Page><Pageid="master2"title="Master 2"backgroundDesign="List"showNavButton="true"navButtonPress=".onPressMasterBack"><List itemPress=".onListItemPress"><items><StandardListItemtitle="To Detail 1"type="Active"custom:to="detail"/><StandardListItemtitle="To Detail 2"type="Active"custom:to="detailDetail"/><StandardListItemtitle="To Detail 3"type="Active"custom:to="detail2"/></items></List></Page></masterPages><detailPages><Pageid="detail"title="Detail 1"backgroundDesign="Solid"><VBox><Label text="Detail page 1" /><Buttontext="Go to Detail page2"press=".onPressNavToDetail"/></VBox></Page><Pageid="detailDetail"title="Detail 2"backgroundDesign="Solid"showNavButton="true"navButtonPress=".onPressDetailBack"><VBox class="sapUiSmallMargin"><Text text="This is Detail Page2" /></VBox></Page><Pageid="detail2"title="Detail 3 Page"backgroundDesign="Solid"showNavButton="true"navButtonPress=".onPressDetailBack"><Label text="This is Detail Page3" /><Input /><Label text="Label 2" /><Input /><Label text="Label 3" /><Input /><Label text="Label 4" /><Input /><Label text="Label 5" /><Input /></Page></detailPages></SplitApp></Page>
  • Controller
    onInit: function () {this.oSplitApp = this.byId("SplitAppDemo");},onPressNavToDetail: function () {this.oSplitApp.to(this.createId("detailDetail"));},onPressDetailBack: function () {this.oSplitApp.backDetail();},onPressMasterBack: function () {this.oSplitApp.backMaster();},onPressGoToMaster: function () {this.oSplitApp.toMaster(this.createId("master2"));},onListItemPress: function (oEvent) {var sToPageId = oEvent.getParameter("listItem").getCustomData()[0].getValue();this.oSplitApp.toDetail(this.createId(sToPageId));}

1.3 mode属性

  • HideMode ( 不论屏幕大小,Master始终在左上角隐藏 )在这里插入图片描述

  • ShowHideMode(屏幕尺寸大时显示在左侧,尺寸小时隐藏在左上方)
    在这里插入图片描述

  • StretchCompressMode(始终在左侧显示)
    在这里插入图片描述

  • PopoverMode(小尺寸时以Popup形式显示)
    在这里插入图片描述


2. SplitContainer

上面提到的SplitApp是继承了SplitContainer。SplitContainer在其用法上和SplitApp是差不多的。

http://www.lryc.cn/news/297514.html

相关文章:

  • MyBatisPlus之分页查询及Service接口运用
  • 对象存储minio
  • 大模型学习笔记二:prompt工程
  • MATLAB实现LSTM时间序列预测
  • Kubernetes CNI Calico:Route Reflector 模式(RR) calico IPIP切换RR网络模式
  • 探索Gin框架:Golang Gin框架请求参数的获取
  • 极值图论基础
  • word导出链接
  • (delphi11最新学习资料) Object Pascal 学习笔记---第4章第2.5节(重载和模糊调用)
  • ElementUI Data:Table 表格
  • 11.2 OpenGL可编程顶点处理:细分着色器
  • 微软正在偷走你的浏览记录,Edge浏览器偷疯了
  • 什么是数据库软删除,什么场景下要用软删除?(go GORM硬删除)
  • 计算机设计大赛 深度学习+python+opencv实现动物识别 - 图像识别
  • 我主编的电子技术实验手册(02)——仪表与电源
  • C语言----内存函数
  • 【力扣】快乐数,哈希集合 + 快慢指针 + 数学
  • c实现顺序表
  • 微软为新闻编辑行业推出 AI 辅助项目,记者参加免费课程
  • openssl3.2 - exp - buffer to BIO
  • Android 13.0 系统framework修改低电量关机值为3%
  • 【EAI 013】BC-Z: Zero-Shot Task Generalization with Robotic Imitation Learning
  • 一文讲透ast.literal_eval() eval() json.loads()
  • 微软.NET6开发的C#特性——类、结构体和联合体
  • naiveui 上传图片遇到的坑 Upload
  • 安全之护网(HVV)、红蓝对抗
  • Leetcode 213 打家劫舍 II
  • 【C语言】三子棋游戏实现代码
  • docker常用10条容器操作命令
  • 《MySQL 简易速速上手小册》第2章:数据库设计最佳实践(2024 最新版)