"use strict";(self.webpackChunkmy_package_ext=self.webpackChunkmy_package_ext||[]).push([[1702],{11702:function(t,e,n){n.r(e),n.d(e,{default:function(){return a}});var i=n(13974);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 r(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)),i}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){var i,r;i=t,r=n[e],(e=function(t){return t=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return String(t);if("object"!==o(n=n.call(t,"string")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),"symbol"===o(t)?t:String(t)}(e))in i?Object.defineProperty(i,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[e]=r})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e={name:"timeLine",mixins:[n(98263).Z],props:{value:"",mode:{default:"edit"},optionTemplate:{type:String,default:""},placement:"bottom",type:null,color:null,lastColor:null,size:"normal",reverse:{type:Boolean,default:!1}},computed:{isDesigner:function(){return"designer"===this.$attrs._source},activities:function(){var t,e=this,n=this.settings,o=void 0===(t=n.customContentField)?"content":t,r=void 0===(t=n.customTimestampField)?"timestamp":t,a=n.type;return(0,i.isEmpty)(this.options)?this.demoList:this.options.map((function(t,n){return{_data:n+1===e.options.length?c(c({},t._data),{},{color:t._data.color||e.lastColor}):t._data,content:"custom"===a?t._data[o]:t.label,timestamp:"custom"===a?t._data[r]:t.value}}))}},data:function(){return{demoList:[{content:"活动1",timestamp:"2023-08-03"},{content:"活动2",timestamp:"2023-08-05"},{content:"活动3",timestamp:"2023-08-08"}]}},created:function(){},watch:{},methods:{clickItem:function(t){this.$emit("clickTimeLineItem",t._data)}}};var a=(0,n(51900).Z)(e,(function(){var t=this,e=t._self._c;return e("div",{staticStyle:{width:"100%"}},["edit"==t.mode?e("el-timeline",t._l(t.activities,(function(n,i){return e("el-timeline-item",t._b({key:i,attrs:{icon:n.icon,type:n.type,color:(null==(i=n._data)?void 0:i.color)||t.color,size:n.size,timestamp:n.timestamp,placement:t.placement},nativeOn:{click:function(e){return t.clickItem(n)}}},"el-timeline-item",t.$attrs,!1),[t._t("default",(function(){return[e("div",[t._v(t._s(n.content))])]}),{data:n._data})],2)})),1):t._e()],1)}),[],!1,null,"38b026f6",null).exports}}]);