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 line
14 KiB
1 line
14 KiB
5 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["technician-pages-shop-detail~user-pages-article~user-pages-bell-order~user-pages-detail~user-pages-i~a3702aa4"],{2069:function(t,e,r){"use strict";r("7a82");var a=r("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=a(r("b85c")),n=a(r("53ca"));r("caad"),r("2532"),r("ac1f"),r("5319"),r("00b4"),r("acd8"),r("14d9"),r("c975");var i=r("9667"),o={name:"parser",data:function(){return{uid:this._uid,showAnimation:"",nodes:[]}},props:{html:{type:null,default:null},autocopy:{type:Boolean,default:!0},autopause:{type:Boolean,default:!0},autopreview:{type:Boolean,default:!0},autosetTitle:{type:Boolean,default:!0},domain:{type:String,default:null},imgMode:{type:String,default:"default"},lazyLoad:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},tagStyle:{type:Object,default:function(){return{}}},showWithAnimation:{type:Boolean,default:!1},useAnchor:{type:Boolean,default:!1},useCache:{type:Boolean,default:!1}},watch:{html:function(t){this.setContent(t,void 0,!0)}},mounted:function(){this.imgList=[],this.imgList.each=function(t){for(var e=0;e<this.length;e++){var r=t(this[e],e,this);r&&(this.includes(r)?this[e]=Deduplication(r):this[e]=r)}},this.setContent(this.html,void 0,!0)},beforeDestroy:function(){this._observer&&this._observer.disconnect()},methods:{setContent:function(t,e,r){var a=this;if("object"==(0,n.default)(e))for(var o in e)o=o.replace(/-(\w)/g,(function(){return arguments[1].toUpperCase()})),this[o]=e[o];if(t=t||"",t){if("string"!=typeof t&&(t=this.Dom2Str(t.nodes||t)),/[0-9.]*?rpx/.test(t)){var l=uni.getSystemInfoSync().screenWidth/750;t=t.replace(/([0-9.]*?)rpx/g,(function(){return parseFloat(arguments[1])*l+"px"}))}var c="<style scoped>";for(var u in i.userAgentStyles)c+=u+"{"+i.userAgentStyles[u]+"}";for(var u in this.tagStyle)c+=u+"{"+this.tagStyle[u]+"}";c+="</style>",t=c+t,this.rtf&&this.rtf.parentNode.removeChild(this.rtf),this.rtf=document.createElement("div"),this.rtf.innerHTML=t;var d,f=(0,s.default)(this.rtf.getElementsByTagName("style"));try{for(f.s();!(d=f.n()).done;){c=d.value;c.innerHTML=c.innerHTML.replace(/\s*body/g,"#rtf"+this._uid),c.setAttribute("scoped","true")}}catch(O){f.e(O)}finally{f.f()}this.lazyLoad&&IntersectionObserver&&(this._observer&&this._observer.disconnect(),this._observer=new IntersectionObserver((function(t){var e,r=(0,s.default)(t);try{for(r.s();!(e=r.n()).done;){var n=e.value;n.isIntersecting&&(n.target.src=n.target.getAttribute("data-src"),n.target.removeAttribute("data-src"),a._observer.unobserve(n.target))}}catch(O){r.e(O)}finally{r.f()}}),{rootMargin:"1000px 0px 1000px 0px"}));var h=this,p=this.rtf.getElementsByTagName("title");p.length&&this.autosetTitle&&uni.setNavigationBarTitle({title:p[0].innerText}),this.imgList.length=0;for(var m=this.rtf.getElementsByTagName("img"),g=0;g<m.length;g++){var y=m[g];y.style.maxWidth="100%",y.i=g,this.domain&&"/"==y.getAttribute("src")[0]&&("/"==y.getAttribute("src")[1]?y.src=(this.domain.includes("://")?this.domain.split("://")[0]:"http")+":"+y.getAttribute("src"):y.src=this.domain+y.getAttribute("src")),h.imgList.push(y.src),"A"!=y.parentElement.nodeName&&(y.onclick=function(){if(!this.hasAttribute("ignore")){var t=!0;this.ignore=function(){return t=!1},h.$emit("imgtap",this),t&&h.autopreview&&uni.previewImage({current:this.i,urls:h.imgList})}}),y.onerror=function(){h.$emit("error",{source:"img",target:this})},h.lazyLoad&&this._observer&&(y.setAttribute("data-src",y.src),y.removeAttribute("src"),this._observer.observe(y))}var v,b=this.rtf.getElementsByTagName("a"),x=(0,s.default)(b);try{for(x.s();!(v=x.n()).done;){var w=v.value;w.onclick=function(t){var e=!0,r=this.getAttribute("href");if(h.$emit("linkpress",{href:r,ignore:function(){return e=!1}}),e&&r)if("#"==r[0])h.useAnchor&&h.navigateTo({id:r.substring(1)});else{if(0==r.indexOf("http")||0==r.indexOf("//"))return!0;uni.navigateTo({url:r})}return!1}}}catch(O){x.e(O)}finally{x.f()}var _=this.rtf.getElementsByTagName("video");h.videoContexts=_;var A,T=(0,s.default)(_);try{for(T.s();
|