changes
This commit is contained in:
@@ -1,24 +1,25 @@
|
||||
<template>
|
||||
<div>
|
||||
<Caption v-bind="{ title: 'Lỗi', type: 'has-text-findata' }"></Caption>
|
||||
<div class="field is-grouped mb-0">
|
||||
<div
|
||||
class="control is-expanded pr-3"
|
||||
v-html="content"
|
||||
></div>
|
||||
<div class="control">
|
||||
<SvgIcon v-bind="{ name: 'error.svg', type: 'danger', size: 24 }"></SvgIcon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field is-grouped is-gap-1">
|
||||
<Icon
|
||||
name="material-symbols:cancel-rounded"
|
||||
:size="22"
|
||||
class="has-text-danger-70"
|
||||
/>
|
||||
<p
|
||||
v-html="content"
|
||||
class="control is-expanded"
|
||||
></p>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: ["content"],
|
||||
methods: {
|
||||
cancel() {
|
||||
this.$store.commit("updateStore", { name: "showmodal", data: undefined });
|
||||
},
|
||||
},
|
||||
};
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
content: String,
|
||||
title: String,
|
||||
});
|
||||
|
||||
const { $store } = useNuxtApp();
|
||||
|
||||
function cancel() {
|
||||
$store.commit("updateStore", { name: "showmodal", data: undefined });
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
<p v-html="props.content"></p>
|
||||
</template>
|
||||
<script setup>
|
||||
var props = defineProps({
|
||||
const props = defineProps({
|
||||
content: String,
|
||||
});
|
||||
|
||||
const { $store } = useNuxtApp();
|
||||
|
||||
function cancel() {
|
||||
this.$store.commit("updateStore", { name: "showmodal", data: undefined });
|
||||
$store.commit("updateStore", { name: "showmodal", data: undefined });
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,28 +1,29 @@
|
||||
<template>
|
||||
<div class="show">
|
||||
<div class="snackbar has-text-white has-background-grey-35 px-3 py-2 rounded-md">
|
||||
<component
|
||||
:is="dynamicComponent"
|
||||
v-bind="vbind"
|
||||
@close="$emit('close')"
|
||||
></component>
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { defineAsyncComponent } from "vue";
|
||||
import { useStore } from "@/stores/index";
|
||||
const store = useStore();
|
||||
var props = defineProps({
|
||||
const props = defineProps({
|
||||
component: String,
|
||||
width: Number,
|
||||
height: Number,
|
||||
width: String,
|
||||
height: String,
|
||||
vbind: Object,
|
||||
title: String,
|
||||
});
|
||||
const dynamicComponent = defineAsyncComponent(() => import(`~/components/snackbar/Info.vue`));
|
||||
|
||||
const store = useStore();
|
||||
const dynamicComponent = defineAsyncComponent(() => import(`../snackbar/${props.component || "Info"}.vue`));
|
||||
setTimeout(() => store.commit("snackbar", undefined), 3900);
|
||||
</script>
|
||||
<style>
|
||||
.show {
|
||||
<style scoped>
|
||||
.snackbar {
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
top: 50px;
|
||||
@@ -32,10 +33,6 @@ setTimeout(() => store.commit("snackbar", undefined), 3900);
|
||||
width: fit-content;
|
||||
max-width: 500px;
|
||||
|
||||
background-color: #303030;
|
||||
color: white;
|
||||
border-radius: 6px;
|
||||
padding: 10px;
|
||||
/* Add animation: Take 0.5 seconds to fade in and out the snackbar.
|
||||
However, delay the fade out process for 2.5 seconds */
|
||||
-webkit-animation:
|
||||
|
||||
@@ -1,29 +1,25 @@
|
||||
<template>
|
||||
<div>
|
||||
<Caption
|
||||
v-bind="{
|
||||
title: $stripHtml(title) || 'Thành công',
|
||||
type: 'has-text-primary',
|
||||
}"
|
||||
></Caption>
|
||||
<div class="field is-grouped mb-0 pb-0">
|
||||
<div
|
||||
class="control is-expanded pr-3 mb-0"
|
||||
v-html="content"
|
||||
></div>
|
||||
<div class="control mb-0">
|
||||
<SvgIcon v-bind="{ name: 'check2.svg', type: 'primary', size: 24 }"></SvgIcon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field is-grouped is-gap-1">
|
||||
<Icon
|
||||
name="material-symbols:check-circle-rounded"
|
||||
:size="22"
|
||||
class="has-text-success"
|
||||
/>
|
||||
<p
|
||||
v-html="content"
|
||||
class="control is-expanded"
|
||||
></p>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: ["content", "title"],
|
||||
methods: {
|
||||
cancel() {
|
||||
this.$store.commit("updateStore", { name: "showmodal", data: undefined });
|
||||
},
|
||||
},
|
||||
};
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
content: String,
|
||||
title: String,
|
||||
});
|
||||
|
||||
const { $store } = useNuxtApp();
|
||||
|
||||
function cancel() {
|
||||
$store.commit("updateStore", { name: "showmodal", data: undefined });
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user