props.js 899 B

12345678910111213141516171819202122232425262728293031323334
  1. import { defineProps } from '../../libs/util/props';
  2. export default defineProps('code', {
  3. // 倒计时总秒数
  4. seconds: {
  5. type: [String, Number],
  6. default: 60
  7. },
  8. // 尚未开始时提示
  9. startText: {
  10. type: String,
  11. default: () => uni.$u.$t('uCode.startText')
  12. },
  13. // 正在倒计时中的提示
  14. changeText: {
  15. type: String,
  16. default: () => uni.$u.$t('uCode.changeText')
  17. },
  18. // 倒计时结束时的提示
  19. endText: {
  20. type: String,
  21. default: () => uni.$u.$t('uCode.endText')
  22. },
  23. // 是否在H5刷新或各端返回再进入时继续倒计时
  24. keepRunning: {
  25. type: Boolean,
  26. default: false
  27. },
  28. // 为了区分多个页面,或者一个页面多个倒计时组件本地存储的继续倒计时变了
  29. uniqueKey: {
  30. type: String,
  31. default: ''
  32. }
  33. })