| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="container_add"> |
| | | <div class="container_add" @click="addCommonPhrases"> |
| | | <span class="ywifont ywicon-jia text-[15px] cursor-pointer text-[#767a97]"></span> |
| | | <div class="grow">添加常用语</div> |
| | | </div> |
| | | <el-dialog v-model="state.useCommonPhrasesDialog" :title="state?.sample_title" width="500" :before-close="handleClose"> |
| | | <el-input v-model="state.inputCommonPhrases" :rows="10" type="textarea"></el-input> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="handleClose">取消</el-button> |
| | | <el-button type="primary" @click="submitCommonPhrases"> 添加 </el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ref } from 'vue'; |
| | | import { reactive, ref } from 'vue'; |
| | | const state = reactive({ |
| | | useCommonPhrasesDialog: false, |
| | | sample_title: '添加常用语', |
| | | inputCommonPhrases: '', |
| | | }); |
| | | const commonPhrases = ref([ |
| | | { |
| | | id: 1, |
| | |
| | | ]); |
| | | const props = defineProps(['isHome']); |
| | | const closeCommonPhrases = () => {}; |
| | | //关闭常用语弹窗 |
| | | const handleClose = () => { |
| | | state.useCommonPhrasesDialog = false; |
| | | }; |
| | | //打开常用语弹窗 |
| | | const addCommonPhrases = () => { |
| | | state.useCommonPhrasesDialog = true; |
| | | }; |
| | | //提交常用语 |
| | | const submitCommonPhrases = () => {}; |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .container { |
| | |
| | | background: #fff; |
| | | border-radius: 8px; |
| | | width: 100%; |
| | | &:hover { |
| | | background: #e5e7ed; |
| | | } |
| | | .title { |
| | | font-size: 14px; |
| | | color: #060607; |
| | |
| | | padding: 6px 8px; |
| | | background: #fff; |
| | | border-radius: 8px; |
| | | &:hover { |
| | | background: #e5e7ed; |
| | | } |
| | | } |
| | | } |
| | | </style> |