Commit ef098c9f117b4e26fa638db31163fd55775afb47
Merge branch 'ft' into 'main_dev'
fix(external/Componse): 修复三个小标题渐变ID值重复问题 See merge request yunteng/thingskit-view!34
Showing
5 changed files
with
22 additions
and
20 deletions
@@ -2,7 +2,14 @@ | @@ -2,7 +2,14 @@ | ||
2 | <n-dropdown trigger="hover" @select="handleSelect" :show-arrow="true" :options="options"> | 2 | <n-dropdown trigger="hover" @select="handleSelect" :show-arrow="true" :options="options"> |
3 | <div class="user-info-box"> | 3 | <div class="user-info-box"> |
4 | <person-icon v-if="fallback"></person-icon> | 4 | <person-icon v-if="fallback"></person-icon> |
5 | - <n-avatar v-if="!fallback" round object-fit="cover" size="medium" :src="Person" @error="errorHandle"></n-avatar> | 5 | + <n-avatar |
6 | + v-if="!fallback" | ||
7 | + round | ||
8 | + object-fit="cover" | ||
9 | + size="medium" | ||
10 | + :src="!avatarLogo ? Person : avatarLogo" | ||
11 | + @error="errorHandle" | ||
12 | + ></n-avatar> | ||
6 | </div> | 13 | </div> |
7 | </n-dropdown> | 14 | </n-dropdown> |
8 | 15 | ||
@@ -31,6 +38,7 @@ const { dataSyncUpdate } = useSyncRemote() | @@ -31,6 +38,7 @@ const { dataSyncUpdate } = useSyncRemote() | ||
31 | 38 | ||
32 | const modelShowInfo = ref(false) | 39 | const modelShowInfo = ref(false) |
33 | const modelShow = ref(false) | 40 | const modelShow = ref(false) |
41 | +const avatarLogo = ref('') | ||
34 | 42 | ||
35 | // 是否失败 | 43 | // 是否失败 |
36 | const fallback = ref(false) | 44 | const fallback = ref(false) |
@@ -39,7 +47,7 @@ const fallback = ref(false) | @@ -39,7 +47,7 @@ const fallback = ref(false) | ||
39 | const renderUserInfo = () => { | 47 | const renderUserInfo = () => { |
40 | const userStoreOverride = useUserStore() | 48 | const userStoreOverride = useUserStore() |
41 | const { username, avatar } = userStoreOverride.getUserInfo | 49 | const { username, avatar } = userStoreOverride.getUserInfo |
42 | - console.log(userStoreOverride.getUserInfo) | 50 | + avatarLogo.value = avatar as string |
43 | return h( | 51 | return h( |
44 | 'div', | 52 | 'div', |
45 | { | 53 | { |
@@ -49,7 +57,7 @@ const renderUserInfo = () => { | @@ -49,7 +57,7 @@ const renderUserInfo = () => { | ||
49 | h(NAvatar, { | 57 | h(NAvatar, { |
50 | round: true, | 58 | round: true, |
51 | style: 'margin-right: 12px;', | 59 | style: 'margin-right: 12px;', |
52 | - src: Person | 60 | + src: !avatar ? Person : avatar |
53 | }), | 61 | }), |
54 | h('div', null, [ | 62 | h('div', null, [ |
55 | h('div', null, [ | 63 | h('div', null, [ |
@@ -48,12 +48,6 @@ let newData = ref('2021-2-3 08:00:00') | @@ -48,12 +48,6 @@ let newData = ref('2021-2-3 08:00:00') | ||
48 | 48 | ||
49 | let timer: any = null | 49 | let timer: any = null |
50 | 50 | ||
51 | -//默认设置宽高距离位置 | ||
52 | -props.chartConfig.attr.w = 1920 | ||
53 | -props.chartConfig.attr.h = 148 | ||
54 | -props.chartConfig.attr.x = 0 | ||
55 | -props.chartConfig.attr.y = 0 | ||
56 | - | ||
57 | watch( | 51 | watch( |
58 | () => props.chartConfig.option, | 52 | () => props.chartConfig.option, |
59 | (newData: any) => { | 53 | (newData: any) => { |
1 | <template> | 1 | <template> |
2 | <div class="go-content-box" :style="{ width: w + 'px', height: h + 'px' }"> | 2 | <div class="go-content-box" :style="{ width: w + 'px', height: h + 'px' }"> |
3 | - <video id="my-player" ref="videoRef" class="video-js my-video"> | 3 | + <video id="my-player" ref="videoRef" class="video-js my-video vjs-theme-city vjs-big-play-centered"> |
4 | <source :src="dataset" /> | 4 | <source :src="dataset" /> |
5 | </video> | 5 | </video> |
6 | </div> | 6 | </div> |
@@ -2,11 +2,11 @@ | @@ -2,11 +2,11 @@ | ||
2 | <div class="go-content-box"> | 2 | <div class="go-content-box"> |
3 | <svg :width="w" :height="h" fill="none"> | 3 | <svg :width="w" :height="h" fill="none"> |
4 | <defs xmlns="http://www.w3.org/2000/svg"> | 4 | <defs xmlns="http://www.w3.org/2000/svg"> |
5 | - <linearGradient id="linear_title2_u" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> | 5 | + <linearGradient id="title2_0" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> |
6 | <stop offset="0" :stop-color="attribute.linearColors[0]" stop-opacity="1" /> | 6 | <stop offset="0" :stop-color="attribute.linearColors[0]" stop-opacity="1" /> |
7 | <stop offset="1" :stop-color="attribute.linearColors[1]" stop-opacity="1" /> | 7 | <stop offset="1" :stop-color="attribute.linearColors[1]" stop-opacity="1" /> |
8 | </linearGradient> | 8 | </linearGradient> |
9 | - <linearGradient id="linear_title2_d" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> | 9 | + <linearGradient id="title2_1" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> |
10 | <stop offset="0" :stop-color="attribute.linearColors[3]" stop-opacity="1" /> | 10 | <stop offset="0" :stop-color="attribute.linearColors[3]" stop-opacity="1" /> |
11 | <stop offset="1" :stop-color="attribute.linearColors[4]" stop-opacity="0" /> | 11 | <stop offset="1" :stop-color="attribute.linearColors[4]" stop-opacity="0" /> |
12 | </linearGradient> | 12 | </linearGradient> |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | <path | 15 | <path |
16 | id="矩形 title2_u" | 16 | id="矩形 title2_u" |
17 | fill-rule="evenodd" | 17 | fill-rule="evenodd" |
18 | - fill="url(#linear_title2_u)" | 18 | + fill="url(#title2_0)" |
19 | transform="translate(0 0) rotate(0 160 15)" | 19 | transform="translate(0 0) rotate(0 160 15)" |
20 | opacity="1" | 20 | opacity="1" |
21 | :d="`M2.77,${h} L${w},${h} L${w},0 L${ | 21 | :d="`M2.77,${h} L${w},${h} L${w},0 L${ |
@@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
24 | /> | 24 | /> |
25 | <path | 25 | <path |
26 | id="矩形 title2_u" | 26 | id="矩形 title2_u" |
27 | - style="stroke: url(#linear_title2_d); stroke-width: 1; stroke-opacity: 100; stroke-dasharray: 0 0" | 27 | + style="stroke: url(#title2_1); stroke-width: 1; stroke-opacity: 100; stroke-dasharray: 0 0" |
28 | transform="translate(0 0) rotate(0 160 15)" | 28 | transform="translate(0 0) rotate(0 160 15)" |
29 | :d="`M2.77,${h} L${w},${h} L${w},0 L11.44,0 C10.58,0 9.81,0.55 9.54,1.37 L0.88,27.37 C0.68,27.98 0.78,28.65 1.15,29.17 C1.53,29.69 2.13,30 2.77,30 Z `" | 29 | :d="`M2.77,${h} L${w},${h} L${w},0 L11.44,0 C10.58,0 9.81,0.55 9.54,1.37 L0.88,27.37 C0.68,27.98 0.78,28.65 1.15,29.17 C1.53,29.69 2.13,30 2.77,30 Z `" |
30 | /> | 30 | /> |
@@ -2,15 +2,15 @@ | @@ -2,15 +2,15 @@ | ||
2 | <div class="go-content-box"> | 2 | <div class="go-content-box"> |
3 | <svg :width="w" :height="h" fill="none"> | 3 | <svg :width="w" :height="h" fill="none"> |
4 | <defs> | 4 | <defs> |
5 | - <linearGradient id="linear_0" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> | 5 | + <linearGradient id="title3_0" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> |
6 | <stop offset="0" :stop-color="attribute.linearColors[0]" stop-opacity="1" /> | 6 | <stop offset="0" :stop-color="attribute.linearColors[0]" stop-opacity="1" /> |
7 | <stop offset="1" :stop-color="attribute.linearColors[1]" stop-opacity="1" /> | 7 | <stop offset="1" :stop-color="attribute.linearColors[1]" stop-opacity="1" /> |
8 | </linearGradient> | 8 | </linearGradient> |
9 | - <linearGradient id="linear_1" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> | 9 | + <linearGradient id="title3_1" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> |
10 | <stop offset="0" :stop-color="attribute.linearColors[2]" stop-opacity="1" /> | 10 | <stop offset="0" :stop-color="attribute.linearColors[2]" stop-opacity="1" /> |
11 | <stop offset="1" :stop-color="attribute.linearColors[3]" stop-opacity="0" /> | 11 | <stop offset="1" :stop-color="attribute.linearColors[3]" stop-opacity="0" /> |
12 | </linearGradient> | 12 | </linearGradient> |
13 | - <linearGradient id="linear_2" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> | 13 | + <linearGradient id="title3_2" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> |
14 | <stop offset="0" :stop-color="attribute.linearColors[4]" stop-opacity="1" /> | 14 | <stop offset="0" :stop-color="attribute.linearColors[4]" stop-opacity="1" /> |
15 | <stop offset="1" :stop-color="attribute.linearColors[5]" stop-opacity="0" /> | 15 | <stop offset="1" :stop-color="attribute.linearColors[5]" stop-opacity="0" /> |
16 | </linearGradient> | 16 | </linearGradient> |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | <path | 19 | <path |
20 | id="矩形 16" | 20 | id="矩形 16" |
21 | fill-rule="evenodd" | 21 | fill-rule="evenodd" |
22 | - fill="url(#linear_0)" | 22 | + fill="url(#title3_0)" |
23 | transform="translate(6.249999895402425e-8 2) rotate(0 160 13)" | 23 | transform="translate(6.249999895402425e-8 2) rotate(0 160 13)" |
24 | opacity="1" | 24 | opacity="1" |
25 | :d="`M0,${h - 5} L${w},${h - 5} L${w},0 L0,0 L0,${h - 5} Z`" | 25 | :d="`M0,${h - 5} L${w},${h - 5} L${w},0 L0,0 L0,${h - 5} Z`" |
@@ -42,13 +42,13 @@ | @@ -42,13 +42,13 @@ | ||
42 | </g> | 42 | </g> |
43 | <path | 43 | <path |
44 | id="路径 5" | 44 | id="路径 5" |
45 | - style="stroke: url(#linear_1); stroke-width: 1; stroke-opacity: 100; stroke-dasharray: 0 0" | 45 | + style="stroke: url(#title3_1); stroke-width: 1; stroke-opacity: 100; stroke-dasharray: 0 0" |
46 | transform="translate(6.249999895402425e-8 30) rotate(0 160 0)" | 46 | transform="translate(6.249999895402425e-8 30) rotate(0 160 0)" |
47 | d="M0,0L320,0 " | 47 | d="M0,0L320,0 " |
48 | /> | 48 | /> |
49 | <path | 49 | <path |
50 | id="路径 5" | 50 | id="路径 5" |
51 | - style="stroke: url(#linear_2); stroke-width: 1; stroke-opacity: 100; stroke-dasharray: 0 0" | 51 | + style="stroke: url(#title3_2); stroke-width: 1; stroke-opacity: 100; stroke-dasharray: 0 0" |
52 | transform="translate(6.249999895402425e-8 0) rotate(0 160 0)" | 52 | transform="translate(6.249999895402425e-8 0) rotate(0 160 0)" |
53 | d="M0,0L320,0 " | 53 | d="M0,0L320,0 " |
54 | /> | 54 | /> |