feat: 添加webfirst前端路由
This commit is contained in:
@@ -51,11 +51,11 @@ async close(){
|
|||||||
//使用async和await 或 promise的then 和catch 处理来自服务端的异常
|
//使用async和await 或 promise的then 和catch 处理来自服务端的异常
|
||||||
await this.SR.start();
|
await this.SR.start();
|
||||||
//console.assert(this.SR.state === signalR.HubConnectionState.Connected);
|
//console.assert(this.SR.state === signalR.HubConnectionState.Connected);
|
||||||
console.log('signalR 连接成功了', this.SR.state);
|
//console.log('signalR 连接成功了', this.SR.state);
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
that.failNum--;
|
that.failNum--;
|
||||||
console.log(`失败重试剩余次数${that.failNum}`, error)
|
//console.log(`失败重试剩余次数${that.failNum}`, error)
|
||||||
if (that.failNum > 0) {
|
if (that.failNum > 0) {
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await this.SR.start()
|
await this.SR.start()
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
字段:{{ field }}
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import useFieldHook from '../hooks/fieldHook'
|
||||||
|
const {field}=useFieldHook();
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<template>表={{ table }}</template>
|
||||||
|
<script setup>
|
||||||
|
import useTableHook from '../hooks/tableHook'
|
||||||
|
const {table}=useTableHook();
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
const useFieldHooks=()=>{
|
||||||
|
const field=ref("zd")
|
||||||
|
onMounted(() => {
|
||||||
|
console.log(`the component is now mounted. field`)
|
||||||
|
});
|
||||||
|
return {field};
|
||||||
|
}
|
||||||
|
export default useFieldHooks;
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
const useTableHooks=()=>{
|
||||||
|
const table=ref("bg")
|
||||||
|
onMounted(() => {
|
||||||
|
console.log(`the component is now mounted. table`)
|
||||||
|
});
|
||||||
|
return {table};
|
||||||
|
}
|
||||||
|
export default useTableHooks;
|
||||||
8
Yi.RuoYi.Vue3/src/views/webfirst/table/index.vue
Normal file
8
Yi.RuoYi.Vue3/src/views/webfirst/table/index.vue
Normal 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>
|
||||||
Reference in New Issue
Block a user