feat: 添加webfirst前端路由

This commit is contained in:
橙子
2023-09-24 23:41:26 +08:00
parent 349a041d71
commit 04278f553e
6 changed files with 40 additions and 2 deletions

View File

@@ -51,11 +51,11 @@ async close(){
//使用async和await 或 promise的then 和catch 处理来自服务端的异常
await this.SR.start();
//console.assert(this.SR.state === signalR.HubConnectionState.Connected);
console.log('signalR 连接成功了', this.SR.state);
//console.log('signalR 连接成功了', this.SR.state);
return true;
} catch (error) {
that.failNum--;
console.log(`失败重试剩余次数${that.failNum}`, error)
//console.log(`失败重试剩余次数${that.failNum}`, error)
if (that.failNum > 0) {
setTimeout(async () => {
await this.SR.start()

View File

@@ -0,0 +1,7 @@
<template>
字段:{{ field }}
</template>
<script setup>
import useFieldHook from '../hooks/fieldHook'
const {field}=useFieldHook();
</script>

View File

@@ -0,0 +1,5 @@
<template>={{ table }}</template>
<script setup>
import useTableHook from '../hooks/tableHook'
const {table}=useTableHook();
</script>

View File

@@ -0,0 +1,9 @@
const useFieldHooks=()=>{
const field=ref("zd")
onMounted(() => {
console.log(`the component is now mounted. field`)
});
return {field};
}
export default useFieldHooks;

View File

@@ -0,0 +1,9 @@
const useTableHooks=()=>{
const table=ref("bg")
onMounted(() => {
console.log(`the component is now mounted. table`)
});
return {table};
}
export default useTableHooks;

View File

@@ -0,0 +1,8 @@
<template>
<TableList></TableList>
<FieldList></FieldList>
</template>
<script setup>
import FieldList from './components/FieldList.vue'
import TableList from './components/tableList.vue'
</script>