移动端更新

This commit is contained in:
molong committed 2026-02-21 14:47:54 +08:00
1 parent 7f8e68bb0a
commit c0d27be99b
432 files changed
+100843

No files matched your search

+1
View File
@@ -0,0 +1 @@
"use strict";function t(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,o)}return e}function r(r){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?t(Object(i),!0).forEach(function(t){e(r,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function e(t,r,e){return(r=o(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function o(t){var r=i(t,"string");return"symbol"==n(r)?r:r+""}function i(t,r){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,r||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function n(t){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=s(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,a=!0,c=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){c=!0,n=t},f:function(){try{a||null==e.return||e.return()}finally{if(c)throw n}}}}function s(t,r){if(t){if("string"==typeof t)return c(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?c(t,r):void 0}}function c(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,o=Array(r);e<r;e++)o[e]=t[e];return o}Component({data:{ctrl:{},nodes:[]},properties:{childs:{type:Array,value:[],observer:function(t){function r(t,o,i){var s=t.length;if(0===s||0===o.length)return void(e[i]=o);for(;s>o.length;)0!==Object.keys(t[s-1]).length&&(e[i+"["+(s-1)+"]"]={}),s-=1;for(;s<o.length;)e[i+"["+s+"]"]=o[s],s+=1;for(var c=0;c<Math.min(t.length,o.length);c++){var l,u=new Set(Object.keys(t[c]).concat(Object.keys(o[c]))),f=a(u);try{for(f.s();!(l=f.n()).done;){var h=l.value;if(void 0===t[c][h]||void 0===o[c][h]||"object"!==n(o[c][h])&&t[c][h]!==o[c][h]){e[i+"["+c+"]"]=o[c];break}}}catch(t){f.e(t)}finally{f.f()}if(!(i+"["+c+"]"in e)){var d,g=a(u);try{for(g.s();!(d=g.n()).done;){var p=d.value;if(Array.isArray(o[c][p]))r(t[c][p],o[c][p],i+"["+c+"]."+p);else{var y,v=a(Object.keys(t[c][p]).concat(Object.keys(o[c][p])));try{for(v.s();!(y=v.n()).done;){var b=y.value;if(t[c][p][b]!==o[c][p][b]){e[i+"["+c+"]."+p]=o[c][p];break}}}catch(t){v.e(t)}finally{v.f()}}}}catch(t){g.e(t)}finally{g.f()}}}}var e={};r(this.data.nodes,t,"nodes"),0!==Object.keys(e).length&&this.setData(e)}},opts:Array},options:{addGlobalClass:!0},methods:{noop:function(){},getNode:function(t){try{for(var r=t.split("_"),e=this.data.childs[r[0]],o=1;o<r.length;o++)e=e.children[r[o]];return e}catch(t){return{text:"",attrs:{},children:[]}}},play:function(t){var e=t.target.dataset.i,o=this.getNode(e);if(this.root.triggerEvent("play",{source:o.name,attrs:r(r({},o.attrs),{},{src:o.src[this.data.ctrl[e]||0]})}),this.root.data.pauseVideo){for(var i=!1,n=t.target.id,a=this.root._videos.length;a--;)this.root._videos[a].id===n?i=!0:this.root._videos[a].pause();if(!i){var s=tt.createVideoContext(n,this);s.id=n,this.root.playbackRate&&s.playbackRate(this.root.playbackRate),this.root._videos.push(s)}}},mediaEvent:function(t){var e=t.target.dataset.i,o=this.getNode(e);this.root.triggerEvent(t.type,r(r({},t.detail),{},{source:o.name,attrs:r(r({},o.attrs),{},{src:o.src[this.data.ctrl[e]||0]})}))},imgTap:function(t){var r=this.getNode(t.target.dataset.i);if(r.a)return this.linkTap(r.a);if(!r.attrs.ignore&&(this.root.triggerEvent("imgtap",r.attrs),this.root.data.previewImg)){var e=this.root.imgList[r.i];tt.previewImage({current:e,urls:this.root.imgList})}},imgLoad:function(t){var r,o=t.target.dataset.i,i=this.getNode(o);i.w?(this.data.opts[1]&&!this.data.ctrl[o]||-1===this.data.ctrl[o])&&(r=1):r=t.detail.width,r&&r!==this.data.ctrl[o]&&this.setData(e({},"ctrl."+o,r)),this.checkReady()},checkReady:function(){var t=this;this.root.data.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(r){t.root.triggerEvent("ready",r)}).catch(function(){t.root.triggerEvent("ready",{})})},Line truncated
+1
View File
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"node":"./node"}}
+1
View File
@@ -0,0 +1 @@
<template name="el"><block tt:if="{{n.name==='img'}}"><rich-text tt:if="{{n.t}}" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchtap="imgTap"/><block tt:else><image tt:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}" lazy-load="{{opts[0]}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop"/></block></block><text tt:elif="{{n.text}}" decode>{{n.text}}</text><text tt:elif="{{n.name==='br'}}">{{'\n'}}</text><view tt:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><template is="node" data="{{childs:n.children,path:i+'_',opts:opts,ctrl:ctrl}}"></template></view><video tt:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" bindpause="mediaEvent" bindfullscreenchange="mediaEvent" binderror="mediaError"/><rich-text tt:else id="{{n.attrs.id}}" style="{{n.f}}" nodes="{{[n]}}"/></template><template name="node"><block tt:for="{{childs}}" tt:for-item="n" tt:for-index="i" tt:key="i"><template tt:if="{{!n.c}}" is="el" data="{{n:n,i:path+i,opts:opts,ctrl:ctrl}}"/><view tt:else id="{{n.attrs.id}}" class="_{{n.name}} {{n.attrs.class}}" style="{{n.attrs.style}}"><template is="node" data="{{childs:n.children,path:path+i+'_',opts:opts,ctrl:ctrl}}"></template></view></block></template><template is="node" data="{{childs:nodes,path:'',opts:opts,ctrl:ctrl}}"></template>
+1
View File
@@ -0,0 +1 @@
._a{padding:1.5px 0 1.5px 0;color:#366092;word-break:break-all}._hover{text-decoration:underline;opacity:.7}._img{max-width:100%;-webkit-touch-callout:none}._b,._strong{font-weight:700}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:700}._ins{text-decoration:underline}._li{display:list-item}._ol{list-style-type:decimal}._ol,._ul{display:block;padding-left:40px;margin:1em 0}._q::before{content:'"'}._q::after{content:'"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}._tbody,._tfoot,._thead{display:table-row-group}._tr{display:table-row}._td,._th{display:table-cell;vertical-align:middle}._th{font-weight:700;text-align:center}._ul{list-style-type:disc}._ul ._ul{margin:0;list-style-type:circle}._ul ._ul ._ul{list-style-type:square}._abbr,._b,._code,._del,._em,._i,._ins,._label,._q,._span,._strong,._sub,._sup{display:inline}