forked from opentiny/tiny-vue
32 lines
562 B
Vue
32 lines
562 B
Vue
<template>
|
|
<tiny-amount
|
|
v-model="value"
|
|
placeholder="请输入金额"
|
|
:fetch-currency="getCurrency"
|
|
:fields="{ textField: 'currency_code', valueField: 'symbol' }"
|
|
></tiny-amount>
|
|
</template>
|
|
|
|
<script>
|
|
import { Amount } from '@opentiny/vue'
|
|
|
|
export default {
|
|
components: {
|
|
TinyAmount: Amount
|
|
},
|
|
data() {
|
|
return {
|
|
value: ''
|
|
}
|
|
},
|
|
methods: {
|
|
getCurrency() {
|
|
return Promise.resolve([
|
|
{ symbol: '$', currency_code: 'MZN' },
|
|
{ symbol: null, currency_code: 'CNY' }
|
|
])
|
|
}
|
|
}
|
|
}
|
|
</script>
|