WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2021-11-09 0a9c34f2da201da0358bf149e475519c82553fc8
扫码组件,允许由业务层转App层来完成
1 files modified
12 ■■■■■ changed files
forms/input/CInputScanCode.vue 12 ●●●●● patch | view | raw | blame | history
forms/input/CInputScanCode.vue
@@ -52,6 +52,8 @@
        itemRes: Object,
        // 占位提示
        placeholder: String,
        // 由业务层调用app
        onScaning: Function,
    },
    data() {
        return {
@@ -96,10 +98,12 @@
                    },
                });
            } else if (type === 'app') {
                // TODO:扫码
                setTimeout(() => {
                    this.scaning = false;
                }, 1000);
                if (this.onScaning) {
                    this.onScaning(res => {
                        this.scaning = false;
                        this.itemRes.onChange(res.result);
                    });
                }
            }
        },
    },