chore: install prettier
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<Teleport to="#__nuxt > div">
|
||||
<div class="modal is-active" @click="doClick">
|
||||
<div
|
||||
class="modal is-active"
|
||||
@click="doClick"
|
||||
>
|
||||
<div
|
||||
class="modal-background"
|
||||
:style="`opacity:${count === 0 ? 0.7 : 0.3} !important;`"
|
||||
@@ -10,14 +13,23 @@
|
||||
:id="docid"
|
||||
:style="`width:${vWidth}; border-radius:16px;`"
|
||||
>
|
||||
<header class="modal-card-head my-0 py-2" v-if="title">
|
||||
<header
|
||||
class="modal-card-head my-0 py-2"
|
||||
v-if="title"
|
||||
>
|
||||
<div style="width: 100%">
|
||||
<div class="field is-grouped">
|
||||
<div class="control is-expanded has-text-left">
|
||||
<p class="fsb-18 has-text-primary" v-html="title"></p>
|
||||
<p
|
||||
class="fsb-18 has-text-primary"
|
||||
v-html="title"
|
||||
></p>
|
||||
</div>
|
||||
<div class="control has-text-right">
|
||||
<button class="delete is-medium" @click="closeModal()"></button>
|
||||
<button
|
||||
class="delete is-medium"
|
||||
@click="closeModal()"
|
||||
></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,14 +61,13 @@ const store = useStore();
|
||||
const { $id } = useNuxtApp();
|
||||
|
||||
const props = defineProps({
|
||||
component: String,
|
||||
component: String,
|
||||
width: String,
|
||||
height: String,
|
||||
vbind: Object,
|
||||
title: String,
|
||||
});
|
||||
|
||||
|
||||
const componentFiles = import.meta.glob("@/components/**/*.vue");
|
||||
|
||||
const resolvedComponent = shallowRef(null);
|
||||
@@ -68,10 +79,8 @@ function loadDynamicComponent() {
|
||||
}
|
||||
|
||||
const fullPath = `/components/${props.component}.vue`;
|
||||
|
||||
const componentPath = Object.keys(componentFiles).find((path) =>
|
||||
path.endsWith(fullPath)
|
||||
);
|
||||
|
||||
const componentPath = Object.keys(componentFiles).find((path) => path.endsWith(fullPath));
|
||||
|
||||
if (componentPath) {
|
||||
resolvedComponent.value = defineAsyncComponent(componentFiles[componentPath]);
|
||||
@@ -118,7 +127,7 @@ const doClick = function (e) {
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
document.documentElement.classList.add('is-clipped');
|
||||
document.documentElement.classList.add("is-clipped");
|
||||
window.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Escape") closeModal();
|
||||
});
|
||||
@@ -128,6 +137,6 @@ onMounted(() => {
|
||||
|
||||
onUnmounted(() => {
|
||||
count--;
|
||||
if (count === 0) document.documentElement.classList.remove('is-clipped');
|
||||
})
|
||||
</script>
|
||||
if (count === 0) document.documentElement.classList.remove("is-clipped");
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user