mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
Loginmodal -> script setup
This commit is contained in:
parent
f2f64fe903
commit
754fabb5b2
|
@ -7,41 +7,28 @@
|
|||
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: {
|
||||
loginText: { required: false, default: 'Login', type: String },
|
||||
},
|
||||
setup() {
|
||||
const loginViewOpen = ref(false);
|
||||
const loginForm = ref<HTMLFormElement>();
|
||||
const handleLoginResult = (result: boolean) => {
|
||||
if (result) {
|
||||
loginViewOpen.value = false;
|
||||
}
|
||||
};
|
||||
const handleOk = () => {
|
||||
loginForm.value?.handleSubmit();
|
||||
};
|
||||
return {
|
||||
loginViewOpen,
|
||||
loginForm,
|
||||
handleOk,
|
||||
handleLoginResult,
|
||||
};
|
||||
},
|
||||
defineProps({
|
||||
loginText: { required: false, default: 'Login', type: String },
|
||||
});
|
||||
const loginViewOpen = ref(false);
|
||||
const loginForm = ref<HTMLFormElement>();
|
||||
const handleLoginResult = (result: boolean) => {
|
||||
if (result) {
|
||||
loginViewOpen.value = false;
|
||||
}
|
||||
};
|
||||
const handleOk = () => {
|
||||
loginForm.value?.handleSubmit();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
Loading…
Reference in New Issue
Block a user