3.0.0 • Published 4 months ago
fxycurrencyformat v3.0.0
安装
npm i fxycurrencyformat
import fxycurrencyformat from 'fxycurrencyformat'
Vue.use(fxycurrencyformat)
使用
<el-input ref="payableFee" v-model="orderForm" v-currency="$CurrencyInput.returnConfig(币种类型0是人民,1是美元)"></el-input>
- 使用: 清除数据参数为元素的ref对象
this.$nextTick(()=>{
this.$CurrencyInput.clearableValue(this.$refs.receivableFee)
this.$CurrencyInput.clearableValue(this.$refs.payableFee)
})
- 更新数据参数为元素ref对象以及更新的数值
this.$nextTick(()=>{
this.$CurrencyInput.updateValue(this.$refs.receivableFee,value)
this.$CurrencyInput.updateValue(this.$refs.payableFee,value)
})
- 国际货币转换数值参数为string,及币种类型
Xxx=this.$CurrencyInput.formattedValue(this.receivableFee,this.currencyType);