🔥 删除无用代码

This commit is contained in:
BTMuli
2023-07-15 18:39:52 +08:00
parent 12c71a176f
commit f083886a98

View File

@@ -37,11 +37,9 @@
<script lang="ts" setup>
// vue
import { computed, inject } from "vue";
import { computed } from "vue";
import TOverlay from "../main/t-overlay.vue";
const test = inject("hide");
interface TOConfirmProps {
title: string;
subtitle?: string;
@@ -72,26 +70,30 @@ const props = withDefaults(defineProps<TOConfirmProps>(), {
const visible = computed({
get: () => props.modelValue,
set: (v) => emits("update:modelValue", v),
set: (v) => {
emits("update:modelValue", v);
},
});
const inputVal = computed({
get: () => props.modelInput,
set: (v) => emits("update:modelInput", v),
set: (v) => {
emits("update:modelInput", v);
},
});
const onCancel = () => {
function onCancel(): void {
visible.value = false;
emits("cancel");
};
}
const onConfirm = () => {
function onConfirm(): void {
visible.value = false;
emits("confirm");
if (props.isInput) {
inputVal.value = "";
}
};
}
</script>
<style scoped>