Repository: incubator-weex Updated Branches: refs/heads/master bbb0817f6 -> 3f3c80910
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3f3c8091/ios/playground/bundlejs/landing.weex.js ---------------------------------------------------------------------- diff --git a/ios/playground/bundlejs/landing.weex.js b/ios/playground/bundlejs/landing.weex.js new file mode 100644 index 0000000..06367ba --- /dev/null +++ b/ios/playground/bundlejs/landing.weex.js @@ -0,0 +1,4 @@ +// { "framework": "Vue" } +"use weex:vue"; + +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=37)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(3),o=n(11);t.exports=n(4)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(9),o=n(29),i=n(17),u=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)tr y{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(55),o=n(15);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(21)("wks"),o=n(12),i=n(0).Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(7);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.expo rts=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fetchNews=e.fetchDoodle=e.readAbout=e.saveAbout=e.fetchAbout=e.readGuide=e.saveGuide=e.fetchGuide=e.readExamples=e.saveExamples=e.fetchExamples=void 0;var r=i(n(44)),o=i(n(46));function i(t){return t&&t.__esModule?t:{default:t}}e.createLink=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];for(var r in e)"string"==typeof e[r]&&n.push(f(r)+"="+f(e[r]));if("Web"===WXEnvironment.platform)return n.unshift("page="+t+".web.js"),"/?"+n.join("&");return""+function(){var t=weex.config.bundleUrl,e=t.indexOf("your_current_IP")>=0||t.indexOf("file://assets/")>=0,n=t.indexOf("file:///")>=0&&t.indexOf("WeexDemo.app")>0;if(e)return"file://assets/";if(n)return t.substring(0,t.lastIndexOf("/")+1);return""}()+t+".weex.js"+(n.length?"?"+n.join("&"):"")},e.createURL=s,e.i18n=l,e.parseLanguage=d,e.setLanguage=fu nction(t){var e=d(t);e&&a.setItem("WEEX_PLAYGROUND_LANGUAGE",e)},e.clearStorageLanguage=function(){a.removeItem("WEEX_PLAYGROUND_LANGUAGE")},e.getStorageLanguage=v,e.getSystemLanguage=h,e.getLanguage=y,e.jumpTo=function(t,e){y(function(n){a.setItem("CURRENT_DOCUMENT_URL",l(t,n)),c.push({url:s("bf0305c14b511b24a4e616f53926432b",{language:n,title:l(e,n)})})})},e.viewSource=function(t){y(function(e){c.push({url:s("f6ce29faf686eabc38b410bf4828fa5a",{hash:t,language:e})})})},e.setTitleBar=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";if("[object Object]"!==Object.prototype.toString.apply(t))return;var n=weex.requireModule("titleBar");if(t.color||t.backgroundColor)try{n.setStyle({foregroundColor:t.color||"#FFFFFF",backgroundColor:t.backgroundColor||"#00B4FF"})}catch(t){}var r=l(t.title,e);if(r)try{n.setTitle(r)}catch(t){}},e.fetchData=b,e.saveData=x,e.readData=w;var u=weex.requireModule("stream"),a=weex.requireModule("storage"),c=weex.requireModule("navigat or"),f="function"==typeof encodeURIComponent?encodeURIComponent:"function"==typeof encodeURI?encodeURI:function(t){return t};function s(t,e){if("Web"===WXEnvironment.platform)return"http://dotwe.org/raw/htmlVue/"+t;var n="http://dotwe.org/raw/dist/"+t+".bundle.wx",r=function(t){if(!t||"object"!==(void 0===t?"undefined":(0,o.default)(t)))return"";var e=[];for(var n in t)"string"==typeof t[n]&&e.push(f(n)+"="+f(t[n]));return e.join("&")}(e);return"TB"===WXEnvironment.appName?n+"?_wx_tpl="+n+"&"+r:"WXSample"===WXEnvironment.appName?n+"?"+r:n+"?wx_weex=true&"+r}function l(t,e){return"string"==typeof t?t:"[object Object]"===Object.prototype.toString.call(t)?t[this&&this.language||e||"en"]:void 0}var p=/(en|zh)\_?\w*/i;function d(t){var e=p.exec(t+"");return e&&e[1]?e[1]:""}function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if("function"!==!(void 0===t||(0,o.default)(t)))try{a.getItem("WEEX_PLAYGROUND_LANGUAGE",function(n){if("success"===n.result){var r=d(n.data);r?t(r):e()}else e(n)})}catch(t){e(t)}}function h(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if("function"!==!(void 0===t||(0,o.default)(t)))if("web"===WXEnvironment.platform.toLowerCase()){var n=d(window.navigator.language);n?t(n):e()}else try{var r=weex.requireModule("locale")||weex.requireModule("local"),i=!1,u=d(r.getLanguage(function(n){var r=d(n);r?i||t(r):e()}));u?(i=!0,t(u)):e()}catch(t){e(t)}}var g=/.+[\?\&]{1}language=([\d\w]+)[\?\&]?.*/i;function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},e=g.exec(weex.config.bundleUrl||""),n=d(e&&e[1]);n?t(n):v(t,function(){h(t,function(){t("en")})})}var m={doodle:"WEEX_PLAYGROUND_APP_DOODLE",guide:"WEEX_PLAYGROUND_APP_GUIDE",examples:"WEEX_PLAYGROUND_APP_EXAMPLES",news:"WEEX_PLAYGROUND_APP_NEWS",about:"WEEX_PLAYGROUND_APP_ABOUT"};function b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2 ]?arguments[2]:function(){};try{u.fetch({url:"http://dotwe.org/query/weex-playground-app",method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},type:"json",body:"name="+t},function(t){t.ok&&t.data&&t.data.success?e(t.data):n(t)})}catch(t){n(t)}}function x(t,e){var n=m[t];n&&e&&"object"===(void 0===e?"undefined":(0,o.default)(e))&&(e.timestamp=Date.now(),a.setItem(n,(0,r.default)(e)))}function w(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=m[t];if(!r)return n();try{a.getItem(r,function(r){if("success"===r.result){var o=JSON.parse(r.data);if(o&&Array.isArray(o[t]))return e(o[t])}n(r)})}catch(t){n(t)}}e.fetchExamples=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.apply(void 0,["examples"].concat(e))},e.saveExamples=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return x.apply(void 0,["exampl es"].concat(e))},e.readExamples=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return w.apply(void 0,["examples"].concat(e))},e.fetchGuide=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.apply(void 0,["guide"].concat(e))},e.saveGuide=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return x.apply(void 0,["guide"].concat(e))},e.readGuide=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return w.apply(void 0,["guide"].concat(e))},e.fetchAbout=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.apply(void 0,["about"].concat(e))},e.saveAbout=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return x.apply(void 0,["about"].concat(e))},e.readAbout=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return w.apply(void 0,["about"].concat(e))},e.fetchDoodle=function(){fo r(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.apply(void 0,["doodle"].concat(e))},e.fetchNews=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.apply(void 0,["news"].concat(e))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!0},function(t,e,n){var r=n(7);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports={}},function(t,e,n){var r=n(33),o=n(22);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(21)("keys"),o=n(12);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(0),o="__core-js_shared__",i=r[o]||(r[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(3).f,o=n(1),i=n(6)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){e.f=n(6)},function(t,e,n){var r=n(0),o=n(8),i=n(16),u=n(24),a=n(3).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:u.f(t)})}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";var r=n(16),o=n(28),i=n(31),u=n(2),a=n(1),c=n(18),f=n(53),s=n(23),l=n(60),p=n(6)("iterator"),d=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,e,n,h,g,y,m){f(n,e,h);var b,x,w,_=function(t){if(!d&&t in j)return j[t];switch(t){case"keys":case"values":return function(){return new n( this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",S="values"==g,E=!1,j=t.prototype,L=j[p]||j["@@iterator"]||g&&j[g],A=!d&&L||_(g),C=g?S?_("entries"):A:void 0,P="Array"==e?j.entries||L:L;if(P&&(w=l(P.call(new t)))!==Object.prototype&&w.next&&(s(w,O,!0),r||a(w,p)||u(w,p,v)),S&&L&&"values"!==L.name&&(E=!0,A=function(){return L.call(this)}),r&&!m||!d&&!E&&j[p]||u(j,p,A),c[e]=A,c[O]=v,g)if(b={values:S?A:_("values"),keys:y?A:_("keys"),entries:C},m)for(x in b)x in j||i(j,x,b[x]);else o(o.P+o.F*(d||E),e,b);return b}},function(t,e,n){var r=n(0),o=n(8),i=n(51),u=n(2),a="prototype",c=function(t,e,n){var f,s,l,p=t&c.F,d=t&c.G,v=t&c.S,h=t&c.P,g=t&c.B,y=t&c.W,m=d?o:o[e]||(o[e]={}),b=m[a],x=d?r:v?r[e]:(r[e]||{})[a];d&&(n=e);for(f in n)(s=!p&&x&&void 0!==x[f])&&f in m||(l=s?x[f]:n[f],m[f]=d&&"function"!=typeof x[f]?n[f]:g&&s?i(l,r):y&&x[f]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[a]=t[a],e}(l):h&&"function"==typeof l?i(Function.call,l):l,h&&((m.virtual||(m.virtual={}))[f]=l,t&c.R&&b&&!b[f]&&u(b,f,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){t.exports=!n(4)&&!n(10)(function(){return 7!=Object.defineProperty(n(30)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(7),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){t.exports=n(2)},function(t,e,n){var r=n(9),o=n(54),i=n(22),u=n(20)("IE_PROTO"),a=function(){},c=function(){var t,e=n(30)("iframe"),r=i.length;for(e.style.display="none",n(59).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[u]=t):n =c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(1),o=n(5),i=n(56)(!1),u=n(20)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),c=0,f=[];for(n in a)n!=u&&r(a,n)&&f.push(n);for(;e.length>c;)r(a,n=e[c++])&&(~i(f,n)||f.push(n));return f}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(33),o=n(22).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=u(n(38)),o=u(n(79)),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(13));function u(t){return t&&t.__esModule?t:{default:t}}try{weex.requireModule("titleBar").showTitleBar(!1)}catch(t){}Vue.mixin(o.default),setTimeout(function(){i.fetchExamples(i.saveExamples),i.fetchGuide(i.saveGuide),i.fetchAbout(i.saveAbout)},10),r.default.el="#root",new Vue(r.default)} ,function(t,e,n){var r,o,i=[];i.push(n(39)),r=n(40);var u=n(78);if(o=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(Object.keys(r).some(function(t){return"default"!==t&&"__esModule"!==t})&&console.error("named exports are not supported in *.vue files."),o=r=r.default),"function"==typeof o&&(o=o.options),o.__file="/Users/Hanks/Codes/work/weex-vue-examples/src/pages/Landing.vue",o.render=u.render,o.staticRenderFns=u.staticRenderFns,o._scopeId="data-v-50791ba3",o.style=o.style||{},i.forEach(function(t){for(var e in t)o.style[e]=t[e]}),"object"==typeof weex&&weex&&weex.document)try{weex.document.registerStyleSheets(o._scopeId,i)}catch(t){}t.exports=r},function(t,e){t.exports={doodle:{width:"750",height:"880"},"menu-list":{flex:1},"menu-row":{flex:1,flexDirection:"row",justifyContent:"center",borderTopWidth:"1",borderTopStyle:"solid",borderTopColor:"#CCCCCC"},"menu-item":{flex:1,backgroundColor:"#FBFBFB",justifyContent:"center",paddingTop:"50",paddingBottom:"50","back groundColor:active":"#F2F2F2"},"menu-item-1":{borderRightWidth:"1",borderRightStyle:"solid",borderRightColor:"#CCCCCC"},"menu-text":{textAlign:"center",fontSize:"52",fontWeight:"bold",color:"#8B8B8B"},"menu-text-zh":{fontSize:"56"}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(41),i=(r=o)&&r.__esModule?r:{default:r};e.default={components:{Doodle:i.default},data:function(){return{language:"en",menus:[[{name:"guide",title:{en:"Guide",zh:"æç¨"}},{name:"examples",title:{en:"Examples",zh:"å®ä¾"}}],[{name:"news",title:{en:"News",zh:"èµè®¯"}},{name:"about",title:{en:"About",zh:"å ³äº"}}]]}}}},function(t,e,n){var r,o,i=[];i.push(n(42)),r=n(43);var u=n(77);if(o=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(Object.keys(r).some(function(t){return"default"!==t&&"__esModule"!==t})&&console.error("named exports are not supported in *.vue files."),o=r=r.default),"function"==typeof o&&(o=o.options),o.__file="/Users/Hanks/Codes/ work/weex-vue-examples/src/components/Doodle.vue",o.render=u.render,o.staticRenderFns=u.staticRenderFns,o._scopeId="data-v-312c24c9",o.style=o.style||{},i.forEach(function(t){for(var e in t)o.style[e]=t[e]}),"object"==typeof weex&&weex&&weex.document)try{weex.document.registerStyleSheets(o._scopeId,i)}catch(t){}t.exports=r},function(t,e){t.exports={wrapper:{alignItems:"center",justifyContent:"space-between",backgroundColor:"#FFFFFF"},center:{alignItems:"center",justifyContent:"center"},logo:{width:"750",height:"318"},btn:{width:"450",height:"160",marginTop:"50",marginRight:"50",marginBottom:"50",marginLeft:"50",opacity:.7,"opacity:active":1},"scan-bg":{width:"450",height:"160",position:"absolute",top:0,left:0},"btn-text":{color:"#505050",fontSize:"56",textAlign:"center"},"btn-text-zh":{fontSize:"64"}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(13),o=(weex.requireModule("modal"),weex.requireModule("navigator")),i=weex.requireModule("event") ;e.default={props:["lang"],data:function(){return{language:this.lang||"en",showDoodle:!1,seenDoodle:!1,SCAN:{en:"Scan QR Code",zh:"æ«æäºç»´ç "},doodle:{}}},beforeCreate:function(){var t=this;(0,r.fetchDoodle)(function(e){var n,r,o=e.doodle;n=o,r=(new Date).getTime(),n&&n.src&&parseInt(n.from,10)<r&&r<parseInt(n.to,10)&&!t.seenDoodle&&(t.doodle=o,t.showDoodle=!0,setTimeout(function(){t.showDoodle=!1,t.seenDoodle=!0},o.duration||8e3))})},methods:{scan:function(){try{i.openURL("weex://go/scan")}catch(t){try{o.push({url:"weex://go/scan"})}catch(t){}}},magic:function(){this.doodle&&this.doodle.next&&(this.showDoodle=!1,o.push({url:this.createURL(this.doodle.next,{language:this.language})}))}}}},function(t,e,n){t.exports={default:n(45),__esModule:!0}},function(t,e,n){var r=n(8),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,n){"use strict";e.__esModule=!0;var r=u(n(47)),o=u(n(66)),i="function"==typeof o.default &&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":typeof t};function u(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof o.default&&"symbol"===i(r.default)?function(t){return void 0===t?"undefined":i(t)}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":void 0===t?"undefined":i(t)}},function(t,e,n){t.exports={default:n(48),__esModule:!0}},function(t,e,n){n(49),n(62),t.exports=n(24).f("iterator")},function(t,e,n){"use strict";var r=n(50)(!0);n(27)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(14),o=n(15);t.exports=function(t){return function(e,n){var i,u,a=String(o(e)),c=r(n),f=a.length;return c<0||c>=f?t?"":void 0:(i=a.charC odeAt(c))<55296||i>56319||c+1===f||(u=a.charCodeAt(c+1))<56320||u>57343?t?a.charAt(c):i:t?a.slice(c,c+2):u-56320+(i-55296<<10)+65536}}},function(t,e,n){var r=n(52);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=n(32),o=n(11),i=n(23),u={};n(2)(u,n(6)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(u,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(3),o=n(9),i=n(19);t.exports=n(4)?Object.defineProperties:function(t,e){o(t);for(var n,u=i(e),a=u.length,c=0;a>c;)r.f(t,n=u[c++],e[n]);return t}},function(t,e,n){var r=n(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return" String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(5),o=n(57),i=n(58);t.exports=function(t){return function(e,n,u){var a,c=r(e),f=o(c.length),s=i(u,f);if(t&&n!=n){for(;f>s;)if((a=c[s++])!=a)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===n)return t||s||0;return!t&&-1}}},function(t,e,n){var r=n(14),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(14),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(1),o=n(61),i=n(20)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(15);t.exports=function(t){return Object(r(t))}},function(t,e,n){n(63);for(var r=n(0),o=n(2),i=n(18),u=n(6)("toStringTag"),a="CSSRuleList,CSSStyleDeclara tion,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<a.length;c++){var f=a[c],s=r[f],l=s&&s.prototype;l&&!l[u]&&o(l,u,f),i[f]=i.Array}},function(t,e,n){"use strict";var r=n(64),o=n(65),i=n(18),u=n(5);t.exports=n(27)(Array,"Array",function(t,e){this._t=u(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports={default:n(67 ),__esModule:!0}},function(t,e,n){n(68),n(74),n(75),n(76),t.exports=n(8).Symbol},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(4),u=n(28),a=n(31),c=n(69).KEY,f=n(10),s=n(21),l=n(23),p=n(12),d=n(6),v=n(24),h=n(25),g=n(70),y=n(71),m=n(9),b=n(7),x=n(5),w=n(17),_=n(11),O=n(32),S=n(72),E=n(73),j=n(3),L=n(19),A=E.f,C=j.f,P=S.f,M=r.Symbol,T=r.JSON,D=T&&T.stringify,R="prototype",k=d("_hidden"),N=d("toPrimitive"),F={}.propertyIsEnumerable,I=s("symbol-registry"),U=s("symbols"),G=s("op-symbols"),W=Object[R],X="function"==typeof M,B=r.QObject,q=!B||!B[R]||!B[R].findChild,z=i&&f(function(){return 7!=O(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=A(W,e);r&&delete W[e],C(t,e,n),r&&t!==W&&C(W,e,r)}:C,V=function(t){var e=U[t]=O(M[R]);return e._k=t,e},H=X&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},J=function(t,e,n){return t===W&&J(G,e,n),m(t),e=w(e,!0),m(n),o(U,e)?(n.enumerable?(o(t,k)&&t[k][e]&&( t[k][e]=!1),n=O(n,{enumerable:_(0,!1)})):(o(t,k)||C(t,k,_(1,{})),t[k][e]=!0),z(t,e,n)):C(t,e,n)},Y=function(t,e){m(t);for(var n,r=g(e=x(e)),o=0,i=r.length;i>o;)J(t,n=r[o++],e[n]);return t},K=function(t){var e=F.call(this,t=w(t,!0));return!(this===W&&o(U,t)&&!o(G,t))&&(!(e||!o(this,t)||!o(U,t)||o(this,k)&&this[k][t])||e)},Q=function(t,e){if(t=x(t),e=w(e,!0),t!==W||!o(U,e)||o(G,e)){var n=A(t,e);return!n||!o(U,e)||o(t,k)&&t[k][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=P(x(t)),r=[],i=0;n.length>i;)o(U,e=n[i++])||e==k||e==c||r.push(e);return r},Z=function(t){for(var e,n=t===W,r=P(n?G:x(t)),i=[],u=0;r.length>u;)!o(U,e=r[u++])||n&&!o(W,e)||i.push(U[e]);return i};X||(a((M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===W&&e.call(G,n),o(this,k)&&o(this[k],t)&&(this[k][t]=!1),z(this,t,_(1,n))};return i&&q&&z(W,t,{configurable:!0,set:e}),V(t)})[R],"toString",function(){return this._k} ),E.f=Q,j.f=J,n(36).f=S.f=$,n(26).f=K,n(35).f=Z,i&&!n(16)&&a(W,"propertyIsEnumerable",K,!0),v.f=function(t){return V(d(t))}),u(u.G+u.W+u.F*!X,{Symbol:M});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)d(tt[et++]);for(var nt=L(d.store),rt=0;nt.length>rt;)h(nt[rt++]);u(u.S+u.F*!X,"Symbol",{for:function(t){return o(I,t+="")?I[t]:I[t]=M(t)},keyFor:function(t){if(!H(t))throw TypeError(t+" is not a symbol!");for(var e in I)if(I[e]===t)return e},useSetter:function(){q=!0},useSimple:function(){q=!1}}),u(u.S+u.F*!X,"Object",{create:function(t,e){return void 0===e?O(t):Y(O(t),e)},defineProperty:J,defineProperties:Y,getOwnPropertyDescriptor:Q,getOwnPropertyNames:$,getOwnPropertySymbols:Z}),T&&u(u.S+u.F*(!X||f(function(){var t=M();return"[null]"!=D([t])||"{}"!=D({a:t})||"{}"!=D(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n =e=r[1],(b(e)||void 0!==t)&&!H(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!H(e))return e}),r[1]=e,D.apply(T,r)}}),M[R][N]||n(2)(M[R],N,M[R].valueOf),l(M,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){var r=n(12)("meta"),o=n(7),i=n(1),u=n(3).f,a=0,c=Object.isExtensible||function(){return!0},f=!n(10)(function(){return c(Object.preventExtensions({}))}),s=function(t){u(t,r,{value:{i:"O"+ ++a,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";s(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;s(t)}return t[r].w},onFreeze:function(t){return f&&l.NEED&&c(t)&&!i(t,r)&&s(t),t}}},function(t,e,n){var r=n(19),o=n(35),i=n(26);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var u,a=n(t),c=i.f,f=0;a.length>f;)c.call(t,u=a[f++])&&e.push(u);return e}},function(t,e,n){var r=n(34);t.exports=Arr ay.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(5),o=n(36).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return u.slice()}}(t):o(r(t))}},function(t,e,n){var r=n(26),o=n(11),i=n(5),u=n(17),a=n(1),c=n(29),f=Object.getOwnPropertyDescriptor;e.f=n(4)?f:function(t,e){if(t=i(t),e=u(e,!0),c)try{return f(t,e)}catch(t){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e){},function(t,e,n){n(25)("asyncIterator")},function(t,e,n){n(25)("observable")},function(t,e){t.exports={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:["wrapper"]},[this.showDoodle&&this.doodle.src?e("embed",{staticStyle:{flex:"1"},attrs:{src:this._f("url")(this.doodle.src)},on:{click:this.magic}}):e("div",{staticClass:["center"],staticStyle:{flex:"1"}},[e("image",{staticClass:["logo"],attr s:{src:"https://gw.alicdn.com/tfs/TB1Q9VBkRfH8KJjy1XbXXbLdXXa-3799-1615.png"}}),e("div",{staticClass:["btn","center"],on:{click:this.scan}},[e("image",{staticClass:["scan-bg"],attrs:{src:"https://gw.alicdn.com/tfs/TB1qnO0kLDH8KJjy1XcXXcpdXXa-900-320.png"}}),e("text",{class:["btn-text","btn-text-"+this.language]},[this._v(this._s(this.i18n(this.SCAN)))])])])])},staticRenderFns:[]},t.exports.render._withStripped=!0},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:["wrapper"]},[n("doodle",{staticClass:["doodle"],attrs:{lang:t.language}}),n("div",{staticClass:["menu-list"]},t._l(t.menus,function(e,r){return n("div",{key:r,class:["menu-row","menu-row-"+(r+1)]},t._l(e,function(e,r){return n("a",{key:e.name,class:["menu-item","menu-item-"+(r+1)],attrs:{href:t._f("link")(e.name,{language:t.language})}},[n("text",{class:["menu-text","menu-text-"+t.language]},[t._v(t._s(t.i18n(e.title)))])])}))}))],1)},staticRenderFns:[]},t. exports.render._withStripped=!0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(13));var o=weex.requireModule("storage");e.default={filters:{i18n:r.i18n,url:r.createURL,link:r.createLink},methods:{createLink:r.createLink,createURL:r.createURL,i18n:r.i18n,getLanguage:r.getLanguage,fetchData:r.fetchData,saveData:r.saveData,readData:r.readData,jumpTo:r.jumpTo},created:function(){var t=this;r.getLanguage(function(e){t.language=e,r.setTitleBar(t.navigationBarOptions,e)}),new BroadcastChannel("language").onmessage=function(e){e.data&&e.data.language&&(t.language=e.data.language)}},beforeDestroy:function(){o.removeItem("CURRENT_DOCUMENT_URL"),o.removeItem("CURRENT_SOURCE_HASH")}}}]); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3f3c8091/ios/playground/bundlejs/lesson.weex.js ---------------------------------------------------------------------- diff --git a/ios/playground/bundlejs/lesson.weex.js b/ios/playground/bundlejs/lesson.weex.js new file mode 100644 index 0000000..d7d88d0 --- /dev/null +++ b/ios/playground/bundlejs/lesson.weex.js @@ -0,0 +1,4 @@ +// { "framework": "Vue" } +"use weex:vue"; + +!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n=e.exports={version:"2.5.3"};"number"==typeof __e &&(__e=n)},function(e,t,n){var o=n(6),r=n(7);e.exports=function(e){return o(r(e))}},function(e,t,n){var o=n(30);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){"use strict";var o,r=n(10),i=(o=r)&&o.__esModule?o:{default:o},c=n(42);Vue.filter("url",c.createURL),Vue.mixin({methods:{i18n:c.i18n,createURL:c.createURL,jumpTo:c.jumpTo}}),i.default.el="#root",new Vue(i.default)},function(e,t,n){var o,r,i=[];i.push(n(11)),o=n(12);var c=n(41);if(r=o=o||{},"object"!=typeof o.default&&"function"!=typeof o.default||(Object.keys(o).some(function(e){return"default"!==e&&"__esModule"!==e})&&console.error("named exports are not supported in *.vue files."),r=o=o.default),"function"==typeof r&&(r=r.options),r.__file="/User s/Hanks/Codes/work/weex-vue-examples/src/pages/Lesson.vue",r.render=c.render,r.staticRenderFns=c.staticRenderFns,r._scopeId="data-v-0ade5a48",r.style=r.style||{},i.forEach(function(e){for(var t in e)r.style[t]=e[t]}),"object"==typeof weex&&weex&&weex.document)try{weex.document.registerStyleSheets(r._scopeId,i)}catch(e){}e.exports=o},function(e,t){e.exports={banner:{height:"350",boxShadow:"0 5px 10px rgba(0, 0, 0, 0.2)",marginBottom:"10"},center:{alignItems:"center",justifyContent:"center"},title:{textAlign:"center",marginTop:"60",marginBottom:"60",color:"#606060"},lesson:{borderBottomWidth:"1",borderBottomStyle:"solid",borderBottomColor:"#EEEEEE",flexDirection:"row",alignItems:"center"},"lesson-zh":{width:"600"},"lesson-en":{width:"630"},"lesson-index":{color:"#777777",textAlign:"right",paddingRight:"30"},"lesson-title":{paddingTop:"35",paddingBottom:"35"},"lesson-index-zh":{fontSize:"46",width:"120"},"lesson-title-zh":{fontSize:"42",width:"480"},"lesson-index-en":{fontSize:"42",wid th:"100"},"lesson-title-en":{fontSize:"38",width:"530"},footer:{height:"120",paddingTop:"40"},copyright:{fontSize:"22",color:"#A0A0A0",textAlign:"center"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(13),i=(o=r)&&o.__esModule?o:{default:o};var c={mainColor:"#00B4FF",poster:"https://gw.alicdn.com/tfs/TB17hlIdgoQMeJjy0FpXXcTxpXa-328-328.png",posterBg:"#E5F7FF",title:{zh:"å¦ä¹ Weex",en:"Learn Weex"},copyright:{zh:"æ¥èª http://weex-project.io/cn/",en:"From http://weex-project.io/"},lessons:[{title:{zh:"å¿«é䏿",en:"Get Started"},docLink:{zh:"http://weex-project.io/cn/guide/index.html",en:"http://weex-project.io/guide/index.html"}},{title:{zh:"å·¥ä½åç",en:"How it works"},docLink:{zh:"http://weex-project.io/cn/guide/intro/how-it-works.html",en:"http://weex-project.io/guide/intro/how-it-works.html"}},{title:{zh:"ç¨ Weex æå»ºç§»å¨åºç¨",en:"Mobile App Architecture"},docLink:{zh:"http://weex-project.io/cn/guide/intro/app-archite cture.html",en:"http://weex-project.io/guide/intro/app-architecture.html"}},{title:{zh:"Weex 页é¢ç»æ",en:"Weex Page Architecture"},docLink:{zh:"http://weex-project.io/cn/guide/intro/page-architecture.html",en:"http://weex-project.io/guide/intro/page-architecture.html"}},{title:{zh:"éæ Weex å°å·²æåºç¨",en:"Integrate to Your App"},docLink:{zh:"http://weex-project.io/cn/guide/integrate-to-your-app.html",en:"http://weex-project.io/guide/integrate-to-your-app.html"}},{title:{zh:"å Web å¹³å°çå·®å¼",en:"Platform difference with Web"},docLink:{zh:"http://weex-project.io/cn/references/platform-difference.html",en:"http://weex-project.io/references/platform-difference.html"}},{title:{zh:"æå»ºå¼åç¯å¢",en:"Set Up Dev Environment"},docLink:{zh:"http://weex-project.io/cn/guide/set-up-env.html",en:"http://weex-project.io/guide/set-up-env.html"}},{title:{zh:"ä½¿ç¨ Vue å¼å页é¢",en:"Using Vue"},docLink:{zh:"http://weex-project.io/cn/guide/intro/using-vue.html",en:"htt p://weex-project.io/guide/intro/using-vue.html"}},{title:{zh:"Vue å¨ Weex ä¸çå·®å¼",en:"Vue.js Difference with Web"},docLink:{zh:"http://weex-project.io/cn/references/vue/difference-with-web.html",en:"http://weex-project.io/references/vue/difference-with-web.html"}},{title:{zh:"éç¨æ ·å¼",en:"Common Styles"},docLink:{zh:"http://weex-project.io/cn/references/common-style.html",en:"http://weex-project.io/references/common-style.html"}},{title:{zh:"éç¨äºä»¶",en:"Common Events"},docLink:{zh:"http://weex-project.io/cn/references/common-event.html",en:"http://weex-project.io/references/common-event.html"}},{title:{zh:"æå¿",en:"Gestures"},docLink:{zh:"http://weex-project.io/cn/references/gesture.html",en:"http://weex-project.io/references/gesture.html"}},{title:{zh:"Weex å®ä¾åé",en:'The "weex" Variable'},docLink:{zh:"http://weex-project.io/cn/references/weex-variable.html",en:"http://weex-project.io/references/weex-variable.html"}},{title:{zh:"å ç½®ç»ä»¶",en:"Build-i n Components"},docLink:{zh:"http://weex-project.io/cn/references/components/index.html",en:"http://weex-project.io/references/components/index.html"}},{title:{zh:"å 置模å",en:"Build-in Modules"},docLink:{zh:"http://weex-project.io/cn/references/modules/index.html",en:"http://weex-project.io/references/modules/index.html"}},{title:{zh:"Android æ©å±",en:"Extend to Android"},docLink:{zh:"http://weex-project.io/cn/references/advanced/extend-to-android.html",en:"http://weex-project.io/references/advanced/extend-to-android.html"}},{title:{zh:"iOS æ©å±",en:"Extend to iOS"},docLink:{zh:"http://weex-project.io/cn/references/advanced/extend-to-ios.html",en:"http://weex-project.io/references/advanced/extend-to-ios.html"}},{title:{zh:"Web æ©å±",en:"Extend to Web"},docLink:{zh:"http://weex-project.io/cn/references/advanced/extend-to-html5.html",en:"http://weex-project.io/references/advanced/extend-to-html5.html"}},{title:{zh:"ä½¿ç¨ weex-toolkit",en:"Using weex-toolkit"},docLink:{zh:" http://weex-project.io/cn/guide/tools/toolkit.html",en:"http://weex-project.io/guide/tools/toolkit.html"}},{title:{zh:"éæ Devtools å° Android",en:"Integrate Devtool to Android"},docLink:{zh:"http://weex-project.io/cn/references/advanced/integrate-devtool-to-android.html",en:"http://weex-project.io/references/advanced/integrate-devtool-to-android.html"}},{title:{zh:"éæ Devtools å° iOS",en:"Integrate Devtool to iOS"},docLink:{zh:"http://weex-project.io/cn/references/advanced/integrate-devtool-to-ios.html",en:"http://weex-project.io/references/advanced/integrate-devtool-to-ios.html"}},{title:{zh:"ä½¿ç¨ Vuex å vue-router",en:"Using Vuex and vue-router"},docLink:{zh:"http://weex-project.io/cn/references/vue/difference-of-vuex.html",en:"http://weex-project.io/references/vue/difference-of-vuex.html"}},{title:"JS Service",docLink:{zh:"http://weex-project.io/cn/references/js-service/index.html",en:"http://weex-project.io/references/js-service/index.html"}},{title:{zh:"å¦ä½åä ¸ç¤¾åº",en:"How to Contribute"},docLink:{zh:"http://weex-project.io/cn/guide/contributing.html",en:"http://weex-project.io/guide/contributing.html"}},{title:"FAQ",docLink:{zh:"http://weex-project.io/cn/faq.html",en:"http://weex-project.io/faq.html"}}]},s={mainColor:"#f56fc6",poster:"https://gw.alicdn.com/tfs/TB1k6anhMMPMeJjy1XdXXasrXXa-427-190.jpg",posterBg:"#ffa2de",posterStyle:{width:"517px",height:"230px"},title:{zh:"å¦ä¹ CSS",en:"Learn CSS"},copyright:{zh:"æ¥èª MDN (Mozilla Developer Network)",en:"From MDN (Mozilla Developer Network)"},lessons:[{title:{zh:"ä»ä¹æ¯ CSS ï¼",en:"What is CSS ?"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/Guide/CSS/Getting_started/What_is_CSS",en:"https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/What_is_CSS"}},{title:{zh:"CSS è¯æ³",en:"CSS Syntax"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/CSS/Introduction_to_CSS/Syntax",en:"https://developer.mozilla.org/en-US/docs/Learn/CSS/Introducti on_to_CSS/Syntax"}},{title:{zh:"CSSçå¼ååä½",en:"CSS Values and Units"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/CSS/Introduction_to_CSS/Values_and_units",en:"https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Values_and_units"}},{title:{zh:"çæ¨¡å",en:"The Box Model"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/CSS/Introduction_to_CSS/Box_model",en:"https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Box_model"}},{title:{zh:"çæ¨¡åç屿§",en:"Box Model Properties"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/CSS/CSS_Box_Model",en:"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model"}},{title:{zh:"å®ä½å¸å±",en:"Positioning"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/CSS/CSS_layout/%E5%AE%9A%E4%BD%8Dx",en:"https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/positioning"}},{title:{zh:"å®ä½å¸å±ç屿§",en:"CSS Positioning"},docLink:{zh :"https://developer.mozilla.org/zh-CN/docs/Web/CSS/CSS_Positioning",en:"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning"}},{title:{zh:"Flexbox å¸å±",en:"Flexbox Layout"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/CSS/CSS_layout/Flexbox",en:"https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox"}},{title:{zh:"Flexbox å¸å±ç屿§",en:"CSS Flexible Box Layout"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/CSS/CSS_Flexible_Box_Layout",en:"https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout"}},{title:{zh:"Weex ä¸çéç¨æ ·å¼",en:"Common Styles in Weex"},docLink:{zh:"http://weex-project.io/cn/references/common-style.html",en:"http://weex-project.io/references/common-style.html"}},{title:{zh:"Weex ä¸çææ¬æ ·å¼",en:"Text Styles in Weex"},docLink:{zh:"http://weex-project.io/cn/references/text-style.html",en:"http://weex-project.io/references/text-style.html"}},{title:{zh:"åæ ¼å¼åä¸ä¸æ (BFC)",en:"Block Formatting Context"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/Guide/CSS/Block_formatting_context",en:"https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context"}},{title:{zh:"è§è§æ ¼å¼å模å",en:"Visual Formatting Model"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/Guide/CSS/Visual_formatting_model",en:"https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Visual_formatting_model"}},{title:"CSS Reference",docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/CSS/Reference",en:"https://developer.mozilla.org/en-US/docs/Web/CSS/Reference"}}]},l={mainColor:"#F7BD2A",poster:"https://gw.alicdn.com/tfs/TB1bT98hMoQMeJjy0FpXXcTxpXa-1500-700.png",posterBg:"#FAF3EB",posterStyle:{width:"750px",height:"350px"},title:{zh:"å¦ä¹ Javascript",en:"Learn Javascript"},copyright:{zh:"æ¥èª MDN (Mozilla Developer Network)",en:"From MDN (Mozilla Developer Network)"},lessons:[{title:{zh:"ä»ä¹æ¯ Javascript ï¼",en:"What is Javascript ?"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/First_steps/What_is_JavaScript",en:"https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/What_is_JavaScript"}},{title:{zh:"JavaScriptåºç¡",en:"JavaScript basics"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/Getting_started_with_the_web/JavaScript_basics",en:"https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics"}},{title:{zh:"éæ°ä»ç» JavaScript",en:"A re-introduction to JavaScript"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/A_re-introduction_to_JavaScript",en:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript"}},{title:{zh:"è¯æ³åæ°æ®ç±»å",en:"Grammar and types"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Grammar_and_types#Variable_scope",en:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_t ypes#Variable_scope"}},{title:{zh:"æ°æ®ç±»ååæ°æ®ç»æ",en:"Data types and data structures"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Data_structures",en:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures"}},{title:{zh:"åé",en:"Variables"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/First_steps/Variables",en:"https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Variables"}},{title:{zh:"æ°ååæä½ç¬¦",en:"Numbers and operators"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/First_steps/Math",en:"https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Math"}},{title:{zh:"å符串",en:"Handling text"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/First_steps/Strings",en:"https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Strings"}},{title:{zh:"常ç¨ç String æ¹æ³",en:"Useful string methods" },docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/First_steps/Useful_string_methods",en:"https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Useful_string_methods"}},{title:{zh:"æ°ç»",en:"Arrays"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/First_steps/Arrays",en:"https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Arrays"}},{title:{zh:"彿°",en:"Functions"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Functions",en:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions"}},{title:{zh:"JavaScript 对象åºç¡",en:"JavaScript object basics"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/Objects/Basics",en:"https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Basics"}},{title:{zh:"使ç¨å¯¹è±¡",en:"Working with objects"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Working_with_Objec ts",en:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects"}},{title:{zh:"ä½¿ç¨ JSON æ°æ®",en:"Working with JSON"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/Objects/JSON",en:"https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON"}},{title:{zh:"对象模åçç»è",en:"Details of the object model"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Details_of_the_Object_Model",en:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model"}},{title:{zh:"对象åå",en:"Object prototypes"},docLink:{zh:"https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object_prototypes",en:"https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/Objects/Object_prototypes"}},{title:{zh:"JavaScript ä¸çç»§æ¿",en:"Inheritance in JavaScript"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/Objects/Inheritance",en:"https://de veloper.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Inheritance"}},{title:{zh:"ç»§æ¿ä¸ååé¾",en:"Inheritance and the prototype chain"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Inheritance_and_the_prototype_chain",en:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain"}},{title:{zh:"ä¸¥æ ¼æ¨¡å¼",en:"Strict mode"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Strict_mode",en:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode"}},{title:{zh:"å å管ç",en:"Memory Management"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Memory_Management",en:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management"}},{title:{zh:"并忍¡åä¸äºä»¶å¾ªç¯",en:"Concurrency model and Event Loop"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/EventLoop",en:"https://developer.mozilla.org/en-US/docs/We b/JavaScript/EventLoop"}},{title:{zh:"JavaScript æ ååº",en:"Standard built-in objects"},docLink:{zh:"https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects",en:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects"}}]},a={mainColor:"#42b983",poster:"https://gw.alicdn.com/tfs/TB1J_uKcMMPMeJjy1XdXXasrXXa-400-400.png",posterBg:"#E7FBF2",title:{zh:"å¦ä¹ Vue.js",en:"Learn Vue.js"},copyright:{zh:"æ¥èª https://cn.vuejs.org/",en:"From https://vuejs.org/"},lessons:[{title:{zh:"Vue.js æ¯ä»ä¹ï¼",en:"What is Vue.js ?"},docLink:{zh:"https://cn.vuejs.org/v2/guide/index.html",en:"https://vuejs.org/v2/guide/index.html"}},{title:{zh:"åæä»¶ç»ä»¶",en:"Single File Components"},docLink:{zh:"https://cn.vuejs.org/v2/guide/single-file-components.html",en:"https://vuejs.org/v2/guide/single-file-components.html"}},{title:{zh:"模æ¿è¯æ³",en:"Template Syntax"},docLink:{zh:"https://cn.vuejs.org/v2/guide/syntax.html",en:"https://vuejs.org/ v2/guide/syntax.html"}},{title:{zh:"Class ä¸ Style ç»å®",en:"Class and Style Bindings"},docLink:{zh:"https://cn.vuejs.org/v2/guide/class-and-style.html",en:"https://vuejs.org/v2/guide/class-and-style.html"}},{title:{zh:"æ¡ä»¶æ¸²æ",en:"Conditional Rendering"},docLink:{zh:"https://cn.vuejs.org/v2/guide/conditional.html",en:"https://vuejs.org/v2/guide/conditional.html"}},{title:{zh:"å表渲æ",en:"List Rendering"},docLink:{zh:"https://cn.vuejs.org/v2/guide/list.html",en:"https://vuejs.org/v2/guide/list.html"}},{title:{zh:"äºä»¶å¤ç",en:"Event Handling"},docLink:{zh:"https://cn.vuejs.org/v2/guide/events.html",en:"https://vuejs.org/v2/guide/events.html"}},{title:{zh:"表åè¾å ¥ç»å®",en:"Form Input Bindings"},docLink:{zh:"https://cn.vuejs.org/v2/guide/forms.html",en:"https://vuejs.org/v2/guide/forms.html"}},{title:{zh:"Vue å®ä¾",en:"The Vue Instance"},docLink:{zh:"https://cn.vuejs.org/v2/guide/instance.html",en:"https://vuejs.org/v2/guide/instance.html"}},{title:{zh:"å¨ Weex ä¸çå·®å¼",en:"Difference in Weex"},docLink:{zh:"http://weex-project.io/cn/references/vue/difference-with-web.html",en:"http://weex-project.io/references/vue/difference-with-web.html"}},{title:{zh:"æ··åï¼mixinsï¼",en:"Mixins"},docLink:{zh:"https://cn.vuejs.org/v2/guide/mixins.html",en:"https://vuejs.org/v2/guide/mixins.html"}},{title:{zh:"è¿æ»¤å¨ï¼filtersï¼",en:"Filters"},docLink:{zh:"https://cn.vuejs.org/v2/guide/filters.html",en:"https://vuejs.org/v2/guide/filters.html"}},{title:{zh:"æä»¶ï¼pluginsï¼",en:"Plugins"},docLink:{zh:"https://cn.vuejs.org/v2/guide/plugins.html",en:"https://vuejs.org/v2/guide/plugins.html"}},{title:{zh:"èªå®ä¹æä»¤",en:"Custom Directives"},docLink:{zh:"https://cn.vuejs.org/v2/guide/custom-directive.html",en:"https://vuejs.org/v2/guide/custom-directive.html"}},{title:{zh:"ç¶æç®¡ç",en:"State Management"},docLink:{zh:"https://cn.vuejs.org/v2/guide/state-management.html",en:"https://vuejs.org/v2/guide/state-management.html"}},{tit le:{zh:"æ·±å ¥ååºå¼åç",en:"Reactivity in Depth"},docLink:{zh:"https://cn.vuejs.org/v2/guide/reactivity.html",en:"https://vuejs.org/v2/guide/reactivity.html"}},{title:{zh:"渲æå½æ°",en:"Render Functions"},docLink:{zh:"https://cn.vuejs.org/v2/guide/render-function.html",en:"https://vuejs.org/v2/guide/render-function.html"}},{title:{zh:"TypeScript æ¯æ",en:"TypeScript Support"},docLink:{zh:"https://cn.vuejs.org/v2/guide/typescript.html",en:"https://vuejs.org/v2/guide/typescript.html"}},{title:"API",docLink:{zh:"https://cn.vuejs.org/v2/api/",en:"https://vuejs.org/v2/api/"}}]},p={startAt:0,mainColor:"#42b983",poster:"https://gw.alicdn.com/tfs/TB1j0fGdaagSKJjy0FbXXa.mVXa-700-328.png",title:"ä½¿ç¨ Weex å Vue å¼ååçåºç¨",titleFontSize:46,posterStyle:{width:"650px",height:"304px"},copyright:{zh:"æ¥èª SegmentFault",en:"From SegmentFault"},lessons:[{title:"项ç®ä»ç»åæç« ç®å½",docLink:"https://segmentfault.com/a/1190000008342533"},{title:"å¦ä½é ç½®å¼åç ¯å¢",docLink:"https://segmentfault.com/a/1190000008344148"},{title:"ç¼åç¬ç«é¡µé¢",docLink:"https://segmentfault.com/a/1190000008366358"},{title:"ä½¿ç¨ Vue æ¡æ¶çç¹æ§",docLink:"https://segmentfault.com/a/1190000008432907"},{title:"ä½¿ç¨ Weex å¹³å°çåè½",docLink:"https://segmentfault.com/a/1190000008464683"},{title:"ä½¿ç¨ Vuex",docLink:"https://segmentfault.com/a/1190000008520677"},{title:"ä½¿ç¨ vue-router",docLink:"https://segmentfault.com/a/1190000009101411"},{title:"宿´é¡¹ç®ç®å½è¯¦è§£",docLink:"https://segmentfault.com/a/1190000009101907"}]},h=(weex.requireModule("navigator"),weex.requireModule("clipboard")),d=weex.requireModule("storage"),u=weex.requireModule("modal");t.default={data:function(){var e=/.+\/?[\?\&]{1}subject=([\d\w]+)$/i.exec(weex.config.bundleUrl||""),t="weex";e&&(t=e[1]);var n=c;switch(t.toLowerCase()){case"vue":n=a;break;case"javascript":case"js":n=l;break;case"css":n=s;break;case"hackernews":n=p}return(0,i.default)({subject:t,language: "en",startAt:1,titleFontSize:"60px",posterBg:"#F5F5F5",posterStyle:{width:"300px",height:"300px"},mainColor:"#00B4FF"},n)},beforeCreate:function(){var e=this;d.getItem("WEEX_PLAYGROUND_LANGUAGE",function(t){"success"===t.result&&(e.language=t.data)})},methods:{copyLinks:function(){var e=this;u.confirm({message:this.i18n({en:"Copy all article address ?",zh:"å¤å¶æææç« 龿¥ï¼"})},function(t){if("OK"===t){var n=e.i18n(e.title)+"\n\n";n+=e.lessons.map(function(t,n){return n+e.startAt+". "+e.i18n(t.title)+" "+e.i18n(t.docLink)}).join("\n"),n+="\n\n"+e.i18n(e.copyright),h.setString(n),u.toast({message:e.i18n({en:"Article address is copied",zh:"æç« 龿¥å·²å¤å¶"})})}})}}}},function(e,t,n){e.exports={default:n(14),__esModule:!0}},function(e,t,n){n(15),e.exports=n(4).Object.assign},function(e,t,n){var o=n(16);o(o.S+o.F,"Object",{assign:n(26)})},function(e,t,n){var o=n(0),r=n(4),i=n(17),c=n(19),s="prototype",l=function(e,t,n){var a,p,h,d=e&l.F,u=e&l.G,f=e&l.S,v=e&l.P,g=e&l.B,m= e&l.W,z=u?r:r[t]||(r[t]={}),S=z[s],x=u?o:f?o[t]:(o[t]||{})[s];u&&(n=t);for(a in n)(p=!d&&x&&void 0!==x[a])&&a in z||(h=p?x[a]:n[a],z[a]=u&&"function"!=typeof x[a]?n[a]:g&&p?i(h,o):m&&x[a]==h?function(e){var t=function(t,n,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return e.apply(this,arguments)};return t[s]=e[s],t}(h):v&&"function"==typeof h?i(Function.call,h):h,v&&((z.virtual||(z.virtual={}))[a]=h,e&l.R&&S&&!S[a]&&c(S,a,h)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){var o=n(18);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},fu nction(e,t,n){var o=n(20),r=n(25);e.exports=n(2)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(21),r=n(22),i=n(24),c=Object.defineProperty;t.f=n(2)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var o=n(1);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(2)&&!n(3)(function(){return 7!=Object.defineProperty(n(23)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var o=n(1),r=n(0).document,i=o(r)&&o(r.createElement);e.exports=function(e){return i?r.createElement(e):{}}},function(e,t,n){var o=n(1);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e .toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var o=n(27),r=n(38),i=n(39),c=n(40),s=n(6),l=Object.assign;e.exports=!l||n(3)(function(){var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=o})?function(e,t){for(var n=c(e),l=arguments.length,a=1,p=r.f,h=i.f;l>a;)for(var d,u=s(arguments[a++]),f=p?o(u).concat(p(u)):o(u),v=f.length,g=0;v>g;)h.call(u,d=f[g++])&&(n[d]=u[d]);return n}:l},function(e,t,n){var o=n(28),r=n(37);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){var o=n(29),r=n(5),i=n(31)(!1),c=n(34)("IE_PROTO");e.exports=function(e,t){var n,s=r(e),l=0,a=[];for(n in s)n!=c&&o(s,n)&&a.push(n);for(;t.length>l;)o(s,n=t[l++])&&(~i(a,n)||a.push(n));return a}},function(e,t){var n={}.has OwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var o=n(5),r=n(32),i=n(33);e.exports=function(e){return function(t,n,c){var s,l=o(t),a=r(l.length),p=i(c,a);if(e&&n!=n){for(;a>p;)if((s=l[p++])!=s)return!0}else for(;a>p;p++)if((e||p in l)&&l[p]===n)return e||p||0;return!e&&-1}}},function(e,t,n){var o=n(8),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t,n){var o=n(8),r=Math.max,i=Math.min;e.exports=function(e,t){return(e=o(e))<0?r(e+t,0):i(e,t)}},function(e,t,n){var o=n(35)("keys"),r=n(36);e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t,n){var o=n(0),r=o["__core-js_shared__"]||(o["__core-js_shared__"]={});e.exports=function(e){return r[e]||(r[e]={})}},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},function(e,t){e.exports="constructor,hasOwnPropert y,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var o=n(7);e.exports=function(e){return Object(o(e))}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("list",{staticClass:["wrapper"]},[n("cell",{appendAsTree:!0,attrs:{append:"tree"},on:{longpress:e.copyLinks}},[n("div",{staticClass:["banner","center"],style:{backgroundColor:e.posterBg}},[n("image",{staticClass:["poster"],style:e.posterStyle,attrs:{resize:"cover",src:e.poster}})])]),n("cell",{staticClass:["center"],appendAsTree:!0,attrs:{append:"tree"},on:{longpress:e.copyLinks}},[n("text",{staticClass:["title"],style:{fontSize:e.titleFontSize}},[e._v(e._s(e.i18n(e.title)))])]),e._l(e.lessons,function(t,o){return n("cell",{key:o,staticClass:["center"],appendAsTree:!0,attrs:{append:"tree"}},[n("div",{class:["lesson","lesson-"+e.language],on:{click :function(n){e.jumpTo(t.docLink)}}},[n("text",{class:["lesson-index","lesson-index-"+e.language]},[e._v(e._s(e.startAt+o)+".")]),n("text",{class:["lesson-title","lesson-title-"+e.language],style:{color:e.mainColor}},[e._v(e._s(e.i18n(t.title)))])])])}),n("cell",{staticClass:["footer","center"],appendAsTree:!0,attrs:{append:"tree"}},[n("text",{staticClass:["copyright"]},[e._v(e._s(e.i18n(e.copyright)))])])],2)},staticRenderFns:[]},e.exports.render._withStripped=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLink=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];for(var o in t)"string"==typeof t[o]&&n.push(o+"="+t[o]);if("Web"===WXEnvironment.platform)return n.unshift("page="+e+".web.js"),"/?"+n.join("&");return""+function(){var e=weex.config.bundleUrl,t=e.indexOf("your_current_IP")>=0||e.indexOf("file://assets/")>=0,n=e.indexOf("file:///")>=0&&e.indexOf("WeexDemo.app")>0;if(t)return"file://assets/";if(n)return e.substring(0,e.lastIndexOf("/")+1);return""}()+e+".weex.js"+(n.length?"?"+n.join("&"):"")},t.createURL=c,t.i18n=s,t.setLanguage=function(e){r.setItem("WEEX_PLAYGROUND_LANGUAGE",e||"en")},t.getLanguage=l,t.jumpTo=function(e){var t={en:"06f6a4f7a03ceffc93ec09ddaebb0a51",zh:"fa7d084ea1dc617e1c4e03ecd65263db"},n=function(n){r.setItem("CURRENT_DOCUMENT_URL",s(e,n)),i.push({url:c(s(t,n))})};l(function(e){return n(e)},function(e){return n("en")})},t.viewSource=function(e){var t={en:"032afafed7947de7d5123a45b3ca9704",zh:"785cf2804ac6a6dd807a0c988b5729cd"},n=function(n){r.setItem("CURRENT_SOURCE_HASH",s(e,n)),i.push({url:c(s(t,n))})};l(function(e){return n(e)},function(e){return n("en")})},t.fetchData=a,t.fetchDoodle=function(e,t){a("doodle",e,t)},t.fetchExamples=function(e,t){a("examples",e,t)},t.fetchNews=function(e,t){a("news",e,t)};var o=weex.requireModule("stream"),r=weex.requireModule("storage"),i=weex.requireModule("navigator");function c(e){if("Web"===WXEnvironment.platform)return"h ttp://dotwe.org/raw/htmlVue/"+e;var t="http://dotwe.org/raw/dist/"+e+".bundle.wx";return t+"?_wx_tpl="+t}function s(e,t){return"string"==typeof e?e:"[object Object]"===Object.prototype.toString.call(e)?e[this&&this.language||t||"en"]:void 0}function l(e,t){try{r.getItem("WEEX_PLAYGROUND_LANGUAGE",function(n){"success"===n.result&&"function"==typeof e?e(n.data):"function"==typeof t&&t(n)})}catch(e){"function"==typeof t&&t(e)}}function a(e,t,n){try{o.fetch({url:"http://dotwe.org/query/weex-playground-app",method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},type:"json",body:"name="+e},function(e){e.ok&&e.data&&"function"==typeof t?t(e.data):"function"==typeof n&&n(e)})}catch(e){"function"==typeof n&&n(e)}}}]); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3f3c8091/ios/playground/bundlejs/news.weex.js ---------------------------------------------------------------------- diff --git a/ios/playground/bundlejs/news.weex.js b/ios/playground/bundlejs/news.weex.js new file mode 100644 index 0000000..9ffb909 --- /dev/null +++ b/ios/playground/bundlejs/news.weex.js @@ -0,0 +1,4 @@ +// { "framework": "Vue" } +"use weex:vue"; + +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=37)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(3),o=n(11);t.exports=n(4)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(9),o=n(29),i=n(16),u=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)tr y{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(52),o=n(14);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(20)("wks"),o=n(12),i=n(0).Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(7);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.expo rts=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!0},function(t,e,n){var r=n(7);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports={}},function(t,e,n){var r=n(33),o=n(21);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(20)("keys"),o=n(12);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(0),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e ){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(3).f,o=n(1),i=n(6)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){e.f=n(6)},function(t,e,n){var r=n(0),o=n(8),i=n(15),u=n(23),a=n(3).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:u.f(t)})}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fetchNews=e.fetchDoodle=e.readAbout=e.saveAbout=e.fetchAbout=e.readGuide=e.saveGuide=e.fetchGuide=e.readExamples=e.saveExamples=e.fetchExamples=void 0;var r=i(n(41)),o=i(n(43));function i(t){return t&&t.__esModule?t:{default:t}}e.createLink=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];for(var r in e)"string"==typeof e[r]&&n.push(f(r)+"="+f(e[r]));if("Web"===WXEnviron ment.platform)return n.unshift("page="+t+".web.js"),"/?"+n.join("&");return""+function(){var t=weex.config.bundleUrl,e=t.indexOf("your_current_IP")>=0||t.indexOf("file://assets/")>=0,n=t.indexOf("file:///")>=0&&t.indexOf("WeexDemo.app")>0;if(e)return"file://assets/";if(n)return t.substring(0,t.lastIndexOf("/")+1);return""}()+t+".weex.js"+(n.length?"?"+n.join("&"):"")},e.createURL=s,e.i18n=l,e.parseLanguage=d,e.setLanguage=function(t){var e=d(t);e&&a.setItem("WEEX_PLAYGROUND_LANGUAGE",e)},e.clearStorageLanguage=function(){a.removeItem("WEEX_PLAYGROUND_LANGUAGE")},e.getStorageLanguage=v,e.getSystemLanguage=g,e.getLanguage=h,e.jumpTo=function(t,e){h(function(n){a.setItem("CURRENT_DOCUMENT_URL",l(t,n)),c.push({url:s("bf0305c14b511b24a4e616f53926432b",{language:n,title:l(e,n)})})})},e.viewSource=function(t){h(function(e){c.push({url:s("f6ce29faf686eabc38b410bf4828fa5a",{hash:t,language:e})})})},e.setTitleBar=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";if ("[object Object]"!==Object.prototype.toString.apply(t))return;var n=weex.requireModule("titleBar");if(t.color||t.backgroundColor)try{n.setStyle({foregroundColor:t.color||"#FFFFFF",backgroundColor:t.backgroundColor||"#00B4FF"})}catch(t){}var r=l(t.title,e);if(r)try{n.setTitle(r)}catch(t){}},e.fetchData=b,e.saveData=x,e.readData=_;var u=weex.requireModule("stream"),a=weex.requireModule("storage"),c=weex.requireModule("navigator"),f="function"==typeof encodeURIComponent?encodeURIComponent:"function"==typeof encodeURI?encodeURI:function(t){return t};function s(t,e){if("Web"===WXEnvironment.platform)return"http://dotwe.org/raw/htmlVue/"+t;var n="http://dotwe.org/raw/dist/"+t+".bundle.wx",r=function(t){if(!t||"object"!==(void 0===t?"undefined":(0,o.default)(t)))return"";var e=[];for(var n in t)"string"==typeof t[n]&&e.push(f(n)+"="+f(t[n]));return e.join("&")}(e);return"TB"===WXEnvironment.appName?n+"?_wx_tpl="+n+"&"+r:"WXSample"===WXEnvironment.appName?n+"?"+r:n+"?wx_weex=true&"+r}funct ion l(t,e){return"string"==typeof t?t:"[object Object]"===Object.prototype.toString.call(t)?t[this&&this.language||e||"en"]:void 0}var p=/(en|zh)\_?\w*/i;function d(t){var e=p.exec(t+"");return e&&e[1]?e[1]:""}function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if("function"!==!(void 0===t||(0,o.default)(t)))try{a.getItem("WEEX_PLAYGROUND_LANGUAGE",function(n){if("success"===n.result){var r=d(n.data);r?t(r):e()}else e(n)})}catch(t){e(t)}}function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if("function"!==!(void 0===t||(0,o.default)(t)))if("web"===WXEnvironment.platform.toLowerCase()){var n=d(window.navigator.language);n?t(n):e()}else try{var r=weex.requireModule("locale")||weex.requireModule("local"),i=!1,u=d(r.getLanguage(function(n){var r=d(n);r?i||t(r):e()}));u?(i=!0,t(u)):e()}catch(t){e(t)}}var y=/.+[\?\&]{1}language=([\d\w]+)[\?\&]?.*/i;function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[ 0]:function(){},e=y.exec(weex.config.bundleUrl||""),n=d(e&&e[1]);n?t(n):v(t,function(){g(t,function(){t("en")})})}var m={doodle:"WEEX_PLAYGROUND_APP_DOODLE",guide:"WEEX_PLAYGROUND_APP_GUIDE",examples:"WEEX_PLAYGROUND_APP_EXAMPLES",news:"WEEX_PLAYGROUND_APP_NEWS",about:"WEEX_PLAYGROUND_APP_ABOUT"};function b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};try{u.fetch({url:"http://dotwe.org/query/weex-playground-app",method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},type:"json",body:"name="+t},function(t){t.ok&&t.data&&t.data.success?e(t.data):n(t)})}catch(t){n(t)}}function x(t,e){var n=m[t];n&&e&&"object"===(void 0===e?"undefined":(0,o.default)(e))&&(e.timestamp=Date.now(),a.setItem(n,(0,r.default)(e)))}function _(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=m [t];if(!r)return n();try{a.getItem(r,function(r){if("success"===r.result){var o=JSON.parse(r.data);if(o&&Array.isArray(o[t]))return e(o[t])}n(r)})}catch(t){n(t)}}e.fetchExamples=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.apply(void 0,["examples"].concat(e))},e.saveExamples=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return x.apply(void 0,["examples"].concat(e))},e.readExamples=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return _.apply(void 0,["examples"].concat(e))},e.fetchGuide=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.apply(void 0,["guide"].concat(e))},e.saveGuide=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return x.apply(void 0,["guide"].concat(e))},e.readGuide=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return _.apply(void 0,["guide"].concat(e))},e.fet chAbout=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.apply(void 0,["about"].concat(e))},e.saveAbout=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return x.apply(void 0,["about"].concat(e))},e.readAbout=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return _.apply(void 0,["about"].concat(e))},e.fetchDoodle=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.apply(void 0,["doodle"].concat(e))},e.fetchNews=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.apply(void 0,["news"].concat(e))}},function(t,e,n){"use strict";var r=n(15),o=n(28),i=n(31),u=n(2),a=n(1),c=n(17),f=n(50),s=n(22),l=n(57),p=n(6)("iterator"),d=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,e,n,g,y,h,m){f(n,e,g);var b,x,_,w=function(t){if(!d&&t in L)return L[t];switch(t){case"keys":case"values":return function( ){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",S="values"==y,E=!1,L=t.prototype,j=L[p]||L["@@iterator"]||y&&L[y],A=!d&&j||w(y),P=y?S?w("entries"):A:void 0,C="Array"==e?L.entries||j:j;if(C&&(_=l(C.call(new t)))!==Object.prototype&&_.next&&(s(_,O,!0),r||a(_,p)||u(_,p,v)),S&&j&&"values"!==j.name&&(E=!0,A=function(){return j.call(this)}),r&&!m||!d&&!E&&L[p]||u(L,p,A),c[e]=A,c[O]=v,y)if(b={values:S?A:w("values"),keys:h?A:w("keys"),entries:P},m)for(x in b)x in L||i(L,x,b[x]);else o(o.P+o.F*(d||E),e,b);return b}},function(t,e,n){var r=n(0),o=n(8),i=n(48),u=n(2),a="prototype",c=function(t,e,n){var f,s,l,p=t&c.F,d=t&c.G,v=t&c.S,g=t&c.P,y=t&c.B,h=t&c.W,m=d?o:o[e]||(o[e]={}),b=m[a],x=d?r:v?r[e]:(r[e]||{})[a];d&&(n=e);for(f in n)(s=!p&&x&&void 0!==x[f])&&f in m||(l=s?x[f]:n[f],m[f]=d&&"function"!=typeof x[f]?n[f]:y&&s?i(l,r):h&&x[f]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);cas e 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[a]=t[a],e}(l):g&&"function"==typeof l?i(Function.call,l):l,g&&((m.virtual||(m.virtual={}))[f]=l,t&c.R&&b&&!b[f]&&u(b,f,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){t.exports=!n(4)&&!n(10)(function(){return 7!=Object.defineProperty(n(30)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(7),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){t.exports=n(2)},function(t,e,n){var r=n(9),o=n(51),i=n(21),u=n(19)("IE_PROTO"),a=function(){},c=function(){var t,e=n(30)("iframe"),r=i.length;for(e.style.display="none",n(56).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype =null,n[u]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(1),o=n(5),i=n(53)(!1),u=n(19)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),c=0,f=[];for(n in a)n!=u&&r(a,n)&&f.push(n);for(;e.length>c;)r(a,n=e[c++])&&(~i(f,n)||f.push(n));return f}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(33),o=n(21).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=i(n(38)),o=i(n(75));function i(t){return t&&t.__esModule?t:{default:t}}Vue.mixin(o.default),r.default.el="#root",new Vue(r.default)},function(t,e,n){var r,o,i=[];i.push(n(39)),r=n(40);var u=n(74);if(o=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(Object.keys(r).some(function(t){return"default"!==t&&"__esModule"!==t})&&console.error("named exports are not supported in *.vue files."),o=r=r.default),"function"==typeof o&&(o=o.opt ions),o.__file="/Users/Hanks/Codes/work/weex-vue-examples/src/pages/News.vue",o.render=u.render,o.staticRenderFns=u.staticRenderFns,o._scopeId="data-v-a2748412",o.style=o.style||{},i.forEach(function(t){for(var e in t)o.style[e]=t[e]}),"object"==typeof weex&&weex&&weex.document)try{weex.document.registerStyleSheets(o._scopeId,i)}catch(t){}t.exports=r},function(t,e){t.exports={list:{backgroundColor:"#F1F1F1"},cell:{alignItems:"center"},"message-time":{marginTop:"25",justifyContent:"center"},"time-text":{paddingTop:"5",paddingBottom:"5",paddingLeft:"18",paddingRight:"18",backgroundColor:"rgba(0,0,0,0.1)",fontSize:"25",borderRadius:"8",color:"#FEFEFE"},"message-box":{borderWidth:"1",borderColor:"#DDDDDD",borderRadius:"15",backgroundColor:"#FFFFFF",marginTop:"25",marginBottom:"35","backgroundColor:active":"#F8F8F8"},"related-article":{borderTopWidth:"1",borderTopColor:"#E6E6E6",flexDirection:"row",alignItems:"center",paddingTop:"10",paddingBottom:"15",paddingLeft:"30",paddingRight:"20", backgroundColor:"#FEFEFE"},poster:{width:"680",height:"340",backgroundColor:"#D2D2D2"},title:{width:"680",paddingTop:"30",paddingRight:"30",paddingBottom:"30",paddingLeft:"30",fontSize:"38",color:"#323232"},shortcut:{width:"80",height:"80"},subtitle:{width:"550",paddingRight:"25",fontSize:"34",color:"#454545"},summary:{width:"680",marginTop:"-20",paddingLeft:"30",paddingRight:"30",paddingBottom:"30",fontSize:"28",color:"#929292",lines:3}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(26);e.default={data:function(){return{navigationBarOptions:{title:{zh:"èµè®¯",en:"News"}},visibleCount:8,news:[]}},computed:{visibleNews:function(){return this.news.slice(0,this.visibleCount)}},beforeCreate:function(){var t=this;(0,r.fetchNews)(function(e){Array.isArray(e.news)&&(t.news=e.news)})}}},function(t,e,n){t.exports={default:n(42),__esModule:!0}},function(t,e,n){var r=n(8),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stri ngify.apply(o,arguments)}},function(t,e,n){"use strict";e.__esModule=!0;var r=u(n(44)),o=u(n(63)),i="function"==typeof o.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":typeof t};function u(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof o.default&&"symbol"===i(r.default)?function(t){return void 0===t?"undefined":i(t)}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default&&t!==o.default.prototype?"symbol":void 0===t?"undefined":i(t)}},function(t,e,n){t.exports={default:n(45),__esModule:!0}},function(t,e,n){n(46),n(59),t.exports=n(23).f("iterator")},function(t,e,n){"use strict";var r=n(47)(!0);n(27)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(13),o=n (14);t.exports=function(t){return function(e,n){var i,u,a=String(o(e)),c=r(n),f=a.length;return c<0||c>=f?t?"":void 0:(i=a.charCodeAt(c))<55296||i>56319||c+1===f||(u=a.charCodeAt(c+1))<56320||u>57343?t?a.charAt(c):i:t?a.slice(c,c+2):u-56320+(i-55296<<10)+65536}}},function(t,e,n){var r=n(49);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=n(32),o=n(11),i=n(22),u={};n(2)(u,n(6)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(u,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(3),o=n(9),i=n(18);t.exports=n(4)?Object.defineProperties:function(t,e){o(t);for(var n,u=i(e),a=u.length,c=0;a>c;)r.f( t,n=u[c++],e[n]);return t}},function(t,e,n){var r=n(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(5),o=n(54),i=n(55);t.exports=function(t){return function(e,n,u){var a,c=r(e),f=o(c.length),s=i(u,f);if(t&&n!=n){for(;f>s;)if((a=c[s++])!=a)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===n)return t||s||0;return!t&&-1}}},function(t,e,n){var r=n(13),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(13),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(1),o=n(58),i=n(19)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(14);t.exports=function(t ){return Object(r(t))}},function(t,e,n){n(60);for(var r=n(0),o=n(2),i=n(17),u=n(6)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<a.length;c++){var f=a[c],s=r[f],l=s&&s.prototype;l&&!l[u]&&o(l,u,f),i[f]=i.Array}},function(t,e,n){"use strict";var r=n(61),o=n(62),i=n(17),u=n(5);t.exports=n(27)(Array,"Array",function(t,e){this._t=u(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){ t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports={default:n(64),__esModule:!0}},function(t,e,n){n(65),n(71),n(72),n(73),t.exports=n(8).Symbol},function(t,e,n){"use strict";var r=n(0),o=n(1),i=n(4),u=n(28),a=n(31),c=n(66).KEY,f=n(10),s=n(20),l=n(22),p=n(12),d=n(6),v=n(23),g=n(24),y=n(67),h=n(68),m=n(9),b=n(7),x=n(5),_=n(16),w=n(11),O=n(32),S=n(69),E=n(70),L=n(3),j=n(18),A=E.f,P=L.f,C=S.f,T=r.Symbol,D=r.JSON,N=D&&D.stringify,F="prototype",M=d("_hidden"),R=d("toPrimitive"),k={}.propertyIsEnumerable,U=s("symbol-registry"),I=s("symbols"),G=s("op-symbols"),W=Object[F],B="function"==typeof T,X=r.QObject,z=!X||!X[F]||!X[F].findChild,V=i&&f(function(){return 7!=O(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=A(W,e);r&&delete W[e],P(t,e,n),r&&t!==W&&P(W,e,r)}:P,Y=function(t){var e=I[t]=O(T[F]);return e._k=t,e},q=B&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function (t){return t instanceof T},J=function(t,e,n){return t===W&&J(G,e,n),m(t),e=_(e,!0),m(n),o(I,e)?(n.enumerable?(o(t,M)&&t[M][e]&&(t[M][e]=!1),n=O(n,{enumerable:w(0,!1)})):(o(t,M)||P(t,M,w(1,{})),t[M][e]=!0),V(t,e,n)):P(t,e,n)},H=function(t,e){m(t);for(var n,r=y(e=x(e)),o=0,i=r.length;i>o;)J(t,n=r[o++],e[n]);return t},K=function(t){var e=k.call(this,t=_(t,!0));return!(this===W&&o(I,t)&&!o(G,t))&&(!(e||!o(this,t)||!o(I,t)||o(this,M)&&this[M][t])||e)},Q=function(t,e){if(t=x(t),e=_(e,!0),t!==W||!o(I,e)||o(G,e)){var n=A(t,e);return!n||!o(I,e)||o(t,M)&&t[M][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=C(x(t)),r=[],i=0;n.length>i;)o(I,e=n[i++])||e==M||e==c||r.push(e);return r},Z=function(t){for(var e,n=t===W,r=C(n?G:x(t)),i=[],u=0;r.length>u;)!o(I,e=r[u++])||n&&!o(W,e)||i.push(I[e]);return i};B||(a((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===W&&e.call(G,n),o(this,M)&&o(this[M],t )&&(this[M][t]=!1),V(this,t,w(1,n))};return i&&z&&V(W,t,{configurable:!0,set:e}),Y(t)})[F],"toString",function(){return this._k}),E.f=Q,L.f=J,n(36).f=S.f=$,n(25).f=K,n(35).f=Z,i&&!n(15)&&a(W,"propertyIsEnumerable",K,!0),v.f=function(t){return Y(d(t))}),u(u.G+u.W+u.F*!B,{Symbol:T});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)d(tt[et++]);for(var nt=j(d.store),rt=0;nt.length>rt;)g(nt[rt++]);u(u.S+u.F*!B,"Symbol",{for:function(t){return o(U,t+="")?U[t]:U[t]=T(t)},keyFor:function(t){if(!q(t))throw TypeError(t+" is not a symbol!");for(var e in U)if(U[e]===t)return e},useSetter:function(){z=!0},useSimple:function(){z=!1}}),u(u.S+u.F*!B,"Object",{create:function(t,e){return void 0===e?O(t):H(O(t),e)},defineProperty:J,defineProperties:H,getOwnPropertyDescriptor:Q,getOwnPropertyNames:$,getOwnPropertySymbols:Z}),D&&u(u.S+u.F*(!B||f(function(){var t=T();return"[null]"!=N([t])||"{}"!=N({ a:t})||"{}"!=N(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(b(e)||void 0!==t)&&!q(t))return h(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!q(e))return e}),r[1]=e,N.apply(D,r)}}),T[F][R]||n(2)(T[F],R,T[F].valueOf),l(T,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){var r=n(12)("meta"),o=n(7),i=n(1),u=n(3).f,a=0,c=Object.isExtensible||function(){return!0},f=!n(10)(function(){return c(Object.preventExtensions({}))}),s=function(t){u(t,r,{value:{i:"O"+ ++a,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";s(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;s(t)}return t[r].w},onFreeze:function(t){return f&&l.NEED&&c(t)&&!i(t,r)&&s(t),t}}},function(t,e,n){var r=n(18),o=n(35),i=n(25);t.exports=function(t){var e=r(t),n=o. f;if(n)for(var u,a=n(t),c=i.f,f=0;a.length>f;)c.call(t,u=a[f++])&&e.push(u);return e}},function(t,e,n){var r=n(34);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(5),o=n(36).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return u.slice()}}(t):o(r(t))}},function(t,e,n){var r=n(25),o=n(11),i=n(5),u=n(16),a=n(1),c=n(29),f=Object.getOwnPropertyDescriptor;e.f=n(4)?f:function(t,e){if(t=i(t),e=u(e,!0),c)try{return f(t,e)}catch(t){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e){},function(t,e,n){n(24)("asyncIterator")},function(t,e,n){n(24)("observable")},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("list",{staticClass:["list"]},t._l(t.visibleNews,function(e,r){return n("cell",{key:r,staticClass:["cell"],appendAsTree:!0,attrs:{ap pend:"tree"}},[e.time?n("div",{staticClass:["message-time"]},[n("text",{staticClass:["time-text"]},[t._v(t._s(t.i18n(e.time)))])]):t._e(),"article"===e.type?n("div",{staticClass:["message-box"]},[n("div",{staticClass:["article"],on:{click:function(n){t.jumpTo(e.link)}}},[n("image",{staticClass:["poster"],attrs:{resize:"cover",src:e.poster}}),n("text",{staticClass:["title"]},[t._v(t._s(e.title))]),e.summary?n("text",{staticClass:["summary"],attrs:{lines:3}},[t._v(t._s(e.summary))]):t._e(),n("div",{staticClass:["related"]},t._l(e.related,function(e){return n("div",{key:e.title,staticClass:["related-article"],on:{click:function(n){t.jumpTo(e.link)}}},[n("text",{staticClass:["subtitle"]},[t._v(t._s(e.title))]),n("image",{staticClass:["shortcut"],attrs:{resize:"cover",src:e.poster}})])}))])]):t._e()])}))},staticRenderFns:[]},t.exports.render._withStripped=!0},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){if(t&&t.__esModule)return t;var e= {};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(26));var o=weex.requireModule("storage");e.default={filters:{i18n:r.i18n,url:r.createURL,link:r.createLink},methods:{createLink:r.createLink,createURL:r.createURL,i18n:r.i18n,getLanguage:r.getLanguage,fetchData:r.fetchData,saveData:r.saveData,readData:r.readData,jumpTo:r.jumpTo},created:function(){var t=this;r.getLanguage(function(e){t.language=e,r.setTitleBar(t.navigationBarOptions,e)}),new BroadcastChannel("language").onmessage=function(e){e.data&&e.data.language&&(t.language=e.data.language)}},beforeDestroy:function(){o.removeItem("CURRENT_DOCUMENT_URL"),o.removeItem("CURRENT_SOURCE_HASH")}}}]); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3f3c8091/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m index 3bcf46f..5cdfd3d 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m @@ -206,6 +206,23 @@ do {\ }\ } while(0); +#define WX_STYLE_FILL_TEXT_WITH_DEFAULT_VALUE(key, prop, type, defaultValue,needLayout)\ +do {\ + id value = styles[@#key];\ + if (value) {\ + if([WXUtility isBlankString:value]){\ + _##prop = defaultValue;\ + }else {\ + _##prop = [WXConvert type:value];\ + }\ + [self setNeedsRepaint];\ + if (needLayout) {\ + [self setNeedsLayout];\ + }\ + }\ +} while(0); + + #define WX_STYLE_FILL_TEXT_PIXEL(key, prop, needLayout)\ do {\ id value = styles[@#key];\ @@ -220,7 +237,7 @@ do {\ - (void)fillCSSStyles:(NSDictionary *)styles { - WX_STYLE_FILL_TEXT(color, color, UIColor, NO) + WX_STYLE_FILL_TEXT_WITH_DEFAULT_VALUE(color, color, UIColor, [UIColor blackColor], NO) WX_STYLE_FILL_TEXT(fontFamily, fontFamily, NSString, YES) WX_STYLE_FILL_TEXT_PIXEL(fontSize, fontSize, YES) WX_STYLE_FILL_TEXT(fontWeight, fontWeight, WXTextWeight, YES) @@ -623,8 +640,11 @@ do {\ - (void)_updateStylesOnComponentThread:(NSDictionary *)styles resetStyles:(NSMutableArray *)resetStyles isUpdateStyles:(BOOL)isUpdateStyles { [super _updateStylesOnComponentThread:styles resetStyles:(NSMutableArray *)resetStyles isUpdateStyles:isUpdateStyles]; - - [self fillCSSStyles:styles]; + NSMutableDictionary * newStyles = [styles mutableCopy]; + for (NSString * key in [resetStyles copy]) { + [newStyles setObject:@"" forKey:key]; + } + [self fillCSSStyles:newStyles]; [self syncTextStorageForView]; } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3f3c8091/ios/sdk/WeexSDK/Sources/Module/WXLocaleModule.m ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Module/WXLocaleModule.m b/ios/sdk/WeexSDK/Sources/Module/WXLocaleModule.m index c993ddc..182fc5b 100644 --- a/ios/sdk/WeexSDK/Sources/Module/WXLocaleModule.m +++ b/ios/sdk/WeexSDK/Sources/Module/WXLocaleModule.m @@ -27,7 +27,10 @@ WX_EXPORT_METHOD_SYNC(@selector(getLanguages)) /** Get preferred language of the user */ -- (NSString *)getLanguage { +- (NSString *)getLanguage:(WXCallback)callback { + if (callback) { + callback([NSLocale preferredLanguages][0]); + } return [NSLocale preferredLanguages][0]; }
