✏️ fix typo

This commit is contained in:
BTMuli
2023-08-29 18:39:40 +08:00
parent 76687ab4f7
commit 0033565c58
3 changed files with 6 additions and 8 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -19,7 +19,7 @@ declare namespace TGApp.Component.Confirm {
export interface Params {
title: string;
text?: string;
mode: "confirm" | "input";
mode?: "confirm" | "input";
otcancel?: boolean;
}
}