12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <template>
- <QuestionBase>
- <template #content>
- <div class="stem">
- <el-input
- v-if="data.property.stem_type === stemTypeList[0].value"
- v-model="data.stem"
- rows="3"
- resize="none"
- type="textarea"
- placeholder="输入题干"
- />
- <RichText v-if="data.property.stem_type === stemTypeList[1].value" v-model="data.stem" placeholder="输入题干" />
- <el-input
- v-show="data.property.is_enable_description"
- v-model="data.description"
- rows="3"
- resize="none"
- type="textarea"
- placeholder="输入描述"
- />
- </div>
- </template>
- <template #property></template>
- </QuestionBase>
- </template>
- <script>
- import QuestionBase from '../common/QuestionBase.vue';
- import RichText from '@/components/common/RichText.vue';
- import {
- stemTypeList,
- switchOption,
- scoreTypeList,
- computedQuestionNumber,
- changeOptionType,
- questionNumberTypeList,
- } from '@/views/exercise_questions/data/common';
- import { matchingTypeList, matchingData } from '@/views/exercise_questions/data/matching';
- export default {
- name: 'MatchingQuestion',
- components: {
- QuestionBase,
- RichText,
- },
- data() {
- return {
- matchingTypeList,
- data: JSON.parse(JSON.stringify(matchingData)),
- };
- },
- methods: {
- /**
- * 设置题目内容
- * @param {object} param
- * @param {string} param.content 题目内容
- */
- setQuestion({ content }) {
- this.data = JSON.parse(content);
- },
- },
- };
- </script>
- <style lang="scss" scoped></style>
|