app模板、应用模板、组件模板、widget模板
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1 lines
2.5 KiB

(window["webpackJsonp_TIS_PLATFORM"]=window["webpackJsonp_TIS_PLATFORM"]||[]).push([["SearchBox"],{"466d":function(t,n,e){"use strict";var i=e("d784"),s=e("825a"),r=e("50c4"),a=e("1d80"),c=e("8aa5"),l=e("14c3");i("match",1,(function(t,n,e){return[function(n){var e=a(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,e):new RegExp(n)[t](String(e))},function(t){var i=e(n,t,this);if(i.done)return i.value;var a=s(t),o=String(this);if(!a.global)return l(a,o);var u=a.unicode;a.lastIndex=0;var p,f=[],d=0;while(null!==(p=l(a,o))){var h=String(p[0]);f[d]=h,""===h&&(a.lastIndex=c(o,r(a.lastIndex),u)),d++}return 0===d?null:f}]}))},"7f01":function(t,n,e){},"8a8c":function(t,n,e){"use strict";e("7f01")},e52f:function(t,n,e){"use strict";e.r(n);var i=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"search-box"},[e("input",{staticClass:"input",attrs:{placeholder:"请输入要查找的内容"},on:{input:t.searchApp}}),e("div",{staticClass:"content"},[e("div",{staticClass:"header"},[t._v("常用")]),t._l(t.mostOpenApps,(function(n){return e("div",{key:n.id,staticClass:"item",on:{click:function(e){return t.onOpenApp(n)}}},[t._v(" "+t._s(n.name)+" ")])})),e("div",{staticClass:"header"},[t._v("应用")]),t._l(t.apps,(function(n,i){return e("div",{key:i,staticClass:"item",on:{click:function(e){return t.onOpenApp(n)}}},[t._v(" "+t._s(n.name)+" ")])}))],2)])},s=[],r=(e("4de4"),e("fb6a"),e("b0c0"),e("4d63"),e("ac1f"),e("25f0"),e("466d"),e("2909")),a={name:"SearchBox",data:function(){return{filterHandle:-1,target:"",isShow:!0}},computed:{allApps:function(){var t=this;return this.$tis.getApps().filter((function(n){return!n.default&&n.name.match(t.target)}))},recentOpenApps:function(){return Object(r["a"])(this.allApps).filter((function(t){return t.lastOpenTime>0})).sort((function(t,n){return n.lastOpenTime-t.lastOpenTime})).slice(0,5)},mostOpenApps:function(){return Object(r["a"])(this.allApps).filter((function(t){return t.openTimes>0})).sort((function(t,n){return n.openTimes-t.openTimes})).slice(0,5)},apps:function(){return this.allApps}},methods:{handleClose:function(){this.$tis.toggleSearchBox()},searchApp:function(t){var n=this,e=t.target.value;this.filterHandle&&(clearTimeout(this.filterHandle),this.filterHandle=null),this.filterHandle=setTimeout((function(){n.target=new RegExp(e)}),1e3)},onOpenApp:function(t){this.$tis.openApp(t.id),this.$tis.toggleSearchBox()}}},c=a,l=(e("8a8c"),e("2877")),o=Object(l["a"])(c,i,s,!1,null,"32f986e6",null);n["default"]=o.exports}}]);