Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js 如何在webgrid handsontable中基于select在列中显示数据_Vue.js_Handsontable_Webgrid - Fatal编程技术网

Vue.js 如何在webgrid handsontable中基于select在列中显示数据

Vue.js 如何在webgrid handsontable中基于select在列中显示数据,vue.js,handsontable,webgrid,Vue.js,Handsontable,Webgrid,如何基于select在列中显示数据?我已经看过文档,但它非常混乱,也许有些可以帮助 var setting={ data: [] , minSpareRows: 20, columns: [ {type: 'dropdown', numericFormat: {pattern: '000'}, validator: 'tps', source: myTps} {type: 'text', allowInvalid: true, editor:false} ], rowHeader

如何基于select在列中显示数据?我已经看过文档,但它非常混乱,也许有些可以帮助

var setting={
data: []
,
minSpareRows: 20,
columns: [
    {type: 'dropdown', numericFormat: {pattern: '000'}, validator: 'tps', source: myTps}
    {type: 'text', allowInvalid: true, editor:false}
],
rowHeaders: true,
colHeaders: ["id","NKK"],
filters: true,
dropdownMenu: false,
width: resizeGrid(),
height: 500,
maxRows: 300,
}

var myTps = [];

    function loadTps(data) {
        data.forEach(element => {
            myTps.push(element.tps_no)
        });
    }

    function getTps() {
        let url = '/dpdraft2/index/getTps';
        const my = this;
        var res = axios.get(url)
                    .then(function(response) {
                        loadTps(response.data)
                    })
                    .catch(error => console.log('error axios'));
    }