first commit
This commit is contained in:
commit
db5762abd4
687 files changed
+171307
No files matched your search
@@ -0,0 +1,52 @@
|
||||
<script>
|
||||
import { onMounted } from "vue";
|
||||
import { renderSlot } from "vue";
|
||||
import { watch } from "vue";
|
||||
import { defineComponent } from "vue";
|
||||
import { useToast } from "primevue/usetoast";
|
||||
var a = Object.assign(
|
||||
defineComponent({
|
||||
__name: `OperationNotice`,
|
||||
props: {
|
||||
message: {},
|
||||
severity: {
|
||||
default: `success`,
|
||||
},
|
||||
details: {
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
setup(r) {
|
||||
let a = r,
|
||||
o = useToast();
|
||||
function s() {
|
||||
a.message.trim() &&
|
||||
o.add({
|
||||
group: `operations`,
|
||||
severity: a.severity,
|
||||
summary: a.message,
|
||||
detail: [...a.details],
|
||||
life: a.details.length
|
||||
? void 0
|
||||
: a.severity === `success`
|
||||
? 4e3
|
||||
: 8e3,
|
||||
closable: !0,
|
||||
});
|
||||
}
|
||||
return (
|
||||
onMounted(s),
|
||||
watch(() => [a.message, a.severity], s, {
|
||||
flush: `post`,
|
||||
}),
|
||||
(e, n) => renderSlot(e.$slots, `default`)
|
||||
);
|
||||
},
|
||||
}),
|
||||
{
|
||||
__name: `OperationNotice`,
|
||||
},
|
||||
);
|
||||
export {};
|
||||
export default a;
|
||||
</script>
|
||||
Reference in new issue
Block a user