Add currency auto transform (#83)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
3f16b60071
commit
c83b4fcc9f
21 files changed
+245
-22
No files matched your search
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div class="price-text">
|
||||
<span v-if="price > 0" class="unfree"
|
||||
>${{ price }} {{ unit ? ` / ${unit}` : '' }}{{ start ? $t('common.message.startPrice') : '' }}
|
||||
>{{ getPriceString({ value: price }) }} {{ unit ? ` / ${unit}` : ''
|
||||
}}{{ start ? $t('common.message.startPrice') : '' }}
|
||||
</span>
|
||||
<span v-else class="free">
|
||||
{{ $t('common.message.free') }}
|
||||
@@ -11,6 +12,8 @@
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
import { getPriceString } from '@/utils';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ApiPrice',
|
||||
props: {
|
||||
@@ -29,6 +32,9 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getPriceString
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user