INFO
This commit is contained in:
unpackage/dist/build/mp-weixin/uni_modules/uni-media-library/components/image-library-panel/index.js
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uni_modules/uni-media-library/components/image-library-panel/index"],{"56c2":function(e,t,n){"use strict";n.r(t);var i=n("aec0"),a=n("c5cf");for(var r in a)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(r);n("efbd");var u=n("828b"),o=Object(u["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);t["default"]=o.exports},9573:function(e,t,n){},aec0:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i}));var i={uniEasyinput:function(){return n.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(n.bind(null,"1986"))},uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,"4821"))}},a=function(){var e=this.$createElement,t=(this._self._c,this.loading&&1===this.page?null:this.list.length);this.$mp.data=Object.assign({},{$root:{g0:t}})},r=[]},c5cf:function(e,t,n){"use strict";n.r(t);var i=n("fd8d"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);t["default"]=a.a},efbd:function(e,t,n){"use strict";var i=n("9573"),a=n.n(i);a.a},fd8d:function(e,t,n){"use strict";(function(e,i){var a=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n("7eb4")),u=a(n("af34")),o=a(n("ee10")),s=e.importObject("uni-media-library-co",{customUI:!0}),c={name:"image-library-panel",emits:["onCopyToMediaLibrary"],expose:[],props:{provider:String},data:function(){return{keyword:"",loading:!1,page:1,pageSize:30,list:[]}},watch:{page:function(){this.loadList()}},computed:{selectedCount:function(){return this.selectedImages.length},selectedImages:function(){return this.list.filter((function(e){return e.selected}))}},methods:{search:function(){this.loading||(1===this.page?this.loadList():this.page=1)},loadList:function(){var e=this;return(0,o.default)(r.default.mark((function t(){var n;return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.keyword&&!e.loading){t.next=2;break}return t.abrupt("return");case 2:return e.loading=!0,t.prev=3,t.next=6,s.searchImageLibrary({keyword:e.keyword,page:e.page,pageSize:e.pageSize,provider:e.provider});case 6:n=t.sent,t.next=12;break;case 9:return t.prev=9,t.t0=t["catch"](3),t.abrupt("return",i.showToast({title:t.t0.errMsg||t.t0.message,icon:"none"}));case 12:return t.prev=12,e.loading=!1,t.finish(12);case 15:1===e.page?e.list=n.data:e.list=[].concat((0,u.default)(e.list),(0,u.default)(n.data));case 16:case"end":return t.stop()}}),t,null,[[3,9,12,15]])})))()},loadMore:function(){this.loading||(this.page+=1)},onSelect:function(e){if(!this.loading){var t=this.list[e];this.$set(t,"selected",!t.selected)}}}};t.default=c}).call(this,n("861b")["uniCloud"],n("df3c")["default"])}}]);
|
||||
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||||
'uni_modules/uni-media-library/components/image-library-panel/index-create-component',
|
||||
{
|
||||
'uni_modules/uni-media-library/components/image-library-panel/index-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('df3c')['createComponent'](__webpack_require__("56c2"))
|
||||
})
|
||||
},
|
||||
[['uni_modules/uni-media-library/components/image-library-panel/index-create-component']]
|
||||
]);
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"uni-easyinput": "/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput",
|
||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
},
|
||||
"component": true
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<view class="wrap"><view class="media-filter-warp"><view class="filter-options"><button type="primary" size="mini" disabled="{{selectedCount<=0}}" data-event-opts="{{[['tap',[['$emit',['onCopyToMediaLibrary','$0'],['selectedImages']]]]]}}" bindtap="__e"><text>复制到媒体库</text></button><view class="split _div"></view><uni-easyinput class="search-input" vue-id="7e34a206-1" suffixIcon="search" placeholder="搜索图片素材" value="{{keyword}}" data-event-opts="{{[['^iconClick',[['search']]],['^blur',[['search']]],['^input',[['__set_model',['','keyword','$event',[]]]]]]}}" bind:iconClick="__e" bind:blur="__e" bind:input="__e" bind:__l="__l"></uni-easyinput></view></view><scroll-view class="media-view" scroll-y="{{true}}" data-event-opts="{{[['scrolltolower',[['loadMore',['$event']]]]]}}" bindscrolltolower="__e"><block wx:if="{{loading&&page===1}}"><view class="loading"><uni-icons class="icon" vue-id="7e34a206-2" type="spinner-cycle" size="30" color="#000" bind:__l="__l"></uni-icons></view></block><block wx:else><block wx:if="{{$root.g0}}"><view class="items"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="id"><view data-event-opts="{{[['tap',[['onSelect',[index]]]]]}}" class="{{['media-item',(item.selected)?'selected':'']}}" bindtap="__e"><view class="image"><image class="img" src="{{item.thumbUrl}}" mode="aspectFill"></image></view></view></block></view></block><block wx:else><view class="media-library-isnull"><uni-icons vue-id="7e34a206-3" type="images" size="60" color="#ccc" bind:__l="__l"></uni-icons><view class="text">搜索免费的素材使用吧!</view></view></block></block></scroll-view></view>
|
||||
+1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user