mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🐛 definedProps无法引入外部Typescript类型定义
This commit is contained in:
@@ -36,7 +36,14 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, reactive, ref, watch } from "vue";
|
||||
|
||||
const props = withDefaults(defineProps<TGApp.Component.Confirm.Params>(), {
|
||||
interface ConfirmProps {
|
||||
title: string;
|
||||
text?: string;
|
||||
mode?: "confirm" | "input";
|
||||
otcancel?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<ConfirmProps>(), {
|
||||
title: "",
|
||||
text: "",
|
||||
mode: "confirm",
|
||||
|
||||
@@ -10,7 +10,13 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
|
||||
const props = withDefaults(defineProps<TGApp.Component.Snackbar.Params>(), {
|
||||
interface SnackbarProps {
|
||||
text: string;
|
||||
color?: string;
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<SnackbarProps>(), {
|
||||
text: "",
|
||||
color: "success",
|
||||
timeout: 1500,
|
||||
@@ -41,6 +47,8 @@ function transColor(color: string): string {
|
||||
return "#faad14";
|
||||
case "info":
|
||||
return "#1890ff";
|
||||
case "cancel":
|
||||
return "#ABB2BF";
|
||||
default:
|
||||
return color;
|
||||
}
|
||||
@@ -95,7 +103,7 @@ defineExpose({
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.func-snackbar .func-snackbar-text {
|
||||
.func-snackbar-text {
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
|
||||
Reference in New Issue
Block a user