表单扫一扫填入列表控件,每扫一次增加一行

41 阅读1分钟

this.$nextTick(() => {
  let foundW = this.getWidgetRef('d7')
  const htDiv = foundW.$el.firstChild.lastChild.lastElementChild
  htDiv.addEventListener('click', () => {
    this.yxt.scanQRCode({
      success:(res)=>{
        this.getWidgetRef('list_1').widget.widgetList[0].options.defaultValue = res.data
        this.getWidgetRef('list_1').addSubFormRow()
        this.getWidgetRef('list_1').widget.widgetList[0].options.defaultValue = ''
      }
    })
  });
});