SAP UI5学习记录20190415

1.设定图片Logo

            // 设定图片LOGO第一种方式
            // var oImage = new sap.m.Image();
            // oImage.setSrc("http://localhost:63343/ZFiroi01/webapp/img/UIP01.jpg");
            // oImage.setDecorative(false);
            // oImage.setAlt("SAPUI5 Logo");
            // oImage.placeAt("content");

            // // 设定图片LOGO第二种方式
            // var oImage = new sap.m.Image({
            //     src:"http://localhost:63343/ZFiroi01/webapp/img/UIP01.jpg",
            //     decorative:false,
            //     alt:"SAPUI5 Logo"
            // }).placeAt("content");

2.图片点击事件

            // 图片点击事件第一种方法作为单独事件绑定
            // oImage.ontap = function (oEvent) {
            //     alert("hello ui5 world!");
            // };
            // 图片点击事件第二种方法作为属性绑定
            // var onPressImage = function (oEvent) {
            //     alert("hello ui5!");
            // };
            // var  oImage2 = new sap.m.Image({
            //     src:"http://localhost:63343/ZFiroi01/webapp/img/UIP02.jpg",
            //     decorative:false,
            //     alt:"picture",
            //     press:onPressImage  }).placeAt("content");

3.Label标签以及radiobutton事件

            // Label标签加radiobutton第一种方法
            // var oLabel = new sap.m.Label("rbgLabel",{
            //     text:"which logo do you like better?",
            // }).placeAt("content2");
            //
            // var oRadioButton = new sap.m.RadioButton({
            //     text:"Left Logo"
            // });
            //
            // var oRadioButton2 = new sap.m.RadioButton({
            //     text:"Right Logo"
            // });

            // var oRadioButtonGroup = new sap.m.RadioButtonGroup({
            //     column:2,
            //     ariaLabelledBy: oLabel
            // });
            // oRadioButtonGroup.addButton(oRadioButton);
            // oRadioButtonGroup.addButton(oRadioButton2);
            // oRadioButtonGroup.placeAt("content3");
            // Label标签加radiobutton第二种方法
            // new sap.m.Label("rbg2Label",{
            //     text:"do you speak javascript?"
            // }).placeAt("content4");
            //
            // new sap.m.RadioButtonGroup({
            //     columns:2,
            //     buttons:[
            //         new sap.m.RadioButton({
            //             text:"yes"
            //         }),
            //         new sap.m.RadioButton({
            //             text:"no"
            //         }),
            //     ],
            //     ariaLabelledBy:"rbg2Label"
            // }).placeAt("content5");

4.使用LAYOUT样式,添加控件

            // 使用layout追加控件样式
            // var oImage = new sap.m.Image({
            //     src:"uu",decorative:false,alt:"sapui5 logo"
            // });
            //
            // oImage.ontap = function (oEvent) {
            //     alert("hello ui5 world");
            // };
            //
            // var onPressImage = function (oEvent) {
            //     alert("hello ui5");
            // };
            // var oImage2 = new sap.m.Image({
            //     src:"dd",decorative:false,alt:"sapui5 logo2",press:onPressImage
            // });
            //
            // var oLabel = new sap.m.Label("rbgLabel",{
            //     text:"which logo do you like better?"
            // });
            //
            // var oRadioButton = new sap.m.RadioButton({text:"left logo"});
            // var oRadioButton2 = new sap.m.RadioButton({text:"right logo"});
            // var oRadioButtonGroup = new sap.m.RadioButtonGroup({
            //     columns:2,
            //     ariaLabelledBy: oLabel
            // });
            // oRadioButtonGroup.addButton(oRadioButton);
            // oRadioButtonGroup.addButton(oRadioButton2);
            // var oLabel2 = new sap.m.Label("rabg2Label",{
            //     text:"do you speak javascript?"
            // });
            // var oRadioButtonGroup2 = new sap.m.RadioButtonGroup({
            //     columns:2,
            //     buttons:[
            //         new sap.m.RadioButton({text:"yes"}),
            //         new sap.m.RadioButton({text:"no"}),
            //     ],
            //     ariaLabelledBy:"rbg2Label"
            // });
            // new sap.ui.layout.VerticalLayout({
            //     content:[oImage,oImage2,oLabel,oRadioButtonGroup,oLabel2,oRadioButtonGroup2]
            // }).placeAt("content");

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

随记随心

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值