Skip to content

Commit caa7408

Browse files
authored
Merge pull request eee555#63 from putianyi889/patch-48
`clickable` style 改成 `el-link`
2 parents bb5e552 + 5dd16c3 commit caa7408

File tree

3 files changed

+15
-52
lines changed

3 files changed

+15
-52
lines changed

front_end/src/components/PlayerName.vue

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<template>
22
<span @click.stop>
33
<el-popover v-if="render" :visible="visible" placement="bottom" width="298px"
4-
popper-class="max-h-300px overflow-auto" @show="pop_show" @hide="pop_hide" popper-style="z-index:888;"
5-
:show-after="0" :hide-after="0">
4+
popper-class="max-h-300px overflow-auto" @show="pop_show" @hide="pop_hide" popper-style="z-index:888;">
65
<div>
76
<div style="width: 80px;float: left;line-height: 200%;">
87
<el-image style="width: 72px; height: 72px;margin-top: 10px;border-radius: 8px;" :src="image_url"
@@ -33,29 +32,24 @@
3332

3433
</div>
3534
<template #reference>
36-
<span href="" target="_blank" class="clickable" @click="visible = !visible">{{ data.user_name }}
37-
</span>
35+
<el-link :underline="false" @click="visible = !visible">{{ data.user_name }}</el-link>
3836
</template>
3937
</el-popover>
40-
<span v-else href="" target="_blank" class="clickable" @click="render = true; visible = true">{{ data.user_name
41-
}}
42-
</span>
38+
<el-link v-else :underline="false" @click="render = true; visible = true">{{ data.user_name }}</el-link>
4339
</span>
4440
</template>
4541

4642
<script setup lang="ts" name="PlayerName">
4743
// 用户的名字,鼠标移上去以后弹出气泡框,可以访问他的主页
48-
import { onMounted, watch, ref, toRefs } from "vue";
49-
import { getCurrentInstance } from 'vue';
44+
import { ref } from "vue";
5045
import useCurrentInstance from "@/utils/common/useCurrentInstance";
5146
const { proxy } = useCurrentInstance();
52-
import { genFileId, ElMessage } from 'element-plus'
5347
import image_url_default from '@/assets/person.png';
5448
const image_url = ref(image_url_default);
5549
// import PreviewDownload from '@/components/PreviewDownload.vue';
5650
import PreviewNumber from '@/components/PreviewNumber.vue';
5751
import { useRouter } from 'vue-router'
58-
import { ms_to_s } from "@/utils"
52+
import { ms_to_s, to_fixed_n } from "@/utils"
5953
const router = useRouter()
6054
import { useUserStore } from '../store'
6155
const store = useUserStore()
@@ -72,6 +66,7 @@ const data = defineProps({
7266
7367
const render = ref<Boolean>(false);
7468
const visible = ref<Boolean>(false);
69+
const is_loading = ref(true);
7570
7671
const realname = ref("");
7772
const id = ref("");
@@ -88,10 +83,6 @@ const e_bvs = ref("");
8883
const e_t_id = ref("");
8984
const e_bvs_id = ref("");
9085
91-
// 控制加载时的小圈圈
92-
const is_loading = ref(true);
93-
94-
9586
const pop_show = async () => {
9687
is_loading.value = true;
9788
@@ -138,7 +129,6 @@ const pop_show = async () => {
138129
139130
}
140131
141-
142132
// 用户记录小弹窗关闭后,删除其中的数据
143133
const pop_hide = () => {
144134
image_url.value = image_url_default;
@@ -159,20 +149,6 @@ const pop_hide = () => {
159149
is_loading.value = true;
160150
}
161151
162-
function to_fixed_n(input: string | number | undefined, to_fixed: number): string | number | undefined {
163-
// 返回保留to_fixed位小数的字符串,四舍六入五取双
164-
if (input === undefined) {
165-
return input;
166-
}
167-
if (to_fixed <= 0) {
168-
return input;
169-
}
170-
if (typeof (input) == "string") {
171-
return parseFloat(input).toFixed(to_fixed);
172-
}
173-
return (input as number).toFixed(to_fixed);
174-
}
175-
176152
const visit_me = (user_id: Number) => {
177153
// proxy.$store.commit('updatePlayer', { "id": id.value, "realname":realname.value });
178154
// localStorage.setItem("player", JSON.stringify({ "id": id.value, "realname":realname.value }));
@@ -183,9 +159,4 @@ const visit_me = (user_id: Number) => {
183159
184160
</script>
185161

186-
<style lang="less" scoped>
187-
.clickable:hover {
188-
color: rgb(26, 127, 228);
189-
cursor: pointer;
190-
}
191-
</style>
162+
<style lang="less" scoped></style>

front_end/src/components/PreviewNumber.vue

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
<template>
22
<Teleport to=".common-layout">
3-
<el-dialog v-if="preview_visible" v-model="preview_visible"
4-
style="backdrop-filter: blur(1px);" draggable align-center
5-
destroy-on-close :modal="false" :lock-scroll="false">
6-
<iframe class="flop-player-iframe flop-player-display-none"
7-
style="width: 100%; height: 500px; border: 0px" src="/flop/index.html" ref="video_iframe"></iframe>
3+
<el-dialog v-if="preview_visible" v-model="preview_visible" style="backdrop-filter: blur(1px);" draggable
4+
align-center destroy-on-close :modal="false" :lock-scroll="false">
5+
<iframe class="flop-player-iframe flop-player-display-none" style="width: 100%; height: 500px; border: 0px"
6+
src="/flop/index.html" ref="video_iframe"></iframe>
87
</el-dialog>
98
</Teleport>
10-
<span v-if="data.id" @click="preview(data.id);" class="clickable">{{ data.text }}</span>
9+
<el-link v-if="data.id" :underline="false" @click="preview(data.id);" class="clickable">{{ data.text }}</el-link>
1110
<span v-else>--</span>
1211
</template>
1312

1413
<script setup lang="ts" name="PreviewNumber">
1514
// 某个数字或字符串,点击后预览
16-
import { onMounted, watch, ref, toRefs } from "vue";
15+
import { ref } from "vue";
1716
import useCurrentInstance from "@/utils/common/useCurrentInstance";
1817
import { generalNotification } from "@/utils/system/status";
1918
import { useI18n } from "vue-i18n";
@@ -31,7 +30,6 @@ const data = defineProps({
3130
})
3231
3332
34-
3533
const preview = (id: Number | undefined) => {
3634
if (!id) {
3735
return
@@ -89,9 +87,4 @@ const playVideo = function (uri: string) {
8987
9088
</script>
9189

92-
<style lang="less" scoped>
93-
.clickable:hover {
94-
color: rgb(26, 127, 228);
95-
cursor: pointer;
96-
}
97-
</style>
90+
<style lang="less" scoped></style>

front_end/src/components/VideoList.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@
3838
<script setup lang="ts">
3939
// 录像列表的组件
4040
41-
import { ref, watch, computed } from 'vue'
41+
import { ref, computed } from 'vue'
4242
import { utc_to_local_format } from "@/utils/system/tools";
4343
import PlayerName from '@/components/PlayerName.vue';
4444
const preview_visible = ref(false);
4545
import useCurrentInstance from "@/utils/common/useCurrentInstance";
46-
import { getRowIdentity } from 'element-plus/es/components/table/src/util';
4746
import { Check, Close } from '@element-plus/icons-vue';
4847
import { ElNotification } from 'element-plus';
4948

0 commit comments

Comments
 (0)