123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <!-- -->
- <template>
- <div class="Big-Book-single">
- <div class="Big-Book-content m">
- <div class="Big-Book-main">
- <div class="adult-book-input-item">
- <span class="adult-book-lable">选项内容:</span>
- <el-input
- class="adult-book-input"
- :autosize="{ minRows: 2 }"
- type="textarea"
- placeholder="请输入内容"
- v-model="curQueItem.con"
- @blur="curQueItem.con = curQueItem.con.trim()"
- maxlength="200"
- show-word-limit
- ></el-input>
- <el-checkbox
- style="margin-left: 7px"
- @change="changeIsAnswer"
- v-model="curQueItem.isAnswer"
- :label="index"
- >答案</el-checkbox
- >
- <!-- <div class=""></div> -->
- <img
- @click="deleteOption"
- class="close"
- src="../../../assets/adult/del-close.png"
- alt=""
- />
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import Upload from "./Upload.vue";
- import "@/utils/pinyin_dict_withtone";
- import "@/utils/pinyinUtil";
- export default {
- components: {
- Upload,
- },
- props: ["curQueItem", "index", "changAnswer", "deleteOptionOne", "type"],
- data() {
- return {
- imgNumber: 10,
- mp3Number: 10,
- fileCon: {
- timu_img_list: [],
- timu_mp3_list: [],
- img_list: [],
- mp3_list: [],
- },
- };
- },
- computed: {},
- watch: {},
- //方法集合
- methods: {
- // 删除当前选项
- deleteOption() {
- this.$confirm("确定要删除此选项吗?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- this.deleteOptionOne(this.index);
- });
- },
- // 修改正确答案
- changeIsAnswer() {
- this.changAnswer(this.index);
- },
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {},
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- if (this.curQueItem) {
- this.fileCon.img_list = this.curQueItem.img_list;
- this.fileCon.mp3_list = this.curQueItem.mp3_list;
- }
- },
- beforeCreate() {}, //生命周期 - 创建之前
- beforeMount() {}, //生命周期 - 挂载之前
- beforeUpdate() {}, //生命周期 - 更新之前
- updated() {}, //生命周期 - 更新之后
- beforeDestroy() {}, //生命周期 - 销毁之前
- destroyed() {}, //生命周期 - 销毁完成
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
- };
- </script>
- <style lang='scss' scoped>
- //@import url(); 引入公共css类
- .Big-Book-single {
- .Big-Book-content {
- &.m {
- display: flex;
- justify-content: flex-start;
- align-items: flex-start;
- }
- .Big-Book-con {
- display: flex;
- align-items: center;
- }
- .Big-Book-title {
- font-size: 16px;
- line-height: 40px;
- color: #000;
- margin-right: 15px;
- }
- .Big-Book-main {
- position: relative;
- width: 100%;
- > div {
- margin-bottom: 10px;
- &.Big-Book-pinyin,
- &.Big-Book-con,
- &.Big-Book-en {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- }
- }
- .close {
- position: relative;
- top: -4px;
- cursor: pointer;
- width: 24px;
- height: 24px;
- }
- }
- }
- }
- </style>
|