汪阿浠
汪阿浠
  • 发布:2017-06-28 13:53
  • 更新:2017-06-28 14:30
  • 阅读:1075

view控件如何更新?

分类:HTML5+
var drawNativeIcon = drawNative('tabIcon', {  
				bottom: '7px',  
				left: leftPos + 2 + 'px',  
				width: '58px',  
				height: '58px',  
				position: 'dock' //此种停靠方式表明该控件应浮在窗口最上层,以免被其他窗口遮住  
			}, [{  
				tag: 'rect',  
				id: 'iconBg',  
				position: {  
					top: '0px',  
					left: '0px',  
					width: '58px',  
					height: '100%'  
				},  
				rectStyles: {  
					color: '#26A2FF', //#26A2FF,#D1D1D1  
					size: '58px',  
					radius: '100%'  
				}  
			}, {  
				tag: 'font',  
				id: 'icon',  
				text: '\ue603', //此为字体图标Unicode码'\e600'转换为'\ue600'  
				position: {  
					top: '0px',  
					left: '0px',  
					width: '58px',  
					height: '100%'  
				},  
				textStyles: {  
					fontSrc: 'fonts/iconfont.ttf',  
					align: 'center',  
					color: '#fff',  
					size: '30px'  
				}  
			}]);

请问如上的代码,如何用updateSubNViews来更新?

2017-06-28 13:53 负责人:无 分享
已邀请:
我是大笨蛋

我是大笨蛋

我也母鸡啊

Trust

Trust - 少说废话

根据View的id,以及tag的id,进行update。

var views = [{  
	id: 'nativeView的id',  
	tags: [{  
		id: 'tag的id'  
	}]  
}];  
  
var webview = plus.webview.currentWebview();  
webview.updateSubNViews(views );
  • 汪阿浠 (作者)

    解决了 ,谢谢!


    2017-06-28 14:12

  • 枫桥居APP

    如果要画一个图文tabbar怎么画呢?还有未读消息数量(就是小红点)


    2017-06-28 14:19

该问题目前已经被锁定, 无法添加新回复