【问题标题】:How to display data in column based on select in webgrid handsontable如何在 webgrid handsontable 中基于 select 显示列中的数据
【发布时间】:2020-06-17 15:37:03
【问题描述】:

如何根据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,

}

【问题讨论】:

    标签: vue.js handsontable webgrid


    【解决方案1】:
    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'));
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-01
      • 2012-09-14
      • 2018-01-03
      • 2016-06-13
      相关资源
      最近更新 更多