mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
🔥 删除无用代码
This commit is contained in:
@@ -37,11 +37,9 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
// vue
|
// vue
|
||||||
import { computed, inject } from "vue";
|
import { computed } from "vue";
|
||||||
import TOverlay from "../main/t-overlay.vue";
|
import TOverlay from "../main/t-overlay.vue";
|
||||||
|
|
||||||
const test = inject("hide");
|
|
||||||
|
|
||||||
interface TOConfirmProps {
|
interface TOConfirmProps {
|
||||||
title: string;
|
title: string;
|
||||||
subtitle?: string;
|
subtitle?: string;
|
||||||
@@ -72,26 +70,30 @@ const props = withDefaults(defineProps<TOConfirmProps>(), {
|
|||||||
|
|
||||||
const visible = computed({
|
const visible = computed({
|
||||||
get: () => props.modelValue,
|
get: () => props.modelValue,
|
||||||
set: (v) => emits("update:modelValue", v),
|
set: (v) => {
|
||||||
|
emits("update:modelValue", v);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const inputVal = computed({
|
const inputVal = computed({
|
||||||
get: () => props.modelInput,
|
get: () => props.modelInput,
|
||||||
set: (v) => emits("update:modelInput", v),
|
set: (v) => {
|
||||||
|
emits("update:modelInput", v);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const onCancel = () => {
|
function onCancel(): void {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
emits("cancel");
|
emits("cancel");
|
||||||
};
|
}
|
||||||
|
|
||||||
const onConfirm = () => {
|
function onConfirm(): void {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
emits("confirm");
|
emits("confirm");
|
||||||
if (props.isInput) {
|
if (props.isInput) {
|
||||||
inputVal.value = "";
|
inputVal.value = "";
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user