2 lines
2.1 KiB
JavaScript
2 lines
2.1 KiB
JavaScript
import{_ as l}from"./index.76a66f15.js";/* empty css */import{bj as d,C as t,D as n,aJ as c,cC as g,b2 as i,aG as _,b4 as f,b1 as C,aV as V,b3 as $,bI as y,bJ as S}from"./arco.f3c60d68.js";const b={components:{Modal:d},data(){return{treeData:[]}},props:{modelValue:{type:[Number,String],default:""},storeId:{type:[Number,String],default:""}},emits:["update:modelValue","update:value"],computed:{value:{get(){return this.modelValue.toString()},set(e){this.$emit("update:modelValue",e.toString())}}},watch:{storeId:function(){this.getCategoryTree()}},methods:{getCategoryTree(){this.loading=!0,this.$request.post("admin/app/channels/category/getCategoryTree",{store_id:this.storeId}).then(e=>{this.treeData=e.data,this.loading=!1}).catch(e=>{this.loading=!1})},storeChange(e){this.$emit("update:modelValue",e),this.$emit("change",e)}},mounted(){this.getCategoryTree()}};function D(e,h,r,p,a,o){const s=g;return t(),n("div",null,[c(s,{onChange:o.storeChange,options:a.treeData,style:{width:"100%"},placeholder:"\u8BF7\u9009\u62E9\u7C7B\u76EE ..."},null,8,["onChange","options"])])}const T=l(b,[["render",D]]),v={components:{Modal:d},data(){return{storeData:[]}},watch:{},props:{modelValue:{type:[Number,String],default:""}},emits:["update:modelValue","update:value"],computed:{value:{get(){return this.modelValue.toString()},set(e){this.$emit("update:modelValue",e.toString())}}},methods:{getStoreData(){this.loading=!0,this.$request.post("admin/app/channels/store/index",{}).then(e=>{this.storeData=e.data,this.loading=!1}).catch(e=>{this.loading=!1})},storeChange(e){this.$emit("update:modelValue",e),this.$emit("change",e)}},mounted(){this.getStoreData()}};function x(e,h,r,p,a,o){const s=y,m=S;return t(),n("div",null,[c(m,{"default-active-first-option":!0,placeholder:"\u8BF7\u9009\u62E9\u5C0F\u5E97",onChange:o.storeChange,"default-value":r.modelValue},{default:i(()=>[(t(!0),n(_,null,f(a.storeData,(u,B)=>(t(),C(s,{value:u.id},{default:i(()=>[V($(u.nickname),1)]),_:2},1032,["value"]))),256))]),_:1},8,["onChange","default-value"])])}const k=l(v,[["render",x]]);export{T as c,k as s};
|