uni-app底部凸起实现
1、uni-app底部凸起实现(不支持小程序)
git中缺少一步转换为base64,可以参照第二个官方插件市场的
https://github.com/xiaotimo/uni-app-tabbar
2、官方插件市场(同样,只支持APP)
子页面隐藏凸起图标
https://ext.dcloud.net.cn/plugin?id=251
在线将图片转换为base64:
http://imgbase64.duoshitong.com/
XML/HTML Code复制内容到剪贴板
- <script>
- var bitmap = null;
- export default{
- onShow() {
- // #ifdef APP-PLUS
- var icon = plus.nativeObj.View.getViewById("icon");
- if (icon) {
- icon.show();
- }
- // #endif
- },
- onLoad(event) {
- // #ifdef APP-PLUS
- // 底部图标凸起,以下代码只会在5+App 环境下生效
- bitmap = new plus.nativeObj.Bitmap('bmp1');
- //ios需要将图片转为base64才能显示出来
- bitmap.loadBase64Data('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAABrCAYAAACffRcyAAAgAElEQVR4nN2de3hW1Znof+sLJJUEixU0FVACiSgqVYFWK4pPgc6Zx1QRT9U59jYeqSLYCwJqhx46c/AWAZvKSCr1jB6nM9oO6viM06mCj9ZLmQYwxqpFaIJibOqlogkygPnW+WPttb93vXvtL1G89bzPk+z97f2utd77etdl7234gKGyspK9e/e+H1VVADVANTAEOAD4BFAFVAKDE5xCgl8E+oB9wF5gD/BfwG7gbWAX0Jvg7Be8jzzmwqAPtPb9gypgWPJ34CmnnDJ+7ty5x0+YMKHhkEMOGVVTUzO8qqpq6KBBgw4oFAqDCoVCBWBUHbZYLPYVi8V33nnnnd179uzp6e3tfe2VV1556dlnn926evXqtscff3wL8BawM/nb86Fy+XGBysrKd4NeDRwOnDBv3rzLnnjiiTu7u7uf3r1795+KxeI79n2GYrH4zu7du//U3d399BNPPHHnvHnzLgNOSGio/oB4/HjCAJgYDIwEjl+xYsXSLVu2PNTb29v9QShmIIrr7e3t3rJly0MrVqxYChyf0DZ4P3n8+EMZJmqAcY2NjX/d1tZ2X09PT1exWOz7sJWTB8Visa+np6erra3tvsbGxr8GxiU0vxse/3wgwsRQY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AReNi6rVm/MdCHo70a+DJwKe7lvAOBdmD15AW0pAYk2s48pC1pCw09CgNSVGyFNm1QNKbxWldyEnAR8D/L8xjAm8C/AncB66YsYK9gbLCFY4zlOOBoYAyGI3DvuzsYp0Q/jnkbp4zXcY+3vABsx/AclqeBZyzs8/S3rqQSt+HkXFwWlzdHF4NbgZ9MWcCGsrE3ATkBrXHfu0ftJ7SuxADfAL5OfFm/HPTi5szW4aZlfjtlAX37TxW0rqQCt3nnVJyC8h59KQeP4FbBb5uyoD/1DJiuKJRV1PsMhwMXAP+D+O6mgUAvbqdOO+5FuZ24FPj15G8PpXeHVwNVOE87GDf3VofbWDIxoeG9vh3wt7hl9Z+S//qH9xU+TEV5OAYX//97cv7nBM/g9t39nJzdQh8UfBSK8jAeODP5m/pRETFAeAy3e/U+IpsjPwz4KBXl4ZPAX+LGJzOBUR8tOSm8hHv05QFcVvhmefQPFj4OipJwJC7hOA33OH+56ZkPAjpxj2P+CpcoPF8e/cODj5uiJNTixjCTgBNwCcCY97mN7bjE5Enc0+et5L9t7SOFj7OiNFTj+rV63PdEDsd9BaEWl9UNo5TpQSkD3InLCLtxb1J7Eff+p224/ib2hZmPHfw/V3yCi0SxZQ4AAAAASUVORK5CYII=', function() {}, function(e) {});
- this.createtab();
- // #endif
- },
- methods:{
- createtab: function(){
- // 设置水平居中位置
- var leftPos = Math.ceil((plus.screen.resolutionWidth - 60) / 2);
- var view = new plus.nativeObj.View('icon', {
- bottom: '19px',
- left: leftPos + 'px',
- width: '60px',
- height: '60px'
- });
- view.drawBitmap(bitmap, {
- tag: 'font',
- id: 'icon',
- src: '/static/app-tabber/app-tabber.png',
- position: {
- top: '0px',
- left: '5px',
- width: '50px',
- height: '100%'
- }
- });
- // 凸起按钮点击事件,可以加弹出层
- view.addEventListener("click", function(e) {
- uni.switchTab({
- url: '/pages/shortcut/shortcut'
- })
- }, false);
- view.show();
- },
- }
- }
- </script>
上一篇 flex 常用写法