xm-money-input-render.vue 544 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <a-input-number
  3. v-bind="$attrs"
  4. :formatter="(value) => `¥${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
  5. :parser="(value) => value.replace(/¥\s?|(,*)/g, '')"
  6. @change="(value) => $emit('input', value)"
  7. v-on="$listeners"
  8. />
  9. </template>
  10. <script>
  11. import components from './_import-components/xm-money-input-render-import'
  12. export default {
  13. name: 'XmMoneyInputRender',
  14. components,
  15. data() {
  16. return {}
  17. },
  18. methods: {},
  19. }
  20. </script>
  21. <style module lang="scss">
  22. @use '@/common/design' as *;
  23. </style>