Vue.js 如何在webgrid handsontable中基于select在列中显示数据
如何基于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
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'));
}