帖子
帖子
用户
博客
课程
显示全部楼层
7
帖子
0
勋章
14
Y币

[插件使用] UIchatBox中的sendBtn参数问题

[复制链接]
发表于 2018-3-23 14:33:59
想给sendBtn这个发送按钮添加JS方法 请问要怎么写
380
帖子
4
勋章
6
Y币
  1. var UIChatBox = api.require('UIChatBox');
  2. UIChatBox.open({
  3.     placeholder: '',
  4.     maxRows: 4,
  5.     emotionPath: 'widget://res/img/emotion',
  6.     texts: {
  7.         recordBtn: {
  8.             normalTitle: '按住说话',
  9.             activeTitle: '松开结束'
  10.         },
  11.         sendBtn: {
  12.             title: 'send'
  13.         }
  14.     },
  15.     styles: {
  16.         inputBar: {
  17.             borderColor: '#d9d9d9',
  18.             bgColor: '#f2f2f2'
  19.         },
  20.         inputBox: {
  21.             borderColor: '#B3B3B3',
  22.             bgColor: '#FFFFFF'
  23.         },
  24.         emotionBtn: {
  25.             normalImg: 'widget://res/img/chatBox_face1.png'
  26.         },
  27.         extrasBtn: {
  28.             normalImg: 'widget://res/img/chatBox_add1.png'
  29.         },
  30.         keyboardBtn: {
  31.             normalImg: 'widget://res/img/chatBox_key1.png'
  32.         },
  33.         speechBtn: {
  34.             normalImg: 'widget://res/img/chatBox_key1.png'
  35.         },
  36.         recordBtn: {
  37.             normalBg: '#c4c4c4',
  38.             activeBg: '#999999',
  39.             color: '#000',
  40.             size: 14
  41.         },
  42.         indicator: {
  43.             target: 'both',
  44.             color: '#c4c4c4',
  45.             activeColor: '#9e9e9e'
  46.         },
  47.         sendBtn: {
  48.             titleColor: '#4cc518',
  49.             bg: '#999999',
  50.             activeBg: '#46a91e',
  51.             titleSize: 14
  52.         }
  53.     },
  54.     extras: {
  55.         titleSize: 10,
  56.         titleColor: '#a3a3a3',
  57.         btns: [{
  58.             title: '图片',
  59.             normalImg: 'widget://res/img/chatBox_album1.png',
  60.             activeImg: 'widget://res/img/chatBox_album2.png'
  61.         }, {
  62.             title: '拍照',
  63.             normalImg: 'widget://res/img/chatBox_cam1.png',
  64.             activeImg: 'widget://res/img/chatBox_cam2.png'
  65.         }]
  66.     }
  67. }, function(ret, err) {
  68.     if (ret.eventType == "send") {
  69. // 点击后事件
  70.     } else {
  71.         alert(JSON.stringify(err));
  72.     }
  73. });
复制代码


7
帖子
0
勋章
14
Y币

大佬 我想问一下 怎么样才能下次让输出的的文字 不替换掉上次的输出文字
您需要登录后才可以回帖 登录

本版积分规则