|
[开发工具]
应用UIChatBox模块,按钮不显示图片样式
[复制链接]
引用了官方案列,比如
btns: [{
title: '图片',
normalImg: 'widget://res/img/chatBox_album1.png',
activeImg: 'widget://res/img/chatBox_album2.png'
}, {
title: '拍照',
normalImg: 'widget://res/img/chatBox_cam1.png',
activeImg: 'widget://res/img/chatBox_cam2.png'
}]
图片和拍照没有图片样式,一片空白,上面的路径在studio2中没有,这个必须在线编译下载到手机才能看到吗?不能调试的时候看到吗,或者说可以自定义图片路径?
在引用表情的时候为啥用 widget:// 开头才行,这是什么意思?
var UIChatBox = api.require('UIChatBox');
UIChatBox.open({
placeholder: '',
maxRows: 4,
emotionPath: 'widget://image/emotion',
texts: {
recordBtn: {
normalTitle: '按住说话',
activeTitle: '松开结束'
},
sendBtn: {
title: '发送'
}
},
styles: {
inputBar: {
borderColor: '#d9d9d9',
bgColor: '#f2f2f2'
},
inputBox: {
borderColor: '#B3B3B3',
bgColor: '#FFFFFF'
},
emotionBtn: {
normalImg: 'widget://res/img/chatBox_face1.png'
},
extrasBtn: {
normalImg: 'widget://res/img/chatBox_add1.png'
},
keyboardBtn: {
normalImg: 'widget://res/img/chatBox_key1.png'
},
speechBtn: {
normalImg: 'widget://res/img/chatBox_key1.png'
},
recordBtn: {
normalBg: '#c4c4c4',
activeBg: '#999999',
color: '#000',
size: 14
},
indicator: {
target: 'both',
color: '#c4c4c4',
activeColor: '#9e9e9e'
},
sendBtn: {
titleColor: '#4cc518',
bg: '#999999',
activeBg: '#46a91e',
titleSize: 14
}
},
extras: {
titleSize: 10,
titleColor: '#a3a3a3',
btns: [{
title: '图片',
normalImg: 'widget://res/img/chatBox_album1.png',
activeImg: 'widget://res/img/chatBox_album2.png'
}, {
title: '拍照',
normalImg: 'widget://res/img/chatBox_cam1.png',
activeImg: 'widget://res/img/chatBox_cam2.png'
}]
}
|
|