CloudGamingAdmin/admin-client/dist/static/js/h-auto-complete-BULknvsE.js
2024-11-15 02:58:48 +08:00

2 lines
1.6 KiB
JavaScript

import{A as h}from"./AppDictionaryCache-emH9lV7i.js";import{d as v,b as i,n as g,o as y,c as V,a as r,w as d,db as b,f as w,t as x,aK as A}from"./index-D2_T1wn8.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SysDictionaryService-CoxT7Yam.js";import"./T_Game_TypesService-O6BewZrT.js";import"./T_Game_TagsService-BMaG5ygF.js";const N={class:"certain-category-search-wrapper"},S={style:{display:"flex","justify-content":"space-between"}},C=v({__name:"h-auto-complete",props:{code:{},modelValue:{},ShowAll:{type:Boolean,default:!1},showNotHave:{type:Boolean,default:!1},defaultValue:{default:""}},emits:["update:modelValue","changed"],setup(_,{emit:m}){const c=i([]);h.getAppDictionary("egpIdName").getDataListSelect().then(e=>{var a,l,s;(a=c.value)==null||a.push(...e),o.ShowAll?(l=options.value)==null||l.unshift({value:o.defaultValue,label:"全部"}):o.showNotHave&&((s=options.value)==null||s.unshift({value:o.defaultValue,label:"无"}))});const t=i(""),o=_,p=m,f=e=>{console.log(e),u(e,u)};function u(e,a){p("update:modelValue",e),p("changed",a)}return g(()=>o.modelValue,(e,a)=>{console.log("modelValue 发生了变化:",e,a),e==null?t.value="":t.value=e}),(e,a)=>{const l=A,s=b;return y(),V("div",N,[r(s,{value:t.value,"onUpdate:value":a[0]||(a[0]=n=>t.value=n),onChange:f,class:"certain-category-search","popup-class-name":"certain-category-search-dropdown",options:c.value},{option:d(n=>[w("div",S,x(n.label),1)]),default:d(()=>[r(l,{placeholder:"input here",size:"large"})]),_:1},8,["value","options"])])}}}),E=B(C,[["__scopeId","data-v-21c7bbc3"]]);export{E as default};