Loginmodal -> script setup

This commit is contained in:
Matthias 2022-12-08 20:22:23 +01:00
parent f2f64fe903
commit 754fabb5b2

View File

@ -7,23 +7,18 @@
title="Login to your bot"
@ok="handleOk"
>
<Login ref="loginForm" in-modal @loginResult="handleLoginResult" />
<login ref="loginForm" in-modal @loginResult="handleLoginResult" />
</b-modal>
</div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
<script setup lang="ts">
import Login from '@/components/Login.vue';
import { ref } from 'vue';
export default defineComponent({
name: 'LoginModal',
components: { Login },
props: {
defineProps({
loginText: { required: false, default: 'Login', type: String },
},
setup() {
});
const loginViewOpen = ref(false);
const loginForm = ref<HTMLFormElement>();
const handleLoginResult = (result: boolean) => {
@ -34,14 +29,6 @@ export default defineComponent({
const handleOk = () => {
loginForm.value?.handleSubmit();
};
return {
loginViewOpen,
loginForm,
handleOk,
handleLoginResult,
};
},
});
</script>
<style scoped></style>