-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split
Test
component to optimize the use of choices question
- Loading branch information
Showing
3 changed files
with
80 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template> | ||
<div class="test_choice"> | ||
<div>{{ numero }}</div> | ||
<div class="test_choices" v-if="c && c.length > 0"> | ||
<div class="test_choice_item" v-for="(d, i) in c" :key="i"> | ||
<div>({{ options[i] }}) </div> | ||
<div>{{ d }}</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
numero: String, // 选项编号 | ||
c: Array // 选项列表 | ||
}, | ||
data: function () { | ||
return { | ||
options: ['A', 'B', 'C', 'D'] | ||
}; | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.test_choice { | ||
margin-left: 1em; | ||
line-height: 1.7; | ||
} | ||
.test_choices { | ||
margin-left: 1em; | ||
padding-left: .1em; | ||
} | ||
.test_choice_item { | ||
display: flex; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters