refactor(front): 重构前端组件和 API
- 更新了多个组件的样式和结构 - 重命名了一些 API 文件 - 添加了新的 API 接口 - 优化了部分代码的可读性和性能
This commit is contained in:
@@ -98,13 +98,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.dashboard-editor-container {
|
||||
padding: 18px 22px 22px 22px;
|
||||
background-color: rgb(240, 242, 245);
|
||||
.chart-wrapper {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.dashboard-editor-container {
|
||||
padding: 18px 22px 22px 22px;
|
||||
background-color: rgb(240, 242, 245);
|
||||
|
||||
.chart-wrapper {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -45,23 +45,26 @@
|
||||
export default {
|
||||
name: 'SplitPaneDemo',
|
||||
methods: {
|
||||
resize() {}
|
||||
resize() {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.wrap{
|
||||
height:300px;
|
||||
.paneL{
|
||||
background-color:red;
|
||||
height:100%;
|
||||
width:100%;
|
||||
.wrap {
|
||||
height: 300px;
|
||||
|
||||
.paneL {
|
||||
background-color: red;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.paneR{
|
||||
|
||||
.paneR {
|
||||
background-color: blue;
|
||||
height:100%;
|
||||
width:100%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
import MyWebSocket from '@/utils/websocket'
|
||||
import { mapGetters } from 'vuex'
|
||||
import CsWsClient from '@/utils/CsWsClient'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -22,12 +21,6 @@ export default {
|
||||
responseTxt: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'websocketApi',
|
||||
'user'
|
||||
])
|
||||
},
|
||||
// mounted() {},
|
||||
destroyed() {
|
||||
if (this.client) {
|
||||
@@ -39,7 +32,7 @@ export default {
|
||||
// 获取mapGetters中的值
|
||||
// console.error('userInfo', this.user)
|
||||
const that = this
|
||||
that.client = new MyWebSocket(that, that.websocketApi.replaceAll('{sid}', that.user.username))
|
||||
that.client = new CsWsClient(that)
|
||||
that.client.connect(function(event) {
|
||||
console.info('=============== MyWebSocket:event', event)
|
||||
}, function(msgEvent) {
|
||||
|
||||
Reference in New Issue
Block a user