"use strict";(self.webpackChunkmy_package_ext=self.webpackChunkmy_package_ext||[]).push([[8981],{78981:function(t,e,i){i.r(e),i.d(e,{default:function(){return a}});var n=i(13974),r=(e=i(98263),i(53874));function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){var i,n=Object.keys(t);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(t),e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)),n}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){var n,r;n=t,r=i[e],(e=function(t){return t=function(t,e){if("object"!==o(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0===i)return String(t);if("object"!==o(i=i.call(t,"string")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),"symbol"===o(t)?t:String(t)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}e={name:"CardList",mixins:[e.Z],props:{value:null,mode:{default:"edit"},columnCount:{default:4},mobileColumnCount:{default:2},alignItem:{type:String,default:"flex-start"},imageWidth:{type:String,default:"100%"},imageHeight:{type:String,default:"160px"},showTitle:{default:!0},titleColor:{type:String,default:"rgba(0, 0, 0)"},titleSize:{default:14},titleWeight:{type:String,default:"bolder"},showDescription:{default:!0},descriptionColor:{type:String,default:"rgba(0, 0, 0, 0.4)"},descriptionSize:{default:14},descriptionWeight:{type:String,default:"normal"},settings:{type:Object,default:function(){}}},data:function(){return{cardLists:[{image:"https://qcloudimg.tencent-cloud.cn/raw/478c35e469057b4d6352ccc14e00ebc5.png",title:"示例标题",description:"这是一段示例描述"},{image:"https://qcloudimg.tencent-cloud.cn/raw/478c35e469057b4d6352ccc14e00ebc5.png",title:"示例标题",description:"这是一段示例描述"},{image:"https://qcloudimg.tencent-cloud.cn/raw/478c35e469057b4d6352ccc14e00ebc5.png",title:"示例标题",description:"这是一段示例描述"},{image:"https://qcloudimg.tencent-cloud.cn/raw/478c35e469057b4d6352ccc14e00ebc5.png",title:"示例标题",description:"这是一段示例描述"}]}},computed:{appName:function(){return(0,r.Dv)("appName")||(0,r.g6)(this)},isDesigner:function(){return"designer"===this.$attrs._source},mixEditable:function(){return!(this.$attrs.readonly||this.$attrs.disabled)&&"edit"===this.mode},lists:function(){var t=this,e=localStorage.getItem("uniqueId").replace(/\"/g,"");return console.log(this.options,"this.options"),(0,n.isEmpty)(this.options)?this.cardLists:this.options.map((function(i){return s(s({},i._data),{},{image:"/".concat(t.appName,"/api/lowcode/models/attachments/").concat(i._data.image,"/actions/download?Authorization=").concat(e)})}))},itemWidth:function(){return console.log("列数:",this.columnCount),"".concat(100/this.columnCount,"%")},titleStyle:function(){return{fontSize:this.titleSize+"px",color:this.titleColor,fontWeight:this.titleWeight}},descriptionStyle:function(){return{fontSize:this.descriptionSize+"px",color:this.descriptionColor,fontWeight:this.descriptionWeight}},imageTransWidth:function(){return this.imageWidth&&this.imageWidth.includes("%")?this.imageWidth:this.imageWidth+"px"},imageTransHeight:function(){return this.imageHeight&&this.imageHeight.includes("%")?this.imageHeight:this.imageHeight+"px"}},methods:{clickCard:function(t){this.$emit("clickCard",t)}}};var a=(0,i(51900).Z)(e,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"list-container",staticStyle:{width:"100%"}},t._l(t.lists,(function(i,n){return e("div",{key:n,staticClass:"article-list",style:{width:t.itemWidth},on:{click:function(e){return t.clickCard(i)}}},[e("div",{staticClass:"card-body"},[e("img",{staticClass:"article-image",style:{width:t.imageTransWidth,height:t.imageTransHeight},attrs:{src:i.image,alt:"image"}}),t._v(" "),e("div",{staticClass:"article-content",style:{alignItems:t.alignItem}},[t.showTitle?e("div",{staticClass:"article-title",style:t.titleStyle,attrs:{title:i.title}},[t._v(t._s(i.title))]):t._e(),t._v(" "),t.showDescription?e("div",{staticClass:"article-description",style:t.descriptionStyle,attrs:{title:i.description}},[t._v(t._s(i.description))]):t._e()])])])})),0)}),[],!1,null,"c9cd6fd4",null).exports}}]);