init项目
This commit is contained in:
15
frontend/src/views/Child.vue
Normal file
15
frontend/src/views/Child.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
defineOptions({
|
||||
name: "componentName"
|
||||
})
|
||||
import {ref, reactive} from 'vue'
|
||||
let select = ref(1)
|
||||
|
||||
defineExpose({ select })
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
36
frontend/src/views/Login.vue
Normal file
36
frontend/src/views/Login.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<div ref="loginContent" class="text-xl text-red-600">
|
||||
<!--用户名密码,暂时不做图形验证码-->
|
||||
<h1 ref="loginTitle">123</h1>
|
||||
<Child ref="child"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
defineOptions({
|
||||
name: "Login"
|
||||
})
|
||||
import {ref, reactive,onMounted} from 'vue'
|
||||
import Child from './Child.vue'
|
||||
let loginContent = ref()
|
||||
let loginTitle = ref()
|
||||
let child = ref()
|
||||
|
||||
function showLog(){
|
||||
console.log(child.value)
|
||||
}
|
||||
|
||||
showLog()
|
||||
|
||||
console.log(loginTitle.value);
|
||||
console.log(child.value);
|
||||
onMounted(() => {
|
||||
console.log(loginTitle.value);
|
||||
console.log(child.value);
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user