123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <template>
- <view>
- <swiper class="swiper" :indicator-dots="false" :autoplay="false" :circular="false">
- <swiper-item>
- <view class="swiper-item uni-bg-red">
- 学
- <hr />{{data.wordInfo}}
- </view>
- </swiper-item>
- <swiper-item>
- <view class="swiper-item uni-bg-red">
- 拼<hr />{{data.wordInfo}}
- </view>
- </swiper-item>
- <swiper-item>
- <view class="swiper-item uni-bg-blue">
- 读<hr />{{data.wordInfo}}
- </view>
- </swiper-item>
- <swiper-item>
- <view class="swiper-item uni-bg-blue">
- 选<hr />{{data.wordInfo}}
- </view>
- </swiper-item>
- <swiper-item>
- <view class="swiper-item uni-bg-blue">
- 背<hr />{{data.wordInfo}}
- </view>
- </swiper-item>
- </swiper>
- </view>
- </template>
- <script setup>
- import {
- reactive
- } from "vue";
- import * as httpApi from "@/api/word.js"
- import {
- onMounted
- } from 'vue';
- const props = defineProps({
- activeWord: {
- type: Object,
- },
- activeWords: {
- type: Array
- }
- })
- const data = reactive({
- wordInfo: null
- })
- function updateWordInfo() {
- httpApi.getWordInfo({
- wordId: props.activeWord.id
- }).then(res => {
- data.wordInfo = res.data;
- })
- }
- onMounted(() => {
- updateWordInfo();
- })
- </script>
- <style>
- </style>
|