实现背景
最近学习《vue实战》,第二篇进阶篇有一个练习
刚好最近在研究vue移动端框架vant
两者结合,实现这么个小项目
实现代码
新建 vue单文件 L0529L.vue
<template>
<div class="dom">
<div class="tmnr">{
{showtm+1}}. {
{timu[showtm]['tmcontent']}}</div>
<component0529
:info="ziInfo"
:showtm="showtm"
@chooseRadio="changeAnswer"
@chooseCheckbox="changeAnswer"
@chooseInput="changeAnswer"
></component0529>
<div class="buttondom">
<van-button type="primary" v-show="showtm>0" @click="shangtm" :disabled="showtm===0">上一题</van-button>
<van-button
type="primary"
v-show="showtm<timu.length-1"
&#