const number = 123456.789
console.log(
new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(
number
)
)
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 11
HBuilderX类型: 正式
HBuilderX版本号: 3.98
手机系统: Android
手机系统版本号: Android 12
手机厂商: 模拟器
手机机型: wsl
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
const number = 123456.789
console.log(
new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(
number
)
)
const number = 123456.789
console.log(
new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(
number
)
)
// expected output: "123.456,79 €"
16:59:08.027 [intlify] Cannot format a number value due to not supported Intl.NumberFormat.
vue3 i18n 9.x 格式化货币报错
0 个回复