Skip to content

Commit

Permalink
fix: @click-button -> @click && format: 使っていないcssのクラスを削除
Browse files Browse the repository at this point in the history
  • Loading branch information
Qro committed Dec 17, 2024
1 parent 8b7a604 commit c39f0b8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 30 deletions.
6 changes: 1 addition & 5 deletions components/response-form-base/button-element.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<script lang="ts" setup>
const emit = defineEmits<{ (e: 'clickButton'): void }>();
const props = defineProps<{
isOutline: boolean
}>();
const handleClick = () => {
emit('clickButton');
};
</script>

<template>
<Button :outlined="props.isOutline" class="form-action-button" @click="handleClick">
<Button :outlined="props.isOutline" class="form-action-button">
<slot />
</Button>
</template>
Expand Down
21 changes: 4 additions & 17 deletions components/response-form-base/response-form-base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const handleSend = () => {
'send',
convertResponseSettingsToResponseFormBody(responseSettings.value),
);
props.sendApi(responseSettings.value)
props.sendApi(responseSettings.value);
};
const handleSave = () => {
Expand Down Expand Up @@ -195,12 +195,12 @@ const handleSave = () => {
<ButtonElement
v-if="$slots.saveButton"
:is-outline="true"
@click-button="handleSave"
@click="handleSave"
>
<Icon name="mdi:content-save" size="24px" />
<slot name="saveButton" />
</ButtonElement>
<ButtonElement :is-outline="false" @click-button="handleSend">
<ButtonElement :is-outline="false" @click="handleSend">
<Icon name="mdi:send" size="24px" />
<slot name="sendButton" />
</ButtonElement>
Expand Down Expand Up @@ -244,12 +244,7 @@ const handleSave = () => {
transform: translateX(832px);
}
.form-action-button {
display: inline-flex;
align-items: center;
gap: 8px;
font-weight: bold;
}
@media screen and (max-width: 1300px) {
.form-action-buttons {
Expand All @@ -264,14 +259,6 @@ const handleSave = () => {
padding-right: 0;
}
}
.form-action-button {
display: inline-flex;
align-items: center;
gap: 8px;
font-weight: bold;
}
@media screen and (max-width: $breakpoint-sm) {
.form-action-buttons {
flex-direction: column;
Expand Down
10 changes: 6 additions & 4 deletions pages/questionnaires/[questionnaireID]/responses/new.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ const formSettings: ResponseFormQuestionnaireFormSettings = {
},
],
};
const newResponseAPI = (_responseSettings: ResponseFormQuestionnaireFormSettings) => {
console.log("response created")
console.log(_responseSettings)
}
const newResponseAPI = (
_responseSettings: ResponseFormQuestionnaireFormSettings,
) => {
console.log('response created');
console.log(_responseSettings);
};
</script>

<template>
Expand Down
10 changes: 6 additions & 4 deletions pages/responses/[responseID]/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ const formSettings: ResponseFormQuestionnaireFormSettings = {
],
};
const editResponseAPI = (_responseSettings: ResponseFormQuestionnaireFormSettings) => {
console.log("response edited")
console.log(_responseSettings)
}
const editResponseAPI = (
_responseSettings: ResponseFormQuestionnaireFormSettings,
) => {
console.log('response edited');
console.log(_responseSettings);
};
</script>

<template>
Expand Down

0 comments on commit c39f0b8

Please sign in to comment.