remove toPersianDigits
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<script lang="ts" setup>
|
||||
import {usePrefix} from "@/utils/usePrefix";
|
||||
import {computed} from "vue";
|
||||
import {usePrice} from "@/components/BasicPacks/BasicPriceInput/src/utils/usePrice";
|
||||
import {usePrice} from "@/utils/usePrice";
|
||||
|
||||
//Props
|
||||
interface Prop {
|
||||
@@ -59,13 +59,14 @@ const addonTextColor = computed(() => props.addonTextColor)
|
||||
//emits
|
||||
const localValue = computed({
|
||||
set(value) {
|
||||
// console.log(value?.toString().replaceAll(',', ''))
|
||||
props.type === 'price' ? emits('update:value', value?.toString().replaceAll(',', '')) : emits('update:value', value)
|
||||
props.type === 'price'
|
||||
? emits('update:value', value?.toString().replaceAll(',', ''))
|
||||
: emits('update:value', value)
|
||||
},
|
||||
get() {
|
||||
let a = props.type === 'price' ? props.value ? usePrice(props.value as number, true, '').trim() : '' : props.value
|
||||
// console.log(props.value)
|
||||
return a
|
||||
return props.type === 'price'
|
||||
? props.value ? usePrice(props.value as number, true, '').trim() : ''
|
||||
: props.value
|
||||
},
|
||||
})
|
||||
|
||||
@@ -75,10 +76,12 @@ const props = withDefaults(defineProps<Prop>(), {
|
||||
const emits = defineEmits(['update:value', 'onchange'])
|
||||
|
||||
const handlerChange = (e: any) => {
|
||||
// emits('onchange', e.target.value)
|
||||
props.type === 'price' ? emits('update:value', e.target.value?.toString().replaceAll(',', '')) : emits('update:value', e.target.value)
|
||||
props.type === 'price' ? emits('onchange', e.target.value?.toString().replaceAll(',', '')) : emits('onchange', e.target.value)
|
||||
// console.log('sas')
|
||||
props.type === 'price'
|
||||
? emits('update:value', e.target.value?.toString().replaceAll(',', ''))
|
||||
: emits('update:value', e.target.value)
|
||||
props.type === 'price'
|
||||
? emits('onchange', e.target.value?.toString().replaceAll(',', ''))
|
||||
: emits('onchange', e.target.value)
|
||||
}
|
||||
|
||||
//css style
|
||||
|
||||
Reference in New Issue
Block a user