UNPKG

ll-package

Version:

2 lines (1 loc) 2.03 kB
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../node_modules/lodash/lodash.js"),h=require("../../../hooks/useDesign.js"),c=require("../../../../node_modules/ant-design-vue/es/steps/index.js"),k={key:0},C={key:0},S=e.defineComponent({name:"LlSteps"}),_=e.defineComponent({...S,props:{current:{default:0},steps:{}},setup(i,{emit:u}){const s=u,r=i,{prefixCls:a}=h.useDesign("steps"),l=e.ref(r.current);e.watch(()=>r.current,n=>{l.value=n});const d=e.useAttrs(),p=e.computed(()=>g.lodashExports.omit({...e.unref(d),...r},["current","steps"])),m=n=>{s("update:current",n),s("change",n)};return(n,B)=>{const f=e.resolveComponent("ll-icon");return e.openBlock(),e.createBlock(e.unref(c.default),e.mergeProps({class:e.unref(a),current:l.value},p.value,{onChange:m}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.steps,(t,o)=>(e.openBlock(),e.createBlock(e.unref(c.Step),{key:o,disabled:t.disabled},e.createSlots({title:e.withCtx(()=>[e.renderSlot(n.$slots,"title",{step:t,index:o},()=>[e.createElementVNode("span",null,e.toDisplayString(t.title),1)])]),description:e.withCtx(()=>[e.renderSlot(n.$slots,"description",{step:t,index:o},()=>[t.description?(e.openBlock(),e.createElementBlock("span",k,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)])]),subTitle:e.withCtx(()=>[e.renderSlot(n.$slots,"subTitle",{step:t,index:o},()=>[t.subTitle?(e.openBlock(),e.createElementBlock("span",C,e.toDisplayString(t.subTitle),1)):e.createCommentVNode("",!0)])]),_:2},[t.icon||n.$slots.icon?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"icon",{step:t,index:o},()=>[e.createVNode(f,{"icon-name":t.icon},null,8,["icon-name"])])]),key:"0"}:void 0]),1032,["disabled"]))),128))]),_:2},[n.$slots.progressDot?{name:"progressDot",fn:e.withCtx(t=>[e.renderSlot(n.$slots,"progressDot",{progressDot:t})]),key:"0"}:void 0]),1040,["class","current"])}}});exports.default=_;