VUE手写input组件

在写带有input的组件时,如果没有任何处理直接写的话,看似也是写出来了,但是在调用的时候,无法获取、绑定到input中的值,辛苦大半天,写了一个废物,然后处理之后是这个样子。

CellInput.vue 组件





然后做一个全局注册

import CellInput from "./CellInput.vue";
const components = {
    install: function (Vue) {
        Vue.component('CellInput', CellInput);
    }
}
export default components;

调用




                    
                    

你可能感兴趣的:(VUE手写input组件)