u--text.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <uvText
  3. :type="type"
  4. :show="show"
  5. :text="text"
  6. :prefixIcon="prefixIcon"
  7. :suffixIcon="suffixIcon"
  8. :mode="mode"
  9. :href="href"
  10. :format="format"
  11. :call="call"
  12. :openType="openType"
  13. :bold="bold"
  14. :block="block"
  15. :lines="lines"
  16. :color="color"
  17. :decoration="decoration"
  18. :size="size"
  19. :iconStyle="iconStyle"
  20. :margin="margin"
  21. :lineHeight="lineHeight"
  22. :align="align"
  23. :wordWrap="wordWrap"
  24. :customStyle="customStyle"
  25. @click="$emit('click')"
  26. ></uvText>
  27. </template>
  28. <script>
  29. /**
  30. * 此组件存在的理由是,在nvue下,u-text被uni-app官方占用了,u-text在nvue中相当于input组件
  31. * 所以在nvue下,取名为u--input,内部其实还是u-text.vue,只不过做一层中转
  32. * 不使用v-bind="$attrs",而是分开独立写传参,是因为微信小程序不支持此写法
  33. */
  34. import uvText from "../u-text/u-text.vue";
  35. import props from "../u-text/props.js";
  36. export default {
  37. name: "u--text",
  38. mixins: [uni.$u.mpMixin, props, uni.$u.mixin],
  39. components: {
  40. uvText,
  41. },
  42. };
  43. </script>