UNPKG

@xysfe/actui

Version:

A fantastic mobile ui lib implement by Vue

1 lines 11.9 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@xysfe/actui/es/assets/utils/create/index.js"),require("@xysfe/actui/es/Keyframe/index.js"),require("@xysfe/actui/es/assets/img/agree-animation.png"),require("@xysfe/actui/es/assets/img/head.png"),require("@xysfe/actui/es/assets/img/star-active.png"),require("@xysfe/actui/es/assets/img/star-deactive.png"),require("@xysfe/actui/es/assets/img/agree.png"),require("@xysfe/actui/es/assets/img/comment-uncheck.png"),require("@xysfe/actui/es/assets/img/comment-checked.png")):"function"==typeof define&&define.amd?define(["@xysfe/actui/es/assets/utils/create/index.js","@xysfe/actui/es/Keyframe/index.js","@xysfe/actui/es/assets/img/agree-animation.png","@xysfe/actui/es/assets/img/head.png","@xysfe/actui/es/assets/img/star-active.png","@xysfe/actui/es/assets/img/star-deactive.png","@xysfe/actui/es/assets/img/agree.png","@xysfe/actui/es/assets/img/comment-uncheck.png","@xysfe/actui/es/assets/img/comment-checked.png"],e):"object"==typeof exports?exports.GoldCommentList=e(require("@xysfe/actui/es/assets/utils/create/index.js"),require("@xysfe/actui/es/Keyframe/index.js"),require("@xysfe/actui/es/assets/img/agree-animation.png"),require("@xysfe/actui/es/assets/img/head.png"),require("@xysfe/actui/es/assets/img/star-active.png"),require("@xysfe/actui/es/assets/img/star-deactive.png"),require("@xysfe/actui/es/assets/img/agree.png"),require("@xysfe/actui/es/assets/img/comment-uncheck.png"),require("@xysfe/actui/es/assets/img/comment-checked.png")):t.GoldCommentList=e(t["@xysfe/actui/es/assets/utils/create/index.js"],t["@xysfe/actui/es/Keyframe/index.js"],t["@xysfe/actui/es/assets/img/agree-animation.png"],t["@xysfe/actui/es/assets/img/head.png"],t["@xysfe/actui/es/assets/img/star-active.png"],t["@xysfe/actui/es/assets/img/star-deactive.png"],t["@xysfe/actui/es/assets/img/agree.png"],t["@xysfe/actui/es/assets/img/comment-uncheck.png"],t["@xysfe/actui/es/assets/img/comment-checked.png"])}("undefined"!=typeof self?self:this,function(t,e,s,i,n,a,c,o,r){return function(t){function e(i){if(s[i])return s[i].exports;var n=s[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var s={};return e.m=t,e.c=s,e.d=function(t,s,i){e.o(t,s)||Object.defineProperty(t,s,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var s=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(s,"a",s),s},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="../es",e(e.s=2065)}({1232:function(t,e,s){"use strict";var i=s(2068),n=s(2077);e.a={name:"ActGoldCommentList",props:{commentCfg:{type:Object,default:function(){return{commentList:[],tagList:[],tagCount:3,activeIdx:0,showAll:!1,showPlan:!1,isAllActive:!1,total:0}}}},components:{CommentItem:i.a,TagList:n.a},data:function(){return{checked:!1}},methods:{toggle:function(){this.checked=!this.checked,this.$emit("planCheck",this.checked)},imgClick:function(){this.$emit.apply(this,["imgClick"].concat(Array.prototype.slice.call(arguments)))},agreeClick:function(){this.$emit.apply(this,["agreeClick"].concat(Array.prototype.slice.call(arguments)))},tagClick:function(){this.$emit.apply(this,["tagClick"].concat(Array.prototype.slice.call(arguments)))}}}},1233:function(t,e,s){"use strict";var i=s(2070),n=s.n(i);e.a={name:"ActGoldCommentItem",components:{ActKeyframe:n.a},props:{comment:{type:Object,default:function(){return{}}},isAllActive:{type:Boolean,default:!1},currentIndex:{type:Number,default:0}},data:function(){return{animation:{name:"agree-animation",width:80,height:75,img:s(2071),totalKeyNum:20,count:1,duration:"800ms",autoplay:!1,isNeedCross:!0},hasAgree:!1,agreeCount:0}},methods:{handleImgSize:function(t){return 1===t.length?"large-size":2===t.length?"middle-size":3===t.length?"small-size":void 0},preview:function(t,e){this.imagePreview?this.imagePreview.setData(t,e):this.imagePreview=this.$createImagePreview({images:t,start:e}),this.imagePreview.show(),this.$emit("imgClick",{id:this.comment.id,index:e})},agree:function(){var t=this.comment,e=t.id,s=t.uid,i=t.type,n=t.comment_id,a=this,c=function(){a.hasAgree?(a.hasAgree=!1,a.agreeCount--):a.$refs.keyframe.start()};this.$emit("agreeClick",{cb:c,id:e,uid:s,type:i,comment_id:n,state:this.hasAgree?1:0})},animationend:function(){this.hasAgree=!0,this.agreeCount++}},watch:{comment:{handler:function(t){this.hasAgree=1===Number(t.fabulous_state),this.agreeCount=Number(t.fabulous)||0},immediate:!0}}}},1234:function(t,e,s){"use strict";e.a={name:"TagList",props:{tagList:{type:Array,default:function(){return[]}},tagCount:{type:Number,default:9},activeIdx:{type:Number,default:0},showAll:{type:Boolean,default:!1},total:{type:Number,default:0},isAllActive:{type:Boolean,default:!1}},filters:{tenThousands:function(t){return t>9999?"9999+":t}},computed:{maxTagList:function(){var t=[].concat(this.tagList);return this.showAll&&t.length&&t.unshift({name:"全部",count:this.total}),t.slice(0,this.tagCount)}},data:function(){return{curIdx:0}},methods:{tagClick:function(t,e){this.curIdx=e,this.$emit("tagClick","全部"===t?"":t)}},beforeMount:function(){this.curIdx=this.activeIdx},watch:{activeIdx:function(t){this.curIdx=t}}}},2065:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s(26),n=s.n(i),a=s(2066);a.a.install=function(t){t.component(a.a.name,a.a),t.prototype.$createGoldCommentList=n()(a.a,t)},e.default=a.a},2066:function(t,e,s){"use strict";function i(t){o||s(2067)}var n=s(1232),a=s(2080),c=s(7),o=!1,r=i,u=Object(c.a)(n.a,a.a,a.b,!1,r,"data-v-318e410a",null);u.options.__file="src\\components\\GoldCommentList\\src\\index.vue",e.a=u.exports},2067:function(t,e){},2068:function(t,e,s){"use strict";function i(t){o||s(2069)}var n=s(1233),a=s(2072),c=s(7),o=!1,r=i,u=Object(c.a)(n.a,a.a,a.b,!1,r,"data-v-fea36e0c",null);u.options.__file="src\\components\\GoldCommentList\\src\\item.vue",e.a=u.exports},2069:function(t,e){},2070:function(t,s){t.exports=e},2071:function(t,e){t.exports=s},2072:function(t,e,s){"use strict";s.d(e,"a",function(){return i}),s.d(e,"b",function(){return n});var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"act-gold-comment-item",style:{"padding-top":0===t.currentIndex&&t.isAllActive?"0":"16px"}},[i("div",{staticClass:"base-info"},[i("div",{staticClass:"comment_head"},[t.comment.head?i("img",{staticClass:"img",attrs:{src:t.comment.head}}):i("img",{staticClass:"img",attrs:{src:s(2073)}})]),t._v(" "),i("div",{staticClass:"middle"},[i("p",[i("span",{staticClass:"name"},[t._v(t._s(t.comment.nickname))]),t._v(" "),t.comment.commentType?i("span",{staticClass:"comment_type"},[t._v(t._s(t.comment.commentType))]):t._e()]),t._v(" "),i("div",{staticClass:"rate"},[i("ul",{staticClass:"stars"},t._l(5,function(e){return i("li",{key:e,staticClass:"star"},[t.comment.star>=e?i("img",{attrs:{src:s(2074)}}):i("img",{attrs:{src:s(2075)}})])}),0),t._v(" "),i("span",{staticClass:"desc"},[t._v(t._s(t.comment.rankTxt))])])])]),t._v(" "),t._t("insuredInfo"),t._v(" "),i("div",[i("p",{staticClass:"comment_text"},[t._v("\n "+t._s(t.comment.comment)+"\n ")]),t._v(" "),t.comment.picture_list&&t.comment.picture_list.length?i("ul",{staticClass:"picture-list"},t._l(t.comment.picture_list,function(e,s){return i("li",{key:s+"ak",staticClass:"item",class:t.handleImgSize(t.comment.picture_list)},[i("img",{attrs:{src:e},on:{click:function(e){return t.preview(t.comment.picture_list,s)}}})])}),0):t._e(),t._v(" "),t.comment.reply?i("div",{staticClass:"comment_reply"},[i("div",{staticClass:"comment_reply_tit"},[t._v("\n 小雨伞客服回复:\n ")]),t._v(" "),i("p",{staticClass:"comment_reply_content"},[t._v("\n "+t._s(t.comment.reply)+"\n ")])]):t._e(),t._v(" "),i("div",{staticClass:"bottom-info",style:{"margin-top":t.comment.picture_list&&t.comment.picture_list.length?"12px":"8px"}},[i("div",[i("span",[t._v(t._s(t.comment.addtime))]),i("span",{staticClass:"comment_addr"},[t._v(t._s(t.comment.comment_addr||"未知"))])]),t._v(" "),i("div",{staticClass:"agree-info"},[t.hasAgree?i("img",{staticClass:"agree-icon",attrs:{src:s(2076)},on:{click:function(e){return t.agree()}}}):i("div",{staticClass:"agree-icon",on:{click:function(e){return t.agree()}}},[i("act-keyframe",{ref:"keyframe",attrs:{animation:t.animation},on:{animationend:t.animationend}})],1),t._v(" "),t.agreeCount?i("div",{staticClass:"agree"},[i("p",[t._v("有"),i("span",{staticStyle:{color:"#8C7FEE"}},[t._v(t._s(t.agreeCount))]),t._v("个人觉得有帮助")])]):i("div",{staticClass:"agree"},[i("p",[t._v("有帮助")])])])])])],2)},n=[];i._withStripped=!0},2073:function(t,e){t.exports=i},2074:function(t,e){t.exports=n},2075:function(t,e){t.exports=a},2076:function(t,e){t.exports=c},2077:function(t,e,s){"use strict";function i(t){o||s(2078)}var n=s(1234),a=s(2079),c=s(7),o=!1,r=i,u=Object(c.a)(n.a,a.a,a.b,!1,r,"data-v-83763afa",null);u.options.__file="src\\components\\GoldCommentList\\src\\tag.vue",e.a=u.exports},2078:function(t,e){},2079:function(t,e,s){"use strict";s.d(e,"a",function(){return i}),s.d(e,"b",function(){return n});var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.maxTagList.length?s("div",{staticClass:"tag-wrapper"},[s("div",{staticClass:"tag-list"},t._l(t.maxTagList,function(e,i){return s("div",{key:i,class:{tag:!0,active:t.curIdx===i||t.isAllActive},on:{click:function(s){return t.tagClick(e.name,i)}}},[s("p",[s("span",[t._v(t._s(e.name))]),s("span",[t._v(t._s(t._f("tenThousands")(e.count)))])])])}),0),t._v(" "),t.isAllActive?t._e():s("div",{staticClass:"border-bottom"})]):t._e()},n=[];i._withStripped=!0},2080:function(t,e,s){"use strict";s.d(e,"a",function(){return i}),s.d(e,"b",function(){return n});var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"act-gold-comment-list"},[i("tag-list",{attrs:{tagList:t.commentCfg.tagList,tagCount:t.commentCfg.tagCount,activeIdx:t.commentCfg.activeIdx,showAll:t.commentCfg.showAll,total:t.commentCfg.total,isAllActive:t.commentCfg.isAllActive},on:{tagClick:t.tagClick}}),t._v(" "),t.commentCfg.showPlan?i("div",{staticClass:"act-gold-comment-check"},[i("div",{staticClass:"check-box",on:{click:function(e){return e.stopPropagation(),t.toggle.apply(null,arguments)}}},[t.checked?i("img",{staticClass:"check-icon",attrs:{src:s(2082)}}):i("img",{staticClass:"check-icon",attrs:{src:s(2081)}})]),t._v(" "),i("span",{staticClass:"check-text"},[t._v("\n 有保障方案图\n ")])]):t._e(),t._v(" "),t.commentCfg.commentList.length?i("div",t._l(t.commentCfg.commentList,function(e,s){return i("comment-item",{key:s,attrs:{comment:e,currentIndex:s,isAllActive:t.commentCfg.isAllActive},on:{imgClick:t.imgClick,agreeClick:t.agreeClick},scopedSlots:t._u([{key:"insuredInfo",fn:function(){return[t._t("insuredInfos",null,{item:e})]},proxy:!0}],null,!0)})}),1):i("div",{staticClass:"no-data"},[t._v("\n 暂无数据\n ")])],1)},n=[];i._withStripped=!0},2081:function(t,e){t.exports=o},2082:function(t,e){t.exports=r},26:function(e,s){e.exports=t},7:function(t,e,s){"use strict";function i(t,e,s,i,n,a,c,o){t=t||{};var r=typeof t.default;"object"!==r&&"function"!==r||(t=t.default);var u="function"==typeof t?t.options:t;e&&(u.render=e,u.staticRenderFns=s,u._compiled=!0),i&&(u.functional=!0),a&&(u._scopeId=a);var m;if(c?(m=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},u._ssrRegister=m):n&&(m=o?function(){n.call(this,this.$root.$options.shadowRoot)}:n),m)if(u.functional){u._injectStyles=m;var l=u.render;u.render=function(t,e){return m.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,m):[m]}return{exports:t,options:u}}e.a=i}})});