props.js 916 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { defineProps } from '../../libs/util/props';
  2. import theme from '../../libs/config/theme.js'
  3. export default defineProps('link', {
  4. // 文字颜色
  5. color: {
  6. type: String,
  7. default: theme.primary
  8. },
  9. // 字体大小,单位px
  10. fontSize: {
  11. type: [String, Number],
  12. default: 15
  13. },
  14. // 是否显示下划线
  15. underLine: {
  16. type: Boolean,
  17. default: false
  18. },
  19. // 要跳转的链接
  20. href: {
  21. type: String,
  22. default: ''
  23. },
  24. // 小程序中复制到粘贴板的提示语
  25. mpTips: {
  26. type: String,
  27. default: () => uni.$u.$t('uLink.mpTips')
  28. },
  29. // 下划线颜色
  30. lineColor: {
  31. type: String,
  32. default: ''
  33. },
  34. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  35. text: {
  36. type: [String, null],
  37. default: ''
  38. }
  39. })