当前位置:网站首页>[technical tutorial] national standard protocol platform easygbs cascading supports customized national standard channels
[technical tutorial] national standard protocol platform easygbs cascading supports customized national standard channels
2022-06-24 10:53:00 【Tsingsee green rhino video】
GB protocol video platform EasyGBS It can connect with the public security network 、 The national standard protocol video streaming media service of campus network , For many projects , The cascading function of GB protocol is a very practical function , Connecting the upper and lower platforms and realizing unified management are the requirements of many projects .
stay EasyGBS In the latest development process , We did EasyGBS Cascade custom GB channel , This article shares with you our implementation process and methods .
1. Create a new one InputTag.vue The custom component is used to edit custom cascading GB channels .
<template>
<div>
<el-input
class="input-new-tag"
v-if="inputVisible"
v-model="inputValue"
type="number"
ref="saveTagInput"
size="small"
@keyup.enter.native="handleInputConfirm"
@blur="handleInputConfirm"
>
</el-input>
<el-button type="text" v-else class="button-new-tag" size="small" @click="showInput">{{channel.CustomID || channel.ID}}</el-button>
</div>
</template>
<script>
export default {
props: ['channel'],
data() {
return {
inputVisible: false,
inputValue: ''
};
},
methods: {
showInput() {
this.inputValue = this.channel.CustomID || this.channel.ID
this.inputVisible = true;
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm() {
let inputValue = this.inputValue;
let lodInputValue = this.channel.CustomID || this.channel.ID
if (inputValue&&lodInputValue!=inputValue) {
this.$emit('submit', this.channel, inputValue)
}
this.inputVisible = false;
}
}
}
</script>
<style lang="scss" >
.button-new-tag {
width: 100%;
text-align: left;
padding: 0 4px!important;
height: 32px;
font-size: 14px;
&:hover {
color: #FF4D23 !important;
background-color: transparent !important;
}
}
.input-new-tag {
height: 22px;
border: 1px solid #606266;
vertical-align: bottom;
.el-input__inner {
padding: 0 4px;
height: 20px;
}
}
</style>2. Import... In the components to be imported InputTag.vue Components .
import InputTag from "./InputTag.vue";
export default {
components: {
InputTag
}
}3. Add a column of custom edit channels to the table , And introduce a custom InputTag Components , Component has two properties , One channel Channel information required ,submit Submit the edited callback function .
<el-table-column label=" Custom channel national standard number " min-width="180" show-overflow-tooltip > <template slot-scope="props"> <div> <InputTag :channel="props.row" @submit="onCustomSubmit"/> </div> </template> </el-table-column>
4. When you click Customize ID The input box... Will be displayed , You can edit the channel by yourself , If you lose focus in the input box, it will be automatically uploaded to the server and saved .
The preview of the effect is as follows :
边栏推荐
- Fashionable pop-up mode login registration window
- 24. image mosaic operation
- Spark提交参数--files的使用
- Outils de capture de paquets
- 26. delete duplicates of ordered array
- The difference between the sleep () method and the wait () method of a thread
- Learn to use PHP to implement unlimited comments and unlimited to secondary comments solutions
- [latest in the whole network] how to start the opentsdb source code in the local ide run
- 26.删除有序数组的重复项
- Spark submission parameter -- use of files
猜你喜欢

88. merge ordered arrays

Spark submission parameter -- use of files

服乔布斯不服库克,苹果传奇设计团队解散内幕曝光

Fais ce que tu veux.

Hill sorting graphic explanation + code implementation

Thread pool execution process

Solve the timeout of Phoenix query of dbeaver SQL client connection

2022 the most complete and detailed JMeter interface test tutorial and detailed interface test process in the whole network - JMeter test plan component (thread < user >)

Today's sleep quality record 76 points

进程与多线程
随机推荐
24. image mosaic operation
【IEEE】自然语言处理与信息检索国际会议(ECNLPIR 2022)
機械臂速成小指南(二):機械臂的應用
charles抓包工具使用教程
Cool interactive animation JS special effects implemented by p5.js
Niuke-top101-bm28
栈题目:函数的独占时间
Multithreaded applications - improve efficiency
Besides technology, programmers also need to master a skill - self marketing ability
2022 International Symposium on intelligent robots and systems (isoirs 2022)
腾讯开源项目「应龙」成Apache顶级项目:前身长期服务微信支付,能hold住百万亿级数据流处理...
【本周六活动】.NET Day in China
今日睡眠质量记录76分
Canvas infinite scan JS special effect code
126. word Solitaire II BFS
常用的第三方ui框架
Hbuilder makes hero skin lottery games
2022 the most complete and detailed JMeter interface test tutorial and detailed interface test process in the whole network - JMeter test plan component (thread < user >)
Plant growth H5 animation JS special effect
88. merge ordered arrays