@10yun/cv-mobile-ui 0.5.7 → 0.5.9

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 (39) hide show
  1. package/package.json +1 -1
  2. package/ui-cv/cv-block/cv-block.vue +1 -4
  3. package/ui-cv/cv-cell/cv-cell.vue +3 -2
  4. package/ui-cv/cv-editor-parse/components/wxParseAudio.vue +14 -5
  5. package/ui-cv/cv-editor-parse/components/wxParseImg.vue +26 -36
  6. package/ui-cv/cv-editor-parse/components/wxParseTable.vue +7 -7
  7. package/ui-cv/cv-editor-parse/components/wxParseTemplate0.vue +105 -88
  8. package/ui-cv/cv-editor-parse/components/wxParseTemplate1.vue +96 -88
  9. package/ui-cv/cv-editor-parse/components/wxParseTemplate10.vue +95 -88
  10. package/ui-cv/cv-editor-parse/components/wxParseTemplate11.vue +84 -82
  11. package/ui-cv/cv-editor-parse/components/wxParseTemplate2.vue +95 -88
  12. package/ui-cv/cv-editor-parse/components/wxParseTemplate3.vue +95 -88
  13. package/ui-cv/cv-editor-parse/components/wxParseTemplate4.vue +95 -88
  14. package/ui-cv/cv-editor-parse/components/wxParseTemplate5.vue +95 -88
  15. package/ui-cv/cv-editor-parse/components/wxParseTemplate6.vue +95 -88
  16. package/ui-cv/cv-editor-parse/components/wxParseTemplate7.vue +95 -88
  17. package/ui-cv/cv-editor-parse/components/wxParseTemplate8.vue +95 -88
  18. package/ui-cv/cv-editor-parse/components/wxParseTemplate9.vue +95 -88
  19. package/ui-cv/cv-editor-parse/components/wxParseVideo.vue +15 -15
  20. package/ui-cv/cv-editor-parse/cv-editor-parse.vue +1 -3
  21. package/ui-cv/cv-editor-parse/libs/html2json.js +15 -18
  22. package/ui-cv/cv-editor-parse/libs/htmlparser.js +12 -5
  23. package/ui-cv/cv-editor-parse/libs/wxDiscode.js +1 -1
  24. package/ui-cv/cv-editor-parse/readme.md +6 -0
  25. package/ui-cv/cv-editor-parse/u-parse.css +52 -95
  26. package/ui-cv/cv-icons/cv-icons.vue +2 -11
  27. package/ui-cv/cv-markdown-show/cv-markdown-show.vue +109 -0
  28. package/ui-cv/cv-markdown-show/lib/highlight/atom-one-dark.css +1 -0
  29. package/ui-cv/cv-markdown-show/lib/highlight/atom-one-light.css +1 -0
  30. package/ui-cv/cv-markdown-show/lib/highlight/github-dark.min.css +10 -0
  31. package/ui-cv/cv-markdown-show/lib/highlight/uni-highlight.min.js +5254 -0
  32. package/ui-cv/cv-markdown-show/lib/html-parser.js +352 -0
  33. package/ui-cv/cv-markdown-show/lib/markdown-it.min.js +2 -0
  34. package/ui-cv/cv-markdown-show/markdown.css +340 -0
  35. package/ui-cv/cv-markdown-show/package.json +18 -0
  36. package/ui-cv/cv-markdown-show/readme.md +45 -0
  37. package/ui-cv/cv-nav-col/cv-nav-col.vue +2 -1
  38. package/ui-cv/cv-nav-row/cv-nav-row.vue +3 -2
  39. package/ui-cv/cv-treaty/cv-treaty.vue +1 -0
@@ -0,0 +1,340 @@
1
+ @charset "UTF-8";
2
+ .ua__markdown {
3
+ font-size: 14px;
4
+ line-height: 1.5;
5
+ }
6
+ .ua__markdown h1,
7
+ .ua__markdown h2,
8
+ .ua__markdown h3,
9
+ .ua__markdown h4,
10
+ .ua__markdown h5,
11
+ .ua__markdown h6 {
12
+ font-family: inherit;
13
+ font-weight: 500;
14
+ line-height: 1.1;
15
+ color: inherit;
16
+ }
17
+ .ua__markdown h1,
18
+ .ua__markdown h2,
19
+ .ua__markdown h3 {
20
+ margin-top: 20px;
21
+ margin-bottom: 10px;
22
+ }
23
+ .ua__markdown h4,
24
+ .ua__markdown h5,
25
+ .ua__markdown h6 {
26
+ margin-top: 10px;
27
+ margin-bottom: 10px;
28
+ }
29
+ .ua__markdown .h1,
30
+ .ua__markdown h1 {
31
+ font-size: 36px;
32
+ }
33
+ .ua__markdown .h2,
34
+ .ua__markdown h2 {
35
+ font-size: 30px;
36
+ }
37
+ .ua__markdown .h3,
38
+ .ua__markdown h3 {
39
+ font-size: 24px;
40
+ }
41
+ .ua__markdown .h4,
42
+ .ua__markdown h4 {
43
+ font-size: 18px;
44
+ }
45
+ .ua__markdown .h5,
46
+ .ua__markdown h5 {
47
+ font-size: 14px;
48
+ }
49
+ .ua__markdown .h6,
50
+ .ua__markdown h6 {
51
+ font-size: 12px;
52
+ }
53
+ .ua__markdown a {
54
+ background-color: transparent;
55
+ color: #2196f3;
56
+ text-decoration: none;
57
+ }
58
+ .ua__markdown hr,
59
+ .ua__markdown ::v-deep .hr {
60
+ margin-top: 20px;
61
+ margin-bottom: 20px;
62
+ border: 0;
63
+ border-top: 1px solid #e5e5e5;
64
+ }
65
+ .ua__markdown img {
66
+ max-width: 35%;
67
+ }
68
+ .ua__markdown p {
69
+ margin: 0 0 10px;
70
+ }
71
+ .ua__markdown em {
72
+ font-style: italic;
73
+ font-weight: inherit;
74
+ }
75
+ .ua__markdown ol,
76
+ .ua__markdown ul {
77
+ margin-top: 0;
78
+ margin-bottom: 10px;
79
+ padding-left: 40px;
80
+ }
81
+ .ua__markdown ol ol,
82
+ .ua__markdown ol ul,
83
+ .ua__markdown ul ol,
84
+ .ua__markdown ul ul {
85
+ margin-bottom: 0;
86
+ }
87
+ .ua__markdown ol ol,
88
+ .ua__markdown ul ol {
89
+ list-style-type: lower-roman;
90
+ }
91
+ .ua__markdown ol ol ol,
92
+ .ua__markdown ul ul ol {
93
+ list-style-type: lower-alpha;
94
+ }
95
+ .ua__markdown dl {
96
+ margin-top: 0;
97
+ margin-bottom: 20px;
98
+ }
99
+ .ua__markdown dt {
100
+ font-weight: 600;
101
+ }
102
+ .ua__markdown dt,
103
+ .ua__markdown dd {
104
+ line-height: 1.4;
105
+ }
106
+ .ua__markdown .task-list-item {
107
+ list-style-type: none;
108
+ }
109
+ .ua__markdown .task-list-item input {
110
+ margin: 0 0.2em 0.25em -1.6em;
111
+ vertical-align: middle;
112
+ }
113
+ .ua__markdown pre {
114
+ position: relative;
115
+ z-index: 11;
116
+ }
117
+ .ua__markdown code,
118
+ .ua__markdown kbd,
119
+ .ua__markdown pre,
120
+ .ua__markdown samp {
121
+ font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
122
+ }
123
+ .ua__markdown code:not(.hljs) {
124
+ padding: 2px 4px;
125
+ font-size: 90%;
126
+ color: #c7254e;
127
+ background-color: #ffe7ee;
128
+ border-radius: 4px;
129
+ }
130
+ .ua__markdown code:empty {
131
+ display: none;
132
+ }
133
+ .ua__markdown pre code.hljs {
134
+ color: var(--vg__text-1);
135
+ border-radius: 16px;
136
+ background: var(--vg__bg-1);
137
+ font-size: 12px;
138
+ }
139
+ .ua__markdown .markdown-wrap {
140
+ font-size: 12px;
141
+ margin-bottom: 10px;
142
+ }
143
+ .ua__markdown pre.code-block-wrapper {
144
+ background: #2b2b2b;
145
+ color: #f8f8f2;
146
+ border-radius: 4px;
147
+ overflow-x: auto;
148
+ padding: 1em;
149
+ position: relative;
150
+ }
151
+ .ua__markdown pre.code-block-wrapper code {
152
+ padding: auto;
153
+ font-size: inherit;
154
+ color: inherit;
155
+ background-color: inherit;
156
+ border-radius: 0;
157
+ }
158
+ .ua__markdown .code-block-header__copy {
159
+ font-size: 16px;
160
+ margin-left: 5px;
161
+ }
162
+ .ua__markdown abbr[data-original-title],
163
+ .ua__markdown abbr[title] {
164
+ cursor: help;
165
+ border-bottom: 1px dotted #777;
166
+ }
167
+ .ua__markdown blockquote {
168
+ padding: 10px 20px;
169
+ margin: 0 0 20px;
170
+ font-size: 17.5px;
171
+ border-left: 5px solid #e5e5e5;
172
+ }
173
+ .ua__markdown blockquote ol:last-child,
174
+ .ua__markdown blockquote p:last-child,
175
+ .ua__markdown blockquote ul:last-child {
176
+ margin-bottom: 0;
177
+ }
178
+ .ua__markdown blockquote .small,
179
+ .ua__markdown blockquote footer,
180
+ .ua__markdown blockquote small {
181
+ display: block;
182
+ font-size: 80%;
183
+ line-height: 1.42857143;
184
+ color: #777;
185
+ }
186
+ .ua__markdown blockquote .small:before,
187
+ .ua__markdown blockquote footer:before,
188
+ .ua__markdown blockquote small:before {
189
+ content: '— ';
190
+ }
191
+ .ua__markdown .blockquote-reverse,
192
+ .ua__markdown blockquote.pull-right {
193
+ padding-right: 15px;
194
+ padding-left: 0;
195
+ text-align: right;
196
+ border-right: 5px solid #eee;
197
+ border-left: 0;
198
+ }
199
+ .ua__markdown .blockquote-reverse .small:before,
200
+ .ua__markdown .blockquote-reverse footer:before,
201
+ .ua__markdown .blockquote-reverse small:before,
202
+ .ua__markdown blockquote.pull-right .small:before,
203
+ .ua__markdown blockquote.pull-right footer:before,
204
+ .ua__markdown blockquote.pull-right small:before {
205
+ content: '';
206
+ }
207
+ .ua__markdown .blockquote-reverse .small:after,
208
+ .ua__markdown .blockquote-reverse footer:after,
209
+ .ua__markdown .blockquote-reverse small:after,
210
+ .ua__markdown blockquote.pull-right .small:after,
211
+ .ua__markdown blockquote.pull-right footer:after,
212
+ .ua__markdown blockquote.pull-right small:after {
213
+ content: ' —';
214
+ }
215
+ .ua__markdown .footnotes {
216
+ -moz-column-count: 2;
217
+ -webkit-column-count: 2;
218
+ column-count: 2;
219
+ }
220
+ .ua__markdown .footnotes-list {
221
+ padding-left: 2em;
222
+ }
223
+ .ua__markdown table,
224
+ .ua__markdown ::v-deep .table {
225
+ border-spacing: 0;
226
+ border-collapse: collapse;
227
+ width: 100%;
228
+ max-width: 65em;
229
+ overflow: auto;
230
+ margin-top: 0;
231
+ margin-bottom: 16px;
232
+ }
233
+ .ua__markdown table tr,
234
+ .ua__markdown ::v-deep .table .tr {
235
+ border-top: 1px solid #e5e5e5;
236
+ }
237
+ .ua__markdown table th,
238
+ .ua__markdown table td,
239
+ .ua__markdown ::v-deep .table .th,
240
+ .ua__markdown ::v-deep .table .td {
241
+ padding: 6px 13px;
242
+ border: 1px solid #e5e5e5;
243
+ }
244
+ .ua__markdown table th,
245
+ .ua__markdown ::v-deep .table .th {
246
+ font-weight: 600;
247
+ background-color: #eee;
248
+ }
249
+ .ua__markdown .hljs[class*='language-']:before {
250
+ position: absolute;
251
+ z-index: 3;
252
+ top: 0.8em;
253
+ right: 1em;
254
+ font-size: 0.8em;
255
+ color: #999;
256
+ }
257
+ .ua__markdown .hljs[class~='language-js']:before {
258
+ content: 'js';
259
+ }
260
+ .ua__markdown .hljs[class~='language-ts']:before {
261
+ content: 'ts';
262
+ }
263
+ .ua__markdown .hljs[class~='language-html']:before {
264
+ content: 'html';
265
+ }
266
+ .ua__markdown .hljs[class~='language-md']:before {
267
+ content: 'md';
268
+ }
269
+ .ua__markdown .hljs[class~='language-vue']:before {
270
+ content: 'vue';
271
+ }
272
+ .ua__markdown .hljs[class~='language-css']:before {
273
+ content: 'css';
274
+ }
275
+ .ua__markdown .hljs[class~='language-sass']:before {
276
+ content: 'sass';
277
+ }
278
+ .ua__markdown .hljs[class~='language-scss']:before {
279
+ content: 'scss';
280
+ }
281
+ .ua__markdown .hljs[class~='language-less']:before {
282
+ content: 'less';
283
+ }
284
+ .ua__markdown .hljs[class~='language-stylus']:before {
285
+ content: 'stylus';
286
+ }
287
+ .ua__markdown .hljs[class~='language-go']:before {
288
+ content: 'go';
289
+ }
290
+ .ua__markdown .hljs[class~='language-java']:before {
291
+ content: 'java';
292
+ }
293
+ .ua__markdown .hljs[class~='language-c']:before {
294
+ content: 'c';
295
+ }
296
+ .ua__markdown .hljs[class~='language-sh']:before {
297
+ content: 'sh';
298
+ }
299
+ .ua__markdown .hljs[class~='language-yaml']:before {
300
+ content: 'yaml';
301
+ }
302
+ .ua__markdown .hljs[class~='language-py']:before {
303
+ content: 'py';
304
+ }
305
+ .ua__markdown .hljs[class~='language-docker']:before {
306
+ content: 'docker';
307
+ }
308
+ .ua__markdown .hljs[class~='language-dockerfile']:before {
309
+ content: 'dockerfile';
310
+ }
311
+ .ua__markdown .hljs[class~='language-makefile']:before {
312
+ content: 'makefile';
313
+ }
314
+ .ua__markdown .hljs[class~='language-javascript']:before {
315
+ content: 'js';
316
+ }
317
+ .ua__markdown .hljs[class~='language-typescript']:before {
318
+ content: 'ts';
319
+ }
320
+ .ua__markdown .hljs[class~='language-markup']:before {
321
+ content: 'html';
322
+ }
323
+ .ua__markdown .hljs[class~='language-markdown']:before {
324
+ content: 'md';
325
+ }
326
+ .ua__markdown .hljs[class~='language-json']:before {
327
+ content: 'json';
328
+ }
329
+ .ua__markdown .hljs[class~='language-ruby']:before {
330
+ content: 'rb';
331
+ }
332
+ .ua__markdown .hljs[class~='language-python']:before {
333
+ content: 'py';
334
+ }
335
+ .ua__markdown .hljs[class~='language-bash']:before {
336
+ content: 'sh';
337
+ }
338
+ .ua__markdown .hljs[class~='language-php']:before {
339
+ content: 'php';
340
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "id": "ua-markdown",
3
+ "name": "uniapp markdown语法渲染及代码高亮",
4
+ "displayName": "uniapp markdown语法渲染及代码高亮",
5
+ "version": "1.1.5",
6
+ "description": "基于uniapp+vue3自定义解析markdown语法/高亮,适用于h5+小程序+App端。",
7
+ "keywords": [
8
+ "ua-markdown",
9
+ "uni-markdown",
10
+ "markdown"
11
+ ],
12
+ "dcloudext": {
13
+ "category": [
14
+ "前端组件",
15
+ "通用组件"
16
+ ]
17
+ }
18
+ }
@@ -0,0 +1,45 @@
1
+
2
+ ## uniapp markdown渲染解析.md语法及代码高亮
3
+ > **组件名:uaMarkdown**
4
+ > 代码块: `<ua-markdown>`
5
+
6
+
7
+ uaMarkdown组件是基于uniapp+vue3自定义解析markdown语法结构插件、支持代码块高亮,编译兼容H5+小程序端+App端。
8
+
9
+
10
+ ### 引入方式
11
+
12
+ 本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,只需将本组件`ua-markdown`放在components目录,在页面`template`中即可直接使用。
13
+
14
+
15
+ ### 基本用法
16
+
17
+ **示例**
18
+
19
+ - 基础用法
20
+
21
+ ```html
22
+ const mdvalue = '### uniapp markdwon'
23
+ <ua-markdown :source="mdvalue" />
24
+ ```
25
+
26
+ - 去掉代码块行号
27
+
28
+ ```html
29
+ <ua-markdown :source="xxx" :showLine="false" />
30
+ ```
31
+
32
+
33
+ ### API
34
+
35
+ ### uaMarkdown Props
36
+
37
+ | 属性名 | 类型 | 默认值 | 说明 |
38
+ | :------: | :-----: | :----: | :----------------: |
39
+ | source | String | - | 渲染解析内容 |
40
+ | showLine | Boolean | true | 是否显示代码块行号 |
41
+
42
+
43
+ ### 💝最后
44
+
45
+ 开发不易,希望各位小伙伴们多多支持下哈~~ ☕️☕️
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="cv-nav-col" @tap="jump" v-bind:style="cvNavColStyle">
2
+ <view class="cv-nav-col" @click="jump" v-bind:style="cvNavColStyle">
3
3
  <view class="cv-nav-col-img-area" v-bind:style="cvNavImgAreaStyle">
4
4
  <view class="cv-nav-col-img-box">
5
5
  <view class="cv-nav-col-img-main">
@@ -29,6 +29,7 @@ export default {
29
29
  }
30
30
  }
31
31
  },
32
+ emits: ['click'],
32
33
  props: {
33
34
  /* 预留参数 用于接收子级 cv-col间距参数 */
34
35
  img: {
@@ -21,7 +21,7 @@
21
21
  </view>
22
22
  </view>
23
23
  </view>
24
- <view class="cv-row-main-center" :class="url == '' && !$listeners.click ? 'cv-row-main-center-nourl' : ''">
24
+ <view class="cv-row-main-center" :class="url == '' && !$attrs.click ? 'cv-row-main-center-nourl' : ''">
25
25
  <view class="cv-row-main-center-intact" v-if="!subexplain">
26
26
  {{ explain }}
27
27
  </view>
@@ -34,7 +34,7 @@
34
34
  </view>
35
35
  </view>
36
36
  </view>
37
- <view class="cv-row-main-more" v-if="url || $listeners.click">
37
+ <view class="cv-row-main-more" v-if="url || $attrs.click">
38
38
  <view class="cv-row-main-more-top"></view>
39
39
  <view class="cv-row-main-more-bottom"></view>
40
40
  </view>
@@ -48,6 +48,7 @@
48
48
 
49
49
  <script>
50
50
  export default {
51
+ emits: ['click'],
51
52
  name: 'cvNavRow',
52
53
  options: {
53
54
  addGlobalClass: true
@@ -16,6 +16,7 @@
16
16
 
17
17
  <script>
18
18
  export default {
19
+ emits: ['click'],
19
20
  name: 'cvTreaty',
20
21
  props: {
21
22
  value: {