mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
✏️ fix typo
This commit is contained in:
@@ -37,8 +37,8 @@ import { onMounted, reactive, ref, watch } from "vue";
|
||||
|
||||
interface ConfirmProps {
|
||||
title: string;
|
||||
text: string;
|
||||
mode: "confirm" | "input";
|
||||
text?: string;
|
||||
mode?: "confirm" | "input";
|
||||
otcancel?: boolean;
|
||||
}
|
||||
|
||||
@@ -46,12 +46,12 @@ const props = withDefaults(defineProps<ConfirmProps>(), {
|
||||
title: "",
|
||||
text: "",
|
||||
mode: "confirm",
|
||||
otcancel: false,
|
||||
});
|
||||
|
||||
// 组件参数
|
||||
const data = reactive<TGApp.Component.Confirm.Params>({
|
||||
title: "",
|
||||
mode: "confirm",
|
||||
});
|
||||
const show = ref<boolean>(false);
|
||||
const showOuter = ref<boolean>(false);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<transition name="func-snackbar">
|
||||
<div v-show="show" class="func-snackbar" :style="{ backgroundColor: color }">
|
||||
<div v-show="show" class="func-snackbar" :style="{ backgroundColor: data.color }">
|
||||
<slot name="text">
|
||||
<span class="func-snackbar-text">{{ text }}</span>
|
||||
<span class="func-snackbar-text">{{ data.text }}</span>
|
||||
</slot>
|
||||
</div>
|
||||
</transition>
|
||||
@@ -26,8 +26,6 @@ const props = withDefaults(defineProps<SnackbarProps>(), {
|
||||
// 组件参数
|
||||
const data = reactive<TGApp.Component.Snackbar.Params>({
|
||||
text: "",
|
||||
color: "success",
|
||||
timeout: 1500,
|
||||
});
|
||||
const show = ref<boolean>(false);
|
||||
let timer: NodeJS.Timeout;
|
||||
|
||||
2
src/types/Component/Confirm.d.ts
vendored
2
src/types/Component/Confirm.d.ts
vendored
@@ -19,7 +19,7 @@ declare namespace TGApp.Component.Confirm {
|
||||
export interface Params {
|
||||
title: string;
|
||||
text?: string;
|
||||
mode: "confirm" | "input";
|
||||
mode?: "confirm" | "input";
|
||||
otcancel?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user