Commit ef098c9f117b4e26fa638db31163fd55775afb47

Authored by xp.Huang
2 parents 6d1c87fb 1dc01d4d

Merge branch 'ft' into 'main_dev'

fix(external/Componse): 修复三个小标题渐变ID值重复问题

See merge request yunteng/thingskit-view!34
... ... @@ -2,7 +2,14 @@
2 2 <n-dropdown trigger="hover" @select="handleSelect" :show-arrow="true" :options="options">
3 3 <div class="user-info-box">
4 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 13 </div>
7 14 </n-dropdown>
8 15
... ... @@ -31,6 +38,7 @@ const { dataSyncUpdate } = useSyncRemote()
31 38
32 39 const modelShowInfo = ref(false)
33 40 const modelShow = ref(false)
  41 +const avatarLogo = ref('')
34 42
35 43 // 是否失败
36 44 const fallback = ref(false)
... ... @@ -39,7 +47,7 @@ const fallback = ref(false)
39 47 const renderUserInfo = () => {
40 48 const userStoreOverride = useUserStore()
41 49 const { username, avatar } = userStoreOverride.getUserInfo
42   - console.log(userStoreOverride.getUserInfo)
  50 + avatarLogo.value = avatar as string
43 51 return h(
44 52 'div',
45 53 {
... ... @@ -49,7 +57,7 @@ const renderUserInfo = () => {
49 57 h(NAvatar, {
50 58 round: true,
51 59 style: 'margin-right: 12px;',
52   - src: Person
  60 + src: !avatar ? Person : avatar
53 61 }),
54 62 h('div', null, [
55 63 h('div', null, [
... ...
... ... @@ -48,12 +48,6 @@ let newData = ref('2021-2-3 08:00:00')
48 48
49 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 51 watch(
58 52 () => props.chartConfig.option,
59 53 (newData: any) => {
... ...
1 1 <template>
2 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 4 <source :src="dataset" />
5 5 </video>
6 6 </div>
... ...
... ... @@ -2,11 +2,11 @@
2 2 <div class="go-content-box">
3 3 <svg :width="w" :height="h" fill="none">
4 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 6 <stop offset="0" :stop-color="attribute.linearColors[0]" stop-opacity="1" />
7 7 <stop offset="1" :stop-color="attribute.linearColors[1]" stop-opacity="1" />
8 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 10 <stop offset="0" :stop-color="attribute.linearColors[3]" stop-opacity="1" />
11 11 <stop offset="1" :stop-color="attribute.linearColors[4]" stop-opacity="0" />
12 12 </linearGradient>
... ... @@ -15,7 +15,7 @@
15 15 <path
16 16 id="矩形 title2_u"
17 17 fill-rule="evenodd"
18   - fill="url(#linear_title2_u)"
  18 + fill="url(#title2_0)"
19 19 transform="translate(0 0) rotate(0 160 15)"
20 20 opacity="1"
21 21 :d="`M2.77,${h} L${w},${h} L${w},0 L${
... ... @@ -24,7 +24,7 @@
24 24 />
25 25 <path
26 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 28 transform="translate(0 0) rotate(0 160 15)"
29 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 2 <div class="go-content-box">
3 3 <svg :width="w" :height="h" fill="none">
4 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 6 <stop offset="0" :stop-color="attribute.linearColors[0]" stop-opacity="1" />
7 7 <stop offset="1" :stop-color="attribute.linearColors[1]" stop-opacity="1" />
8 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 10 <stop offset="0" :stop-color="attribute.linearColors[2]" stop-opacity="1" />
11 11 <stop offset="1" :stop-color="attribute.linearColors[3]" stop-opacity="0" />
12 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 14 <stop offset="0" :stop-color="attribute.linearColors[4]" stop-opacity="1" />
15 15 <stop offset="1" :stop-color="attribute.linearColors[5]" stop-opacity="0" />
16 16 </linearGradient>
... ... @@ -19,7 +19,7 @@
19 19 <path
20 20 id="矩形 16"
21 21 fill-rule="evenodd"
22   - fill="url(#linear_0)"
  22 + fill="url(#title3_0)"
23 23 transform="translate(6.249999895402425e-8 2) rotate(0 160 13)"
24 24 opacity="1"
25 25 :d="`M0,${h - 5} L${w},${h - 5} L${w},0 L0,0 L0,${h - 5} Z`"
... ... @@ -42,13 +42,13 @@
42 42 </g>
43 43 <path
44 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 46 transform="translate(6.249999895402425e-8 30) rotate(0 160 0)"
47 47 d="M0,0L320,0 "
48 48 />
49 49 <path
50 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 52 transform="translate(6.249999895402425e-8 0) rotate(0 160 0)"
53 53 d="M0,0L320,0 "
54 54 />
... ...