簡體   English   中英

歐元格式kendo網格列Angular JS

[英]Euro format kendo grid column Angular JS

我在劍道中有一個金額列,該列以美元格式顯示,相應的列詳細信息為

{
  field: 'INVOICE_AMOUNT_ORIGINAL',
  title: $translate.instant('invoiceAmount'),
  format: '{0:n}',
  headerTemplate: '{{ \'invAmount\' | translate }}',
  attributes: {
    style: 'text-align: right;'
  },
  width: 115
},

我現在希望將此格式更改為歐元格式,從kendo紀錄片中讀取后,我在上面的代碼中嘗試使用以下格式:'{0:c}',但是它在前面給出了美元符號,我該如何轉換格式為歐元。 我不希望任何轉換,而只是從美元到歐元的格式

我認為您必須像這樣定義貨幣:

---
[format]="{ style: 'currency', currency: 'EUR' }",
---

另一個解決方案可能是這種方法:

 ---
 format: '{0:c3}', // converts to euro (according to the site)
 ---

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM