@cloudbase/weda-ui 0.2.7 → 0.2.8

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 (114) hide show
  1. package/package.json +1 -3
  2. package/src/configs/components/container.json +2 -1
  3. package/src/configs/components/form/richText.json +2 -1
  4. package/src/configs/components/form/uploader.json +4 -4
  5. package/src/configs/components/image.json +2 -1
  6. package/src/configs/components/link.json +2 -1
  7. package/src/configs/components/richtextview.json +2 -1
  8. package/src/configs/components/scrollVeiw.json +2 -1
  9. package/src/configs/components/swiper.json +2 -1
  10. package/src/configs/components/tabs.json +2 -1
  11. package/src/configs/components/text.json +2 -1
  12. package/src/configs/index.js +3 -5
  13. package/src/mp/components/form/uploader/index.js +15 -8
  14. package/src/mp/components/form/uploader/index.wxml +1 -1
  15. package/src/web/components/form/select/region/{cities.json → cities.js} +2 -2
  16. package/src/web/components/form/select/region/index.js +3 -3
  17. package/src/web/components/form/select/region/{provinces.json → provinces.js} +2 -2
  18. package/src/web/components/form/select/region/{regions.json → regions.js} +2 -2
  19. package/src/web/components/form/switch/index.jsx +1 -0
  20. package/src/web/components/form/uploader/uploader.h5.jsx +42 -16
  21. package/src/web/components/form/uploader/uploader.pc.jsx +1 -1
  22. package/src/web/components/image/image.jsx +0 -1
  23. package/src/web/components/index.js +0 -1
  24. package/src/configs/components/markdown.json +0 -17
  25. package/src/mp/components/markdown/index.js +0 -27
  26. package/src/mp/components/markdown/index.json +0 -6
  27. package/src/mp/components/markdown/index.wxml +0 -1
  28. package/src/mp/components/markdown/towxml/audio-player/Audio.js +0 -99
  29. package/src/mp/components/markdown/towxml/audio-player/audio-player.js +0 -102
  30. package/src/mp/components/markdown/towxml/audio-player/audio-player.json +0 -5
  31. package/src/mp/components/markdown/towxml/audio-player/audio-player.wxml +0 -14
  32. package/src/mp/components/markdown/towxml/audio-player/audio-player.wxss +0 -175
  33. package/src/mp/components/markdown/towxml/audio-player/loading.svg +0 -1
  34. package/src/mp/components/markdown/towxml/config.js +0 -285
  35. package/src/mp/components/markdown/towxml/decode.js +0 -26
  36. package/src/mp/components/markdown/towxml/decode.json +0 -12
  37. package/src/mp/components/markdown/towxml/decode.wxml +0 -1
  38. package/src/mp/components/markdown/towxml/decode.wxss +0 -0
  39. package/src/mp/components/markdown/towxml/img/img.js +0 -98
  40. package/src/mp/components/markdown/towxml/img/img.json +0 -3
  41. package/src/mp/components/markdown/towxml/img/img.wxml +0 -1
  42. package/src/mp/components/markdown/towxml/img/img.wxss +0 -0
  43. package/src/mp/components/markdown/towxml/index.js +0 -19
  44. package/src/mp/components/markdown/towxml/latex/latex.js +0 -53
  45. package/src/mp/components/markdown/towxml/latex/latex.json +0 -5
  46. package/src/mp/components/markdown/towxml/latex/latex.wxml +0 -1
  47. package/src/mp/components/markdown/towxml/latex/latex.wxss +0 -0
  48. package/src/mp/components/markdown/towxml/parse/highlight/highlight.js +0 -729
  49. package/src/mp/components/markdown/towxml/parse/highlight/index.js +0 -7
  50. package/src/mp/components/markdown/towxml/parse/highlight/languages/bash.js +0 -91
  51. package/src/mp/components/markdown/towxml/parse/highlight/languages/c-like.js +0 -244
  52. package/src/mp/components/markdown/towxml/parse/highlight/languages/c.js +0 -20
  53. package/src/mp/components/markdown/towxml/parse/highlight/languages/css.js +0 -138
  54. package/src/mp/components/markdown/towxml/parse/highlight/languages/dart.js +0 -135
  55. package/src/mp/components/markdown/towxml/parse/highlight/languages/go.js +0 -57
  56. package/src/mp/components/markdown/towxml/parse/highlight/languages/htmlbars.js +0 -79
  57. package/src/mp/components/markdown/towxml/parse/highlight/languages/java.js +0 -126
  58. package/src/mp/components/markdown/towxml/parse/highlight/languages/javascript.js +0 -263
  59. package/src/mp/components/markdown/towxml/parse/highlight/languages/json.js +0 -51
  60. package/src/mp/components/markdown/towxml/parse/highlight/languages/less.js +0 -177
  61. package/src/mp/components/markdown/towxml/parse/highlight/languages/nginx.js +0 -103
  62. package/src/mp/components/markdown/towxml/parse/highlight/languages/php.js +0 -152
  63. package/src/mp/components/markdown/towxml/parse/highlight/languages/python-repl.js +0 -27
  64. package/src/mp/components/markdown/towxml/parse/highlight/languages/python.js +0 -146
  65. package/src/mp/components/markdown/towxml/parse/highlight/languages/scss.js +0 -137
  66. package/src/mp/components/markdown/towxml/parse/highlight/languages/shell.js +0 -23
  67. package/src/mp/components/markdown/towxml/parse/highlight/languages/typescript.js +0 -198
  68. package/src/mp/components/markdown/towxml/parse/highlight/languages/xml.js +0 -143
  69. package/src/mp/components/markdown/towxml/parse/highlight/style/github.wxss +0 -99
  70. package/src/mp/components/markdown/towxml/parse/highlight/style/monokai.wxss +0 -70
  71. package/src/mp/components/markdown/towxml/parse/index.js +0 -106
  72. package/src/mp/components/markdown/towxml/parse/markdown/index.js +0 -53
  73. package/src/mp/components/markdown/towxml/parse/markdown/markdown.js +0 -5834
  74. package/src/mp/components/markdown/towxml/parse/markdown/plugins/emoji.js +0 -1773
  75. package/src/mp/components/markdown/towxml/parse/markdown/plugins/ins.js +0 -120
  76. package/src/mp/components/markdown/towxml/parse/markdown/plugins/latex.js +0 -193
  77. package/src/mp/components/markdown/towxml/parse/markdown/plugins/mark.js +0 -120
  78. package/src/mp/components/markdown/towxml/parse/markdown/plugins/sub.js +0 -95
  79. package/src/mp/components/markdown/towxml/parse/markdown/plugins/sup.js +0 -95
  80. package/src/mp/components/markdown/towxml/parse/markdown/plugins/todo.js +0 -220
  81. package/src/mp/components/markdown/towxml/parse/markdown/plugins/yuml.js +0 -18
  82. package/src/mp/components/markdown/towxml/parse/parse2/Parser.js +0 -263
  83. package/src/mp/components/markdown/towxml/parse/parse2/Tokenizer.js +0 -507
  84. package/src/mp/components/markdown/towxml/parse/parse2/domhandler/index.js +0 -104
  85. package/src/mp/components/markdown/towxml/parse/parse2/domhandler/node.js +0 -169
  86. package/src/mp/components/markdown/towxml/parse/parse2/entities/decode.js +0 -54
  87. package/src/mp/components/markdown/towxml/parse/parse2/entities/decode_codepoint.js +0 -19
  88. package/src/mp/components/markdown/towxml/parse/parse2/entities/encode.js +0 -54
  89. package/src/mp/components/markdown/towxml/parse/parse2/entities/index.js +0 -30
  90. package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/decode.js +0 -31
  91. package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/entities.js +0 -2128
  92. package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/legacy.js +0 -109
  93. package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/xml.js +0 -2
  94. package/src/mp/components/markdown/towxml/parse/parse2/index.js +0 -8
  95. package/src/mp/components/markdown/towxml/style/main.wxss +0 -378
  96. package/src/mp/components/markdown/towxml/style/theme/dark.wxss +0 -73
  97. package/src/mp/components/markdown/towxml/style/theme/light.wxss +0 -63
  98. package/src/mp/components/markdown/towxml/table/table.js +0 -11
  99. package/src/mp/components/markdown/towxml/table/table.json +0 -6
  100. package/src/mp/components/markdown/towxml/table/table.wxml +0 -24
  101. package/src/mp/components/markdown/towxml/table/table.wxss +0 -0
  102. package/src/mp/components/markdown/towxml/todogroup/todogroup.js +0 -19
  103. package/src/mp/components/markdown/towxml/todogroup/todogroup.json +0 -6
  104. package/src/mp/components/markdown/towxml/todogroup/todogroup.wxml +0 -13
  105. package/src/mp/components/markdown/towxml/todogroup/todogroup.wxss +0 -3
  106. package/src/mp/components/markdown/towxml/towxml.js +0 -17
  107. package/src/mp/components/markdown/towxml/towxml.json +0 -6
  108. package/src/mp/components/markdown/towxml/towxml.wxml +0 -5
  109. package/src/mp/components/markdown/towxml/towxml.wxss +0 -8
  110. package/src/mp/components/markdown/towxml/yuml/yuml.js +0 -51
  111. package/src/mp/components/markdown/towxml/yuml/yuml.json +0 -5
  112. package/src/mp/components/markdown/towxml/yuml/yuml.wxml +0 -5
  113. package/src/mp/components/markdown/towxml/yuml/yuml.wxss +0 -0
  114. package/src/web/components/markdown/index.jsx +0 -40
@@ -1,102 +0,0 @@
1
- const Audio = require('./Audio');
2
- Component({
3
- options: {
4
- styleIsolation: 'shared',
5
- },
6
- properties: {
7
- data: {
8
- type: Object,
9
- value: {},
10
- },
11
- },
12
- lifetimes: {
13
- // 页面生命周期
14
- attached() {
15
- const _ts = this;
16
- const audio = (_ts.audio = new Audio(this.data.data));
17
-
18
- audio.eventPlay = function () {
19
- _ts.setData({ tips: { state: 'h2w__audio--play', text: 'Playing' } });
20
- };
21
- audio.eventCanplay = function () {
22
- _ts.setData({ tips: { state: 'h2w__audio--readyed', text: 'Readyed' } });
23
- };
24
- audio.eventTimeUpdate = function (duration, currentTime) {
25
- _ts.setData({
26
- time: {
27
- currentTime,
28
- duration,
29
- schedule: `${(Math.round(_ts.audio.currentTime) / Math.round(_ts.audio.duration)) * 100}%`,
30
- },
31
- });
32
- };
33
- audio.eventPause = function () {
34
- _ts.setData({ tips: { state: 'h2w__audio--pause', text: 'Pause' } });
35
- };
36
- audio.eventStop = function () {
37
- _ts.setData({ tips: { state: 'h2w__audio--end', text: 'End' } });
38
- };
39
-
40
- // // 更新播放状态
41
- // _ts.audio.onTimeUpdate = function(duration,currentTime){
42
- // _ts.setData({
43
- // playerData:{
44
- // state:'h2w__audio--play',
45
- // tips:'Playing',
46
- // currentTime:currentTime,
47
- // duration:duration,
48
- // schedule:_ts.audio.currentTime / _ts.audio.duration * 100 + '%'
49
- // }
50
- // });
51
- // };
52
-
53
- // _ts.audio.onPause = function(){
54
- // _ts.setData({playerData:{state:'h2w__audio--pause',tips:'Pause'}});
55
- // };
56
-
57
- // _ts.audio.onCanplay = function(){
58
- // _ts.setData({playerData:{state:'h2w__audio--readyed',tips:'Readyed'}});
59
- // };
60
-
61
- // _ts.audio.onError = function(){
62
- // _ts.setData({playerData:{state:'h2w__audio--error',tips:'Error'}});
63
- // };
64
-
65
- // _ts.audio.onEnded = ()=>{
66
- // _ts.setData({playerData:{state:'h2w__audio--end',tips:'End'}});
67
- // };
68
- },
69
- moved() {
70
- _ts.audio.destroy();
71
- },
72
- detached: () => {},
73
- },
74
- data: {
75
- tips: {
76
- state: '',
77
- text: '--',
78
- },
79
- time: {
80
- currentTime: '00:00:00',
81
- duration: '00:00:00',
82
- schedule: '0%',
83
- },
84
- },
85
- methods: {
86
- playAndPause() {
87
- const _ts = this;
88
- const { audio } = _ts;
89
-
90
- // console.log(audio);
91
-
92
- audio.isTouch = true;
93
- if (audio.status === 'update' || audio.status === 'play') {
94
- // console.log('pause');
95
- audio.pause();
96
- } else {
97
- // console.log('play');
98
- audio.play();
99
- }
100
- },
101
- },
102
- });
@@ -1,5 +0,0 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- }
5
- }
@@ -1,14 +0,0 @@
1
- <view class="h2w__audio {{tips.state || 'h2w__audio--loading'}}" bind:tap="playAndPause">
2
- <view class="h2w__audioIcon"></view>
3
- <view class="h2w__audioCover">
4
- <image class="h2w__audioLoading" src="loading.svg"></image>
5
- <image class="h2w__audioCoverImg" src="{{data.attr.poster}}"></image>
6
- </view>
7
- <view class="h2w__audioInfo">
8
- <view class="h2w__audioTips">{{tips.text || 'Error'}}</view>
9
- <view class="h2w__audioSchedule" style="width:{{time.schedule}};"></view>
10
- <view class="h2w__audioTitle">{{data.attr.name}}</view>
11
- <view class="h2w__audioAuthor">{{data.attr.author}}</view>
12
- <view class="h2w__audioTime">{{time.currentTime || '00:00:00'}} / {{time.duration || '00:00:00'}}</view>
13
- </view>
14
- </view>
@@ -1,175 +0,0 @@
1
- /*音频播放器样式*/
2
- .h2w__audio {
3
- height: 136rpx;
4
- margin:16rpx 0;
5
- background: #f1f1f1;
6
- position: relative;
7
- }
8
-
9
- .h2w__audio--error .h2w__audioIcon,
10
- .h2w__audio--loading .h2w__audioIcon {
11
- display:none;
12
- }
13
-
14
- .h2w__audio--readyed .h2w__audioLoading,
15
- .h2w__audio--end .h2w__audioLoading,
16
- .h2w__audio--play .h2w__audioIcon,
17
- .h2w__audio--pause .h2w__audioLoading,
18
- .h2w__audio--play .h2w__audioLoading {
19
- display: none;
20
- }
21
-
22
- .h2w__audio--play .h2w__audioCover image {
23
- opacity: 1;
24
- }
25
-
26
- .h2w__audio--readyed .h2w__audioTips,
27
- .h2w__audio--end .h2w__audioTips,
28
- .h2w__audio--stop .h2w__audioTips,
29
- .h2w__audio--pause .h2w__audioTips,
30
- .h2w__audio--play .h2w__audioTips {
31
- opacity:0.4;
32
- }
33
-
34
- .h2w__audio--error {
35
- background:red;
36
- }
37
-
38
- /* .h2w__audio--end .h2w__audio__icon {width:20rpx; height:20rpx; background:white; border:0; left:24rpx; top:24rpx; border-radius:2rpx;} */
39
- .h2w__audioCover {
40
- width: 136rpx;
41
- height: 136rpx;
42
- background: black;
43
- float: left;
44
- position: relative;
45
- }
46
-
47
- .h2w__audioCover image {
48
- width: 100%;
49
- height: 100%;
50
- opacity: 0.6;
51
- margin:0;
52
- transition: all 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
53
- }
54
-
55
- .h2w__audioCover .h2w__audioLoading {
56
- width:80rpx;
57
- height:80rpx;
58
- position:absolute;
59
- left:50%;
60
- top:50%;
61
- margin:-40rpx 0 0 -40rpx;
62
- z-index:1;
63
- opacity:1;
64
- }
65
-
66
- .h2w__audioInfo {
67
- padding-left: 20rpx;
68
- padding-top: 16rpx;
69
- position: absolute;
70
- left: 136rpx;
71
- right: 0;
72
- }
73
-
74
- .h2w__audioSchedule {
75
- position: absolute;
76
- left: 0;
77
- top: 0;
78
- background: rgba(0, 255, 0, 0.1);
79
- height: 136rpx;
80
- width: 0;
81
- }
82
-
83
- .h2w__audioTips {
84
- position:absolute;
85
- right:0;
86
- top:0;
87
- height: 32rpx;
88
- line-height: 32rpx;
89
- padding:10rpx 20rpx;
90
- font-size:20rpx;
91
- }
92
-
93
- .h2w__audio--error .h2w__audioTips {
94
- color:red;
95
- }
96
-
97
- .h2w__audioTitle {
98
- display: block;
99
- font-size: 24rpx;
100
- height: 40rpx;
101
- line-height: 40rpx;
102
- font-weight: bold;
103
- }
104
-
105
- .h2w__audioAuthor {
106
- display: block;
107
- font-size: 20rpx;
108
- height: 32rpx;
109
- line-height: 32rpx;
110
- }
111
-
112
- .h2w__audioTime {
113
- display: block;
114
- font-size: 20rpx;
115
- height: 32rpx;
116
- line-height: 32rpx;
117
- }
118
-
119
- .h2w__audioIcon {
120
- width: 0;
121
- height: 0;
122
- position: absolute;
123
- left: 60rpx;
124
- top: 48rpx;
125
- border-width: 20rpx 0 20rpx 20rpx;
126
- border-style: solid;
127
- border-color: transparent transparent transparent #fff;
128
- z-index: 1;
129
- }
130
-
131
- /* 深色主题 */
132
- .h2w-dark .h2w__audio {
133
- background: #1f1f1f;
134
- }
135
-
136
- .h2w-dark .h2w__audio--error {
137
- background:rgba(255,0,0,0.1);
138
- }
139
-
140
- .h2w-dark .h2w__audioCover {
141
- background: black;
142
- }
143
-
144
- .h2w-dark .h2w__audioSchedule {
145
- background: rgba(0, 255, 0, 0.2);
146
- }
147
-
148
- .h2w-dark .h2w__audioIcon {
149
- border-color: transparent transparent transparent #fff;
150
- }
151
-
152
-
153
-
154
- /* 浅色主题 */
155
- .h2w-light .h2w__audio {
156
- background: #f1f1f1;
157
- }
158
-
159
- .h2w-light .h2w__audio--error {
160
- background:rgba(255,0,0,0.1);
161
- }
162
-
163
- .h2w-light .h2w__audioCover {
164
- background: black;
165
- }
166
-
167
- .h2w-light .h2w__audioSchedule {
168
- background: rgba(0, 255, 0, 0.1);
169
- }
170
-
171
- .h2w-light .h2w__audioIcon {
172
- border-color: transparent transparent transparent #fff;
173
- }
174
-
175
-
@@ -1 +0,0 @@
1
- <svg width='200px' height='200px' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-default"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(0 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-1s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(30 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.9166666666666666s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(60 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.8333333333333334s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(90 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.75s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(120 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.6666666666666666s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(150 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.5833333333333334s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(180 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.5s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(210 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.4166666666666667s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(240 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.3333333333333333s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(270 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.25s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(300 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.16666666666666666s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#1ed600' transform='rotate(330 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.08333333333333333s' repeatCount='indefinite'/></rect></svg>
@@ -1,285 +0,0 @@
1
- module.exports = {
2
- // LaTex公式、yuml解析服务架设参见 https://github.com/sbfkcel/markdown-server
3
-
4
- // 数学公式解析API
5
- latex: {
6
- api: 'http://towxml.vvadd.com/?tex',
7
- },
8
-
9
- // yuml图解析APPI
10
- yuml: {
11
- api: 'http://towxml.vvadd.com/?yuml',
12
- },
13
-
14
- // markdown解析配置,保留需要的选项即可
15
- markdown: [
16
- 'sub', // 下标支持
17
- 'sup', // 上标支持
18
- 'ins', // 文本删除线支持
19
- 'mark', // 文本高亮支持
20
- 'emoji', // emoji表情支持
21
- 'todo', // todo支持
22
- ],
23
-
24
- // 代码高亮配置,保留需要的选项即可(尽量越少越好,不要随意调整顺序。部分高亮有顺序依赖)
25
- highlight: [
26
- 'c-like',
27
- 'c',
28
- 'bash',
29
- 'css',
30
- 'dart',
31
- 'go',
32
- 'java',
33
- 'javascript',
34
- 'json',
35
- 'less',
36
- 'scss',
37
- 'shell',
38
- 'xml',
39
- 'htmlbars',
40
- 'nginx',
41
- 'php',
42
- 'python',
43
- 'python-repl',
44
- 'typescript',
45
-
46
- // 'csharp',
47
- // 'http',
48
- // 'swift',
49
- // 'yaml',
50
- // 'markdown',
51
- // 'powershell',
52
- // 'ruby',
53
- // 'makefile',
54
- // 'lua',
55
- // 'stylus',
56
- // 'basic',
57
- // '1c',
58
- // 'abnf',
59
- // 'accesslog',
60
- // 'actionscript',
61
- // 'ada',
62
- // 'angelscript',
63
- // 'apache',
64
- // 'applescript',
65
- // 'arcade',
66
- // 'cpp',
67
- // 'arduino',
68
- // 'armasm',
69
- // 'asciidoc',
70
- // 'aspectj',
71
- // 'autohotkey',
72
- // 'autoit',
73
- // 'avrasm',
74
- // 'awk',
75
- // 'axapta',
76
- // 'bnf',
77
- // 'brainfuck',
78
- // 'cal',
79
- // 'capnproto',
80
- // 'ceylon',
81
- // 'clean',
82
- // 'clojure-repl',
83
- // 'clojure',
84
- // 'cmake',
85
- // 'coffeescript',
86
- // 'coq',
87
- // 'cos',
88
- // 'crmsh',
89
- // 'crystal',
90
- // 'csp',
91
- // 'd',
92
- // 'delphi',
93
- // 'diff',
94
- // 'django',
95
- // 'dns',
96
- // 'dockerfile',
97
- // 'dos',
98
- // 'dsconfig',
99
- // 'dts',
100
- // 'dust',
101
- // 'ebnf',
102
- // 'elixir',
103
- // 'elm',
104
- // 'erb',
105
- // 'erlang-repl',
106
- // 'erlang',
107
- // 'excel',
108
- // 'fix',
109
- // 'flix',
110
- // 'fortran',
111
- // 'fsharp',
112
- // 'gams',
113
- // 'gauss',
114
- // 'gcode',
115
- // 'gherkin',
116
- // 'glsl',
117
- // 'gml',
118
- // 'golo',
119
- // 'gradle',
120
- // 'groovy',
121
- // 'haml',
122
- // 'handlebars',
123
- // 'haskell',
124
- // 'haxe',
125
- // 'hsp',
126
- // 'hy',
127
- // 'inform7',
128
- // 'ini',
129
- // 'irpf90',
130
- // 'isbl',
131
- // 'jboss-cli',
132
- // 'julia-repl',
133
- // 'julia',
134
- // 'kotlin',
135
- // 'lasso',
136
- // 'latex',
137
- // 'ldif',
138
- // 'leaf',
139
- // 'lisp',
140
- // 'livecodeserver',
141
- // 'livescript',
142
- // 'llvm',
143
- // 'lsl',
144
- // 'mathematica',
145
- // 'matlab',
146
- // 'maxima',
147
- // 'mel',
148
- // 'mercury',
149
- // 'mipsasm',
150
- // 'mizar',
151
- // 'mojolicious',
152
- // 'monkey',
153
- // 'moonscript',
154
- // 'n1ql',
155
- // 'nim',
156
- // 'nix',
157
- // 'nsis',
158
- // 'objectivec',
159
- // 'ocaml',
160
- // 'openscad',
161
- // 'oxygene',
162
- // 'parser3',
163
- // 'perl',
164
- // 'pf',
165
- // 'pgsql',
166
- // 'php-template',
167
- // 'plaintext',
168
- // 'pony',
169
- // 'processing',
170
- // 'profile',
171
- // 'prolog',
172
- // 'properties',
173
- // 'protobuf',
174
- // 'puppet',
175
- // 'purebasic',
176
- // 'q',
177
- // 'qml',
178
- // 'r',
179
- // 'reasonml',
180
- // 'rib',
181
- // 'roboconf',
182
- // 'routeros',
183
- // 'rsl',
184
- // 'ruleslanguage',
185
- // 'rust',
186
- // 'sas',
187
- // 'scala',
188
- // 'scheme',
189
- // 'scilab',
190
- // 'smali',
191
- // 'smalltalk',
192
- // 'sml',
193
- // 'sqf',
194
- // 'sql',
195
- // 'stan',
196
- // 'stata',
197
- // 'step21',
198
- // 'subunit',
199
- // 'taggerscript',
200
- // 'tap',
201
- // 'tcl',
202
- // 'thrift',
203
- // 'tp',
204
- // 'twig',
205
- // 'vala',
206
- // 'vbnet',
207
- // 'vbscript-html',
208
- // 'vbscript',
209
- // 'verilog',
210
- // 'vhdl',
211
- // 'vim',
212
- // 'x86asm',
213
- // 'xl',
214
- // 'xquery',
215
- // 'zephir'
216
- ],
217
-
218
- // wxml原生标签,该系列标签将不会被转换
219
- wxml: [
220
- 'view',
221
- 'video',
222
- 'text',
223
- 'image',
224
- 'navigator',
225
- 'swiper',
226
- 'swiper-item',
227
- 'block',
228
- 'form',
229
- 'input',
230
- 'textarea',
231
- 'button',
232
- 'checkbox-group',
233
- 'checkbox',
234
- 'radio-group',
235
- 'radio',
236
-
237
- // 可以解析的标签(html或markdown中会很少使用)
238
- // 'canvas',
239
- // 'map',
240
- // 'slider',
241
- // 'scroll-view',
242
- // 'movable-area',
243
- // 'movable-view',
244
- // 'progress',
245
- // 'label',
246
- // 'switch',
247
- // 'picker',
248
- // 'picker-view',
249
- // 'switch',
250
- // 'contact-button'
251
- ],
252
-
253
- // 自定义组件
254
- components: [
255
- 'audio-player', // 音频组件,建议保留,由于小程序原生audio存在诸多问题,towxml解决了原生音频播放器的相关问题
256
- // 'echarts', // echarts图表支持
257
- 'latex', // 数学公式支持
258
- 'table', // 表格支持
259
- 'todogroup', // todo支持
260
- 'yuml', // yuml图表支持
261
- 'img', // 图片解析组件
262
- ],
263
-
264
- // 保留原本的元素属性(建议不要变动)
265
- attrs: ['class', 'data', 'id', 'style'],
266
-
267
- // 事件绑定方式(catch或bind),catch 会阻止事件向上冒泡。更多请参考:https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxml/event.html
268
- bindType: 'catch',
269
-
270
- // 需要激活的事件
271
- events: [
272
- // 'touchstart',
273
- // 'touchmove',
274
- // 'touchcancel',
275
- // 'touchend',
276
- 'tap', // 用于元素的点击事件
277
- 'change', // 用于todoList的change事件
278
- ],
279
-
280
- // 图片倍数
281
- dpr: 1,
282
-
283
- // 代码块显示行号
284
- showLineNumber: true,
285
- };
@@ -1,26 +0,0 @@
1
- const config = require('./config');
2
-
3
- Component({
4
- options: {
5
- styleIsolation: 'apply-shared',
6
- },
7
- properties: {
8
- nodes: {
9
- type: Object,
10
- value: {},
11
- },
12
- },
13
- lifetimes: {
14
- attached() {
15
- const _ts = this;
16
-
17
- config.events.forEach((item) => {
18
- _ts[`_${item}`] = function (...arg) {
19
- if (global._events && typeof global._events[item] === 'function') {
20
- global._events[item](...arg);
21
- }
22
- };
23
- });
24
- },
25
- },
26
- });
@@ -1,12 +0,0 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "decode": "./decode",
5
- "audio-player": "./audio-player/audio-player",
6
- "latex": "./latex/latex",
7
- "table": "./table/table",
8
- "todogroup": "./todogroup/todogroup",
9
- "yuml": "./yuml/yuml",
10
- "img": "./img/img"
11
- }
12
- }
@@ -1 +0,0 @@
1
- <block wx:for="{{nodes.child}}" wx:for-index="i" wx:for-item="item" wx:key="i"><block wx:if="{{item.tag===undefined}}">{{item.text}}</block><view wx:if="{{item.tag==='view'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></view><video wx:if="{{item.tag==='video'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" poster="{{item.attr.poster}}" src="{{item.attr.src}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></video><text wx:if="{{item.tag==='text'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></text><image wx:if="{{item.tag==='image'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" src="{{item.attr.src}}" mode="{{item.attr.mode ? item.attr.mode : 'widthFix'}}" lazy-load="{{item.attr['lazy-load']}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></image><navigator wx:if="{{item.tag==='navigator'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" url="{{item.attr.href}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></navigator><swiper wx:if="{{item.tag==='swiper'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></swiper><swiper-item wx:if="{{item.tag==='swiper-item'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></swiper-item><block wx:if="{{item.tag==='block'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></block><form wx:if="{{item.tag==='form'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></form><input wx:if="{{item.tag==='input'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></input><textarea wx:if="{{item.tag==='textarea'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></textarea><button wx:if="{{item.tag==='button'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></button><checkbox-group wx:if="{{item.tag==='checkbox-group'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" catch:change="_change" bindchange="{{item.attr.bindchange}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></checkbox-group><checkbox wx:if="{{item.tag==='checkbox'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" checked="{{item.attr.checked}}" value="{{item.attr.value}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></checkbox><radio-group wx:if="{{item.tag==='radio-group'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></radio-group><radio wx:if="{{item.tag==='radio'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" checked="{{item.attr.checked}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></radio><block wx:if="{{item.tag==='audio-player'}}"><audio-player data="{{item}}" data-data="{{item}}" catch:tap="_tap"/></block><block wx:if="{{item.tag==='latex'}}"><latex data="{{item}}" data-data="{{item}}" catch:tap="_tap"/></block><block wx:if="{{item.tag==='table'}}"><table data="{{item}}" data-data="{{item}}" catch:tap="_tap"/></block><block wx:if="{{item.tag==='todogroup'}}"><todogroup data="{{item}}" data-data="{{item}}" catch:tap="_tap"/></block><block wx:if="{{item.tag==='yuml'}}"><yuml data="{{item}}" data-data="{{item}}" catch:tap="_tap"/></block><block wx:if="{{item.tag==='img'}}"><img data="{{item}}" data-data="{{item}}" catch:tap="_tap"/></block></block>
File without changes