mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2026-01-15 02:57:09 +08:00
style: 调整 Vue 组件内 script 标签到 template 标签之前
1.template 和 style 挨在一起,便于样式调整 2.打开文件,可以便于修改 Script 代码
This commit is contained in:
@@ -1,3 +1,30 @@
|
||||
<script lang="ts" setup>
|
||||
import { useAppStore } from '@/store';
|
||||
import useResponsive from '@/hooks/responsive';
|
||||
import { socialAuth } from '@/api/auth';
|
||||
import AccountLogin from './components/account-login.vue';
|
||||
import PhoneLogin from './components/phone-login.vue';
|
||||
import EmailLogin from './components/email-login.vue';
|
||||
|
||||
const appStore = useAppStore();
|
||||
useResponsive(true);
|
||||
const isEmailLogin = ref(false);
|
||||
|
||||
/**
|
||||
* 第三方登录授权
|
||||
*
|
||||
* @param source 来源
|
||||
*/
|
||||
const handleSocialAuth = async (source: string) => {
|
||||
const { data } = await socialAuth(source);
|
||||
window.location.href = data;
|
||||
};
|
||||
|
||||
const toggleLoginMode = () => {
|
||||
isEmailLogin.value = !isEmailLogin.value;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="root">
|
||||
<div class="header">
|
||||
@@ -71,33 +98,6 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useAppStore } from '@/store';
|
||||
import useResponsive from '@/hooks/responsive';
|
||||
import { socialAuth } from '@/api/auth';
|
||||
import AccountLogin from './components/account-login.vue';
|
||||
import PhoneLogin from './components/phone-login.vue';
|
||||
import EmailLogin from './components/email-login.vue';
|
||||
|
||||
const appStore = useAppStore();
|
||||
useResponsive(true);
|
||||
const isEmailLogin = ref(false);
|
||||
|
||||
/**
|
||||
* 第三方登录授权
|
||||
*
|
||||
* @param source 来源
|
||||
*/
|
||||
const handleSocialAuth = async (source: string) => {
|
||||
const { data } = await socialAuth(source);
|
||||
window.location.href = data;
|
||||
};
|
||||
|
||||
const toggleLoginMode = () => {
|
||||
isEmailLogin.value = !isEmailLogin.value;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.root {
|
||||
background-image: url(https://z1.ax1x.com/2023/09/27/pPbnTOK.jpg);
|
||||
|
||||
Reference in New Issue
Block a user