readContent.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view>
  3. <selectTypesVue activeSelect="3"></selectTypesVue>
  4. <view class="words-xuan-box">
  5. <!-- 单词区 -->
  6. <view class="show-words-box"> {{data.name}} </view>
  7. <!-- 音标区 -->
  8. <view class="yb-play-box">
  9. <text>{{data.yinbiao}}</text>
  10. <!-- active -->
  11. <icon class="yb-play-btn"></icon>
  12. <icon class="yb-playing-btn" v-if="false"></icon>
  13. </view>
  14. <view style="text-align: center;">
  15. <text v-if="data.jianyi&&data.jianyi.length>0" v-for="(item,index) in data.jianyi"
  16. :key="index">
  17. {{item}}
  18. </text>
  19. </view>
  20. <view>
  21. <view class="audio-play-btn"></view>
  22. <!-- 播放中 -->
  23. <view class="audio-playing-btn" v-if="false"></view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script setup>
  29. import selectWordsVue from './selectWords.vue';
  30. import selectTypesVue from './selectTypes.vue';
  31. import {
  32. onLoad
  33. } from "@dcloudio/uni-app"
  34. import {
  35. reactive,
  36. ref,
  37. onMounted
  38. } from 'vue';
  39. const props = defineProps({
  40. activeWord: {
  41. type: Object,
  42. },
  43. pageData: {
  44. type: Object,
  45. },
  46. activeWords: {
  47. type: Array
  48. },
  49. })
  50. let tabFlag = ref(1)
  51. const audioInfo = ref(null)
  52. const data = reactive({
  53. name: '',
  54. yinbiao: '',
  55. jianyi:[]
  56. })
  57. onLoad(() => {
  58. initItem()
  59. })
  60. function initItem() {
  61. console.log('data',data);
  62. data.name = props.activeWord.name;
  63. data.yinbiao = props.activeWord.yinbiao;
  64. data.jianyi = props.activeWord.jianyi;
  65. }
  66. </script>
  67. <style>
  68. </style>