sand-components-vben 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sand-components-vben",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "",
5
5
  "main": "sand-components-vben.js",
6
6
  "keywords": [],
@@ -1 +1 @@
1
- .ant-select[data-v-bb2c3e46]{width:100%}
1
+ .ant-select[data-v-7d5e8290]{width:100%}
@@ -1,4 +1,4 @@
1
- import { defineComponent as h, reactive as _, toRefs as m, onMounted as y, watch as g, resolveComponent as r, openBlock as s, createBlock as u, unref as i, isRef as w, withCtx as d, createElementBlock as S, Fragment as x, renderList as b, createTextVNode as k, toDisplayString as B } from "vue";
1
+ import { defineComponent as h, reactive as _, toRefs as m, onMounted as y, watch as w, resolveComponent as r, openBlock as s, createBlock as u, unref as i, isRef as S, withCtx as d, createElementBlock as g, Fragment as x, renderList as k, createTextVNode as B, toDisplayString as b } from "vue";
2
2
  const C = /* @__PURE__ */ h({
3
3
  __name: "ApiSelect",
4
4
  props: {
@@ -37,10 +37,10 @@ const C = /* @__PURE__ */ h({
37
37
  let { options: c, propsValue: o } = m(n);
38
38
  return y(async () => {
39
39
  if (e.api) {
40
- const { data: l } = await e.api(e.params);
41
- console.log(l), n.options = l, o.value = e.value;
40
+ const { list: l } = await e.api(e.params);
41
+ n.options = l, o.value = e.value;
42
42
  }
43
- }), g(
43
+ }), w(
44
44
  () => e.value,
45
45
  (l) => {
46
46
  o.value = l;
@@ -50,18 +50,18 @@ const C = /* @__PURE__ */ h({
50
50
  const f = r("a-select-option"), v = r("a-select");
51
51
  return s(), u(v, {
52
52
  value: i(o),
53
- "onUpdate:value": p[0] || (p[0] = (a) => w(o) ? o.value = a : o = a),
53
+ "onUpdate:value": p[0] || (p[0] = (a) => S(o) ? o.value = a : o = a),
54
54
  "show-search": t.showSearch,
55
55
  placeholder: t.placeholder,
56
56
  style: { width: "100%" }
57
57
  }, {
58
58
  default: d(() => [
59
- (s(!0), S(x, null, b(i(c), (a) => (s(), u(f, {
59
+ (s(!0), g(x, null, k(i(c), (a) => (s(), u(f, {
60
60
  value: a.value,
61
61
  key: a.value
62
62
  }, {
63
63
  default: d(() => [
64
- k(B(a.label), 1)
64
+ B(b(a.label), 1)
65
65
  ]),
66
66
  _: 2
67
67
  }, 1032, ["value"]))), 128))
@@ -75,7 +75,7 @@ const C = /* @__PURE__ */ h({
75
75
  for (const [c, o] of e)
76
76
  n[c] = o;
77
77
  return n;
78
- }, V = /* @__PURE__ */ N(C, [["__scopeId", "data-v-bb2c3e46"]]), A = [V], E = function(t) {
78
+ }, V = /* @__PURE__ */ N(C, [["__scopeId", "data-v-7d5e8290"]]), A = [V], E = function(t) {
79
79
  A.forEach((e) => {
80
80
  t.component(e.name, e);
81
81
  });
@@ -1 +1 @@
1
- (function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o["sand-components-vben"]={},o.Vue))})(this,function(o,e){"use strict";const r=((n,t)=>{const c=n.__vccOpts||n;for(const[p,a]of t)c[p]=a;return c})(e.defineComponent({__name:"ApiSelect",props:{value:{type:[String,Number],default:void 0},api:{type:Function,default:()=>null},showSearch:{type:Boolean,default:!0},params:{type:Object,default:()=>({pageSize:100,pageNo:1})},placeholder:{type:String,default:"请选择"}},setup(n){const t=n,c=e.reactive({options:[],propsValue:void 0});let{options:p,propsValue:a}=e.toRefs(c);return e.onMounted(async()=>{if(t.api){const{data:s}=await t.api(t.params);console.log(s),c.options=s,a.value=t.value}}),e.watch(()=>t.value,s=>{a.value=s},{deep:!0}),(s,i)=>{const f=e.resolveComponent("a-select-option"),_=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(_,{value:e.unref(a),"onUpdate:value":i[0]||(i[0]=l=>e.isRef(a)?a.value=l:a=l),"show-search":n.showSearch,placeholder:n.placeholder,style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),l=>(e.openBlock(),e.createBlock(f,{value:l.value,key:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","show-search","placeholder"])}}}),[["__scopeId","data-v-bb2c3e46"]]),d=[r],u={install:function(n){d.forEach(t=>{n.component(t.name,t)})}};o.ApiSelect=r,o.default=u,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o["sand-components-vben"]={},o.Vue))})(this,function(o,e){"use strict";const r=((n,t)=>{const c=n.__vccOpts||n;for(const[p,a]of t)c[p]=a;return c})(e.defineComponent({__name:"ApiSelect",props:{value:{type:[String,Number],default:void 0},api:{type:Function,default:()=>null},showSearch:{type:Boolean,default:!0},params:{type:Object,default:()=>({pageSize:100,pageNo:1})},placeholder:{type:String,default:"请选择"}},setup(n){const t=n,c=e.reactive({options:[],propsValue:void 0});let{options:p,propsValue:a}=e.toRefs(c);return e.onMounted(async()=>{if(t.api){const{list:s}=await t.api(t.params);c.options=s,a.value=t.value}}),e.watch(()=>t.value,s=>{a.value=s},{deep:!0}),(s,i)=>{const f=e.resolveComponent("a-select-option"),_=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(_,{value:e.unref(a),"onUpdate:value":i[0]||(i[0]=l=>e.isRef(a)?a.value=l:a=l),"show-search":n.showSearch,placeholder:n.placeholder,style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),l=>(e.openBlock(),e.createBlock(f,{value:l.value,key:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","show-search","placeholder"])}}}),[["__scopeId","data-v-7d5e8290"]]),d=[r],u={install:function(n){d.forEach(t=>{n.component(t.name,t)})}};o.ApiSelect=r,o.default=u,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});