sh-chart 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/.eslintrc.js +21 -0
  2. package/README.en.md +36 -0
  3. package/README.md +39 -0
  4. package/package.json +42 -0
  5. package/packages/components/global-components/mixin/autoResize.js +152 -0
  6. package/packages/components/global-components/sh-border/components/border1.vue +70 -0
  7. package/packages/components/global-components/sh-border/components/border10.vue +54 -0
  8. package/packages/components/global-components/sh-border/components/border11.vue +207 -0
  9. package/packages/components/global-components/sh-border/components/border12.vue +112 -0
  10. package/packages/components/global-components/sh-border/components/border13.vue +50 -0
  11. package/packages/components/global-components/sh-border/components/border2.vue +50 -0
  12. package/packages/components/global-components/sh-border/components/border3.vue +53 -0
  13. package/packages/components/global-components/sh-border/components/border4.vue +95 -0
  14. package/packages/components/global-components/sh-border/components/border5.vue +64 -0
  15. package/packages/components/global-components/sh-border/components/border6.vue +60 -0
  16. package/packages/components/global-components/sh-border/components/border7.vue +57 -0
  17. package/packages/components/global-components/sh-border/components/border8.vue +75 -0
  18. package/packages/components/global-components/sh-border/components/border9.vue +92 -0
  19. package/packages/components/global-components/sh-border/index.vue +73 -0
  20. package/packages/components/global-components/sh-border/mixin/border.js +62 -0
  21. package/packages/components/global-components/sh-charts/config/config.js +58 -0
  22. package/packages/components/global-components/sh-charts/index.vue +169 -0
  23. package/packages/components/global-components/sh-decoration/components/decoration1.vue +81 -0
  24. package/packages/components/global-components/sh-decoration/components/decoration10.vue +80 -0
  25. package/packages/components/global-components/sh-decoration/components/decoration11.vue +63 -0
  26. package/packages/components/global-components/sh-decoration/components/decoration12.vue +171 -0
  27. package/packages/components/global-components/sh-decoration/components/decoration2.vue +78 -0
  28. package/packages/components/global-components/sh-decoration/components/decoration3.vue +65 -0
  29. package/packages/components/global-components/sh-decoration/components/decoration4.vue +72 -0
  30. package/packages/components/global-components/sh-decoration/components/decoration5.vue +96 -0
  31. package/packages/components/global-components/sh-decoration/components/decoration6.vue +84 -0
  32. package/packages/components/global-components/sh-decoration/components/decoration7.vue +31 -0
  33. package/packages/components/global-components/sh-decoration/components/decoration8.vue +32 -0
  34. package/packages/components/global-components/sh-decoration/components/decoration9.vue +63 -0
  35. package/packages/components/global-components/sh-decoration/index.vue +71 -0
  36. package/packages/components/global-components/sh-decoration/mixin/decoration.js +69 -0
  37. package/packages/components/global-components/sh-screen-header/components/header1.vue +228 -0
  38. package/packages/components/global-components/sh-screen-header/components/header2.vue +285 -0
  39. package/packages/components/global-components/sh-screen-header/components/header3.vue +452 -0
  40. package/packages/components/global-components/sh-screen-header/components/header4.vue +544 -0
  41. package/packages/components/global-components/sh-screen-header/components/header5.vue +291 -0
  42. package/packages/components/global-components/sh-screen-header/components/header6.vue +206 -0
  43. package/packages/components/global-components/sh-screen-header/index.vue +50 -0
  44. package/packages/components/global-components/sh-screen-header/mixin/header.js +62 -0
  45. package/packages/components/global-components/sh-spin/index.vue +44 -0
  46. package/packages/components/index.js +24 -0
  47. package/packages/echarts/index.js +94 -0
  48. package/packages/echarts/map/110000.json +1 -0
  49. package/packages/echarts/map/120000.json +1 -0
  50. package/packages/echarts/map/130000.json +1 -0
  51. package/packages/echarts/map/140000.json +1 -0
  52. package/packages/echarts/map/150000.json +1 -0
  53. package/packages/echarts/map/210000.json +1 -0
  54. package/packages/echarts/map/220000.json +1 -0
  55. package/packages/echarts/map/230000.json +1 -0
  56. package/packages/echarts/map/310000.json +1 -0
  57. package/packages/echarts/map/320000.json +1 -0
  58. package/packages/echarts/map/330000.json +1 -0
  59. package/packages/echarts/map/340000.json +1 -0
  60. package/packages/echarts/map/350000.json +1 -0
  61. package/packages/echarts/map/360000.json +1 -0
  62. package/packages/echarts/map/370000.json +1 -0
  63. package/packages/echarts/map/410000.json +1 -0
  64. package/packages/echarts/map/420000.json +1 -0
  65. package/packages/echarts/map/430000.json +1 -0
  66. package/packages/echarts/map/440000.json +1 -0
  67. package/packages/echarts/map/450000.json +1 -0
  68. package/packages/echarts/map/460000.json +1 -0
  69. package/packages/echarts/map/500000.json +1 -0
  70. package/packages/echarts/map/510000.json +1 -0
  71. package/packages/echarts/map/520000.json +1 -0
  72. package/packages/echarts/map/530000.json +1 -0
  73. package/packages/echarts/map/540000.json +1 -0
  74. package/packages/echarts/map/610000.json +1 -0
  75. package/packages/echarts/map/620000.json +1 -0
  76. package/packages/echarts/map/630000.json +1 -0
  77. package/packages/echarts/map/640000.json +1 -0
  78. package/packages/echarts/map/650000.json +1 -0
  79. package/packages/echarts/map/710000.json +1 -0
  80. package/packages/echarts/map/china.json +1 -0
  81. package/packages/echarts/theme/dark.js +128 -0
  82. package/packages/echarts/theme/infographic.js +181 -0
  83. package/packages/echarts/theme/macarons.js +194 -0
  84. package/packages/echarts/theme/roma.js +66 -0
  85. package/packages/echarts/theme/shine.js +136 -0
  86. package/packages/echarts/theme/vintage.js +11 -0
  87. package/packages/index.js +31 -0
@@ -0,0 +1,112 @@
1
+ <template>
2
+ <div :ref="ref" class="sh-border-box-12">
3
+ <svg class="border-svg-container" :width="width" :height="height">
4
+ <defs>
5
+ <filter :id="filterId" height="150%" width="150%" x="-25%" y="-25%">
6
+ <feMorphology operator="dilate" radius="1" in="SourceAlpha" result="thicken" />
7
+ <feGaussianBlur in="thicken" stdDeviation="2" result="blurred" />
8
+ <feFlood :flood-color="fade(mergedColor[1] || defaultColor[1], 70)" result="glowColor">
9
+ <animate
10
+ attributeName="flood-color"
11
+ :values="`
12
+ ${fade(mergedColor[1] || defaultColor[1], 70)};
13
+ ${fade(mergedColor[1] || defaultColor[1], 30)};
14
+ ${fade(mergedColor[1] || defaultColor[1], 70)};
15
+ `"
16
+ dur="3s"
17
+ begin="0s"
18
+ repeatCount="indefinite" />
19
+ </feFlood>
20
+ <feComposite in="glowColor" in2="blurred" operator="in" result="softGlowColored" />
21
+ <feMerge>
22
+ <feMergeNode in="softGlowColored" />
23
+ <feMergeNode in="SourceGraphic" />
24
+ </feMerge>
25
+ </filter>
26
+ </defs>
27
+
28
+ <path
29
+ v-if="width && height"
30
+ :fill="backgroundColor"
31
+ stroke-width="2"
32
+ :stroke="mergedColor[0]"
33
+ :d="`
34
+ M15 5 L ${width - 15} 5 Q ${width - 5} 5, ${width - 5} 15
35
+ L ${width - 5} ${height - 15} Q ${width - 5} ${height - 5}, ${width - 15} ${height - 5}
36
+ L 15, ${height - 5} Q 5 ${height - 5} 5 ${height - 15} L 5 15
37
+ Q 5 5 15 5
38
+ `" />
39
+
40
+ <path stroke-width="2" fill="transparent" stroke-linecap="round" :filter="`url(#${filterId})`" :stroke="mergedColor[1]" :d="`M 20 5 L 15 5 Q 5 5 5 15 L 5 20`" />
41
+
42
+ <path
43
+ stroke-width="2"
44
+ fill="transparent"
45
+ stroke-linecap="round"
46
+ :filter="`url(#${filterId})`"
47
+ :stroke="mergedColor[1]"
48
+ :d="`M ${width - 20} 5 L ${width - 15} 5 Q ${width - 5} 5 ${width - 5} 15 L ${width - 5} 20`" />
49
+
50
+ <path
51
+ stroke-width="2"
52
+ fill="transparent"
53
+ stroke-linecap="round"
54
+ :filter="`url(#${filterId})`"
55
+ :stroke="mergedColor[1]"
56
+ :d="`
57
+ M ${width - 20} ${height - 5} L ${width - 15} ${height - 5}
58
+ Q ${width - 5} ${height - 5} ${width - 5} ${height - 15}
59
+ L ${width - 5} ${height - 20}
60
+ `" />
61
+
62
+ <path
63
+ stroke-width="2"
64
+ fill="transparent"
65
+ stroke-linecap="round"
66
+ :filter="`url(#${filterId})`"
67
+ :stroke="mergedColor[1]"
68
+ :d="`
69
+ M 20 ${height - 5} L 15 ${height - 5}
70
+ Q 5 ${height - 5} 5 ${height - 15}
71
+ L 5 ${height - 20}
72
+ `" />
73
+ </svg>
74
+
75
+ <div class="border-box-content">
76
+ <slot></slot>
77
+ </div>
78
+ </div>
79
+ </template>
80
+
81
+ <script>
82
+ import mixin from '../mixin/border'
83
+ export default {
84
+ name: 'ShBorder12',
85
+ mixins: [mixin],
86
+ computed: {
87
+ filterId() {
88
+ return `border-box-11-filterId-${this.borderId}`
89
+ }
90
+ }
91
+ }
92
+ </script>
93
+
94
+ <style scoped lang="scss">
95
+ .sh-border-box-12 {
96
+ position: relative;
97
+ width: 100%;
98
+ height: 100%;
99
+ .border-svg-container {
100
+ position: absolute;
101
+ width: 100%;
102
+ height: 100%;
103
+ top: 0;
104
+ left: 0;
105
+ }
106
+ .border-box-content {
107
+ position: relative;
108
+ width: 100%;
109
+ height: 100%;
110
+ }
111
+ }
112
+ </style>
@@ -0,0 +1,50 @@
1
+ <template>
2
+ <div :ref="ref" class="sh-border-box-13">
3
+ <svg class="border-svg-container" :width="width" :height="height">
4
+ <path
5
+ :fill="backgroundColor"
6
+ :stroke="mergedColor[0]"
7
+ :d="`
8
+ M 5 20 L 5 10 L 12 3 L 60 3 L 68 10
9
+ L ${width - 20} 10 L ${width - 5} 25
10
+ L ${width - 5} ${height - 5} L 20 ${height - 5}
11
+ L 5 ${height - 20} L 5 20
12
+ `" />
13
+ <path fill="transparent" stroke-width="3" stroke-linecap="round" stroke-dasharray="10, 5" :stroke="mergedColor[0]" :d="`M 16 9 L 61 9`" />
14
+ <path fill="transparent" :stroke="mergedColor[1]" :d="`M 5 20 L 5 10 L 12 3 L 60 3 L 68 10`" />
15
+ <path fill="transparent" :stroke="mergedColor[1]" :d="`M ${width - 5} ${height - 30} L ${width - 5} ${height - 5} L ${width - 30} ${height - 5}`" />
16
+ </svg>
17
+
18
+ <div class="border-box-content">
19
+ <slot></slot>
20
+ </div>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ import mixin from '../mixin/border'
26
+ export default {
27
+ name: 'ShBorder13',
28
+ mixins: [mixin]
29
+ }
30
+ </script>
31
+
32
+ <style scoped lang="scss">
33
+ .sh-border-box-13 {
34
+ position: relative;
35
+ width: 100%;
36
+ height: 100%;
37
+ .border-svg-container {
38
+ position: absolute;
39
+ width: 100%;
40
+ height: 100%;
41
+ top: 0;
42
+ left: 0;
43
+ }
44
+ .border-box-content {
45
+ position: relative;
46
+ width: 100%;
47
+ height: 100%;
48
+ }
49
+ }
50
+ </style>
@@ -0,0 +1,50 @@
1
+ <template>
2
+ <div :ref="ref" class="sh-border-box-2">
3
+ <svg class="border-svg-container" :width="width" :height="height">
4
+ <polygon :fill="backgroundColor" :points="`7, 7 ${width - 7}, 7 ${width - 7}, ${height - 7} 7, ${height - 7}`" />
5
+
6
+ <polyline :stroke="mergedColor[0]" :points="`2, 2 ${width - 2} ,2 ${width - 2}, ${height - 2} 2, ${height - 2} 2, 2`" />
7
+ <polyline :stroke="mergedColor[1]" :points="`6, 6 ${width - 6}, 6 ${width - 6}, ${height - 6} 6, ${height - 6} 6, 6`" />
8
+ <circle :fill="mergedColor[0]" cx="11" cy="11" r="1" />
9
+ <circle :fill="mergedColor[0]" :cx="width - 11" cy="11" r="1" />
10
+ <circle :fill="mergedColor[0]" :cx="width - 11" :cy="height - 11" r="1" />
11
+ <circle :fill="mergedColor[0]" cx="11" :cy="height - 11" r="1" />
12
+ </svg>
13
+
14
+ <div class="border-box-content">
15
+ <slot></slot>
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ import mixin from '../mixin/border'
22
+ export default {
23
+ name: 'ShBorder2',
24
+ mixins: [mixin]
25
+ }
26
+ </script>
27
+
28
+ <style scoped lang="scss">
29
+ .sh-border-box-2 {
30
+ position: relative;
31
+ width: 100%;
32
+ height: 100%;
33
+ .border-svg-container {
34
+ position: absolute;
35
+ width: 100%;
36
+ height: 100%;
37
+ top: 0;
38
+ left: 0;
39
+ & > polyline {
40
+ fill: none;
41
+ stroke-width: 1;
42
+ }
43
+ }
44
+ .border-box-content {
45
+ position: relative;
46
+ width: 100%;
47
+ height: 100%;
48
+ }
49
+ }
50
+ </style>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <div :ref="ref" class="sh-border-box-3">
3
+ <svg class="border-svg-container" :width="width" :height="height">
4
+ <polygon :fill="backgroundColor" :points="`23, 23 ${width - 24}, 23 ${width - 24}, ${height - 24} 23, ${height - 24}`" />
5
+
6
+ <polyline class="bb3-line1" :stroke="mergedColor[0]" :points="`4, 4 ${width - 22} ,4 ${width - 22}, ${height - 22} 4, ${height - 22} 4, 4`" />
7
+ <polyline class="bb3-line2" :stroke="mergedColor[1]" :points="`10, 10 ${width - 16}, 10 ${width - 16}, ${height - 16} 10, ${height - 16} 10, 10`" />
8
+ <polyline class="bb3-line2" :stroke="mergedColor[1]" :points="`16, 16 ${width - 10}, 16 ${width - 10}, ${height - 10} 16, ${height - 10} 16, 16`" />
9
+ <polyline class="bb3-line2" :stroke="mergedColor[1]" :points="`22, 22 ${width - 4}, 22 ${width - 4}, ${height - 4} 22, ${height - 4} 22, 22`" />
10
+ </svg>
11
+
12
+ <div class="border-box-content">
13
+ <slot></slot>
14
+ </div>
15
+ </div>
16
+ </template>
17
+
18
+ <script>
19
+ import mixin from '../mixin/border'
20
+ export default {
21
+ name: 'ShBorder3',
22
+ mixins: [mixin]
23
+ }
24
+ </script>
25
+
26
+ <style scoped lang="scss">
27
+ .sh-border-box-3 {
28
+ position: relative;
29
+ width: 100%;
30
+ height: 100%;
31
+ .border-svg-container {
32
+ position: absolute;
33
+ width: 100%;
34
+ height: 100%;
35
+ top: 0;
36
+ left: 0;
37
+ & > polyline {
38
+ fill: none;
39
+ }
40
+ }
41
+ .bb3-line1 {
42
+ stroke-width: 3;
43
+ }
44
+ .bb3-line2 {
45
+ stroke-width: 1;
46
+ }
47
+ .border-box-content {
48
+ position: relative;
49
+ width: 100%;
50
+ height: 100%;
51
+ }
52
+ }
53
+ </style>
@@ -0,0 +1,95 @@
1
+ <template>
2
+ <div :ref="ref" class="sh-border-box-4">
3
+ <svg :class="`border-svg-container ${reverse && 'reverse'}`" :width="width" :height="height">
4
+ <polygon :fill="backgroundColor" :points="`${width - 15}, 22 170, 22 150, 7 40, 7 28, 21 32, 24 16, 42 16, ${height - 32} 41, ${height - 7} ${width - 15}, ${height - 7}`" />
5
+ <polyline class="bb4-line-1" :stroke="mergedColor[0]" :points="`145, ${height - 5} 40, ${height - 5} 10, ${height - 35} 10, 40 40, 5 150, 5 170, 20 ${width - 15}, 20`" />
6
+ <polyline :stroke="mergedColor[1]" class="bb4-line-2" :points="`245, ${height - 1} 36, ${height - 1} 14, ${height - 23} 14, ${height - 100}`" />
7
+
8
+ <polyline class="bb4-line-3" :stroke="mergedColor[0]" :points="`7, ${height - 40} 7, ${height - 75}`" />
9
+ <polyline class="bb4-line-4" :stroke="mergedColor[0]" :points="`28, 24 13, 41 13, 64`" />
10
+ <polyline class="bb4-line-5" :stroke="mergedColor[0]" :points="`5, 45 5, 140`" />
11
+ <polyline class="bb4-line-6" :stroke="mergedColor[1]" :points="`14, 75 14, 180`" />
12
+ <polyline class="bb4-line-7" :stroke="mergedColor[1]" :points="`55, 11 147, 11 167, 26 250, 26`" />
13
+ <polyline class="bb4-line-8" :stroke="mergedColor[1]" :points="`158, 5 173, 16`" />
14
+ <polyline class="bb4-line-9" :stroke="mergedColor[0]" :points="`200, 17 ${width - 10}, 17`" />
15
+ <polyline class="bb4-line-10" :stroke="mergedColor[1]" :points="`385, 17 ${width - 10}, 17`" />
16
+ </svg>
17
+
18
+ <div class="border-box-content">
19
+ <slot></slot>
20
+ </div>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ import mixin from '../mixin/border'
26
+ export default {
27
+ name: 'ShBorder4',
28
+ mixins: [mixin]
29
+ }
30
+ </script>
31
+
32
+ <style scoped lang="scss">
33
+ @mixin sw1 {
34
+ stroke-width: 1;
35
+ }
36
+ @mixin sw3 {
37
+ stroke-width: 3px;
38
+ stroke-linecap: round;
39
+ }
40
+ .sh-border-box-4 {
41
+ position: relative;
42
+ width: 100%;
43
+ height: 100%;
44
+ .reverse {
45
+ transform: rotate(180deg);
46
+ }
47
+ .border-svg-container {
48
+ position: absolute;
49
+ width: 100%;
50
+ height: 100%;
51
+ top: 0;
52
+ left: 0;
53
+ & > polyline {
54
+ fill: none;
55
+ }
56
+ }
57
+ .bb4-line-1 {
58
+ @include sw1;
59
+ }
60
+ .bb4-line-2 {
61
+ @include sw1;
62
+ }
63
+ .bb4-line-3 {
64
+ @include sw3;
65
+ }
66
+ .bb4-line-4 {
67
+ @include sw3;
68
+ }
69
+ .bb4-line-5 {
70
+ @include sw1;
71
+ }
72
+ .bb4-line-6 {
73
+ @include sw1;
74
+ }
75
+ .bb4-line-7 {
76
+ @include sw1;
77
+ }
78
+ .bb4-line-8 {
79
+ @include sw3;
80
+ }
81
+ .bb4-line-9 {
82
+ @include sw3;
83
+ stroke-dasharray: 100 250;
84
+ }
85
+ .bb4-line-10 {
86
+ @include sw1;
87
+ stroke-dasharray: 80 270;
88
+ }
89
+ .border-box-content {
90
+ position: relative;
91
+ width: 100%;
92
+ height: 100%;
93
+ }
94
+ }
95
+ </style>
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <div :ref="ref" class="sh-border-box-5">
3
+ <svg :class="`border-svg-container ${reverse && 'reverse'}`" :width="width" :height="height">
4
+ <polygon :fill="backgroundColor" :points="`10, 22 ${width - 22}, 22 ${width - 22}, ${height - 86} ${width - 84}, ${height - 24} 10, ${height - 24}`" />
5
+
6
+ <polyline class="bb5-line-1" :stroke="mergedColor[0]" :points="`8, 5 ${width - 5}, 5 ${width - 5}, ${height - 100} ${width - 100}, ${height - 5} 8, ${height - 5} 8, 5`" />
7
+ <polyline class="bb5-line-2" :stroke="mergedColor[1]" :points="`3, 5 ${width - 20}, 5 ${width - 20}, ${height - 60} ${width - 74}, ${height - 5} 3, ${height - 5} 3, 5`" />
8
+ <polyline class="bb5-line-3" :stroke="mergedColor[1]" :points="`50, 13 ${width - 35}, 13`" />
9
+ <polyline class="bb5-line-4" :stroke="mergedColor[1]" :points="`15, 20 ${width - 35}, 20`" />
10
+ <polyline class="bb5-line-5" :stroke="mergedColor[1]" :points="`15, ${height - 20} ${width - 110}, ${height - 20}`" />
11
+ <polyline class="bb5-line-6" :stroke="mergedColor[1]" :points="`15, ${height - 13} ${width - 110}, ${height - 13}`" />
12
+ </svg>
13
+
14
+ <div class="border-box-content">
15
+ <slot></slot>
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ import mixin from '../mixin/border'
22
+ export default {
23
+ name: 'ShBorder5',
24
+ mixins: [mixin]
25
+ }
26
+ </script>
27
+
28
+ <style scoped lang="scss">
29
+ .sh-border-box-5 {
30
+ position: relative;
31
+ width: 100%;
32
+ height: 100%;
33
+ .reverse {
34
+ transform: rotate(180deg);
35
+ }
36
+ .border-svg-container {
37
+ position: absolute;
38
+ top: 0;
39
+ left: 0;
40
+ width: 100%;
41
+ height: 100%;
42
+ & > polyline {
43
+ fill: none;
44
+ }
45
+ }
46
+ .bb5-line-1,
47
+ .bb5-line-2 {
48
+ stroke-width: 1;
49
+ }
50
+ .bb5-line-3,
51
+ .bb5-line-6 {
52
+ stroke-width: 5;
53
+ }
54
+ .bb5-line-4,
55
+ .bb5-line-5 {
56
+ stroke-width: 2;
57
+ }
58
+ .border-box-content {
59
+ position: relative;
60
+ width: 100%;
61
+ height: 100%;
62
+ }
63
+ }
64
+ </style>
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <div :ref="ref" class="sh-border-box-6">
3
+ <svg class="border-svg-container" :width="width" :height="height">
4
+ <polygon :fill="backgroundColor" :points="`9, 7 ${width - 9}, 7 ${width - 9}, ${height - 7} 9, ${height - 7}`" />
5
+
6
+ <circle :fill="mergedColor[1]" cx="5" cy="5" r="2" />
7
+ <circle :fill="mergedColor[1]" :cx="width - 5" cy="5" r="2" />
8
+ <circle :fill="mergedColor[1]" :cx="width - 5" :cy="height - 5" r="2" />
9
+ <circle :fill="mergedColor[1]" cx="5" :cy="height - 5" r="2" />
10
+ <polyline :stroke="mergedColor[0]" :points="`10, 4 ${width - 10}, 4`" />
11
+ <polyline :stroke="mergedColor[0]" :points="`10, ${height - 4} ${width - 10}, ${height - 4}`" />
12
+ <polyline :stroke="mergedColor[0]" :points="`5, 70 5, ${height - 70}`" />
13
+ <polyline :stroke="mergedColor[0]" :points="`${width - 5}, 70 ${width - 5}, ${height - 70}`" />
14
+ <polyline :stroke="mergedColor[0]" :points="`3, 10, 3, 50`" />
15
+ <polyline :stroke="mergedColor[0]" :points="`7, 30 7, 80`" />
16
+ <polyline :stroke="mergedColor[0]" :points="`${width - 3}, 10 ${width - 3}, 50`" />
17
+ <polyline :stroke="mergedColor[0]" :points="`${width - 7}, 30 ${width - 7}, 80`" />
18
+ <polyline :stroke="mergedColor[0]" :points="`3, ${height - 10} 3, ${height - 50}`" />
19
+ <polyline :stroke="mergedColor[0]" :points="`7, ${height - 30} 7, ${height - 80}`" />
20
+ <polyline :stroke="mergedColor[0]" :points="`${width - 3}, ${height - 10} ${width - 3}, ${height - 50}`" />
21
+ <polyline :stroke="mergedColor[0]" :points="`${width - 7}, ${height - 30} ${width - 7}, ${height - 80}`" />
22
+ </svg>
23
+
24
+ <div class="border-box-content">
25
+ <slot></slot>
26
+ </div>
27
+ </div>
28
+ </template>
29
+
30
+ <script>
31
+ import mixin from '../mixin/border'
32
+ export default {
33
+ name: 'ShBorder6',
34
+ mixins: [mixin]
35
+ }
36
+ </script>
37
+
38
+ <style scoped lang="scss">
39
+ .sh-border-box-6 {
40
+ position: relative;
41
+ width: 100%;
42
+ height: 100%;
43
+ .border-svg-container {
44
+ position: absolute;
45
+ top: 0;
46
+ left: 0;
47
+ width: 100%;
48
+ height: 100%;
49
+ & > polyline {
50
+ fill: none;
51
+ stroke-width: 1;
52
+ }
53
+ }
54
+ .border-box-content {
55
+ position: relative;
56
+ width: 100%;
57
+ height: 100%;
58
+ }
59
+ }
60
+ </style>
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <div :ref="ref" class="sh-border-box-7" :style="`box-shadow: inset 0 0 40px ${mergedColor[0]}; border: 1px solid ${mergedColor[0]}; background-color: ${backgroundColor}`">
3
+ <svg class="border-svg-container" :width="width" :height="height">
4
+ <polyline class="bb7-line-width-2" :stroke="mergedColor[0]" :points="`0, 25 0, 0 25, 0`" />
5
+ <polyline class="bb7-line-width-2" :stroke="mergedColor[0]" :points="`${width - 25}, 0 ${width}, 0 ${width}, 25`" />
6
+ <polyline class="bb7-line-width-2" :stroke="mergedColor[0]" :points="`${width - 25}, ${height} ${width}, ${height} ${width}, ${height - 25}`" />
7
+ <polyline class="bb7-line-width-2" :stroke="mergedColor[0]" :points="`0, ${height - 25} 0, ${height} 25, ${height}`" />
8
+
9
+ <polyline class="bb7-line-width-5" :stroke="mergedColor[1]" :points="`0, 10 0, 0 10, 0`" />
10
+ <polyline class="bb7-line-width-5" :stroke="mergedColor[1]" :points="`${width - 10}, 0 ${width}, 0 ${width}, 10`" />
11
+ <polyline class="bb7-line-width-5" :stroke="mergedColor[1]" :points="`${width - 10}, ${height} ${width}, ${height} ${width}, ${height - 10}`" />
12
+ <polyline class="bb7-line-width-5" :stroke="mergedColor[1]" :points="`0, ${height - 10} 0, ${height} 10, ${height}`" />
13
+ </svg>
14
+
15
+ <div class="border-box-content">
16
+ <slot></slot>
17
+ </div>
18
+ </div>
19
+ </template>
20
+
21
+ <script>
22
+ import mixin from '../mixin/border'
23
+ export default {
24
+ name: 'ShBorder7',
25
+ mixins: [mixin]
26
+ }
27
+ </script>
28
+
29
+ <style scoped lang="scss">
30
+ .sh-border-box-7 {
31
+ position: relative;
32
+ width: 100%;
33
+ height: 100%;
34
+ .border-svg-container {
35
+ position: absolute;
36
+ top: 0;
37
+ left: 0;
38
+ width: 100%;
39
+ height: 100%;
40
+ & > polyline {
41
+ fill: none;
42
+ stroke-linecap: round;
43
+ }
44
+ }
45
+ .bb7-line-width-2 {
46
+ stroke-width: 2;
47
+ }
48
+ .bb7-line-width-5 {
49
+ stroke-width: 5;
50
+ }
51
+ .border-box-content {
52
+ position: relative;
53
+ width: 100%;
54
+ height: 100%;
55
+ }
56
+ }
57
+ </style>
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <div :ref="ref" class="sh-border-box-8">
3
+ <svg class="border-svg-container" :width="width" :height="height">
4
+ <defs>
5
+ <path :id="path" :d="pathD" fill="transparent" />
6
+ <radialGradient :id="gradient" cx="50%" cy="50%" r="50%">
7
+ <stop offset="0%" stop-color="#fff" stop-opacity="1" />
8
+ <stop offset="100%" stop-color="#fff" stop-opacity="0" />
9
+ </radialGradient>
10
+ <mask :id="mask">
11
+ <circle cx="0" cy="0" r="150" :fill="`url(#${gradient})`">
12
+ <animateMotion :dur="`${dur}s`" :path="pathD" rotate="auto" repeatCount="indefinite" />
13
+ </circle>
14
+ </mask>
15
+ </defs>
16
+ <polygon :fill="backgroundColor" :points="`5, 5 ${width - 5}, 5 ${width - 5} ${height - 5} 5, ${height - 5}`" />
17
+ <use :stroke="mergedColor[0]" stroke-width="1" :xlink:href="`#${path}`" />
18
+ <use :stroke="mergedColor[1]" stroke-width="3" :xlink:href="`#${path}`" :mask="`url(#${mask})`">
19
+ <animate attributeName="stroke-dasharray" :from="`0, ${length}`" :to="`${length}, 0`" :dur="`${dur}s`" repeatCount="indefinite" />
20
+ </use>
21
+ </svg>
22
+
23
+ <div class="border-box-content">
24
+ <slot></slot>
25
+ </div>
26
+ </div>
27
+ </template>
28
+
29
+ <script>
30
+ import mixin from '../mixin/border'
31
+ export default {
32
+ name: 'ShBorder8',
33
+ mixins: [mixin],
34
+ computed: {
35
+ path() {
36
+ return `border-box-8-path-${this.borderId}`
37
+ },
38
+ gradient() {
39
+ return `border-box-8-gradient-${this.borderId}`
40
+ },
41
+ mask() {
42
+ return `border-box-8-mask-${this.borderId}`
43
+ },
44
+ length() {
45
+ const { width, height } = this
46
+ return (width + height - 5) * 2
47
+ },
48
+ pathD() {
49
+ const { reverse, width, height } = this
50
+ if (reverse) return `M 2.5, 2.5 L 2.5, ${height - 2.5} L ${width - 2.5}, ${height - 2.5} L ${width - 2.5}, 2.5 L 2.5, 2.5`
51
+ return `M2.5, 2.5 L${width - 2.5}, 2.5 L${width - 2.5}, ${height - 2.5} L2.5, ${height - 2.5} L2.5, 2.5`
52
+ }
53
+ }
54
+ }
55
+ </script>
56
+
57
+ <style scoped lang="scss">
58
+ .sh-border-box-8 {
59
+ position: relative;
60
+ width: 100%;
61
+ height: 100%;
62
+ .border-svg-container {
63
+ position: absolute;
64
+ width: 100%;
65
+ height: 100%;
66
+ left: 0;
67
+ top: 0;
68
+ }
69
+ .border-box-content {
70
+ position: relative;
71
+ width: 100%;
72
+ height: 100%;
73
+ }
74
+ }
75
+ </style>