function t(){return(t=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t}).apply(this,arguments)}function n(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);e<n;e++)o[e]=t[e];return o}function e(t){t=t||Object.create(null);var n={on:function(n,e){(t[n]||(t[n]=[])).push(e)},off:function(n,e){t[n]&&(1==arguments.length?t[n]=[]:t[n].splice(t[n].indexOf(e)>>>0,1))},emit:function(n,e,o){void 0===e&&(e=[]);var i=(t[n]||[]).slice().map(function(t){return t.apply(o,e)}),r=(t["*"]||[]).slice().map(function(t){return t.apply(o,[].concat(e,[n]))});return[].concat(i,r)},asyncEmit:function(t,e,o){return void 0===e&&(e=[]),Promise.all(n.emit(t,e,o))}};return n}var o,i="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync,r="object"==typeof my&&"function"==typeof my.getSystemInfoSync;i?o={App:["onLaunch","onShow","onHide","onError","onPageNotFound","onUnhandledRejection","onThemeChange"],Page:["onLoad","onShow","onBack","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareTimeline","onPageScroll","onResize","onTabItemTap"],Component:["created","attached","ready","moved","detached"]}:r&&(o={App:["onLaunch","onShow","onHide","onError"],Page:["onLoad","onShow","onBack","onReady","onHide","onUnload","onTitleClick","onPullDownRefresh","onReachBottom","onOptionMenuClick","onPullIntercept","onTabItemTap","onPageScroll"],Component:["onInit","deriveDataFromProps","didMount","didUpdate","didUnmount"]});var a=o,s=e();Object.entries||(Object.entries=function(t){for(var n=Object.keys(t),e=n.length,o=new Array(e);e--;)o[e]=[n[e],t[n[e]]];return o}),Object.fromEntries||(Object.fromEntries=function(t){if("[object Map]"===Object.prototype.toString.call(t)){for(var e,o={},i=function(t,e){var o;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(o=function(t,e){if(t){if("string"==typeof t)return n(t,void 0);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?n(t,void 0):void 0}}(t))){o&&(t=o);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[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.")}return(o=t[Symbol.iterator]()).next.bind(o)}(t.keys());!(e=i()).done;){var r=e.value;o[r]=t.get(r)}return o}if(Array.isArray(t)){var a={};return t.map(function(t){a[t[0]]=t[1]}),a}throw"Uncaught TypeError: argument is not iterable"});var c=function(t){return{}.toString.call(t).slice(8,-1).toLowerCase()},u=function(t){return t&&"object"==c(t)&&"__type__"in t&&"Page"==t.__type__},f=function(t){return t&&"object"==c(t)&&!u(t)&&t.is},p=function(t){return t==getApp()};Object.assign(s,{type:c,isPage:u,isComponent:f,isApp:p,isMy:r,isWx:i,getPage:function(){var t=getCurrentPages();return t[t.length-1]},Event:e,version:"2.1.1"});var d=function(t,n){s.emit(t+".init",[n]),a[t].forEach(function(e){var o=n[e],i=o||function(){};n[e]=function(){try{var n=arguments,o=this;return Promise.resolve(s.asyncEmit(t+"."+e+":before",n,o)).then(function(){return Promise.resolve(i.apply(o,n)).then(function(){return Promise.resolve(s.asyncEmit(t+"."+e+":after",n,o)).then(function(){})})})}catch(t){return Promise.reject(t)}},n[e].origin=o}),s.emit(t+".inited",[n])},h=App,l=Page,m=Component;App=function(t){return d("App",t),t.__type__="App",h(t)},App._App=h,App.isApp=p,Page=function(t){return d("Page",t),t.__type__="Page",l(t)},Page._Page=l,Page.isPage=u,Component=function(t){return d("Component",t),t.__type__="Component",m(t)},Component._Component=m,Component.isComponent=f;var g=new Set;s.use=function(t,n){t.options=n,g.add(t),(0,t.bind(s)(s,n).install)()},s.plugins=g,s.lifeCycles=a,console&&console.info("miniapp-spore: v2.1.1");var v="[object Array]",y="[object Object]";function b(t){return Object.prototype.toString.call(t)}function _(t){var n=b(t);if(n===y){var e={};return Object.keys(t).forEach(function(n){return e[n]=_(t[n])}),e}if(n===v){var o=[];return t.forEach(function(t,n){return o[n]=_(t)}),o}return t}function P(t,n){var e={};return b(t)==y&&(t=_(t)),function t(n,e){if(n!==e){var o=b(n),i=b(e);if(o==y&&i==y)for(var r in e){var a=n[r];void 0===a?n[r]=null:t(a,e[r])}else o==v&&i==v&&n.length>=e.length&&e.forEach(function(e,o){t(n[o],e)})}}(t,n),function t(n,e,o,i){if(n!==e){var r=b(n),a=b(e);if(r==y)if(a!=y||Object.keys(n).length<Object.keys(e).length)j(i,o,n);else{var s=function(r){var a=n[r],s=e[r],c=b(a),u=b(s);if(c!=v&&c!=y)a!=e[r]&&j(i,(""==o?"":o+".")+r,a);else if(c==v)u!=v||a.length<s.length?j(i,(""==o?"":o+".")+r,a):a.forEach(function(n,e){t(n,s[e],(""==o?"":o+".")+r+"["+e+"]",i)});else if(c==y)if(u!=y||Object.keys(a).length<Object.keys(s).length)j(i,(""==o?"":o+".")+r,a);else for(var f in a)t(a[f],s[f],(""==o?"":o+".")+r+"."+f,i)};for(var c in n)s(c)}else r==v?a!=v||n.length<e.length?j(i,o,n):n.forEach(function(n,r){t(n,e[r],o+"["+r+"]",i)}):j(i,o,n)}}(t,n,"",e),e}function j(t,n,e){"[object Function]"!=b(e)&&(t[n]=e)}P.deepCopy=_,s.use(function(t,n){return{install:function(){t.on("Page.onLoad:before",function(){var t=this;setTimeout(function(){t._loaded=!0},10)}),t.on("Page.onShow:after",function(){this._loaded&&this.onBack&&this.onBack()})}}}),s.use(function(n,e){var o=P.deepCopy,i=n.Event,r=n.type,a=n.isComponent,s=n.isPage,c=function(t){return t.replace(/\]$/g,"")},u=function t(n,e){var o=Array.isArray(e)?e:e.split(/\.|\[/);if(e&&o.length){var i=c(o.shift());if("object"!=typeof n||!n||!(i in n))return;return t(n[i],o)}return n},f=new Set,p=function(){function t(t,n,e){if(void 0===t&&(t="$store"),void 0===n&&(n={}),void 0===e&&(e={}),this.asyncSetData=d,!/^[_\$a-zA-Z][_\$a-zA-Z0-9]*$/.test(t))throw new Error("Store命名空间"+t+"定义不合法,规则与js变量名一致");if(this.namespace=t,Array.from(f).find(function(n){return n.namespace==t}))throw new Error("Store不能同时使用同一个命名空间:"+t);f.add(this),Object.assign(this,i(this._events={})),Object.assign(this,e.actions||{}),this.options=Object.assign({diff:!1},e),this._createDefineData(n)}var e,a=t.prototype;return a.setData=function(t,n){var e=this;"object"==r(t)&&(Object.entries(t).map(function(t){!function t(n,e,o){var i=Array.isArray(e)?e:e.split(/\.|\[/);if(e&&i.length>1){var r=c(i.shift());return t(n=n[r]||(n[r]=i[0]!==c(i[0])?[]:{}),i,o)}return n[c(i[0])]=o,n}(e._defineData,t[0],t[1])}),this._data=o(this._defineData),this.emit("setData",[t],this),this.update(n))},a.$spliceData=function(t,n){var e=this;"object"==r(t)&&(Object.entries(t).map(function(t){var n=t[1],o=u(e._defineData,t[0]);Array.isArray(o)&&[].splice.apply(o,n)}),this._data=o(this._defineData),this.emit("$spliceData",[t],this),this.update(n))},a.clear=function(t){var n=this;Object.entries(this._defineData).map(function(t){n._defineData[t[0]]=null}),this._data=o(this._defineData),this.emit("clear",[],this),this.update(t)},a._createDefineData=function(t){this._defineData=t,this._setComputed(),this._data=o(this._defineData)},a._setComputed=function(){var t=this,n=this;this.options.computed&&Object.entries(this.options.computed).map(function(e){var o=e[0],i=e[1];"function"==r(i)&&(function(t,n,e){void 0===e&&(e={});var o,i,r=Array.isArray(n)?n:n.split(/\.|\[/);if(r.length>1?(o=r.splice(-1)[0],i=u(t,r)):(o=r[0],i=t),o=c(o),"object"==typeof i)return Object.defineProperty(i,o,e)}(t._defineData,o,{enumerable:!0,set:function(){console.warn("计算属性不支持重新赋值")},get:function(){return i.bind(n._defineData)()}})||console.warn("存储【"+t.namespace+"】无法定义计算属性"+o+",因为在此路径下不是对象类型,无法定义属性。"))})},a.update=function(t){var e=this;void 0===t&&(t=function(){});var o=n.getPage(),i=this.data;if(o){var r,a=((r={})[this.namespace]=i,r);
没有合适的资源?快使用搜索试试~ 我知道了~
微信、阿里小程序渐进框架,全局存储状态管理、跨页面通讯、生命周期事件系统、组件props监听
共65个文件
js:23个
json:17个
acss:6个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 58 浏览量
2023-12-31
10:30:54
上传
评论
收藏 57KB ZIP 举报
温馨提示
微信、阿里小程序渐进框架,全局存储状态管理、跨页面通讯、生命周期事件系统、组件props监听。支持微信小程序、支付宝小程序、淘宝小程序、钉钉小程序、高德小程序等
资源推荐
资源详情
资源评论
收起资源包目录
miniapp-spore-2.x.zip (65个子文件)
miniapp-spore-2.x
src
event.js 1KB
plugins
onBack.plugin.js 436B
props.plugin.js 3KB
store.plugin.js 10KB
platforms
aliLifeCycles.js 355B
wxLifeCycles.js 366B
index.js 490B
core.js 3KB
index.js 299B
diff.js 4KB
LICENSE 11KB
examples
todolist
pages
index
index.acss 627B
index.axml 606B
index.js 728B
index.json 2B
viewlist
viewlist.acss 330B
viewlist.json 2B
viewlist.js 281B
viewlist.axml 359B
app.json 124B
app.js 724B
snapshot.png 16KB
app.acss 32B
package.json 58B
base
pages
index
index.axml 280B
index.js 270B
index.json 2B
demo
demo.js 243B
demo.json 61B
demo.acss 33B
demo.axml 409B
app.json 116B
app.js 185B
snapshot.png 16KB
app.acss 32B
components
com
com.js 252B
com.axml 144B
com.acss 0B
com.json 23B
package.json 58B
wx-base
sitemap.json 191B
pages
index2
index2.wxss 30B
index2.json 60B
index2.js 181B
index2.wxml 210B
index
index.wxml 412B
index.js 197B
index.json 60B
index.wxss 122B
app.json 302B
project.config.json 2KB
app.js 374B
app.wxss 194B
package.json 294B
coms
test
test.json 48B
test.wxss 20B
test.wxml 90B
test.js 340B
.gitee
ISSUE_TEMPLATE.zh-CN.md 79B
dist
miniapp-spore.js 11KB
miniapp-spore.js.map 40KB
package.json 730B
build
index.js 390B
.npmignore 49B
.gitignore 1KB
共 65 条
- 1
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 6656
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 论文(最终)_20240430235101.pdf
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
- 林周瑜-论文.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功