ll-package
Version:
2 lines (1 loc) • 1.7 kB
JavaScript
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../node_modules/lodash/lodash.js"),w=require("./IconData.vue.js"),V={class:"icon-picker-wrapper"},k=e.defineComponent({name:"LlIconPicker"}),N=e.defineComponent({...k,props:{value:{}},setup(i){const p=e.useAttrs(),a=i;let c="";const o=e.toRef(a.value),d=e.inject("setMenuIcon"),s=u=>{o.value=u},v=e.computed(()=>({...e.unref(p),...I.lodashExports.omit(a,["value"])}));e.provide("changeIcon",s);const n=e.ref(!1),_=()=>{c=o.value,n.value=!0},m=()=>{d(o.value),n.value=!1},f=()=>{o.value=c,n.value=!1};return(u,t)=>{const r=e.resolveComponent("ll-icon"),C=e.resolveComponent("a-input"),h=e.resolveComponent("a-button"),g=e.resolveComponent("a-input-group"),x=e.resolveComponent("ll-modal");return e.openBlock(),e.createElementBlock("div",V,[e.createVNode(g,{compact:""},{default:e.withCtx(()=>[e.createVNode(C,e.mergeProps({readonly:""},v.value,{value:o.value,"onUpdate:value":t[0]||(t[0]=l=>o.value=l),style:{width:"calc(100% - 36px)"}}),{suffix:e.withCtx(()=>[e.createVNode(r,{"icon-name":"icon-"+o.value},null,8,["icon-name"])]),_:1},16,["value"]),e.createVNode(h,{onClick:_,class:"searchButton"},{default:e.withCtx(()=>[e.createVNode(r,{"icon-name":"icon-select",style:{"font-size":"16px"}})]),_:1})]),_:1}),e.createVNode(x,{open:n.value,"onUpdate:open":t[1]||(t[1]=l=>n.value=l),title:"图标选择",class:"icon-picker-modal-wrapper",destroyOnClose:"","extra-config":{width:"776px"},onOk:m,onCancel:f},{default:e.withCtx(()=>[e.createVNode(w.default,{icon:o.value,onChangeIcon:s},null,8,["icon"])]),_:1},8,["open"])])}}});exports.default=N;
;