86 lines
2.1 KiB
Vue
86 lines
2.1 KiB
Vue
<template>
|
|
<div>
|
|
<div class="sub-title">一、单选题</div>
|
|
<div class="options">
|
|
<a-row :gutter="[16, 16]">
|
|
<a-anchor :affix="false">
|
|
<a-col v-for="(item, index) in 12" :key="index" :span="4">
|
|
<div class="option-item flex-center" :class="{ 'option-item-active': index === 0 }">
|
|
<a-anchor-link :href="`#type1-${index}`" :title="index + 1"></a-anchor-link>
|
|
</div>
|
|
</a-col>
|
|
</a-anchor>
|
|
</a-row>
|
|
</div>
|
|
<div class="sub-title">二、多选题</div>
|
|
<div class="options">
|
|
<a-row :gutter="[16, 16]">
|
|
<a-anchor :affix="false">
|
|
<a-col v-for="(item, index) in 6" :key="index" :span="4">
|
|
<div class="option-item flex-center" :class="{ 'option-item-active': index === 0 }">
|
|
<a-anchor-link :href="`#type2-${index}`" :title="index + 1"></a-anchor-link>
|
|
</div>
|
|
</a-col>
|
|
</a-anchor>
|
|
</a-row>
|
|
</div>
|
|
<div class="sub-title">三、判断题</div>
|
|
<div class="options">
|
|
<a-row :gutter="[16, 16]">
|
|
<a-anchor :affix="false">
|
|
<a-col v-for="(item, index) in 6" :key="index" :span="4">
|
|
<div class="option-item flex-center" :class="{ 'option-item-active': index === 0 }">
|
|
<a-anchor-link :href="`#type3-${index}`" :title="index + 1"></a-anchor-link>
|
|
</div>
|
|
</a-col>
|
|
</a-anchor>
|
|
</a-row>
|
|
</div>
|
|
<div class="sub-title">四、填空题</div>
|
|
<div class="options"></div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { Anchor } from 'ant-design-vue'
|
|
export default {
|
|
props: {
|
|
pref: Object
|
|
},
|
|
components: {
|
|
'a-anchor': Anchor,
|
|
'a-anchor-link': Anchor.Link
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.sub-title {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
color: #333;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.option-item {
|
|
background: #f9f9f9;
|
|
height: 48px;
|
|
width: 100%;
|
|
font-size: 16px;
|
|
color: #333;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.option-item-active {
|
|
background: #1890ff;
|
|
color: #fff;
|
|
::v-deep .ant-anchor-link-title {
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
::v-deep .ant-anchor-link {
|
|
padding: 0;
|
|
}
|
|
</style>
|