| | |
| | | <div class="pam-tags"> |
| | | <div class="pb-10" v-for="(qaItem,index) in questionList" :key="index"> |
| | | <el-button class="tags" :class="{'active': qaItem.selected}" |
| | | @click="qaItem.selected = !qaItem.selected"> |
| | | @click="selectQuestion(index)"> |
| | | {{qaItem.name}} |
| | | </el-button> |
| | | </div> |
| | | <el-button class="tags" @click="other = !other" :class="{'active':other=other}">其他</el-button> |
| | | </div> |
| | | <div class="pb-10 pam-tags con-input"> |
| | | <input v-if="other" class="other-input" placeholder="請輸入,限X字" v-model="otherQuestion"> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { Vue, Component} from 'vue-property-decorator'; |
| | | <script lang="ts"> |
| | | import { Vue, Component, Emit} from 'vue-property-decorator'; |
| | | @Component |
| | | export default class ConsultantQues extends Vue{ |
| | | |
| | |
| | | selected:false |
| | | } |
| | | ]; |
| | | |
| | | |
| | | @Emit('change') |
| | | selectQuestion(questionIndex: number): any[] { |
| | | this.questionList[questionIndex].selected = !this.questionList[questionIndex].selected; |
| | | return this.questionList; |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | <style lang="scss"> |