@shijiu/jsview-vue-samples 1.9.888 → 1.9.931

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 (185) hide show
  1. package/AnimPicture/App.vue +10 -10
  2. package/Basic/App.vue +1 -1
  3. package/Basic/components/FontStyle.css +3 -3
  4. package/Basic/components/anim/AnimKeyframeBasic.vue +1 -1
  5. package/Basic/components/anim/AnimKeyframeComposite.vue +2 -2
  6. package/Basic/components/anim/AnimTransition.vue +4 -4
  7. package/Basic/components/div/DivClip.vue +0 -39
  8. package/Basic/components/div/DivCssScoped.vue +1 -1
  9. package/Basic/components/div/DivLayout.vue +6 -1
  10. package/Basic/components/div/DivRadius.vue +4 -4
  11. package/Basic/components/img/ImageGroup.vue +2 -2
  12. package/Basic/components/img/ImgLayout.vue +78 -14
  13. package/Basic/components/text/TextDirection.vue +9 -9
  14. package/Basic/components/text/TextEmoji.vue +7 -2
  15. package/Basic/components/text/TextFontStyle.vue +4 -4
  16. package/Basic/components/text/TextGroup1.vue +1 -1
  17. package/Basic/components/text/TextGroup2.vue +2 -2
  18. package/BasicFocusControl/App.vue +2 -2
  19. package/BasicFocusControl/components/BaseBlock.vue +2 -2
  20. package/BasicFocusControl/components/MainArea.vue +2 -2
  21. package/BasicFocusControl/components/SideBar.vue +2 -2
  22. package/Collision/App.vue +16 -16
  23. package/ColorSpace/App.vue +11 -11
  24. package/CssPreprocessor/App.vue +70 -0
  25. package/CssPreprocessor/Less/App.vue +32 -0
  26. package/CssPreprocessor/Less/PanelData.js +51 -0
  27. package/CssPreprocessor/Less/components/less-group1/LessComments.vue +34 -0
  28. package/CssPreprocessor/Less/components/less-group1/LessConditionals.vue +32 -0
  29. package/CssPreprocessor/Less/components/less-group1/LessOperations.vue +24 -0
  30. package/CssPreprocessor/Less/components/less-group1/LessVariables.vue +48 -0
  31. package/CssPreprocessor/Less/components/less-group2/LessIteration.vue +32 -0
  32. package/CssPreprocessor/Less/components/less-group2/LessMethods.vue +27 -0
  33. package/CssPreprocessor/Less/components/less-group3/LessExtends.vue +32 -0
  34. package/CssPreprocessor/Less/components/less-group3/LessNesting.vue +63 -0
  35. package/CssPreprocessor/Less/components/less-group4/LessKeyframes.vue +40 -0
  36. package/CssPreprocessor/Less/components/less-group4/LessMaps.vue +33 -0
  37. package/CssPreprocessor/Less/components/less-group4/LessMixins.vue +33 -0
  38. package/CssPreprocessor/Less/components/less-group5/LessImporting.vue +34 -0
  39. package/CssPreprocessor/Less/components/less-group5/TextSettings.less +4 -0
  40. package/CssPreprocessor/Scss/App.vue +32 -0
  41. package/CssPreprocessor/Scss/PanelData.js +51 -0
  42. package/CssPreprocessor/Scss/components/scss-group1/ScssComments.vue +34 -0
  43. package/CssPreprocessor/Scss/components/scss-group1/ScssConditionals.vue +36 -0
  44. package/CssPreprocessor/Scss/components/scss-group1/ScssOperations.vue +30 -0
  45. package/CssPreprocessor/Scss/components/scss-group1/ScssVariables.vue +48 -0
  46. package/CssPreprocessor/Scss/components/scss-group2/ScssIteration.vue +36 -0
  47. package/CssPreprocessor/Scss/components/scss-group2/ScssMethods.vue +84 -0
  48. package/CssPreprocessor/Scss/components/scss-group3/ScssExtends.vue +34 -0
  49. package/CssPreprocessor/Scss/components/scss-group3/ScssNesting.vue +75 -0
  50. package/CssPreprocessor/Scss/components/scss-group4/ScssKeyframes.vue +40 -0
  51. package/CssPreprocessor/Scss/components/scss-group4/ScssMaps.vue +35 -0
  52. package/CssPreprocessor/Scss/components/scss-group4/ScssMixins.vue +33 -0
  53. package/CssPreprocessor/Scss/components/scss-group5/ScssImporting.vue +34 -0
  54. package/CssPreprocessor/Scss/components/scss-group5/TextSettings.scss +4 -0
  55. package/CssPreprocessor/Stylus/App.vue +32 -0
  56. package/CssPreprocessor/Stylus/PanelData.js +51 -0
  57. package/CssPreprocessor/Stylus/components/stylus-group1/StylusComments.vue +34 -0
  58. package/CssPreprocessor/Stylus/components/stylus-group1/StylusConditionals.vue +36 -0
  59. package/CssPreprocessor/Stylus/components/stylus-group1/StylusOperations.vue +30 -0
  60. package/CssPreprocessor/Stylus/components/stylus-group1/StylusVariables.vue +47 -0
  61. package/CssPreprocessor/Stylus/components/stylus-group2/StylusIteration.vue +34 -0
  62. package/CssPreprocessor/Stylus/components/stylus-group2/StylusMethods.vue +78 -0
  63. package/CssPreprocessor/Stylus/components/stylus-group3/StylusExtends.vue +34 -0
  64. package/CssPreprocessor/Stylus/components/stylus-group3/StylusNesting.vue +63 -0
  65. package/CssPreprocessor/Stylus/components/stylus-group4/StylusKeyframes.vue +40 -0
  66. package/CssPreprocessor/Stylus/components/stylus-group4/StylusMaps.vue +33 -0
  67. package/CssPreprocessor/Stylus/components/stylus-group4/StylusMixins.vue +33 -0
  68. package/CssPreprocessor/Stylus/components/stylus-group5/StylusImporting.vue +34 -0
  69. package/CssPreprocessor/Stylus/components/stylus-group5/TextSettings.styl +4 -0
  70. package/CssPreprocessor/utils/ContentBlock.vue +43 -0
  71. package/CssPreprocessor/utils/ContentList.vue +34 -0
  72. package/CssPreprocessor/utils/FontStyle.css +19 -0
  73. package/CssPreprocessor/utils/Panel.vue +49 -0
  74. package/CssPreprocessor/utils/TitleBar.vue +29 -0
  75. package/DemoHomepage/App.vue +46 -11
  76. package/DemoHomepage/components/Dialog.vue +15 -15
  77. package/DemoHomepage/router.js +21 -13
  78. package/DemoHomepage/views/Homepage.vue +90 -102
  79. package/DivMetroPerformance/App.vue +150 -0
  80. package/DivMetroPerformance/Item.vue +58 -0
  81. package/DivMetroPerformance/assets/bg.jpg +0 -0
  82. package/DivMetroPerformance/assets/coupon_content.png +0 -0
  83. package/DivMetroPerformance/assets/coupon_left.png +0 -0
  84. package/DivMetroPerformance/assets/coupon_mid.png +0 -0
  85. package/DivMetroPerformance/assets/coupon_right.png +0 -0
  86. package/DivMetroPerformance/assets/focus_border.png +0 -0
  87. package/DivMetroPerformance/assets/holder_logo.png +0 -0
  88. package/DivMetroPerformance/assets/jrbm.png +0 -0
  89. package/DivMetroPerformance/assets/line_left.png +0 -0
  90. package/DivMetroPerformance/assets/line_mid.png +0 -0
  91. package/DivMetroPerformance/assets/line_right.png +0 -0
  92. package/DivMetroPerformance/assets/loading.png +0 -0
  93. package/DivMetroPerformance/assets/logo.png +0 -0
  94. package/DivMetroPerformance/assets/mcjx.png +0 -0
  95. package/DivMetroPerformance/assets/tao.png +0 -0
  96. package/DivMetroPerformance/assets/tmall.png +0 -0
  97. package/DivMetroPerformance/border.png +0 -0
  98. package/DivMetroPerformance/components/ContentItem.vue +385 -0
  99. package/DivMetroPerformance/components/MyTab.vue +129 -0
  100. package/DivMetroPerformance/data.js +124 -0
  101. package/DivMetroPerformance/utils/GridItem.vue +28 -0
  102. package/DivMetroPerformance/utils/GridPlate.vue +85 -0
  103. package/FilterDemo/AnimatePic.vue +2 -2
  104. package/FilterDemo/App.vue +3 -3
  105. package/FlipCard/App.vue +2 -2
  106. package/FlipCard/FlipCard.vue +2 -2
  107. package/GridDemo/Item.vue +13 -13
  108. package/HashHistory/App.vue +0 -1
  109. package/HashHistory/components/Item.vue +2 -2
  110. package/HashHistory/views/MainPage.vue +1 -1
  111. package/HashHistory/views/SubPage.vue +2 -2
  112. package/ImpactStop/App.vue +9 -11
  113. package/Input/InputPanel.vue +2 -4
  114. package/LongImage/App.vue +2 -2
  115. package/LongImage/Button.vue +1 -1
  116. package/LongImage/ButtonItem.vue +1 -1
  117. package/LongText/App.vue +3 -3
  118. package/LongText/Button.vue +1 -1
  119. package/LongText/ButtonItem.vue +1 -1
  120. package/LongText/LongTextScroll.vue +4 -4
  121. package/Marquee/longText.js +0 -2
  122. package/MaskClip/App.vue +4 -4
  123. package/MediaDemo/App.vue +127 -0
  124. package/MediaDemo/assets/audio-poster.png +0 -0
  125. package/MediaDemo/components/Button.vue +69 -0
  126. package/MediaDemo/components/Controllor.vue +279 -0
  127. package/MediaDemo/components/StatusBar.vue +100 -0
  128. package/MediaDemo/components/frames/AudioFrame.vue +39 -0
  129. package/MediaDemo/components/frames/AudioPoster.vue +48 -0
  130. package/MediaDemo/components/frames/MediaFrame.vue +153 -0
  131. package/MediaDemo/components/frames/VideoFrame.vue +39 -0
  132. package/MetroWidgetDemos/Advanced/ButtonItem.vue +4 -4
  133. package/MetroWidgetDemos/Advanced/widgets/Item.vue +5 -5
  134. package/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +2 -2
  135. package/MetroWidgetDemos/Advanced/widgets/Widgets.vue +57 -56
  136. package/MetroWidgetDemos/Item.vue +4 -5
  137. package/MetroWidgetDemos/PerformanceTest/App.vue +3 -3
  138. package/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +26 -26
  139. package/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +15 -15
  140. package/MetroWidgetDemos/PingPong/AppPage.vue +2 -2
  141. package/MetroWidgetDemos/PingPong/TabItem.vue +2 -2
  142. package/MetroWidgetDemos/PingPong/ViewSwiper.vue +9 -9
  143. package/MetroWidgetDemos/Simple/RelativeTemplate.vue +2 -2
  144. package/MetroWidgetDemos/WidgetItem.vue +2 -2
  145. package/NinePatchDemo/App.vue +3 -3
  146. package/NinePatchDemo/Item.vue +5 -5
  147. package/Preload/App.vue +5 -5
  148. package/Preload/Item.vue +1 -1
  149. package/QrcodeDemo/App.vue +3 -3
  150. package/ScaleDownNeon/App.vue +9 -9
  151. package/SoundPool/App.vue +6 -9
  152. package/SprayView/App.vue +22 -22
  153. package/SpriteImage/App.vue +4 -4
  154. package/Swiper/App.vue +2 -8
  155. package/TextBox/App.vue +1 -2
  156. package/TextBox/RenderCenter.vue +16 -16
  157. package/TextBox/RenderLeft.vue +16 -16
  158. package/TextBox/RenderOneLine.vue +12 -12
  159. package/TextBox/RenderRight.vue +16 -16
  160. package/TextShadowDemo/App.vue +4 -4
  161. package/TextureAnimation/App.vue +1 -17
  162. package/TextureAnimation/App2.vue +3 -3
  163. package/TextureSize/App.vue +8 -8
  164. package/ThrowMoveDemo/AccelerateDemo.vue +4 -4
  165. package/ThrowMoveDemo/LRParabolicDemo.vue +4 -4
  166. package/ThrowMoveDemo/TargetDemo.vue +4 -4
  167. package/ThrowMoveDemo/UDParabolicDemo.vue +4 -4
  168. package/TouchSample/App.vue +2 -2
  169. package/TouchSample/Item.vue +2 -2
  170. package/TouchSample/MetroWidgetHorizontal.vue +3 -3
  171. package/TouchSample/MetroWidgetVertical.vue +3 -3
  172. package/TouchSample/TouchContainerHorizontal.vue +2 -2
  173. package/TouchSample/TouchContainerVertical.vue +2 -2
  174. package/TransitPage/App.vue +1 -1
  175. package/VideoDemo/App.vue +4 -4
  176. package/VideoDemo/components/Button.vue +1 -1
  177. package/VideoDemo/components/Controllor.vue +2 -2
  178. package/VideoDemo/components/VideoFrame.vue +1 -1
  179. package/VisibleSensorDemo/App.vue +7 -7
  180. package/assets/bmpDemo.bmp +0 -0
  181. package/assets/jpegDemo.jpeg +0 -0
  182. package/assets/pngDemo.png +0 -0
  183. package/assets/pngNoAlphaDemo.png +0 -0
  184. package/assets/webpDemo.webp +0 -0
  185. package/package.json +6 -1
@@ -0,0 +1,51 @@
1
+ import StylusComments from './components/stylus-group1/StylusComments.vue';
2
+ import StylusOperations from './components/stylus-group1/StylusOperations.vue';
3
+ import StylusVariables from './components/stylus-group1/StylusVariables.vue';
4
+ import StylusConditionals from './components/stylus-group1/StylusConditionals.vue';
5
+ import StylusIteration from './components/stylus-group2/StylusIteration.vue';
6
+ import StylusMethods from './components/stylus-group2/StylusMethods.vue';
7
+ import StylusExtends from './components/stylus-group3/StylusExtends.vue';
8
+ import StylusNesting from './components/stylus-group3/StylusNesting.vue';
9
+ import StylusMixins from './components/stylus-group4/StylusMixins.vue';
10
+ import StylusMaps from './components/stylus-group4/StylusMaps.vue';
11
+ import StylusKeyframes from './components/stylus-group4/StylusKeyframes.vue';
12
+ import StylusImporting from './components/stylus-group5/StylusImporting.vue';
13
+
14
+ const titleData = [
15
+ 'Stylus 注释、运算符、变量、条件',
16
+ 'Stylus 迭代、方法',
17
+ 'Stylus 继承、嵌套',
18
+ 'Stylus 混入、映射、关键帧',
19
+ 'Stylus 导入',
20
+ ];
21
+
22
+ const contentListData = [
23
+ [
24
+ { title: "注释- //, /**/", obj: StylusComments },
25
+ { title: "运算符- [ +,-,*,/,... ]", obj: StylusOperations },
26
+ { title: "变量- $var, .a{$var}", obj: StylusVariables },
27
+ { title: "条件- if, else if, else", obj: StylusConditionals },
28
+ ],
29
+ [
30
+ { title: "迭代- for in", obj: StylusIteration },
31
+ { title: "方法- name(var)", obj: StylusMethods, zoom: 3 },
32
+ ],
33
+ [
34
+ { title: "继承- @extend", obj: StylusExtends },
35
+ { title: "嵌套- .a{.b{}}", obj: StylusNesting, zoom: 3 },
36
+ ],
37
+ [
38
+ { title: "混入- name(var)", obj: StylusMixins},
39
+ { title: "映射- name={key:value}", obj: StylusMaps},
40
+ { title: "关键帧- @keyframes", obj: StylusKeyframes},
41
+ ],
42
+ [
43
+ { title: "导入- @import", obj: StylusImporting, zoom: 2 },
44
+ { title: undefined, obj: undefined, zoom: 0 },
45
+ ],
46
+ ];
47
+
48
+ export const panelData = {
49
+ title: titleData,
50
+ contentList: contentListData
51
+ }
@@ -0,0 +1,34 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div>
8
+ <div class="stylus-comments">
9
+ {{'// stylus 单行注释\n'
10
+ + '/* stylus 多行注释 */\n'
11
+ + '.stylus-comments {\n'
12
+ + ' // stylus 单行注释\n'
13
+ + ' /* stylus 多行注释 */\n'
14
+ + ' color: #00FF00;\n'
15
+ + '}'}}
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <style scoped lang="stylus">
21
+ // stylus 单行注释
22
+ /* stylus 多行注释 */
23
+ .stylus-comments {
24
+ // stylus 单行注释
25
+ /* stylus 多行注释 */
26
+ color: #00FF00;
27
+ font-size: 14;
28
+
29
+ left: 10;
30
+ top: 3;
31
+ width: 230;
32
+ height: 130;
33
+ }
34
+ </style>
@@ -0,0 +1,36 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div>
8
+ <div class="stylus-conditional">
9
+ {{'$show-green = true\n'
10
+ + '.stylus-conditional {\n'
11
+ + ' if $show-green {\n'
12
+ + ' color #00FF00\n'
13
+ + ' } else {\n'
14
+ + ' color #FF0000\n'
15
+ + ' }\n'
16
+ + '}'}}
17
+ </div>
18
+ </div>
19
+ </template>
20
+
21
+ <style scoped lang="stylus">
22
+ $show-green = false
23
+ .stylus-conditional {
24
+ if $show-green {
25
+ color: #00FF00;
26
+ } else {
27
+ color: #FF0000;
28
+ }
29
+
30
+ font-size: 14;
31
+ left: 10;
32
+ top: 0;
33
+ width: 220;
34
+ height: 140;
35
+ }
36
+ </style>
@@ -0,0 +1,30 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div>
8
+ <div class="stylus-op">
9
+ {{'., [], !, ~, +, -, is defined\n'
10
+ + '**, *, /, %, +, -, ..., ..\n'
11
+ + '<=, >=, <, >, in\n'
12
+ + '==, is, !=, is not, isnt\n'
13
+ + 'is a, &&, and, ||, or, ?:\n'
14
+ + '=, :=, ?=, +=, -=, *=, /=, %=\n'
15
+ + 'not'}}
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <style scoped lang="stylus">
21
+ .stylus-op {
22
+ color: #001100 * 16;
23
+ font-size: 20 - 6;
24
+
25
+ left: 10;
26
+ top: 3;
27
+ width: 230;
28
+ height: 280;
29
+ }
30
+ </style>
@@ -0,0 +1,47 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div>
8
+ <div class="stylus-var-general">
9
+ {{'$my-color = #00FF00; // 一般变量\n'
10
+ + '.stylus-var-general {\n'
11
+ + ' color: $my-color;\n'
12
+ + '}'}}
13
+ </div>
14
+ <div class="stylus-var-enclosing">
15
+ {{'.stylus-var-enclosing {\n'
16
+ + ' $my-color = #0000FF; // 局部变量\n'
17
+ + ' color: $my-color;\n'
18
+ + '}'}}
19
+ </div>
20
+ </div>
21
+ </template>
22
+
23
+ <style scoped lang="stylus">
24
+ $my-color = #00FF00; // 一般变量
25
+ .stylus-var-general {
26
+ color: $my-color;
27
+
28
+ font-size: 14;
29
+ left: 10;
30
+ top: 0;
31
+ width: 220;
32
+ height: 140;
33
+ }
34
+
35
+ $my-color = #00FF00;
36
+ .stylus-var-enclosing {
37
+ // 只在 .stylus-enclosing 里有效,局部作用域
38
+ $my-color = #FF0000; // 局部变量
39
+ color: $my-color;
40
+
41
+ font-size: 14;
42
+ left: 10;
43
+ top: 68;
44
+ width: 220;
45
+ height: 140;
46
+ }
47
+ </style>
@@ -0,0 +1,34 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div>
8
+ <div class="stylus-iteration">
9
+ {{'$size = 4\n'
10
+ + 'for num in 1..4\n'
11
+ + ' $size += num\n'
12
+ + '\n'
13
+ + '.stylus-iteration {\n'
14
+ + ' font-size: $size;\n'
15
+ + '}'}}
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <style scoped lang="stylus">
21
+ $size = 4
22
+ for num in 1..4
23
+ $size += num
24
+
25
+ .stylus-iteration {
26
+ font-size: $size;
27
+
28
+ color: #00FF00;
29
+ left: 10;
30
+ top: 3;
31
+ width: 230;
32
+ height: 280;
33
+ }
34
+ </style>
@@ -0,0 +1,78 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div>
8
+ <div class="stylus-method-general">
9
+ {{'getsize(zoom) { //一般调用\n'
10
+ + ' 2 * zoom\n'
11
+ + '}\n'
12
+ + '.stylus-method-general {\n'
13
+ + ' font-size: getsize(7);\n'
14
+ + '}'}}
15
+ </div>
16
+
17
+ <div class="stylus-method-named">
18
+ {{'getsize(zoom) { //具名参数\n'
19
+ + ' 2 * zoom\n'
20
+ + '}\n'
21
+ + '.stylus-method-named {\n'
22
+ + ' font-size: getsize(zoom: 7);\n'
23
+ + '}'}}
24
+ </div>
25
+
26
+ <div class="stylus-method-varargs">
27
+ {{'getsize(args...) { //不定参数\n'
28
+ + ' 2 * args\n'
29
+ + '}\n'
30
+ + '.stylus-method-varargs {\n'
31
+ + ' font-size: getsize(7);\n'
32
+ + '}'}}
33
+ </div>
34
+ </div>
35
+ </template>
36
+
37
+ <style scoped lang="stylus">
38
+ getsize(zoom) { // 一般调用
39
+ 2 * zoom
40
+ }
41
+ .stylus-method-general {
42
+ font-size: getsize(7);
43
+
44
+ color: #00FF00;
45
+ left: 10;
46
+ top: 10;
47
+ width: 240;
48
+ height: 140;
49
+ }
50
+
51
+ getsize(zoom) { // 具名参数
52
+ 2 * zoom
53
+ }
54
+
55
+ .stylus-method-named {
56
+ font-size: getsize(zoom: 7);
57
+
58
+ color: #00FF00;
59
+ left: 10;
60
+ top: 140;
61
+ width: 240;
62
+ height: 140;
63
+ }
64
+
65
+ getsize(args...) { // 不定参数
66
+ 2 * args
67
+ }
68
+
69
+ .stylus-method-varargs {
70
+ font-size: getsize(7);
71
+
72
+ color: #00FF00;
73
+ left: 10;
74
+ top: 270;
75
+ width: 240;
76
+ height: 140;
77
+ }
78
+ </style>
@@ -0,0 +1,34 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div>
8
+ <div class="stylus-extend">
9
+ {{'.stylus-basic {\n'
10
+ + ' color: #00FF00;\n'
11
+ + '}\n'
12
+ + '.stylus-extend {\n'
13
+ + ' @extend .stylus-basic;\n'
14
+ + ' font-size: 14;\n'
15
+ + '}'}}
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <style scoped lang='stylus'>
21
+ .stylus-basic {
22
+ color: #00FF00;
23
+ }
24
+
25
+ .stylus-extend {
26
+ @extend .stylus-basic;
27
+ font-size: 14;
28
+
29
+ left: 10;
30
+ top: 3;
31
+ width: 230;
32
+ height: 140;
33
+ }
34
+ </style>
@@ -0,0 +1,63 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div class="stylus-root">
8
+ <div class="stylus-rule-nesting">
9
+ {{'.stylus-root {\n'
10
+ + ' color: #00FF00;\n'
11
+ + ' .stylus-rule-nesting { // 规则嵌套\n'
12
+ + ' font-size: 14;\n'
13
+ + ' }\n'
14
+ + '}'}}
15
+ </div>
16
+ <div class="stylus-prop-nesting">
17
+ {{'// 属性嵌套\n'
18
+ + '不支持'}}
19
+ </div>
20
+ <div class="stylus-root-parent-selector">
21
+ {{'.stylus-root {\n'
22
+ + ' color: #00FF00;\n'
23
+ + ' &-parent-selector { // 父选择器\n'
24
+ + ' font-size: 14;\n'
25
+ + ' }\n'
26
+ + '}'}}
27
+ </div>
28
+ </div>
29
+ </template>
30
+
31
+ <style scoped lang='stylus'>
32
+ .stylus-root {
33
+ color: #00FF00;
34
+
35
+ .stylus-rule-nesting { // 规则嵌套
36
+ font-size: 14;
37
+
38
+ left: 10;
39
+ top: 3;
40
+ width: 230;
41
+ height: 140;
42
+ }
43
+
44
+ .stylus-prop-nesting { // 属性嵌套(不支持)
45
+ color: #000000;
46
+ font-size: 14;
47
+
48
+ left: 10;
49
+ top: 120;
50
+ width: 230;
51
+ height: 140;
52
+ }
53
+
54
+ &-parent-selector { // 父选择器
55
+ font-size: 14;
56
+
57
+ left: 10;
58
+ top: 280;
59
+ width: 230;
60
+ height: 140;
61
+ }
62
+ }
63
+ </style>
@@ -0,0 +1,40 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div>
8
+ <div class="stylus-keyframes" :style="{ animation: 'scale-anim 3s infinite linear' }">
9
+ {{'@keyframes scale-anim {\n'
10
+ + ' from {\n'
11
+ + ' transform scale3d(1.0, 1.0, 1)\n'
12
+ + ' }\n'
13
+ + ' to {\n'
14
+ + ' transform scale3d(0.8, 0.8, 1)\n'
15
+ + ' }\n'
16
+ + '}'}}
17
+ </div>
18
+ </div>
19
+ </template>
20
+
21
+ <style scoped lang="stylus">
22
+ @keyframes scale-anim {
23
+ from {
24
+ transform: scale3d(1.0, 1.0, 1);
25
+ }
26
+ to {
27
+ transform: scale3d(0.8, 0.8, 1);
28
+ }
29
+ }
30
+
31
+ .stylus-keyframes {
32
+ color: #00FF00;
33
+ font-size: 14;
34
+
35
+ left: 10;
36
+ top: 0;
37
+ width: 230;
38
+ height: 140;
39
+ }
40
+ </style>
@@ -0,0 +1,33 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div>
8
+ <div class="stylus-map">
9
+ {{'font-sizes = {\n'
10
+ + ' small: 10, medium: 14, large: 18,\n'
11
+ + '}\n'
12
+ + '.stylus-map {\n'
13
+ + ' font-size: font-sizes[medium];\n'
14
+ + '}'}}
15
+ </div>
16
+ </div>
17
+ </template>
18
+
19
+ <style scoped lang='stylus'>
20
+ font-sizes = {
21
+ small: 10, medium: 14, large: 18,
22
+ }
23
+
24
+ .stylus-map {
25
+ font-size: font-sizes[medium];
26
+
27
+ color: #00FF00;
28
+ left: 10;
29
+ top: 3;
30
+ width: 230;
31
+ height: 140;
32
+ }
33
+ </style>
@@ -0,0 +1,33 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div>
8
+ <div class="stylus-mixin">
9
+ {{'font(size) {\n'
10
+ + ' font-size: size;\n'
11
+ + '}\n'
12
+ + '.stylus-mixin {\n'
13
+ + ' font(14);\n'
14
+ + '}'}}
15
+ </div>
16
+ </div>
17
+ </template>
18
+
19
+ <style scoped lang='stylus'>
20
+ font(size) {
21
+ font-size: size;
22
+ }
23
+
24
+ .stylus-mixin {
25
+ font(14);
26
+
27
+ color: #00FF00;
28
+ left: 10;
29
+ top: 0;
30
+ width: 230;
31
+ height: 140;
32
+ }
33
+ </style>
@@ -0,0 +1,34 @@
1
+ <script>
2
+ export default {
3
+ }
4
+ </script>
5
+
6
+ <template>
7
+ <div>
8
+ <div class="stylus-bounds stylus-imported">
9
+ {{'StylusImportFile.vue\n'
10
+ + '\n'
11
+ + '<style scoped lang=\'stylus\'>\n'
12
+ + '@import \'./TextSettings\';\n'
13
+ + '</style>\n'
14
+ + '\n'
15
+ + '=================\n'
16
+ + 'TextSettings.styl\n'
17
+ + '\n'
18
+ + '.stylus-imported {\n'
19
+ + ' color: #00FF00;\n'
20
+ + ' font-size: 14;\n'
21
+ + '}'}}
22
+ </div>
23
+ </div>
24
+ </template>
25
+
26
+ <style scoped lang='stylus'>
27
+ @import './TextSettings';
28
+ .stylus-bounds {
29
+ left: 10;
30
+ top: 0;
31
+ width: 230;
32
+ height: 280;
33
+ }
34
+ </style>
@@ -0,0 +1,4 @@
1
+ .stylus-imported {
2
+ color: #00FF00;
3
+ font-size: 14;
4
+ }
@@ -0,0 +1,43 @@
1
+ <script>
2
+
3
+ export default {
4
+ props: {
5
+ index: Number,
6
+ style: Object,
7
+ title: String,
8
+ },
9
+ computed: {
10
+ blockOpacity() {
11
+ return 0.4 * ((this.index % 3) + 1) / 3;
12
+ }
13
+ },
14
+ data() {
15
+ return {
16
+ titleStyle: {
17
+ lineHeight: 18,
18
+ width: this.style.width, height: 18,
19
+ backgroundColor: 'rgba(0,0,255,0.7)',
20
+ }
21
+ }
22
+ }
23
+
24
+ }
25
+
26
+ </script>
27
+
28
+ <template>
29
+ <div :style=style>
30
+ <div class="container-font" :style=titleStyle>
31
+ {{title}}
32
+ </div>
33
+ <div class="content-font" :style="{ top: titleStyle.lineHeight,
34
+ width: style.width, height: style.height - 18,
35
+ backgroundColor: 'rgba(0,0,255,'+blockOpacity+')' }">
36
+ <slot/>
37
+ </div>
38
+ </div>
39
+ </template>
40
+
41
+ <style scoped>
42
+ @import "./FontStyle.css";
43
+ </style>
@@ -0,0 +1,34 @@
1
+ <script>
2
+ import ContentBlock from './ContentBlock.vue';
3
+
4
+ export default {
5
+ props: {
6
+ style: Object,
7
+ startIndex: Number,
8
+ contentData: Array,
9
+ },
10
+ components: {
11
+ ContentBlock,
12
+ },
13
+ computed: {
14
+ rowHeight() {
15
+ return this.style.height / 4;
16
+ },
17
+ }
18
+ }
19
+ </script>
20
+
21
+ <template>
22
+ <div :style=style>
23
+ <div v-for="(_, idx) in contentData.length" :key=idx>
24
+ <ContentBlock v-if="contentData[idx].zoom != 0"
25
+ :style="{top: rowHeight*idx, width: style.width, height: rowHeight * (contentData[idx].zoom ?? 1)}"
26
+ :index=startIndex+idx :title=contentData[idx].title >
27
+ <component :is=contentData[idx].obj />
28
+ </ContentBlock>
29
+ </div>
30
+ </div>
31
+ </template>
32
+
33
+ <style>
34
+ </style>
@@ -0,0 +1,19 @@
1
+
2
+ .title-font {
3
+ color: #0000FF;
4
+ font-family: 黑体;
5
+ font-size: 16;
6
+ text-align: center;
7
+ }
8
+
9
+ .container-font {
10
+ color: #FFFFFF;
11
+ font-family: 黑体;
12
+ font-size: 16;
13
+ }
14
+
15
+ .content-font {
16
+ color: #000000;
17
+ font-family: 黑体;
18
+ font-size: 10;
19
+ }