first commit
This commit is contained in:
commit
db5762abd4
687 files changed
+171307
No files matched your search
@@ -0,0 +1,123 @@
|
||||
<script>
|
||||
import "~/assets/styles/OperationToasts.DfA_b8om.css";
|
||||
import { toDisplayString } from "vue";
|
||||
import { renderList } from "vue";
|
||||
import { normalizeClass } from "vue";
|
||||
import { watch } from "vue";
|
||||
import { createBlock } from "vue";
|
||||
import { withCtx } from "vue";
|
||||
import { createCommentVNode } from "vue";
|
||||
import { createElementBlock } from "vue";
|
||||
import { Fragment } from "vue";
|
||||
import { createElementVNode } from "vue";
|
||||
import { defineComponent } from "vue";
|
||||
import { openBlock } from "vue";
|
||||
import { useAuth } from "~/lib/auth.js";
|
||||
import toast from "primevue/toast";
|
||||
import { useToast } from "primevue/usetoast";
|
||||
var h = {
|
||||
class: `operation-toast-copy`,
|
||||
},
|
||||
g = {
|
||||
key: 0,
|
||||
class: `operation-toast-results`,
|
||||
},
|
||||
_ = Object.assign(
|
||||
defineComponent({
|
||||
__name: `OperationToasts`,
|
||||
setup(u) {
|
||||
let _ = useToast(),
|
||||
v = useAuth();
|
||||
watch(
|
||||
() => v.token,
|
||||
() => _.removeGroup(`operations`),
|
||||
);
|
||||
let y = {
|
||||
success: `pi-check-circle`,
|
||||
error: `pi-times-circle`,
|
||||
warn: `pi-exclamation-triangle`,
|
||||
info: `pi-info-circle`,
|
||||
};
|
||||
return (r, u) => {
|
||||
let f = toast;
|
||||
return (
|
||||
openBlock(),
|
||||
createBlock(
|
||||
f,
|
||||
{
|
||||
group: `operations`,
|
||||
position: `top-right`,
|
||||
class: `operation-toasts`,
|
||||
"base-z-index": 2e3,
|
||||
limit: 3,
|
||||
},
|
||||
{
|
||||
message: withCtx(({ message: r }) => [
|
||||
createElementVNode(
|
||||
`i`,
|
||||
{
|
||||
class: normalizeClass([
|
||||
`pi operation-toast-icon`,
|
||||
[y[r.severity || `info`], `notice-${r.severity}`],
|
||||
]),
|
||||
"aria-hidden": `true`,
|
||||
},
|
||||
null,
|
||||
2,
|
||||
),
|
||||
createElementVNode(`div`, h, [
|
||||
createElementVNode(
|
||||
`div`,
|
||||
null,
|
||||
toDisplayString(r.summary),
|
||||
1,
|
||||
),
|
||||
r.detail?.length
|
||||
? (openBlock(),
|
||||
createElementBlock(`details`, g, [
|
||||
(u[0] ||= createElementVNode(
|
||||
`summary`,
|
||||
null,
|
||||
`查看处理结果`,
|
||||
-1,
|
||||
)),
|
||||
createElementVNode(`ul`, null, [
|
||||
(openBlock(!0),
|
||||
createElementBlock(
|
||||
Fragment,
|
||||
null,
|
||||
renderList(
|
||||
r.detail,
|
||||
(t, n) => (
|
||||
openBlock(),
|
||||
createElementBlock(
|
||||
`li`,
|
||||
{
|
||||
key: n,
|
||||
},
|
||||
toDisplayString(t),
|
||||
1,
|
||||
)
|
||||
),
|
||||
),
|
||||
128,
|
||||
)),
|
||||
]),
|
||||
]))
|
||||
: createCommentVNode(``, !0),
|
||||
]),
|
||||
]),
|
||||
_: 1,
|
||||
},
|
||||
)
|
||||
);
|
||||
};
|
||||
},
|
||||
}),
|
||||
{
|
||||
__name: `OperationToasts`,
|
||||
},
|
||||
);
|
||||
export {};
|
||||
export default _;
|
||||
</script>
|
||||
Reference in new issue
Block a user