mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-14 10:00:58 +08:00
16 lines
338 B
Vue
16 lines
338 B
Vue
<template>
|
|
<el-input
|
|
v-model="input"
|
|
style="width: 240px"
|
|
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>
|