@10yun/cv-mobile-ui 0.5.19 → 0.5.21
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.
- package/other/mpvue-picker/mpvuePicker.vue +402 -0
- package/{uni-ui/lib → other}/mpvue-picker/style.css +0 -1
- package/{uni-ui/lib → other}/tab-nvue/style.css +0 -1
- package/other/uParse/components/style.css +1 -0
- package/other/uParse/components/wxParseAudio.vue +1 -0
- package/other/uParse/components/wxParseImg.vue +86 -0
- package/other/uParse/components/wxParseTable.vue +54 -0
- package/other/uParse/components/wxParseTemplate0.vue +98 -0
- package/other/uParse/components/wxParseTemplate1.vue +81 -0
- package/other/uParse/components/wxParseTemplate10.vue +81 -0
- package/other/uParse/components/wxParseTemplate11.vue +79 -0
- package/other/uParse/components/wxParseTemplate2.vue +81 -0
- package/other/uParse/components/wxParseTemplate3.vue +81 -0
- package/other/uParse/components/wxParseTemplate4.vue +81 -0
- package/other/uParse/components/wxParseTemplate5.vue +81 -0
- package/other/uParse/components/wxParseTemplate6.vue +81 -0
- package/other/uParse/components/wxParseTemplate7.vue +81 -0
- package/other/uParse/components/wxParseTemplate8.vue +81 -0
- package/other/uParse/components/wxParseTemplate9.vue +81 -0
- package/other/uParse/components/wxParseVideo.vue +14 -0
- package/other/uParse/editor.css +495 -0
- package/{uni-ui/lib/uParse/src → other/uParse}/libs/html2json.js +19 -22
- package/{uni-ui/lib/uParse/src → other/uParse}/libs/htmlparser.js +12 -5
- package/{uni-ui/lib/uParse/src → other/uParse}/libs/wxDiscode.js +2 -2
- package/other/uParse/wxParse.vue +196 -0
- package/package.json +1 -1
- package/plugins/map/amqp-wx.js +173 -0
- package/{uni-ui/lib/mpvueGestureLock/index.vue → ui-cv/components/cv-draw-gesture-lock/cv-draw-gesture-lock.vue} +4 -1
- package/ui-cv/components/cv-draw-gesture-lock/gestureLock.js +169 -0
- package/{uni-ui/lib/mpvueGestureLock → ui-cv/components/cv-draw-gesture-lock}/style.css +0 -1
- package/{uni-ui/lib/mpvue-citypicker → ui-cv/components/cv-geo-region}/style.css +0 -1
- package/ui-cv/components/cv-grid-item/cv-grid-item.vue +1 -1
- package/uni-ui/lib/uni-badge/uni-badge.vue +150 -1
- package/uni-ui/lib/uni-breadcrumb/uni-breadcrumb.vue +37 -1
- package/uni-ui/lib/uni-breadcrumb-item/uni-breadcrumb-item.vue +83 -1
- package/uni-ui/lib/uni-calendar/uni-calendar-item.vue +122 -1
- package/uni-ui/lib/uni-calendar/uni-calendar.vue +366 -1
- package/uni-ui/lib/uni-card/uni-card.vue +124 -1
- package/uni-ui/lib/uni-col/uni-col.vue +1 -1
- package/uni-ui/lib/uni-collapse/uni-collapse.vue +135 -1
- package/uni-ui/lib/uni-collapse-item/uni-collapse-item.vue +266 -1
- package/uni-ui/lib/uni-combox/uni-combox.vue +1 -1
- package/uni-ui/lib/uni-countdown/uni-countdown.vue +239 -1
- package/uni-ui/lib/uni-data-checkbox/uni-data-checkbox.vue +487 -1
- package/uni-ui/lib/uni-data-picker/uni-data-picker.vue +530 -1
- package/uni-ui/lib/uni-data-pickerview/uni-data-picker.js +157 -150
- package/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.vue +166 -1
- package/uni-ui/lib/uni-data-select/uni-data-select.vue +289 -1
- package/uni-ui/lib/uni-datetime-picker/calendar-item.vue +70 -1
- package/uni-ui/lib/uni-datetime-picker/calendar.vue +629 -1
- package/uni-ui/lib/uni-datetime-picker/time-picker.vue +741 -1
- package/uni-ui/lib/uni-datetime-picker/uni-datetime-picker.vue +847 -1
- package/uni-ui/lib/uni-drawer/uni-drawer.vue +115 -1
- package/uni-ui/lib/uni-easyinput/uni-easyinput.vue +515 -1
- package/uni-ui/lib/uni-fab/uni-fab.vue +257 -1
- package/uni-ui/lib/uni-fav/uni-fav.vue +123 -1
- package/uni-ui/lib/uni-file-picker/uni-file-picker.vue +642 -1
- package/uni-ui/lib/uni-file-picker/upload-file.vue +177 -1
- package/uni-ui/lib/uni-file-picker/upload-image.vue +176 -1
- package/uni-ui/lib/uni-forms/uni-forms.vue +375 -1
- package/uni-ui/lib/uni-forms-item/uni-forms-item.vue +429 -1
- package/uni-ui/lib/uni-goods-nav/uni-goods-nav.vue +129 -1
- package/uni-ui/lib/uni-grid/uni-grid.vue +115 -1
- package/uni-ui/lib/uni-grid-item/uni-grid-item.vue +78 -1
- package/uni-ui/lib/uni-group/uni-group.vue +85 -1
- package/uni-ui/lib/uni-icons/uni-icons.vue +85 -1
- package/uni-ui/lib/uni-indexed-list/uni-indexed-list-item.vue +68 -1
- package/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue +294 -1
- package/uni-ui/lib/uni-list/uni-list.vue +81 -1
- package/uni-ui/lib/uni-list-ad/uni-list-ad.vue +77 -1
- package/uni-ui/lib/uni-list-chat/uni-list-chat.vue +294 -1
- package/uni-ui/lib/uni-list-item/uni-list-item.vue +346 -1
- package/uni-ui/lib/uni-load-more/uni-load-more.vue +172 -1
- package/uni-ui/lib/uni-nav-bar/uni-nav-bar.vue +205 -1
- package/uni-ui/lib/uni-nav-bar/uni-status-bar.vue +18 -1
- package/uni-ui/lib/uni-notice-bar/uni-notice-bar.vue +331 -1
- package/uni-ui/lib/uni-number-box/uni-number-box.vue +166 -1
- package/uni-ui/lib/uni-pagination/uni-pagination.vue +323 -1
- package/uni-ui/lib/uni-popup/uni-popup.vue +1 -1
- package/uni-ui/lib/uni-popup-dialog/uni-popup-dialog.vue +173 -1
- package/uni-ui/lib/uni-popup-message/uni-popup-message.vue +74 -1
- package/uni-ui/lib/uni-popup-share/uni-popup-share.vue +106 -1
- package/uni-ui/lib/uni-rate/uni-rate.vue +322 -1
- package/uni-ui/lib/uni-row/uni-row.vue +1 -1
- package/uni-ui/lib/uni-search-bar/uni-search-bar.vue +236 -1
- package/uni-ui/lib/uni-section/uni-section.vue +109 -1
- package/uni-ui/lib/uni-segmented-control/uni-segmented-control.vue +103 -1
- package/uni-ui/lib/uni-status-bar/uni-status-bar.vue +1 -1
- package/uni-ui/lib/uni-steps/uni-steps.vue +120 -1
- package/uni-ui/lib/uni-swipe-action-item/uni-swipe-action-item.vue +226 -3
- package/uni-ui/lib/uni-swiper-dot/uni-swiper-dot.vue +167 -1
- package/uni-ui/lib/uni-table/uni-table.vue +297 -1
- package/uni-ui/lib/uni-tag/uni-tag.vue +100 -1
- package/uni-ui/lib/uni-td/uni-td.vue +78 -1
- package/uni-ui/lib/uni-th/filter-dropdown.vue +1 -1
- package/uni-ui/lib/uni-th/uni-th.vue +224 -1
- package/uni-ui/lib/uni-thead/uni-thead.vue +77 -1
- package/uni-ui/lib/uni-tr/table-checkbox.vue +79 -1
- package/uni-ui/lib/uni-tr/uni-tr.vue +135 -1
- package/uni-ui/lib/amap-wx/js/util.js +0 -181
- package/uni-ui/lib/marked/index.js +0 -1
- package/uni-ui/lib/mpvue-citypicker/city-data/area.js +0 -12542
- package/uni-ui/lib/mpvue-citypicker/city-data/city.js +0 -1503
- package/uni-ui/lib/mpvue-citypicker/city-data/province.js +0 -139
- package/uni-ui/lib/mpvue-picker/mpvuePicker.vue +0 -3
- package/uni-ui/lib/mpvueGestureLock/gestureLock.js +0 -175
- package/uni-ui/lib/uParse/src/components/style.css +0 -2
- package/uni-ui/lib/uParse/src/components/wxParseAudio.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseImg.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTable.vue +0 -3
- package/uni-ui/lib/uParse/src/components/wxParseTemplate0.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTemplate1.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTemplate10.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTemplate11.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTemplate2.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTemplate3.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTemplate4.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTemplate5.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTemplate6.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTemplate7.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTemplate8.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseTemplate9.vue +0 -1
- package/uni-ui/lib/uParse/src/components/wxParseVideo.vue +0 -1
- package/uni-ui/lib/uParse/src/editor.css +0 -495
- package/uni-ui/lib/uParse/src/wxParse.vue +0 -1
- /package/{uni-ui/lib → other}/api-set-tabbar.nvue +0 -0
- /package/{uni-ui/lib → other}/mpvue-echarts/src/echarts.vue +0 -0
- /package/{uni-ui/lib → other}/mpvue-echarts/src/style.css +0 -0
- /package/{uni-ui/lib → other}/mpvue-echarts/src/wx-canvas.js +0 -0
- /package/{uni-ui/lib → other}/product.vue +0 -0
- /package/{uni-ui/lib → other}/style.css +0 -0
- /package/{uni-ui/lib → other}/tab-nvue/mediaList.vue +0 -0
- /package/{uni-ui/lib → other}/u-charts/u-charts.js +0 -0
- /package/{uni-ui/lib/uParse/src → other/uParse}/wxParse.css +0 -0
- /package/{uni-ui/lib/amap-wx → plugins/map}/lib/amap-wx.js +0 -0
- /package/{uni-ui/lib/mpvue-citypicker → ui-cv/components/cv-geo-region}/mpvueCityPicker.vue +0 -0
- /package/{uni-ui/lib/marked → ui-cv/components/cv-markdown-show}/lib/marked.js +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--判断是否是标签节点-->
|
|
3
|
+
<block v-if="node.node == 'element'">
|
|
4
|
+
<!--button类型-->
|
|
5
|
+
<button v-if="node.tag == 'button'" type="default" size="mini" :class="node.classStr" :style="node.styleStr">
|
|
6
|
+
<wx-parse-template :node="node" />
|
|
7
|
+
</button>
|
|
8
|
+
<!--a类型-->
|
|
9
|
+
<view
|
|
10
|
+
v-else-if="node.tag == 'a'"
|
|
11
|
+
@click="wxParseATap(node.attr, $event)"
|
|
12
|
+
:class="node.classStr"
|
|
13
|
+
:data-href="node.attr.href"
|
|
14
|
+
:style="node.styleStr"
|
|
15
|
+
>
|
|
16
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
17
|
+
<wx-parse-template :node="node" />
|
|
18
|
+
</block>
|
|
19
|
+
</view>
|
|
20
|
+
<!--li类型-->
|
|
21
|
+
<view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr">
|
|
22
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
23
|
+
<wx-parse-template :node="node" />
|
|
24
|
+
</block>
|
|
25
|
+
</view>
|
|
26
|
+
<!--table类型-->
|
|
27
|
+
<wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" />
|
|
28
|
+
<!--br类型-->
|
|
29
|
+
<!-- #ifndef H5 -->
|
|
30
|
+
<text v-else-if="node.tag == 'br'">\n</text>
|
|
31
|
+
<!-- #endif -->
|
|
32
|
+
<!-- #ifdef H5 -->
|
|
33
|
+
<br v-else-if="node.tag == 'br'" />
|
|
34
|
+
<!-- #endif -->
|
|
35
|
+
<!--video类型-->
|
|
36
|
+
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
|
|
37
|
+
<!--audio类型-->
|
|
38
|
+
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
|
|
39
|
+
<!--img类型-->
|
|
40
|
+
<wx-parse-img :node="node" v-else-if="node.tag == 'img'" :style="node.styleStr" />
|
|
41
|
+
<!--其他标签-->
|
|
42
|
+
<view v-else :class="node.classStr" :style="node.styleStr">
|
|
43
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
44
|
+
<wx-parse-template :node="node" />
|
|
45
|
+
</block>
|
|
46
|
+
</view>
|
|
47
|
+
</block>
|
|
48
|
+
<!--判断是否是文本节点-->
|
|
49
|
+
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
|
|
50
|
+
</template>
|
|
51
|
+
<script>
|
|
52
|
+
import wxParseTemplate from './wxParseTemplate2';
|
|
53
|
+
import wxParseImg from './wxParseImg';
|
|
54
|
+
import wxParseVideo from './wxParseVideo';
|
|
55
|
+
import wxParseAudio from './wxParseAudio';
|
|
56
|
+
import wxParseTable from './wxParseTable';
|
|
57
|
+
export default {
|
|
58
|
+
name: 'wxParseTemplate1',
|
|
59
|
+
props: {
|
|
60
|
+
node: {}
|
|
61
|
+
},
|
|
62
|
+
components: {
|
|
63
|
+
wxParseTemplate,
|
|
64
|
+
wxParseImg,
|
|
65
|
+
wxParseVideo,
|
|
66
|
+
wxParseAudio,
|
|
67
|
+
wxParseTable
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
wxParseATap(attr, e) {
|
|
71
|
+
const { href } = e.currentTarget.dataset;
|
|
72
|
+
if (!href) return;
|
|
73
|
+
let parent = this.$parent;
|
|
74
|
+
while (!parent.preview || typeof parent.preview !== 'function') {
|
|
75
|
+
parent = parent.$parent;
|
|
76
|
+
}
|
|
77
|
+
parent.navigate(href, e, attr);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--判断是否是标签节点-->
|
|
3
|
+
<block v-if="node.node == 'element'">
|
|
4
|
+
<!--button类型-->
|
|
5
|
+
<button v-if="node.tag == 'button'" type="default" size="mini" :class="node.classStr" :style="node.styleStr">
|
|
6
|
+
<wx-parse-template :node="node" />
|
|
7
|
+
</button>
|
|
8
|
+
<!--a类型-->
|
|
9
|
+
<view
|
|
10
|
+
v-else-if="node.tag == 'a'"
|
|
11
|
+
@click="wxParseATap(node.attr, $event)"
|
|
12
|
+
:class="node.classStr"
|
|
13
|
+
:data-href="node.attr.href"
|
|
14
|
+
:style="node.styleStr"
|
|
15
|
+
>
|
|
16
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
17
|
+
<wx-parse-template :node="node" />
|
|
18
|
+
</block>
|
|
19
|
+
</view>
|
|
20
|
+
<!--li类型-->
|
|
21
|
+
<view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr">
|
|
22
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
23
|
+
<wx-parse-template :node="node" />
|
|
24
|
+
</block>
|
|
25
|
+
</view>
|
|
26
|
+
<!--table类型-->
|
|
27
|
+
<wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" />
|
|
28
|
+
<!--br类型-->
|
|
29
|
+
<!-- #ifndef H5 -->
|
|
30
|
+
<text v-else-if="node.tag == 'br'">\n</text>
|
|
31
|
+
<!-- #endif -->
|
|
32
|
+
<!-- #ifdef H5 -->
|
|
33
|
+
<br v-else-if="node.tag == 'br'" />
|
|
34
|
+
<!-- #endif -->
|
|
35
|
+
<!--video类型-->
|
|
36
|
+
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
|
|
37
|
+
<!--audio类型-->
|
|
38
|
+
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
|
|
39
|
+
<!--img类型-->
|
|
40
|
+
<wx-parse-img :node="node" v-else-if="node.tag == 'img'" :style="node.styleStr" />
|
|
41
|
+
<!--其他标签-->
|
|
42
|
+
<view v-else :class="node.classStr" :style="node.styleStr">
|
|
43
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
44
|
+
<wx-parse-template :node="node" />
|
|
45
|
+
</block>
|
|
46
|
+
</view>
|
|
47
|
+
</block>
|
|
48
|
+
<!--判断是否是文本节点-->
|
|
49
|
+
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
|
|
50
|
+
</template>
|
|
51
|
+
<script>
|
|
52
|
+
import wxParseTemplate from './wxParseTemplate11';
|
|
53
|
+
import wxParseImg from './wxParseImg';
|
|
54
|
+
import wxParseVideo from './wxParseVideo';
|
|
55
|
+
import wxParseAudio from './wxParseAudio';
|
|
56
|
+
import wxParseTable from './wxParseTable';
|
|
57
|
+
export default {
|
|
58
|
+
name: 'wxParseTemplate10',
|
|
59
|
+
props: {
|
|
60
|
+
node: {}
|
|
61
|
+
},
|
|
62
|
+
components: {
|
|
63
|
+
wxParseTemplate,
|
|
64
|
+
wxParseImg,
|
|
65
|
+
wxParseVideo,
|
|
66
|
+
wxParseAudio,
|
|
67
|
+
wxParseTable
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
wxParseATap(attr, e) {
|
|
71
|
+
const { href } = e.currentTarget.dataset;
|
|
72
|
+
if (!href) return;
|
|
73
|
+
let parent = this.$parent;
|
|
74
|
+
while (!parent.preview || typeof parent.preview !== 'function') {
|
|
75
|
+
parent = parent.$parent;
|
|
76
|
+
}
|
|
77
|
+
parent.navigate(href, e, attr);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
</script>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--判断是否是标签节点-->
|
|
3
|
+
<block v-if="node.node == 'element'">
|
|
4
|
+
<!--button类型-->
|
|
5
|
+
<button v-if="node.tag == 'button'" type="default" size="mini" :class="node.classStr" :style="node.styleStr">
|
|
6
|
+
<rich-text :nodes="node" :class="node.classStr" :style="'user-select:' + parseSelect"></rich-text>
|
|
7
|
+
</button>
|
|
8
|
+
<!--a类型-->
|
|
9
|
+
<view
|
|
10
|
+
v-else-if="node.tag == 'a'"
|
|
11
|
+
@click="wxParseATap(node.attr, $event)"
|
|
12
|
+
:class="node.classStr"
|
|
13
|
+
:data-href="node.attr.href"
|
|
14
|
+
:style="node.styleStr"
|
|
15
|
+
>
|
|
16
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
17
|
+
<rich-text :nodes="node" :class="node.classStr" :style="'user-select:' + parseSelect"></rich-text>
|
|
18
|
+
</block>
|
|
19
|
+
</view>
|
|
20
|
+
<!--li类型-->
|
|
21
|
+
<view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr">
|
|
22
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
23
|
+
<rich-text :nodes="node" :class="node.classStr" :style="'user-select:' + parseSelect"></rich-text>
|
|
24
|
+
</block>
|
|
25
|
+
</view>
|
|
26
|
+
<!--table类型-->
|
|
27
|
+
<wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" />
|
|
28
|
+
<!--br类型-->
|
|
29
|
+
<!-- #ifndef H5 -->
|
|
30
|
+
<text v-else-if="node.tag == 'br'">\n</text>
|
|
31
|
+
<!-- #endif -->
|
|
32
|
+
<!-- #ifdef H5 -->
|
|
33
|
+
<br v-else-if="node.tag == 'br'" />
|
|
34
|
+
<!-- #endif -->
|
|
35
|
+
<!--video类型-->
|
|
36
|
+
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
|
|
37
|
+
<!--audio类型-->
|
|
38
|
+
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
|
|
39
|
+
<!--img类型-->
|
|
40
|
+
<wx-parse-img :node="node" v-else-if="node.tag == 'img'" />
|
|
41
|
+
<!--其他标签-->
|
|
42
|
+
<view v-else :class="node.classStr" :style="node.styleStr">
|
|
43
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
44
|
+
<rich-text :nodes="node" :class="node.classStr" :style="'user-select:' + parseSelect"></rich-text>
|
|
45
|
+
</block>
|
|
46
|
+
</view>
|
|
47
|
+
</block>
|
|
48
|
+
<!--判断是否是文本节点-->
|
|
49
|
+
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
|
|
50
|
+
</template>
|
|
51
|
+
<script>
|
|
52
|
+
import wxParseImg from './wxParseImg';
|
|
53
|
+
import wxParseVideo from './wxParseVideo';
|
|
54
|
+
import wxParseAudio from './wxParseAudio';
|
|
55
|
+
import wxParseTable from './wxParseTable';
|
|
56
|
+
export default {
|
|
57
|
+
name: 'wxParseTemplate11',
|
|
58
|
+
props: {
|
|
59
|
+
node: {}
|
|
60
|
+
},
|
|
61
|
+
components: {
|
|
62
|
+
wxParseImg,
|
|
63
|
+
wxParseVideo,
|
|
64
|
+
wxParseAudio,
|
|
65
|
+
wxParseTable
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
wxParseATap(attr, e) {
|
|
69
|
+
const { href } = e.currentTarget.dataset;
|
|
70
|
+
if (!href) return;
|
|
71
|
+
let parent = this.$parent;
|
|
72
|
+
while (!parent.preview || typeof parent.preview !== 'function') {
|
|
73
|
+
parent = parent.$parent;
|
|
74
|
+
}
|
|
75
|
+
parent.navigate(href, e, attr);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--判断是否是标签节点-->
|
|
3
|
+
<block v-if="node.node == 'element'">
|
|
4
|
+
<!--button类型-->
|
|
5
|
+
<button v-if="node.tag == 'button'" type="default" size="mini" :class="node.classStr" :style="node.styleStr">
|
|
6
|
+
<wx-parse-template :node="node" />
|
|
7
|
+
</button>
|
|
8
|
+
<!--a类型-->
|
|
9
|
+
<view
|
|
10
|
+
v-else-if="node.tag == 'a'"
|
|
11
|
+
@click="wxParseATap(node.attr, $event)"
|
|
12
|
+
:class="node.classStr"
|
|
13
|
+
:data-href="node.attr.href"
|
|
14
|
+
:style="node.styleStr"
|
|
15
|
+
>
|
|
16
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
17
|
+
<wx-parse-template :node="node" />
|
|
18
|
+
</block>
|
|
19
|
+
</view>
|
|
20
|
+
<!--li类型-->
|
|
21
|
+
<view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr">
|
|
22
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
23
|
+
<wx-parse-template :node="node" />
|
|
24
|
+
</block>
|
|
25
|
+
</view>
|
|
26
|
+
<!--table类型-->
|
|
27
|
+
<wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" />
|
|
28
|
+
<!--br类型-->
|
|
29
|
+
<!-- #ifndef H5 -->
|
|
30
|
+
<text v-else-if="node.tag == 'br'">\n</text>
|
|
31
|
+
<!-- #endif -->
|
|
32
|
+
<!-- #ifdef H5 -->
|
|
33
|
+
<br v-else-if="node.tag == 'br'" />
|
|
34
|
+
<!-- #endif -->
|
|
35
|
+
<!--video类型-->
|
|
36
|
+
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
|
|
37
|
+
<!--audio类型-->
|
|
38
|
+
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
|
|
39
|
+
<!--img类型-->
|
|
40
|
+
<wx-parse-img :node="node" v-else-if="node.tag == 'img'" :style="node.styleStr" />
|
|
41
|
+
<!--其他标签-->
|
|
42
|
+
<view v-else :class="node.classStr" :style="node.styleStr">
|
|
43
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
44
|
+
<wx-parse-template :node="node" />
|
|
45
|
+
</block>
|
|
46
|
+
</view>
|
|
47
|
+
</block>
|
|
48
|
+
<!--判断是否是文本节点-->
|
|
49
|
+
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
|
|
50
|
+
</template>
|
|
51
|
+
<script>
|
|
52
|
+
import wxParseTemplate from './wxParseTemplate3';
|
|
53
|
+
import wxParseImg from './wxParseImg';
|
|
54
|
+
import wxParseVideo from './wxParseVideo';
|
|
55
|
+
import wxParseAudio from './wxParseAudio';
|
|
56
|
+
import wxParseTable from './wxParseTable';
|
|
57
|
+
export default {
|
|
58
|
+
name: 'wxParseTemplate2',
|
|
59
|
+
props: {
|
|
60
|
+
node: {}
|
|
61
|
+
},
|
|
62
|
+
components: {
|
|
63
|
+
wxParseTemplate,
|
|
64
|
+
wxParseImg,
|
|
65
|
+
wxParseVideo,
|
|
66
|
+
wxParseAudio,
|
|
67
|
+
wxParseTable
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
wxParseATap(attr, e) {
|
|
71
|
+
const { href } = e.currentTarget.dataset;
|
|
72
|
+
if (!href) return;
|
|
73
|
+
let parent = this.$parent;
|
|
74
|
+
while (!parent.preview || typeof parent.preview !== 'function') {
|
|
75
|
+
parent = parent.$parent;
|
|
76
|
+
}
|
|
77
|
+
parent.navigate(href, e, attr);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--判断是否是标签节点-->
|
|
3
|
+
<block v-if="node.node == 'element'">
|
|
4
|
+
<!--button类型-->
|
|
5
|
+
<button v-if="node.tag == 'button'" type="default" size="mini" :class="node.classStr" :style="node.styleStr">
|
|
6
|
+
<wx-parse-template :node="node" />
|
|
7
|
+
</button>
|
|
8
|
+
<!--a类型-->
|
|
9
|
+
<view
|
|
10
|
+
v-else-if="node.tag == 'a'"
|
|
11
|
+
@click="wxParseATap(node.attr, $event)"
|
|
12
|
+
:class="node.classStr"
|
|
13
|
+
:data-href="node.attr.href"
|
|
14
|
+
:style="node.styleStr"
|
|
15
|
+
>
|
|
16
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
17
|
+
<wx-parse-template :node="node" />
|
|
18
|
+
</block>
|
|
19
|
+
</view>
|
|
20
|
+
<!--li类型-->
|
|
21
|
+
<view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr">
|
|
22
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
23
|
+
<wx-parse-template :node="node" />
|
|
24
|
+
</block>
|
|
25
|
+
</view>
|
|
26
|
+
<!--table类型-->
|
|
27
|
+
<wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" />
|
|
28
|
+
<!--br类型-->
|
|
29
|
+
<!-- #ifndef H5 -->
|
|
30
|
+
<text v-else-if="node.tag == 'br'">\n</text>
|
|
31
|
+
<!-- #endif -->
|
|
32
|
+
<!-- #ifdef H5 -->
|
|
33
|
+
<br v-else-if="node.tag == 'br'" />
|
|
34
|
+
<!-- #endif -->
|
|
35
|
+
<!--video类型-->
|
|
36
|
+
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
|
|
37
|
+
<!--audio类型-->
|
|
38
|
+
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
|
|
39
|
+
<!--img类型-->
|
|
40
|
+
<wx-parse-img :node="node" v-else-if="node.tag == 'img'" :style="node.styleStr" />
|
|
41
|
+
<!--其他标签-->
|
|
42
|
+
<view v-else :class="node.classStr" :style="node.styleStr">
|
|
43
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
44
|
+
<wx-parse-template :node="node" />
|
|
45
|
+
</block>
|
|
46
|
+
</view>
|
|
47
|
+
</block>
|
|
48
|
+
<!--判断是否是文本节点-->
|
|
49
|
+
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
|
|
50
|
+
</template>
|
|
51
|
+
<script>
|
|
52
|
+
import wxParseTemplate from './wxParseTemplate4';
|
|
53
|
+
import wxParseImg from './wxParseImg';
|
|
54
|
+
import wxParseVideo from './wxParseVideo';
|
|
55
|
+
import wxParseAudio from './wxParseAudio';
|
|
56
|
+
import wxParseTable from './wxParseTable';
|
|
57
|
+
export default {
|
|
58
|
+
name: 'wxParseTemplate3',
|
|
59
|
+
props: {
|
|
60
|
+
node: {}
|
|
61
|
+
},
|
|
62
|
+
components: {
|
|
63
|
+
wxParseTemplate,
|
|
64
|
+
wxParseImg,
|
|
65
|
+
wxParseVideo,
|
|
66
|
+
wxParseAudio,
|
|
67
|
+
wxParseTable
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
wxParseATap(attr, e) {
|
|
71
|
+
const { href } = e.currentTarget.dataset;
|
|
72
|
+
if (!href) return;
|
|
73
|
+
let parent = this.$parent;
|
|
74
|
+
while (!parent.preview || typeof parent.preview !== 'function') {
|
|
75
|
+
parent = parent.$parent;
|
|
76
|
+
}
|
|
77
|
+
parent.navigate(href, e, attr);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--判断是否是标签节点-->
|
|
3
|
+
<block v-if="node.node == 'element'">
|
|
4
|
+
<!--button类型-->
|
|
5
|
+
<button v-if="node.tag == 'button'" type="default" size="mini" :class="node.classStr" :style="node.styleStr">
|
|
6
|
+
<wx-parse-template :node="node" />
|
|
7
|
+
</button>
|
|
8
|
+
<!--a类型-->
|
|
9
|
+
<view
|
|
10
|
+
v-else-if="node.tag == 'a'"
|
|
11
|
+
@click="wxParseATap(node.attr, $event)"
|
|
12
|
+
:class="node.classStr"
|
|
13
|
+
:data-href="node.attr.href"
|
|
14
|
+
:style="node.styleStr"
|
|
15
|
+
>
|
|
16
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
17
|
+
<wx-parse-template :node="node" />
|
|
18
|
+
</block>
|
|
19
|
+
</view>
|
|
20
|
+
<!--li类型-->
|
|
21
|
+
<view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr">
|
|
22
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
23
|
+
<wx-parse-template :node="node" />
|
|
24
|
+
</block>
|
|
25
|
+
</view>
|
|
26
|
+
<!--table类型-->
|
|
27
|
+
<wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" />
|
|
28
|
+
<!--br类型-->
|
|
29
|
+
<!-- #ifndef H5 -->
|
|
30
|
+
<text v-else-if="node.tag == 'br'">\n</text>
|
|
31
|
+
<!-- #endif -->
|
|
32
|
+
<!-- #ifdef H5 -->
|
|
33
|
+
<br v-else-if="node.tag == 'br'" />
|
|
34
|
+
<!-- #endif -->
|
|
35
|
+
<!--video类型-->
|
|
36
|
+
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
|
|
37
|
+
<!--audio类型-->
|
|
38
|
+
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
|
|
39
|
+
<!--img类型-->
|
|
40
|
+
<wx-parse-img :node="node" v-else-if="node.tag == 'img'" :style="node.styleStr" />
|
|
41
|
+
<!--其他标签-->
|
|
42
|
+
<view v-else :class="node.classStr" :style="node.styleStr">
|
|
43
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
44
|
+
<wx-parse-template :node="node" />
|
|
45
|
+
</block>
|
|
46
|
+
</view>
|
|
47
|
+
</block>
|
|
48
|
+
<!--判断是否是文本节点-->
|
|
49
|
+
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
|
|
50
|
+
</template>
|
|
51
|
+
<script>
|
|
52
|
+
import wxParseTemplate from './wxParseTemplate5';
|
|
53
|
+
import wxParseImg from './wxParseImg';
|
|
54
|
+
import wxParseVideo from './wxParseVideo';
|
|
55
|
+
import wxParseAudio from './wxParseAudio';
|
|
56
|
+
import wxParseTable from './wxParseTable';
|
|
57
|
+
export default {
|
|
58
|
+
name: 'wxParseTemplate4',
|
|
59
|
+
props: {
|
|
60
|
+
node: {}
|
|
61
|
+
},
|
|
62
|
+
components: {
|
|
63
|
+
wxParseTemplate,
|
|
64
|
+
wxParseImg,
|
|
65
|
+
wxParseVideo,
|
|
66
|
+
wxParseAudio,
|
|
67
|
+
wxParseTable
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
wxParseATap(attr, e) {
|
|
71
|
+
const { href } = e.currentTarget.dataset;
|
|
72
|
+
if (!href) return;
|
|
73
|
+
let parent = this.$parent;
|
|
74
|
+
while (!parent.preview || typeof parent.preview !== 'function') {
|
|
75
|
+
parent = parent.$parent;
|
|
76
|
+
}
|
|
77
|
+
parent.navigate(href, e, attr);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--判断是否是标签节点-->
|
|
3
|
+
<block v-if="node.node == 'element'">
|
|
4
|
+
<!--button类型-->
|
|
5
|
+
<button v-if="node.tag == 'button'" type="default" size="mini" :class="node.classStr" :style="node.styleStr">
|
|
6
|
+
<wx-parse-template :node="node" />
|
|
7
|
+
</button>
|
|
8
|
+
<!--a类型-->
|
|
9
|
+
<view
|
|
10
|
+
v-else-if="node.tag == 'a'"
|
|
11
|
+
@click="wxParseATap(node.attr, $event)"
|
|
12
|
+
:class="node.classStr"
|
|
13
|
+
:data-href="node.attr.href"
|
|
14
|
+
:style="node.styleStr"
|
|
15
|
+
>
|
|
16
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
17
|
+
<wx-parse-template :node="node" />
|
|
18
|
+
</block>
|
|
19
|
+
</view>
|
|
20
|
+
<!--li类型-->
|
|
21
|
+
<view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr">
|
|
22
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
23
|
+
<wx-parse-template :node="node" />
|
|
24
|
+
</block>
|
|
25
|
+
</view>
|
|
26
|
+
<!--table类型-->
|
|
27
|
+
<wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" />
|
|
28
|
+
<!--br类型-->
|
|
29
|
+
<!-- #ifndef H5 -->
|
|
30
|
+
<text v-else-if="node.tag == 'br'">\n</text>
|
|
31
|
+
<!-- #endif -->
|
|
32
|
+
<!-- #ifdef H5 -->
|
|
33
|
+
<br v-else-if="node.tag == 'br'" />
|
|
34
|
+
<!-- #endif -->
|
|
35
|
+
<!--video类型-->
|
|
36
|
+
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
|
|
37
|
+
<!--audio类型-->
|
|
38
|
+
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
|
|
39
|
+
<!--img类型-->
|
|
40
|
+
<wx-parse-img :node="node" v-else-if="node.tag == 'img'" :style="node.styleStr" />
|
|
41
|
+
<!--其他标签-->
|
|
42
|
+
<view v-else :class="node.classStr" :style="node.styleStr">
|
|
43
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
44
|
+
<wx-parse-template :node="node" />
|
|
45
|
+
</block>
|
|
46
|
+
</view>
|
|
47
|
+
</block>
|
|
48
|
+
<!--判断是否是文本节点-->
|
|
49
|
+
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
|
|
50
|
+
</template>
|
|
51
|
+
<script>
|
|
52
|
+
import wxParseTemplate from './wxParseTemplate6';
|
|
53
|
+
import wxParseImg from './wxParseImg';
|
|
54
|
+
import wxParseVideo from './wxParseVideo';
|
|
55
|
+
import wxParseAudio from './wxParseAudio';
|
|
56
|
+
import wxParseTable from './wxParseTable';
|
|
57
|
+
export default {
|
|
58
|
+
name: 'wxParseTemplate5',
|
|
59
|
+
props: {
|
|
60
|
+
node: {}
|
|
61
|
+
},
|
|
62
|
+
components: {
|
|
63
|
+
wxParseTemplate,
|
|
64
|
+
wxParseImg,
|
|
65
|
+
wxParseVideo,
|
|
66
|
+
wxParseAudio,
|
|
67
|
+
wxParseTable
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
wxParseATap(attr, e) {
|
|
71
|
+
const { href } = e.currentTarget.dataset;
|
|
72
|
+
if (!href) return;
|
|
73
|
+
let parent = this.$parent;
|
|
74
|
+
while (!parent.preview || typeof parent.preview !== 'function') {
|
|
75
|
+
parent = parent.$parent;
|
|
76
|
+
}
|
|
77
|
+
parent.navigate(href, e, attr);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--判断是否是标签节点-->
|
|
3
|
+
<block v-if="node.node == 'element'">
|
|
4
|
+
<!--button类型-->
|
|
5
|
+
<button v-if="node.tag == 'button'" type="default" size="mini" :class="node.classStr" :style="node.styleStr">
|
|
6
|
+
<wx-parse-template :node="node" />
|
|
7
|
+
</button>
|
|
8
|
+
<!--a类型-->
|
|
9
|
+
<view
|
|
10
|
+
v-else-if="node.tag == 'a'"
|
|
11
|
+
@click="wxParseATap(node.attr, $event)"
|
|
12
|
+
:class="node.classStr"
|
|
13
|
+
:data-href="node.attr.href"
|
|
14
|
+
:style="node.styleStr"
|
|
15
|
+
>
|
|
16
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
17
|
+
<wx-parse-template :node="node" />
|
|
18
|
+
</block>
|
|
19
|
+
</view>
|
|
20
|
+
<!--li类型-->
|
|
21
|
+
<view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr">
|
|
22
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
23
|
+
<wx-parse-template :node="node" />
|
|
24
|
+
</block>
|
|
25
|
+
</view>
|
|
26
|
+
<!--table类型-->
|
|
27
|
+
<wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" />
|
|
28
|
+
<!--br类型-->
|
|
29
|
+
<!-- #ifndef H5 -->
|
|
30
|
+
<text v-else-if="node.tag == 'br'">\n</text>
|
|
31
|
+
<!-- #endif -->
|
|
32
|
+
<!-- #ifdef H5 -->
|
|
33
|
+
<br v-else-if="node.tag == 'br'" />
|
|
34
|
+
<!-- #endif -->
|
|
35
|
+
<!--video类型-->
|
|
36
|
+
<wx-parse-video :node="node" v-else-if="node.tag == 'video'" />
|
|
37
|
+
<!--audio类型-->
|
|
38
|
+
<wx-parse-audio :node="node" v-else-if="node.tag == 'audio'" />
|
|
39
|
+
<!--img类型-->
|
|
40
|
+
<wx-parse-img :node="node" v-else-if="node.tag == 'img'" :style="node.styleStr" />
|
|
41
|
+
<!--其他标签-->
|
|
42
|
+
<view v-else :class="node.classStr" :style="node.styleStr">
|
|
43
|
+
<block v-for="(node, index) of node.nodes" :key="index">
|
|
44
|
+
<wx-parse-template :node="node" />
|
|
45
|
+
</block>
|
|
46
|
+
</view>
|
|
47
|
+
</block>
|
|
48
|
+
<!--判断是否是文本节点-->
|
|
49
|
+
<block v-else-if="node.node == 'text'">{{ node.text }}</block>
|
|
50
|
+
</template>
|
|
51
|
+
<script>
|
|
52
|
+
import wxParseTemplate from './wxParseTemplate7';
|
|
53
|
+
import wxParseImg from './wxParseImg';
|
|
54
|
+
import wxParseVideo from './wxParseVideo';
|
|
55
|
+
import wxParseAudio from './wxParseAudio';
|
|
56
|
+
import wxParseTable from './wxParseTable';
|
|
57
|
+
export default {
|
|
58
|
+
name: 'wxParseTemplate6',
|
|
59
|
+
props: {
|
|
60
|
+
node: {}
|
|
61
|
+
},
|
|
62
|
+
components: {
|
|
63
|
+
wxParseTemplate,
|
|
64
|
+
wxParseImg,
|
|
65
|
+
wxParseVideo,
|
|
66
|
+
wxParseAudio,
|
|
67
|
+
wxParseTable
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
wxParseATap(attr, e) {
|
|
71
|
+
const { href } = e.currentTarget.dataset;
|
|
72
|
+
if (!href) return;
|
|
73
|
+
let parent = this.$parent;
|
|
74
|
+
while (!parent.preview || typeof parent.preview !== 'function') {
|
|
75
|
+
parent = parent.$parent;
|
|
76
|
+
}
|
|
77
|
+
parent.navigate(href, e, attr);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
</script>
|