wangguoyu 3 月之前
父节点
当前提交
1326183c82
共有 2 个文件被更改,包括 26 次插入9 次删除
  1. 1 0
      pages/newEnglish/components/mainCard.vue
  2. 25 9
      pages/newEnglish/components/readContent.vue

+ 1 - 0
pages/newEnglish/components/mainCard.vue

@@ -33,6 +33,7 @@
 	import pinPageVue from './pinPage.vue';
 	import selectPageVue from './selectPage.vue';
 	import beiPageVue from './beiPage.vue';
+	import readContent from './readContent.vue';
 	import xuePage from './xuePage.vue';
 	const props = defineProps({
 		activeWord: {

+ 25 - 9
pages/newEnglish/components/readContent.vue

@@ -3,28 +3,29 @@
 		<selectTypesVue activeSelect="3"></selectTypesVue>
 		<view class="words-xuan-box">
 			<!-- 单词区 -->
-			<view class="show-words-box"> {{activeWord.name}} </view>
+			<view class="show-words-box"> {{data.name}} </view>
 			<!--  音标区  -->
 			<view class="yb-play-box">
-				<text>{{activeWord.yinbiao}}</text>
+				<text>{{data.yinbiao}}</text>
 				<!-- active -->
-				
+
 				<icon class="yb-play-btn"></icon>
 				<icon class="yb-playing-btn" v-if="false"></icon>
 			</view>
-			
+
 			<view style="text-align: center;">
-				<text v-if="activeWord.jianyi&&activeWord.jianyi.length>0" v-for="(item,index) in activeWord.jianyi" :key="index">
+				<text v-if="data.jianyi&&data.jianyi.length>0" v-for="(item,index) in data.jianyi"
+					:key="index">
 					{{item}}
 				</text>
 			</view>
-			
+
 			<view>
 				<view class="audio-play-btn"></view>
 				<!-- 播放中 -->
 				<view class="audio-playing-btn" v-if="false"></view>
 			</view>
-			
+
 		</view>
 	</view>
 </template>
@@ -33,6 +34,9 @@
 	import selectWordsVue from './selectWords.vue';
 	import selectTypesVue from './selectTypes.vue';
 	import {
+		onLoad
+	} from "@dcloudio/uni-app"
+	import {
 		reactive,
 		ref,
 		onMounted
@@ -51,10 +55,22 @@
 	let tabFlag = ref(1)
 	const audioInfo = ref(null)
 
+	const data = reactive({
+		name: '',
+		yinbiao: '',
+		jianyi:[]
+	})
 
-	onMounted(() => {
-
+	onLoad(() => {
+		initItem()
 	})
+
+	function initItem() {
+		console.log('data',data);
+		data.name = props.activeWord.name;
+		data.yinbiao = props.activeWord.yinbiao;
+		data.jianyi = props.activeWord.jianyi;
+	}
 </script>
 
 <style>