You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
8.3 KiB
1 lines
8.3 KiB
{"version":3,"sources":["webpack:///G:/web/中龙小程序/zhonglmini/components/u-parse/u-parse.vue?7bb1","webpack:///G:/web/中龙小程序/zhonglmini/components/u-parse/u-parse.vue?3fdf","webpack:///G:/web/中龙小程序/zhonglmini/components/u-parse/u-parse.vue?6a58","webpack:///G:/web/中龙小程序/zhonglmini/components/u-parse/u-parse.vue?a1b1","uni-app:///components/u-parse/u-parse.vue"],"names":["name","props","loading","type","default","className","content","noData","startHandler","node","endHandler","charsHandler","imageProp","mode","padding","lazyLoad","domain","components","wxParseTemplate","data","imageUrls","computed","nodes","start","end","chars","console","methods","navigate","preview","wx","current","urls","removeImageUrl"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoH;AACpH;AAC2D;AACL;;;AAGtD;AACqL;AACrL,gBAAgB,0LAAU;AAC1B,EAAE,6EAAM;AACR,EAAE,kFAAM;AACR,EAAE,2FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,sFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAirB,CAAgB,krBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;ACkBrsB;;;;;;;;;;;;;;;;;;;;;;;gBAGA;EACAA;EACAC;IACAC;MACAC;MACAC;IACA;IACAC;MACAF;MACAC;IACA;IACAE;MACAH;MACAC;IACA;IACAG;MACAJ;MACAC;IACA;IACAI;MACAL;MACAC;QACA;UACAK;UACAA;QACA;MACA;IACA;IACAC;MACAP;MACAC;IACA;IACAO;MACAR;MACAC;IACA;IACAQ;MACAT;MACAC;QACA;UACAS;UACAC;UACAC;UACAC;QACA;MACA;IACA;EACA;EACAC;IACAC;EACA;EACAC;IACA;MACAC;IACA;EACA;EACAC;IACAC;MACA,IACAhB,UAMA,KANAA;QACAC,SAKA,KALAA;QACAK,YAIA,KAJAA;QACAJ,eAGA,KAHAA;QACAE,aAEA,KAFAA;QACAC,eACA,KADAA;MAEA;MACA;QACAY;QACAC;QACAC;MACA;MACA;MACA;MACAC;MACA;IACA;EACA;EACAC;IACAC;MACA;IACA;IACAC;MACA;MACAC;QACAC;QACAC;MACA;MACA;IACA;IACAC;MACA;MACAb;IACA;EACA;AACA;AAAA,4B","file":"components/u-parse/u-parse.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./u-parse.vue?vue&type=template&id=f9871e88&\"\nvar renderjs\nimport script from \"./u-parse.vue?vue&type=script&lang=js&\"\nexport * from \"./u-parse.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\runtime\\\\componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/u-parse/u-parse.vue\"\nexport default component.exports","export * from \"-!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--17-0!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-parse.vue?vue&type=template&id=f9871e88&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-parse.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!F:\\\\软件\\\\HBuilder X\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-parse.vue?vue&type=script&lang=js&\"","<!--**\r\n * forked from:https://github.com/F-loat/mpvue-wxParse\r\n *\r\n * github地址: https://github.com/dcloudio/uParse\r\n *\r\n * for: uni-app框架下 富文本解析\r\n */-->\r\n\r\n<template>\r\n<!--基础元素-->\r\n<div class=\"wxParse\" :class=\"className\" v-if=\"!loading\">\r\n <block v-for=\"(node,index) of nodes\" :key=\"index\">\r\n <wxParseTemplate :node=\"node\" />\r\n </block>\r\n</div>\r\n</template>\r\n\r\n<script>\r\nimport HtmlToJson from './libs/html2json';\r\nimport wxParseTemplate from './components/wxParseTemplate0';\r\n\r\nexport default {\r\n name: 'wxParse',\r\n props: {\r\n loading: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n className: {\r\n type: String,\r\n default: '',\r\n },\r\n content: {\r\n type: String,\r\n default: '',\r\n },\r\n noData: {\r\n type: String,\r\n default: '<div style=\"color: red;\">数据不能为空</div>',\r\n },\r\n startHandler: {\r\n type: Function,\r\n default() {\r\n return (node) => {\r\n node.attr.class = null;\r\n node.attr.style = null;\r\n };\r\n },\r\n },\r\n endHandler: {\r\n type: Function,\r\n default: null,\r\n },\r\n charsHandler: {\r\n type: Function,\r\n default: null,\r\n },\r\n imageProp: {\r\n type: Object,\r\n default() {\r\n return {\r\n mode: 'aspectFit',\r\n padding: 0,\r\n lazyLoad: false,\r\n domain: '',\r\n };\r\n },\r\n },\r\n },\r\n components: {\r\n wxParseTemplate,\r\n },\r\n data() {\r\n return {\r\n imageUrls: [],\r\n };\r\n },\r\n computed: {\r\n nodes() {\r\n const {\r\n content,\r\n noData,\r\n imageProp,\r\n startHandler,\r\n endHandler,\r\n charsHandler,\r\n } = this;\r\n const parseData = content || noData;\r\n const customHandler = {\r\n start: startHandler,\r\n end: endHandler,\r\n chars: charsHandler,\r\n };\r\n const results = HtmlToJson(parseData, customHandler, imageProp, this);\r\n this.imageUrls = results.imageUrls;\r\n console.log(results)\r\n return results.nodes;\r\n },\r\n },\r\n methods: {\r\n navigate(href, $event) {\r\n this.$emit('navigate', href, $event);\r\n },\r\n preview(src, $event) {\r\n if (!this.imageUrls.length) return;\r\n wx.previewImage({\r\n current: src,\r\n urls: this.imageUrls,\r\n });\r\n this.$emit('preview', src, $event);\r\n },\r\n removeImageUrl(src) {\r\n const { imageUrls } = this;\r\n imageUrls.splice(imageUrls.indexOf(src), 1);\r\n },\r\n },\r\n};\r\n</script>\r\n"],"sourceRoot":""}
|