generated from sapphi-red/vite-boilerplate-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #869 from traPtitech/questionnaires/newtab=questions
/questionnaires/new?tab=questions の実装 #500
- Loading branch information
Showing
15 changed files
with
397 additions
and
152 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
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
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
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,40 @@ | ||
<template> | ||
<Icon name="trash-can-outline" @click="deleteQuestion" /> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import Icon from '/@/components/UI/Icon.vue' | ||
export default defineComponent({ | ||
name: 'QuestionDispose', | ||
components: { | ||
Icon | ||
}, | ||
props: { | ||
questionarray: { | ||
type: Array, | ||
required: true | ||
}, | ||
index: { | ||
type: Number, | ||
required: true | ||
} | ||
}, | ||
emits: { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
delete: (index: number) => true | ||
}, | ||
setup(props, context) { | ||
const deleteQuestion = () => { | ||
const isTrash = confirm('この質問を削除しますか?') | ||
if (isTrash) { | ||
context.emit('delete', props.index) | ||
} | ||
} | ||
return { deleteQuestion } | ||
} | ||
}) | ||
</script> | ||
|
||
<style lang="scss" module></style> |
Oops, something went wrong.