import{d as N,ak as V,r as _,a8 as n,ae as k,H as D,o as A,c as B,M as t,G as i,a as o,L as m,K as q,ap as L,aq as T}from"./vue.95e072e2.js";import{c as E}from"./index.d90151cc.js";import{u as G}from"./index.8a64ecdf.js";import{_ as H}from"./_plugin-vue_export-helper.c27b6911.js";import"./elementPlus.58179425.js";import"./echarts.72dc8373.js";const K=l=>(L("data-v-651a6b26"),l=l(),T(),l),M={style:{height:"525px"}},R=K(()=>o("hr",{style:{"margin-top":"5px"}},null,-1)),U={style:{display:"flex","align-items":"center"}},j={style:{"margin-right":"8px","line-height":"normal"}},z={class:"double-line"},F={class:"data-color",style:{"margin-right":"8px"}},J=N({__name:"SingleSearch",emits:["updateSelected"],setup(l,{emit:u}){const h=G(),{profile:f}=V(h),c=_(!1),r=_(""),p=_("");function g(){v()}async function v(){c.value=!0;try{const a={profile_id:f.value.profile_id,asin:r.value},s=await E(a);p.value=s.data}catch(a){console.log("error:",a)}finally{c.value=!1}}const y=u;function S(a){y("updateSelected",a)}return(a,s)=>{const w=n("el-input"),x=n("el-image"),b=n("el-tooltip"),d=n("el-table-column"),C=n("el-table"),I=k("loading");return D((A(),B("div",M,[t(w,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=e=>r.value=e),onChange:g,placeholder:"按ASIN搜索"},null,8,["modelValue"]),R,t(C,{data:p.value,"show-header":!1,onSelectionChange:S,height:"450",style:{width:"100%"}},{default:i(()=>[t(d,{prop:"date",label:"商品"},{default:i(e=>[o("div",U,[o("div",j,[t(x,{class:"img-box",src:e.row.image_link},null,8,["src"])]),o("div",null,[t(b,{class:"box-item",effect:"dark",content:e.row.title,placement:"top"},{default:i(()=>[o("div",z,m(e.row.title?e.row.title:"--"),1)]),_:2},1032,["content"]),o("span",null,[q("ASIN: "),o("span",F,m(e.row.asin?e.row.asin:"--"),1)])])])]),_:1}),t(d,{prop:"name",label:"Name",width:"80"},{default:i(e=>[]),_:1}),t(d,{type:"selection",width:"55"})]),_:1},8,["data"])])),[[I,c.value]])}}});const Z=H(J,[["__scopeId","data-v-651a6b26"]]);export{Z as default};
