UNPKG

dk-plus

Version:
2 lines (1 loc) 5 kB
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./index2.js"),e=require("vue"),a=require("../../_virtual/index.js"),r=["href","target"],i=["disabled"],c={key:0};function d(o,n,u,m,B,y){const l=e.resolveComponent("dk-icon");return e.openBlock(),e.createElementBlock("div",{class:"dk-button",style:e.normalizeStyle(o.disabled?"cursor:not-allowed":""),onClick:n[0]||(n[0]=(...t)=>o.EventClick&&o.EventClick(...t))},[o.link||o.text?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([o.classList,o.text?"dk-button-text":"",o.icon||o.afterIcon?"dk-button_flex":""]),style:e.normalizeStyle([o.styleList])},[o.icon===""||o.icon===null?e.renderSlot(o.$slots,"icon",{key:0}):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([o.icon?"dk-button_slot_left":""])},[o.loading?(e.openBlock(),e.createBlock(l,{key:0,icon:o.icon?o.icon:"IconRefresh",class:e.normalizeClass(o.loading?"dk-button_rotate":"")},null,8,["icon","class"])):(e.openBlock(),e.createBlock(l,{key:1,icon:o.icon},null,8,["icon"]))],2)),e.createElementVNode("div",null,[o.loading&&!o.icon?(e.openBlock(),e.createBlock(l,{key:0,class:e.normalizeClass(o.loading?"dk-button_rotate":""),icon:o.icon?o.icon:"IconRefresh"},null,8,["class","icon"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")]),o.afterIcon===""||o.afterIcon===null?e.renderSlot(o.$slots,"afterIcon",{key:2}):(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass([o.afterIcon?"dk-button_slot_right":""])},[e.createVNode(l,{icon:o.afterIcon},null,8,["icon"])],2))],6)):e.createCommentVNode("",!0),o.link?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([o.classList,o.link?"dk-button-link":""]),style:e.normalizeStyle(o.styleList)},[e.createElementVNode("a",{href:o.href,tabindex:"0",target:o.target},[e.createElementVNode("div",{class:e.normalizeClass(o.icon||o.afterIcon?"dk-button_flex":"")},[o.icon===""||o.icon===null?e.renderSlot(o.$slots,"icon",{key:0}):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([o.icon?"dk-button_slot_left":""])},[o.loading?(e.openBlock(),e.createBlock(l,{key:0,icon:o.icon?o.icon:"IconRefresh",class:e.normalizeClass(o.loading?"dk-button_rotate":"")},null,8,["icon","class"])):(e.openBlock(),e.createBlock(l,{key:1,icon:o.icon},null,8,["icon"]))],2)),e.createElementVNode("div",null,[o.loading&&!o.icon?(e.openBlock(),e.createBlock(l,{key:0,class:e.normalizeClass(o.loading?"dk-button_rotate":""),icon:o.icon?o.icon:"IconRefresh"},null,8,["class","icon"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")]),o.afterIcon===""||o.afterIcon===null?e.renderSlot(o.$slots,"afterIcon",{key:2}):(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass([o.afterIcon?"dk-button_slot_right":""])},[e.createVNode(l,{icon:o.afterIcon},null,8,["icon"])],2))],2)],8,r)],6)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.personality?(e.openBlock(),e.createElementBlock("button",{key:1,ref:"dkBoxButton",class:e.normalizeClass(["dk-button-personality",o.personaClassList]),style:e.normalizeStyle(o.personalityStylist),role:"button"},[o.personalityType==="shine"||o.personalityType==="flatBtn"?(e.openBlock(),e.createElementBlock("span",c,[e.renderSlot(o.$slots,"icon"),e.renderSlot(o.$slots,"default"),e.renderSlot(o.$slots,"afterIcon")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(o.$slots,"icon"),e.renderSlot(o.$slots,"default"),e.renderSlot(o.$slots,"afterIcon")],64))],6)):(e.openBlock(),e.createElementBlock("button",{key:0,ref:"dkBoxButton",class:e.normalizeClass(["dk-button-box",o.classList]),style:e.normalizeStyle(o.styleList),role:"button",disabled:o.disabled},[e.createElementVNode("div",{class:e.normalizeClass(o.icon||o.afterIcon?"dk-button_flex":"")},[o.icon===""||o.icon===null?e.renderSlot(o.$slots,"icon",{key:0}):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(o.icon&&!o.circle?"dk-button_slot_left":"")},[o.loading?(e.openBlock(),e.createBlock(l,{key:0,icon:o.icon?o.icon:"IconRefresh",class:e.normalizeClass(o.loading?"dk-button_rotate":"")},null,8,["icon","class"])):(e.openBlock(),e.createBlock(l,{key:1,icon:o.icon},null,8,["icon"]))],2)),e.createElementVNode("div",null,[o.loading&&!o.icon?(e.openBlock(),e.createBlock(l,{key:0,class:e.normalizeClass(o.loading?"dk-button_rotate":""),icon:o.icon?o.icon:"IconRefresh"},null,8,["class","icon"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")]),o.afterIcon===""||o.afterIcon===null?e.renderSlot(o.$slots,"afterIcon",{key:2}):(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(o.afterIcon&&!o.circle?"dk-button_slot_right":"")},[e.createVNode(l,{icon:o.afterIcon},null,8,["icon"])],2))],2)],14,i))],64))],4)}const k=a.default(s.default,[["render",d]]);exports.default=k;