kanban > step > virtual sample : fix uri
This commit is contained in:
parent
dd8d9c7fa1
commit
8c0a347d2c
7 changed files with 46 additions and 15 deletions
|
|
@ -2,10 +2,7 @@
|
|||
<article class="card">
|
||||
<hgroup class="order-last">
|
||||
<h3 class="card__title | font-serif | text-lg">
|
||||
<router-link
|
||||
:to="'/' + step.uri + '&fileIndex=' + index"
|
||||
class="link-full"
|
||||
>
|
||||
<router-link :to="uri" class="link-full">
|
||||
{{ pdf.label.length ? pdf.label : pdf.name.replace(".pdf", "") }}
|
||||
</router-link>
|
||||
</h3>
|
||||
|
|
@ -42,13 +39,18 @@ import DateTime from "./DateTime.vue";
|
|||
const { step, pdf, index } = defineProps({
|
||||
step: Object,
|
||||
pdf: Object,
|
||||
index: {
|
||||
default: 0,
|
||||
type: Number,
|
||||
},
|
||||
index: Number,
|
||||
hasImage: {
|
||||
default: true,
|
||||
type: Boolean,
|
||||
},
|
||||
});
|
||||
|
||||
const uri =
|
||||
location.pathname + "?dialog=" + step.slug + "&fileIndex=" + getIndex();
|
||||
|
||||
function getIndex() {
|
||||
if (index) return index;
|
||||
return step.files.findIndex((file) => file.type === "document");
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue