Apicloud鈥斺€擭VTabBarAnimation鎻掍欢
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Apicloud鈥斺€擭VTabBarAnimation鎻掍欢相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/badge' title='badge'>badge
play nes amp charset console fun body lse2018-12-20 11:50:05
搴曢儴鍒囨崲鍜岄《閮ㄥ浐瀹氥€€銆€
1 <!DOCTYPE html> 2 <html> 3 4 <head> 5 <meta charset="utf-8"> 6 <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" /> 7 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> 8 <title>杩涗欢绠$悊</title> 9 <link rel="stylesheet" type="text/css" href="../css/api.css" /> 10 <link rel="stylesheet" type="text/css" href="../css/style.css" /> 11 <link rel="stylesheet" type="text/css" href="../css/aui.css" /> 12 13 </head> 14 15 <body> 16 17 <header style="display:flex;flex-direction:column-reverse;" class="buy_car_wrap" id="header"> 18 <div style="width:100%;height:60px;display:flex;justify-content:space-around;align-items:center;"> 19 <div class="" onclick=""></div> 20 <div onclick="" id="div" style="height:100%;width:65%;display:flex;align-items:center;justify-content:center;">杩涗欢绠$悊</div> 21 <div></div> 22 </div> 23 </header> 24 25 26 </body> 27 28 <script type="text/javascript" src="../script/api.js"></script> 29 <script type="text/javascript" src="../script/jquery.min.js"></script> 30 <script type="text/javascript" src="../script/common.js"></script> 31 <script type="text/javascript"> 32 var NVTabBarAnimation; 33 apiready = function() { 34 NVTabBarAnimation = api.require("NVTabBarAnimation"); 35 36 37 38 NVTabBarAnimation.open({ 39 styles: { 40 bg: 鈥?fff鈥?span style="color: #000000">, 41 h: 58, 42 badge: { 43 bgColor: 鈥?f45815鈥?span style="color: #000000">, 44 numColor: 鈥?fff鈥?span style="color: #000000">, 45 size: 7.0 46 } 47 }, 48 items: [{ 49 w: api.winWidth / 3.0, 50 bg: { 51 marginB: 0, 52 image: 鈥榬gba(20,0,0,0)鈥?span style="color: #000000">, 53 }, 54 icon: { 55 normal: 鈥榳idget://image/footer/form.png鈥?span style="color: #000000">, 56 selected: 鈥榳idget://image/footer/form-blue.png鈥?span style="color: #000000">, 57 rect: { 58 w: 20.0, 59 h: 20.0, 60 x: 0, 61 y: 0, 62 }, 63 }, 64 title: { 65 text: 鈥樿繘浠剁鐞嗏€?span style="color: #000000">, 66 size: 14.0, 67 normal: 鈥?8a8a8a鈥?span style="color: #000000">, 68 selected: 鈥?1296db鈥?span style="color: #000000">, 69 marginB: 6.0, 70 //ttf: 鈥楢lkatip Basma Tom鈥?/span> 71 72 }, 73 rect: { 74 w: api.winWidth / 3.0, 75 x: 0, 76 y: 0, 77 }, 78 }, { 79 w: api.winWidth / 3.0, 80 bg: { 81 marginB: 0, 82 image: 鈥榬gba(0,0,0,0)鈥?span style="color: #000000">, 83 }, 84 icon: { 85 normal: 鈥榳idget://image/footer/manage-order.png鈥?span style="color: #000000">, 86 selected: 鈥榳idget://image/footer/manage-order-blue.png鈥?span style="color: #000000">, 87 rect: { 88 w: 20.0, 89 h: 20.0, 90 x: 0, 91 y: 0, 92 }, 93 }, 94 95 title: { 96 text: 鈥樿捶鍚庣鐞嗏€?span style="color: #000000">, 97 size: 14.0, 98 normal: 鈥?8a8a8a鈥?span style="color: #000000">, 99 selected: 鈥?1296db鈥?span style="color: #000000">, 100 marginB: 6.0, 101 //ttf: 鈥楢lkatip Basma Tom鈥?/span> 102 }, 103 rect: { 104 w: api.winWidth / 3.0, 105 x: 0, 106 y: 0, 107 }, 108 }, { 109 w: api.winWidth / 3.0, 110 bg: { 111 marginB: 0, 112 image: 鈥榬gba(0,0,0,0)鈥?span style="color: #000000">, 113 }, 114 icon: { 115 normal: 鈥榳idget://image/footer/bussiness-man.png鈥?span style="color: #000000">, 116 selected: 鈥榳idget://image/footer/bussiness-man-blue.png鈥?span style="color: #000000">, 117 rect: { 118 w: 20.0, 119 h: 20.0, 120 x: 0, 121 y: 0, 122 }, 123 }, 124 title: { 125 text: 鈥樹釜浜轰腑蹇冣€?span style="color: #000000">, 126 size: 14.0, 127 normal: 鈥?8a8a8a鈥?span style="color: #000000">, 128 selected: 鈥?1296db鈥?span style="color: #000000">, 129 marginB: 6.0, 130 //ttf: 鈥楢lkatip Basma Tom鈥?/span> 131 }, 132 rect: { 133 w: api.winWidth / 3.0, 134 x: 0, 135 y: 0, 136 }, 137 }], 138 selectedIndex: 0 139 }, function(ret, err) { 140 console.log(JSON.stringify(ret)); 141 if (ret && ret.eventType == "click" && ret.index == 0) { 142 //杩涗欢绠$悊 143 var header = $api.byId(鈥榟eader鈥?span style="color: #000000">); 144 var headerH = $api.offset(header).h; 145 $(鈥?div鈥?.html(鈥樿繘浠剁鐞嗏€?span style="color: #000000">); 146 147 api.openFrame({ 148 name: 鈥榯ab-stock鈥?span style="color: #000000">, 149 url: 鈥?/tab-stock.html鈥?span style="color: #000000">,//绗竴涓〉闈?index涓? 150 rect: { 151 x: 0, 152 y: headerH, 153 w: 鈥榓uto鈥?span style="color: #000000">, 154 h: api.frameHeight - headerH, 155 marginBottom:58 156 }, 157 pageParam: { 158 name: 鈥榯est鈥?159 }, 160 bgColor: 鈥榬gba(0,0,0,0)鈥?span style="color: #000000">, 161 // vScrollBarEnabled: true, 162 //hScrollBarEnabled: true 163 }); 164 165 }else if (ret && ret.eventType == "click" && ret.index == 1) { 166 //璐峰悗绠$悊 167 var header = $api.byId(鈥榟eader鈥?span style="color: #000000">); 168 var headerH = $api.offset(header).h; 169 $(鈥?div鈥?.html(鈥樿捶鍚庣鐞嗏€?span style="color: #000000">); 170 171 api.openFrame({ 172 name: 鈥榯ab-loan鈥?span style="color: #000000">, 173 url: 鈥?/tab-loan.html鈥?span style="color: #000000">,//绗簩涓〉闈?index涓? 174 rect: { 175 x: 0, 176 y: headerH, 177 w: 鈥榓uto鈥?span style="color: #000000">, 178 h: api.frameHeight - headerH, 179 marginBottom:58 180 }, 181 pageParam: { 182 name: 鈥榯est鈥?183 }, 184 bgColor: 鈥榬gba(0,0,0,0)鈥?span style="color: #000000">, 185 // vScrollBarEnabled: true, 186 //hScrollBarEnabled: true 187 }); 188 189 }else if (ret && ret.eventType == "click" && ret.index == 2) { 190 //涓汉涓績 191 var header = $api.byId(鈥榟eader鈥?span style="color: #000000">); 192 var headerH = $api.offset(header).h; 193 $(鈥?div鈥?.html(鈥樹釜浜轰腑蹇冣€?span style="color: #000000">); 194 195 api.openFrame({ 196 name: 鈥榯ab-min鈥?span style="color: #000000">, 197 url: 鈥?/tab-min.html鈥?span style="color: #000000">,//绗笁涓〉闈?index涓? 198 rect: { 199 x: 0, 200 y: headerH, 201 w: 鈥榓uto鈥?span style="color: #000000">, 202 h: api.frameHeight - headerH, 203 marginBottom:58 204 }, 205 pageParam: { 206 name: 鈥榯est鈥?207 }, 208 bgColor: 鈥榬gba(0,0,0,0)鈥?span style="color: #000000">, 209 // vScrollBarEnabled: true, 210 //hScrollBarEnabled: true 211 }); 212 213 } 214 }); 215 } 216 217 218 </script> 219 220 </html>
以上是关于Apicloud鈥斺€擭VTabBarAnimation鎻掍欢的主要内容,如果未能解决你的问题,请参考以下文章