fix: use share button in drawer info
This commit is contained in:
parent
6b790573e9
commit
64f9c80a88
1 changed files with 27 additions and 69 deletions
|
|
@ -1,5 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import {
|
||||||
|
EditButton,
|
||||||
|
DeleteButton,
|
||||||
|
CancelButton,
|
||||||
|
SaveButton,
|
||||||
|
UndoButton,
|
||||||
|
} from 'src/components/button';
|
||||||
|
|
||||||
withDefaults(
|
withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|
@ -65,41 +72,22 @@ function reset() {
|
||||||
<div class="bordered-b q-pa-lg row items-center">
|
<div class="bordered-b q-pa-lg row items-center">
|
||||||
<div v-if="showEdit">
|
<div v-if="showEdit">
|
||||||
<div v-if="isEdit" class="row">
|
<div v-if="isEdit" class="row">
|
||||||
<q-btn
|
<UndoButton
|
||||||
round
|
|
||||||
flat
|
|
||||||
id="closeDialog"
|
|
||||||
icon="mdi-arrow-left"
|
|
||||||
padding="xs"
|
|
||||||
class="q-mr-md"
|
class="q-mr-md"
|
||||||
:class="{ dark: $q.dark.isActive }"
|
id="btn-info-undo"
|
||||||
style="color: var(--brand-1)"
|
iconOnly
|
||||||
@click="undo"
|
@click="undo"
|
||||||
/>
|
/>
|
||||||
<div style="width: 31.98px"></div>
|
<div style="width: 36.8px"></div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else class="row">
|
||||||
<q-btn
|
<EditButton
|
||||||
round
|
id="btn-info-edit"
|
||||||
flat
|
|
||||||
id="editDialog"
|
|
||||||
icon="mdi-pencil-outline"
|
|
||||||
padding="xs"
|
|
||||||
class="q-mr-md"
|
class="q-mr-md"
|
||||||
:class="{ dark: $q.dark.isActive }"
|
iconOnly
|
||||||
style="color: var(--brand-1)"
|
|
||||||
@click="editData"
|
@click="editData"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<DeleteButton id="btn-info-delete" iconOnly @click="deleteData" />
|
||||||
round
|
|
||||||
flat
|
|
||||||
id="deleteDialog"
|
|
||||||
icon="mdi-trash-can-outline"
|
|
||||||
padding="xs"
|
|
||||||
:class="{ dark: $q.dark.isActive }"
|
|
||||||
style="color: hsl(var(--negative-bg))"
|
|
||||||
@click="deleteData"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -131,22 +119,17 @@ function reset() {
|
||||||
</text>
|
</text>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="width: 31.98px"></div>
|
<div class="q-mr-md" style="width: 36.8px"></div>
|
||||||
<q-btn
|
<CancelButton
|
||||||
round
|
icon-only
|
||||||
flat
|
id="btn-info-cancel"
|
||||||
id="closeDialog"
|
|
||||||
icon="mdi-close"
|
|
||||||
padding="xs"
|
|
||||||
class="close-btn"
|
|
||||||
:class="{ dark: $q.dark.isActive }"
|
|
||||||
type="reset"
|
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
drawerOpen = beforeClose ? beforeClose() : !drawerOpen;
|
drawerOpen = beforeClose ? beforeClose() : !drawerOpen;
|
||||||
close?.();
|
close?.();
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
type="reset"
|
||||||
resetValidation
|
resetValidation
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -161,39 +144,14 @@ function reset() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- footer -->
|
<!-- footer -->
|
||||||
<div
|
<div class="bordered-t q-pr-lg row items-center justify-end q-py-md">
|
||||||
class="bordered-t q-pr-lg row items-center justify-end q-gutter-x-lg q-py-md"
|
<CancelButton id="btn-info-cancel" outlined @click="close" />
|
||||||
>
|
<SaveButton
|
||||||
<q-btn
|
class="q-ml-md"
|
||||||
|
id="btn-info-save"
|
||||||
v-if="isEdit"
|
v-if="isEdit"
|
||||||
id="cancelBtn"
|
|
||||||
unelevated
|
|
||||||
class="btn-cancel-dialog"
|
|
||||||
color="grey-4"
|
|
||||||
type="reset"
|
|
||||||
text-color="grey-10"
|
|
||||||
@click="close"
|
|
||||||
:label="$t('cancel')"
|
|
||||||
/>
|
|
||||||
<q-btn
|
|
||||||
v-if="isEdit"
|
|
||||||
dense
|
|
||||||
unelevated
|
|
||||||
id="submitBtn"
|
|
||||||
type="submit"
|
type="submit"
|
||||||
color="primary"
|
solid
|
||||||
class="q-px-md"
|
|
||||||
:label="$t('save')"
|
|
||||||
/>
|
|
||||||
<q-btn
|
|
||||||
v-else
|
|
||||||
dense
|
|
||||||
unelevated
|
|
||||||
id="okBtn"
|
|
||||||
color="primary"
|
|
||||||
class="q-px-md"
|
|
||||||
:label="$t('agree')"
|
|
||||||
@click="close"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue