bottomCalcFormatterParams 在 Tabulator.js 中不起作用?

编程入门 行业动态 更新时间:2024-10-28 06:27:50
本文介绍了bottomCalcFormatterParams 在 Tabulator.js 中不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在使用底部自定义计算,所以 bottomCalcFormatterParams 可以用于

请注意,您必须单击行才能将其包含在自定义计算中.jsFiddle

解决方案

我找到了 Tabulator 解决方案.我在设置中缺少 bottomCalcFormatter:money",

所以这很好用

 bottomCalcFormatter:钱",底部CalcFormatterParams:{十进制:,",千:.",符号:€",符号后:p",精度:假,},

检查 jsFiddle

I am using bottom custom calculation so bottomCalcFormatterParams could be used regarding documentation

Here is the code I am using

  title: "Sum",
  field: "cena_m",
  width: 100,
  topCalc: "sum",
  bottomCalc: mysum,
  bottomCalcParams: {
    precision: 0
  },
  bottomCalcFormatterParams: {
    decimal: ",",
    thousand: ".",
    symbol: "€",
    symbolAfter: "p",
    precision: false,
  },      
  formatter: "money",
  formatterParams: {
    decimal: ",",
    thousand: ".",
    symbol: "€",
    symbolAfter: "p",
    precision: 0,
  },
  topCalcFormatter: "money",
  topCalcFormatterParams: {
    decimal: ",",
    thousand: ".",
    symbol: "$",
    symbolAfter: "p",
    precision: false,
  },
}

Please note, you have click to row to get it included in the custom calculation. jsFiddle

解决方案

I found a Tabulator solution. I was missing bottomCalcFormatter:"money", in settings

So this works nicely

  bottomCalcFormatter:"money",
  bottomCalcFormatterParams: {
    decimal: ",",
    thousand: ".",
    symbol: "€",
    symbolAfter: "p",
    precision: false,
  },  

Check jsFiddle

这篇关于bottomCalcFormatterParams 在 Tabulator.js 中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-05-01 10:44:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1408836.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中不   bottomCalcFormatterParams   Tabulator   js

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!