mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 01:11:25 +08:00
14 lines
312 B
Vue
14 lines
312 B
Vue
|
<template>
|
||
|
<el-input
|
||
|
v-model="input"
|
||
|
placeholder="Please input"
|
||
|
:formatter="(value) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
|
||
|
:parser="(value) => value.replace(/\$\s?|(,*)/g, '')"
|
||
|
/>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts" setup>
|
||
|
import { ref } from 'vue'
|
||
|
const input = ref('')
|
||
|
</script>
|