新增signalR连接

This commit is contained in:
不做码农
2022-02-27 21:11:46 +08:00
parent 2a84f7d322
commit 748b9065db
15 changed files with 259 additions and 61 deletions

View File

@@ -7,9 +7,9 @@
</div>
<div class="card-panel-description">
<div class="card-panel-text">
访客
在线用户
</div>
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />
<count-to :start-val="0" :end-val="onlineUserNum" :duration="2600" class="card-panel-num" />
</div>
</div>
</el-col>
@@ -56,18 +56,21 @@
</template>
<script>
import CountTo from 'vue-count-to'
import CountTo from "vue-count-to";
import { mapGetters } from "vuex";
export default {
components: {
CountTo
CountTo,
},
computed: {
...mapGetters(["onlineUserNum"]),
},
methods: {
handleSetLineChartData(type) {
this.$emit('handleSetLineChartData', type)
}
}
}
this.$emit("handleSetLineChartData", type);
},
},
};
</script>
<style lang="scss" scoped>
@@ -86,8 +89,8 @@ export default {
overflow: hidden;
color: #666;
background: #fff;
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
border-color: rgba(0, 0, 0, .05);
box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
border-color: rgba(0, 0, 0, 0.05);
&:hover {
.card-panel-icon-wrapper {
@@ -107,7 +110,7 @@ export default {
}
.icon-shopping {
background: #34bfa3
background: #34bfa3;
}
}
@@ -124,7 +127,7 @@ export default {
}
.icon-shopping {
color: #34bfa3
color: #34bfa3;
}
.card-panel-icon-wrapper {
@@ -160,7 +163,7 @@ export default {
}
}
@media (max-width:550px) {
@media (max-width: 550px) {
.card-panel-description {
display: none;
}