瀏覽代碼

fix: 协议配置默认参数

lvkun 3 年之前
父節點
當前提交
f377188ef3
共有 2 個文件被更改,包括 7 次插入3 次删除
  1. 6 2
      src/pages/rts/protocol/index.vue
  2. 1 1
      src/router/index.ts

+ 6 - 2
src/pages/rts/protocol/index.vue

@@ -31,7 +31,7 @@
 </template>
 <script lang="ts" setup >
 import { RtsController } from '@/controller/rts'
-import { reactive, ref, watch } from 'vue'
+import { onMounted, reactive, ref, watch } from 'vue'
 import { CodeMirrorTsx } from '@/components/CodeMirror/index'
 import { useScheduler } from '@/hooks'
 import { Empty } from 'ant-design-vue'
@@ -45,7 +45,7 @@ const state = reactive<{
   bodyJson: string
   loading: boolean
 }>({
-  name: '',
+  name: 'RTSP',
   bodyJson: '',
   loading: false
 })
@@ -68,6 +68,10 @@ const getProtocol = async () => {
   start()
   state.bodyJson = JSON.stringify(data)
 }
+
+onMounted(() => {
+  getProtocol()
+})
 </script>
 
 <style lang="less" scoped >

+ 1 - 1
src/router/index.ts

@@ -177,7 +177,7 @@ export const routes: Array<ROUTER.RoutesProps> = [
       },
       {
         path: '/protocol',
-        name: ' 协议配置',
+        name: '协议配置',
         icon: 'DeploymentUnitOutlined',
         component: () => import('@/pages/rts/protocol/index.vue')
       },