feat(doc-preview): add toolbar
This commit is contained in:
parent
5559010eed
commit
f257fb2774
1 changed files with 25 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ import { QuotationPayload } from 'src/stores/quotations/types';
|
||||||
// NOTE: Import Components
|
// NOTE: Import Components
|
||||||
import ViewHeader from './ViewHeader.vue';
|
import ViewHeader from './ViewHeader.vue';
|
||||||
import BankComponents from './BankComponents.vue';
|
import BankComponents from './BankComponents.vue';
|
||||||
|
import PrintButton from 'src/components/button/PrintButton.vue';
|
||||||
|
|
||||||
const quotationForm = useQuotationForm();
|
const quotationForm = useQuotationForm();
|
||||||
const optionStore = useOptionStore();
|
const optionStore = useOptionStore();
|
||||||
|
|
@ -184,9 +185,16 @@ onMounted(async () => {
|
||||||
watch(elements, () => {
|
watch(elements, () => {
|
||||||
console.log(elements.value);
|
console.log(elements.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function print() {
|
||||||
|
window.print();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="toolbar">
|
||||||
|
<PrintButton solid @click="print" />
|
||||||
|
</div>
|
||||||
<div class="row justify-between container">
|
<div class="row justify-between container">
|
||||||
<section class="content" v-for="chunk in chunks">
|
<section class="content" v-for="chunk in chunks">
|
||||||
<ViewHeader />
|
<ViewHeader />
|
||||||
|
|
@ -423,6 +431,19 @@ watch(elements, () => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.toolbar {
|
||||||
|
width: 100%;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
padding: 1rem;
|
||||||
|
background: white;
|
||||||
|
border-bottom: 1px solid var(--gray-3);
|
||||||
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
@ -496,6 +517,10 @@ hr {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
|
.toolbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
gap: 0;
|
gap: 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue