niucloud-admin/niucloud/public/admin/assets/edit-image-cf03c90d.js
全栈小学生 1c498f5a2a up
2025-01-03 17:59:49 +08:00

2 lines
1.1 KiB
JavaScript

import{d as p,k as l,ah as c,z as u,h as g,c as f,a as h,e as n,w as m,u as s,b as v,G as w,H as C}from"./index-a59af0dd.js";/* empty css */import"./el-form-item-4ed993c7.js";import b from"./index-fbdf2045.js";import{u as V}from"./poster-ba3e32ef.js";const x={class:"content-wrap"},S={class:"edit-attr-item-wrap"},y=p({__name:"edit-image",setup(k,{expose:i}){const e=V();return e.editComponent.verify=a=>{const t={code:!0,message:""};return e.value[a].value==""&&(t.code=!1,t.message=l("imageUrlTip")),t},c(()=>e.editComponent.value,(a,t)=>{const o=new Image;o.src=u(e.editComponent.value),o.onload=async()=>{e.editComponent.imgWidth=o.width,e.editComponent.imgHeight=o.height}}),i({}),(a,t)=>{const o=b,r=w,d=C;return g(),f("div",x,[h("div",S,[n(d,{"label-width":"80px",class:"px-[10px]"},{default:m(()=>[n(r,{label:s(l)("image")},{default:m(()=>[n(o,{modelValue:s(e).editComponent.value,"onUpdate:modelValue":t[0]||(t[0]=_=>s(e).editComponent.value=_),limit:1},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),v(a.$slots,"common")])}}}),H=Object.freeze(Object.defineProperty({__proto__:null,default:y},Symbol.toStringTag,{value:"Module"}));export{H as _};