diff options
author | Santo Cariotti <santo@dcariotti.me> | 2022-10-19 11:51:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 11:51:02 +0200 |
commit | a294f7d3a24546fb9d2c40ca3992ecdfc93039d8 (patch) | |
tree | 02a2181783b16029d91049f2bb2715320b0733a5 /components/VTable.vue | |
parent | 585317bcf53db267366a64b8c896ebc52d527ee7 (diff) |
Add prefetching using `nuxt-link` (#1)
Diffstat (limited to 'components/VTable.vue')
-rw-r--r-- | components/VTable.vue | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/VTable.vue b/components/VTable.vue index db7a9ae..ef06393 100644 --- a/components/VTable.vue +++ b/components/VTable.vue @@ -25,7 +25,7 @@ path(stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12") span(v-else-if="name == 'avatar'") .block(class="sm:flex") - a.inline-block(:href="'/user/'+field.id" target="_blank") + nuxt-link.inline-block(:to="'/user/'+field.id" target="_blank") user-avatar(:data="field") a.text-red-500.ml-2.cursor-pointer( title="Delete this avatar" @@ -37,20 +37,20 @@ span(v-else-if="['author', 'user', 'resolved'].includes(name)") - a.inline-block(:href="'/user/'+field[name].id" target="_blank") + nuxt-link.inline-block(:to="'/user/'+field[name].id" target="_blank") user-avatar(:data="field[name]" v-if="field[name].username") span(v-else-if="name == 'created' || name == 'updated'") | {{ field[name]|moment("DD/MM/YYYY HH:mm") }} span(v-else-if="name == 'likes'") | {{ field.likes ? field.likes.length : 0 }} span(v-else-if="name == 'model_id'") - a.underline.text-green-500(:href="'/models/'+field.model_id" target="_blank") + nuxt-link.underline.text-green-500(:to="'/models/'+field.model_id" target="_blank") | {{ field[name] }} span(v-else :title="field[name]") {{ field[name] }} td.px-6.py-4.whitespace-nowrap.text-sm.text-gray-900(class="dark:text-white") .flex .mr-1(v-if="path") - a(:href="path + field.id" target="_blank") + nuxt-link(:to="path + field.id" target="_blank") svg(xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6") path(stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244") .mr-1(v-if="editrow") |