เพิ่ม href => PDF

This commit is contained in:
setthawutttty 2023-08-24 13:00:33 +07:00
parent dbcf1f0106
commit 955e651dae
2 changed files with 8 additions and 2 deletions

View file

@ -135,7 +135,7 @@
{{ props.row.fileName }}
</q-td>
<q-td key="btnMicrosoft" :props="props">
<q-btn flat dense round color="red" icon="picture_as_pdf">
<q-btn type="a" target="_blank" :href="props.row.pathName" flat dense round color="red" icon="picture_as_pdf">
<q-tooltip>ไฟล PDF</q-tooltip>
</q-btn>
<q-btn flat dense round color="blue" icon="mdi-file-word">

View file

@ -10,6 +10,7 @@ const mixin = useCounterMixin()
const { success, messageError,hideLoader,dialogConfirm } = mixin
const fileUpload = ref<any>(null);
const reason = ref<string>("");
const file = ref<string>("");
const documentTitle = ref<string>("");
const $q = useQuasar();
const filterKeyword = ref<string>("");
@ -56,6 +57,7 @@ const rows2 = ref<any>([]);
interface TypeData {
fileName:string
annotation:string
pathName:string
}
const props = defineProps({
roundId: {
@ -73,7 +75,8 @@ const getRequest = async () => {
data.map((item:TypeData) =>{
rows2.value.push({
fileName:item.fileName,
annotation:item.annotation
annotation:item.annotation,
file:item.pathName
})
}
@ -239,6 +242,9 @@ const save = () => {
</q-td>
<q-td auto-width>
<q-btn
type="a"
:href="props.row.file"
target="_blank"
dense
size="14px"
flat