xm-phone-input.vue 659 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <xm-verify-input
  3. v-model="component.attr.defaultValue"
  4. :regex="/^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/"
  5. />
  6. </template>
  7. <script>
  8. import components from './_import-components/xm-phone-input-import'
  9. export const metaInfo = {
  10. caption: '电话',
  11. component: 'a-input',
  12. icon: 'phone',
  13. order: 200,
  14. }
  15. export const fieldProps = {
  16. dataType: 'string',
  17. attr: {
  18. regex: `^(\\(\\d{3,4}\\)|\\d{3,4}-|\\s)?\\d{7,14}$`,
  19. regexMessage: '格式有误',
  20. },
  21. }
  22. export default {
  23. name: 'XmPhoneInput',
  24. components,
  25. data() {
  26. return {}
  27. },
  28. methods: {},
  29. }
  30. </script>
  31. <style module lang="scss">
  32. @use '@/common/design' as *;
  33. </style>