created
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/image-grid/media-list"],{796:function(e,t,n){"use strict";n.r(t);var a=n(797),r=n(799);for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n(801);var u,o=n(46),s=Object(o["default"])(r["default"],a["render"],a["staticRenderFns"],!1,null,"09ac949a",null,!1,a["components"],u);s.options.__file="components/image-grid/media-list.vue",t["default"]=s.exports},797:function(e,t,n){"use strict";n.r(t);var a=n(798);n.d(t,"render",(function(){return a["render"]})),n.d(t,"staticRenderFns",(function(){return a["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return a["recyclableRender"]})),n.d(t,"components",(function(){return a["components"]}))},798:function(e,t,n){"use strict";var a;n.r(t),n.d(t,"render",(function(){return r})),n.d(t,"staticRenderFns",(function(){return u})),n.d(t,"recyclableRender",(function(){return i})),n.d(t,"components",(function(){return a}));var r=function(){var e=this,t=e.$createElement;e._self._c},i=!1,u=[];r._withStripped=!0},799:function(e,t,n){"use strict";n.r(t);var a=n(800),r=n.n(a);for(var i in a)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(i);t["default"]=r.a},800:function(e,t,n){"use strict";(function(e,a){var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(28)),u=r(n(31)),o=e.database(),s=function(){n.e("components/cloud-image").then(function(){return resolve(n(612))}.bind(null,n)).catch(n.oe)},c={components:{cloudImage:s},props:{dataType:{type:String,default:""},pageSize:{type:Number,default:10},currentTemplate:{type:String,default:""}},data:function(){return{list:[],selectValue:"",page:12,loading:!1,noMore:!1}},mounted:function(){0===this.list.length&&("template"===this.dataType?this.list=[{value:"不使用模板",_id:"",src:"not_image"}]:"music"===this.dataType?this.list=[{value:"不播放音乐",_id:"",src:"not_music"}]:this.dataType,this.loadData())},methods:{select:function(e){this.selectValue=e,this.$emit("update",this.selectValue)},loadData:function(){var e=this;return(0,u.default)(i.default.mark((function t(){var n,a,r,u;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.loading&&!e.noMore){t.next=2;break}return t.abrupt("return");case 2:if(e.loading=!0,"template"!==e.dataType){t.next=18;break}if(console.log(e.list),1!==e.list.length){t.next=16;break}return t.next=8,o.collection("cms-temp").get();case 8:for(a=t.sent,console.log(a.result.data),r=[],u=0;u<a.result.data.length;u++)r.push({value:a.result.data[u].temptele_name,_id:a.result.data[u]._id,src:a.result.data[u].temptele_src});return(n=e.list).push.apply(n,r),t.next=15,e.select(e.list[0]._id);case 15:e.noMore=!0;case 16:t.next=25;break;case 18:if("music"!==e.dataType){t.next=24;break}return t.next=21,e.select(e.list[0]._id);case 21:e.noMore=!0,t.next=25;break;case 24:"font"===e.dataType||(e.noMore=!0);case 25:case"end":return t.stop()}}),t)})))()},loadMore:function(){this.noMore||this.loadData()},previewImage:function(e){a.previewImage({current:e,urls:this.list.map((function(e){return e.image}))})}}};t.default=c}).call(this,n(27)["uniCloud"],n(2)["default"])},801:function(e,t,n){"use strict";n.r(t);var a=n(802),r=n.n(a);for(var i in a)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(i);t["default"]=r.a},802:function(e,t,n){}}]);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/image-grid/media-list.js.map
|
||||
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||||
'components/image-grid/media-list-create-component',
|
||||
{
|
||||
'components/image-grid/media-list-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('2')['createComponent'](__webpack_require__(796))
|
||||
})
|
||||
},
|
||||
[['components/image-grid/media-list-create-component']]
|
||||
]);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"cloud-image": "/components/cloud-image"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<scroll-view class="container data-v-09ac949a" scroll-y="{{true}}" show-scrollbar="{{false}}" data-event-opts="{{[['scrolltolower',[['loadMore',['$event']]]]]}}" bindscrolltolower="__e"><block wx:if="{{dataType==='template'}}"><view class="data-v-09ac949a"><view class="list-container data-v-09ac949a"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="list-item data-v-09ac949a"><block wx:if="{{item.src!=='not_image'}}"><view class="data-v-09ac949a"><view data-event-opts="{{[['tap',[['select',['$0'],[[['list','',index,'_id']]]]]]]}}" class="{{['data-v-09ac949a',(selectValue===item._id)?'select-image':'',(true)?'item-image':'']}}" bindtap="__e"><cloud-image vue-id="{{'6a0d81b3-1-'+index}}" src="{{item.src}}" mode="scaleToFill" width="33vw" height="100%" class="data-v-09ac949a" bind:__l="__l"></cloud-image></view><text class="item-text data-v-09ac949a">{{item.value}}</text></view></block><block wx:else><view class="data-v-09ac949a"><view data-event-opts="{{[['tap',[['select',['$0'],[[['list','',index,'_id']]]]]]]}}" class="{{['data-v-09ac949a',(selectValue===item._id)?'select-image':'',(true)?'item-image':'']}}" bindtap="__e"><view style="width:33vw;height:100%;background-color:aqua;" class="data-v-09ac949a"></view></view><text class="item-text data-v-09ac949a">{{item.value}}</text></view></block></view></block></view></view></block><block wx:else><block wx:if="{{dataType==='music'}}"><view class="data-v-09ac949a"><view class="list-container data-v-09ac949a"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="list-item data-v-09ac949a"><block wx:if="{{item.src!=='not_music'}}"><view class="center-con data-v-09ac949a"><view data-event-opts="{{[['tap',[['select',['$0'],[[['list','',index,'_id']]]]]]]}}" class="{{['data-v-09ac949a',(selectValue===item._id)?'select-image':'',(true)?'music-item':'']}}" bindtap="__e"><cloud-image vue-id="{{'6a0d81b3-2-'+index}}" src="{{item.src}}" mode="scaleToFill" width="100%" height="100%" class="data-v-09ac949a" bind:__l="__l"></cloud-image></view><text class="item-text data-v-09ac949a">{{item.value}}</text></view></block><block wx:else><view class="center-con data-v-09ac949a"><view class="{{['data-v-09ac949a',(selectValue===item._id)?'select-image':'',(true)?'music-item':'']}}"><view style="width:100%;height:100%;background-color:aqua;" class="data-v-09ac949a"></view></view><text class="item-text data-v-09ac949a">{{item.value}}</text></view></block></view></block></view></view></block></block><view class="loading-tips data-v-09ac949a"><block wx:if="{{loading}}"><text class="data-v-09ac949a">正在加载...</text></block><block wx:if="{{noMore}}"><text class="data-v-09ac949a">没有更多了~</text></block></view></scroll-view>
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
.container.data-v-09ac949a {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.list-container.data-v-09ac949a {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 10rpx;
|
||||
}
|
||||
.list-item.data-v-09ac949a {
|
||||
width: 33%;
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.item-image.data-v-09ac949a {
|
||||
width: 100%;
|
||||
height: 250rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: #f5f5f5;
|
||||
padding: 10rpx;
|
||||
}
|
||||
.item-text.data-v-09ac949a {
|
||||
display: block;
|
||||
padding: 20rpx 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
line-height: 1.4;
|
||||
text-align: center;
|
||||
}
|
||||
.loading-tips.data-v-09ac949a {
|
||||
text-align: center;
|
||||
padding: 30rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
.select-image.data-v-09ac949a {
|
||||
box-sizing: border-box;
|
||||
border: 10rpx solid #3399ff;
|
||||
}
|
||||
.music-item.data-v-09ac949a {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user