UNPKG

tyh-ui2

Version:

The next generation ui component library of tyh-ui is based on vue3 Version, fully embrace vue3.

2 lines (1 loc) 1.15 kB
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("./index2.js"),u=["disabled"],a=e.defineComponent({name:"TyhButton"}),i=e.defineComponent({...a,props:r.Props,setup(l){const t=l,n=e.computed(()=>{const o={primary:"#3a6ff4",success:"#54c600",danger:"#d10f1b",warning:"#fbcc30",default:"#3f536e"};return t.simple?o[t.type]:t.type==="default"||!t.type?"#333":"#fff"}),s=e.computed(()=>["tyh-button",`tyh-button-${t.type}`,{[`tyh-button-${t.size}`]:t.size,"tyh-button-round":t.round,"tyh-button-square":t.square,"tyh-button-simple":t.simple,"tyh-button-disabled":t.disabled||t.loading,"tyh-button-block":t.block}]);return(o,d)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(e.unref(s)),disabled:o.disabled||o.loading,style:e.normalizeStyle({color:e.unref(n)})},[o.loading||o.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["tyh-icon",o.loading?"tyh-ui-loading":o.icon]),style:e.normalizeStyle({color:e.unref(n)})},null,6)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")],14,u))}});exports.default=i;