st-comp 0.0.201 → 0.0.202

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/es/Table.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";require("./base-ef747d02.cjs");const v=require("./el-loading-cfd86c15.cjs"),k=require("./zh-cn-90317f62.cjs"),h=require("./el-table-column-079b76f5.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-b6c99b28.cjs");require("./el-scrollbar-bc3f790d.cjs");require("./el-tag-a33c4b22.cjs");require("./el-popover-0ea8fbf8.cjs");const e=require("vue"),w=require("./index-098c2447.cjs"),E=require("./el-popconfirm-70a976bf.cjs"),S=require("./el-button-eec58cff.cjs"),T=require("./index-f967d6c1.cjs");require("./use-global-config-30d7d8ce.cjs");require("./use-form-common-props-fd9b61a0.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-c108567d.cjs");require("./config-provider-a584d81e.cjs");require("./index-298075cf.cjs");require("./_initCloneObject-52b6a510.cjs");require("./castArray-35947698.cjs");require("./debounce-62f5b6e8.cjs");require("./index-f1c702f6.cjs");require("./raf-8249652f.cjs");require("./index-eea0bcb3.cjs");require("./dropdown-071c5d7e.cjs");const x=e.defineComponent({__name:"index",props:{option:{type:Object,required:!0},scope:{type:Object,required:!0},showMargin:{type:Boolean,default:()=>!1}},setup(t){const u=t,d=e.computed(()=>{const{option:l,scope:n}=u;return typeof l.show=="function"?l.show(n.row,n.$index):l.show!==!1});return(l,n)=>{const s=S.ElButton,f=E.ElPopconfirm;return d.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.option.needCheck?(e.openBlock(),e.createBlock(f,{key:0,title:t.option.needCheck.title,onConfirm:n[0]||(n[0]=r=>t.option.onClick(t.scope.row,t.scope.$index))},{reference:e.withCtx(()=>[e.createVNode(s,{type:t.option.type,disabled:typeof t.option.disabled=="function"?t.option.disabled(t.scope.row,t.scope.$index):t.option.disabled,style:e.normalizeStyle({marginTop:t.showMargin?"10px":0})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(typeof t.option.text=="function"?t.option.text(t.scope.row,t.scope.$index):t.option.text),1)]),_:1},8,["type","disabled","style"])]),_:1},8,["title"])):(e.openBlock(),e.createBlock(s,{key:1,type:t.option.type,disabled:typeof t.option.disabled=="function"?t.option.disabled(t.scope.row,t.scope.$index):t.option.disabled,style:e.normalizeStyle({marginTop:t.showMargin?"10px":0}),onClick:n[1]||(n[1]=r=>t.option.onClick(t.scope.row,t.scope.$index))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(typeof t.option.text=="function"?t.option.text(t.scope.row,t.scope.$index):t.option.text),1)]),_:1},8,["type","disabled","style"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}}),N=e.defineComponent({__name:"index",props:{option:{type:Object,required:!0},scope:{type:Object,required:!0}},setup(t){return(u,d)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(typeof t.option.style=="function"?t.option.style(t.scope.row[t.option.prop],t.scope.row):t.option.style)},e.toDisplayString(typeof t.option.formatter=="function"?t.option.formatter(t.scope.row[t.option.prop],t.scope.row):t.scope.row[t.option.prop]),5))}}),V=e.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]},column:{type:Array,default:()=>[]},loading:{type:Boolean,default:()=>!1},emptyText:{type:String,default:()=>""}},emits:["sortChange"],setup(t,{emit:u}){const d=u,l=t,n=e.computed(()=>l.column.filter(r=>r.show!==!1)),s=r=>{d("sortChange",r)},f=(r,p)=>r.filter(c=>typeof c.show=="function"&&c.show(p.row,p.$index)===!1?!1:c.show!==!1);return(r,p)=>{const c=w.ElIcon,g=T.ElPopover,B=h.ElTableColumn,q=h.ElTable,C=k.ElConfigProvider,b=v.vLoading;return e.openBlock(),e.createBlock(C,{locale:e.unref(k.zhCn)},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(q,{data:t.data,"empty-text":t.emptyText,stripe:"",style:{width:"100%"},onSortChange:s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,o=>(e.openBlock(),e.createBlock(B,{key:o.prop,prop:o.prop,label:o.label,sortable:o.sortable,width:o.width,"min-width":o.minWidth},e.createSlots({_:2},[o.type==="formatter"?{name:"default",fn:e.withCtx(i=>[e.createVNode(N,{option:o,scope:i},null,8,["option","scope"])]),key:"0"}:o.type==="slot"?{name:"default",fn:e.withCtx(i=>[e.renderSlot(r.$slots,o.slot,{row:i.row})]),key:"1"}:o.type==="btns"?{name:"default",fn:e.withCtx(i=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.btns,(a,$)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${a.text}-${$}`},[a.children?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f(a.children,i).length?(e.openBlock(),e.createBlock(g,{key:0,placement:"bottom",trigger:"hover","popper-style":{minWidth:"0px",width:null}},{reference:e.withCtx(()=>[e.createVNode(c,{style:{marginLeft:"10px",verticalAlign:"-5px",cursor:"pointer"},size:"20"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.more_filled_default))]),_:1})]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(a.children,i),(y,m)=>(e.openBlock(),e.createElementBlock("div",{key:`${y.text}-${m}`},[e.createVNode(x,{option:y,scope:i,showMargin:m!==0},null,8,["option","scope","showMargin"])]))),128))]),_:2},1024)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(x,{key:1,option:a,scope:i},null,8,["option","scope"]))],64))),128))]),key:"2"}:void 0]),1032,["prop","label","sortable","width","min-width"]))),128))]),_:1},8,["data","empty-text"])),[[b,t.loading]])]),_:1},8,["locale"])}}}),F={install(t){t.component("st-table",V)}};module.exports=F;
1
+ "use strict";require("./base-ef747d02.cjs");const v=require("./el-loading-cfd86c15.cjs"),k=require("./zh-cn-90317f62.cjs"),h=require("./el-table-column-c974cb96.cjs");require("./el-checkbox-c25236a6.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-b6c99b28.cjs");require("./el-scrollbar-bc3f790d.cjs");require("./el-tag-a33c4b22.cjs");require("./el-popover-0ea8fbf8.cjs");const e=require("vue"),w=require("./index-098c2447.cjs"),E=require("./el-popconfirm-70a976bf.cjs"),S=require("./el-button-eec58cff.cjs"),T=require("./index-f967d6c1.cjs");require("./use-global-config-30d7d8ce.cjs");require("./use-form-common-props-fd9b61a0.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-c108567d.cjs");require("./config-provider-a584d81e.cjs");require("./index-298075cf.cjs");require("./_initCloneObject-52b6a510.cjs");require("./castArray-35947698.cjs");require("./debounce-62f5b6e8.cjs");require("./raf-8249652f.cjs");require("./index-f1c702f6.cjs");require("./index-eea0bcb3.cjs");require("./dropdown-071c5d7e.cjs");const x=e.defineComponent({__name:"index",props:{option:{type:Object,required:!0},scope:{type:Object,required:!0},showMargin:{type:Boolean,default:()=>!1}},setup(t){const u=t,d=e.computed(()=>{const{option:l,scope:n}=u;return typeof l.show=="function"?l.show(n.row,n.$index):l.show!==!1});return(l,n)=>{const s=S.ElButton,f=E.ElPopconfirm;return d.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.option.needCheck?(e.openBlock(),e.createBlock(f,{key:0,title:t.option.needCheck.title,onConfirm:n[0]||(n[0]=r=>t.option.onClick(t.scope.row,t.scope.$index))},{reference:e.withCtx(()=>[e.createVNode(s,{type:t.option.type,disabled:typeof t.option.disabled=="function"?t.option.disabled(t.scope.row,t.scope.$index):t.option.disabled,style:e.normalizeStyle({marginTop:t.showMargin?"10px":0})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(typeof t.option.text=="function"?t.option.text(t.scope.row,t.scope.$index):t.option.text),1)]),_:1},8,["type","disabled","style"])]),_:1},8,["title"])):(e.openBlock(),e.createBlock(s,{key:1,type:t.option.type,disabled:typeof t.option.disabled=="function"?t.option.disabled(t.scope.row,t.scope.$index):t.option.disabled,style:e.normalizeStyle({marginTop:t.showMargin?"10px":0}),onClick:n[1]||(n[1]=r=>t.option.onClick(t.scope.row,t.scope.$index))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(typeof t.option.text=="function"?t.option.text(t.scope.row,t.scope.$index):t.option.text),1)]),_:1},8,["type","disabled","style"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}}),N=e.defineComponent({__name:"index",props:{option:{type:Object,required:!0},scope:{type:Object,required:!0}},setup(t){return(u,d)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(typeof t.option.style=="function"?t.option.style(t.scope.row[t.option.prop],t.scope.row):t.option.style)},e.toDisplayString(typeof t.option.formatter=="function"?t.option.formatter(t.scope.row[t.option.prop],t.scope.row):t.scope.row[t.option.prop]),5))}}),V=e.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]},column:{type:Array,default:()=>[]},loading:{type:Boolean,default:()=>!1},emptyText:{type:String,default:()=>""}},emits:["sortChange"],setup(t,{emit:u}){const d=u,l=t,n=e.computed(()=>l.column.filter(r=>r.show!==!1)),s=r=>{d("sortChange",r)},f=(r,p)=>r.filter(c=>typeof c.show=="function"&&c.show(p.row,p.$index)===!1?!1:c.show!==!1);return(r,p)=>{const c=w.ElIcon,g=T.ElPopover,B=h.ElTableColumn,q=h.ElTable,C=k.ElConfigProvider,b=v.vLoading;return e.openBlock(),e.createBlock(C,{locale:e.unref(k.zhCn)},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(q,{data:t.data,"empty-text":t.emptyText,stripe:"",style:{width:"100%"},onSortChange:s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,o=>(e.openBlock(),e.createBlock(B,{key:o.prop,prop:o.prop,label:o.label,sortable:o.sortable,width:o.width,"min-width":o.minWidth},e.createSlots({_:2},[o.type==="formatter"?{name:"default",fn:e.withCtx(i=>[e.createVNode(N,{option:o,scope:i},null,8,["option","scope"])]),key:"0"}:o.type==="slot"?{name:"default",fn:e.withCtx(i=>[e.renderSlot(r.$slots,o.slot,{row:i.row})]),key:"1"}:o.type==="btns"?{name:"default",fn:e.withCtx(i=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.btns,(a,$)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${a.text}-${$}`},[a.children?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f(a.children,i).length?(e.openBlock(),e.createBlock(g,{key:0,placement:"bottom",trigger:"hover","popper-style":{minWidth:"0px",width:null}},{reference:e.withCtx(()=>[e.createVNode(c,{style:{marginLeft:"10px",verticalAlign:"-5px",cursor:"pointer"},size:"20"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.more_filled_default))]),_:1})]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(a.children,i),(y,m)=>(e.openBlock(),e.createElementBlock("div",{key:`${y.text}-${m}`},[e.createVNode(x,{option:y,scope:i,showMargin:m!==0},null,8,["option","scope","showMargin"])]))),128))]),_:2},1024)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(x,{key:1,option:a,scope:i},null,8,["option","scope"]))],64))),128))]),key:"2"}:void 0]),1032,["prop","label","sortable","width","min-width"]))),128))]),_:1},8,["data","empty-text"])),[[b,t.loading]])]),_:1},8,["locale"])}}}),F={install(t){t.component("st-table",V)}};module.exports=F;
package/es/Table.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import "./base-a5af3db3.js";
2
2
  import { v as L } from "./el-loading-f6022062.js";
3
3
  import { z as N, E as P } from "./zh-cn-e963c628.js";
4
- import { b as V, c as D } from "./el-table-column-72c50d58.js";
4
+ import { E as V, a as D } from "./el-table-column-376cd907.js";
5
+ import "./el-checkbox-7421ccd3.js";
5
6
  import "./el-tooltip-4ed993c7.js";
6
7
  import "./el-popper-b4f97157.js";
7
8
  import "./el-scrollbar-323542e7.js";
@@ -22,8 +23,8 @@ import "./index-844bdd85.js";
22
23
  import "./_initCloneObject-eaef9418.js";
23
24
  import "./castArray-7741a212.js";
24
25
  import "./debounce-8d53f4dd.js";
25
- import "./index-2e331d74.js";
26
26
  import "./raf-80ef0c0a.js";
27
+ import "./index-2e331d74.js";
27
28
  import "./index-657047bb.js";
28
29
  import "./dropdown-a59bba73.js";
29
30
  const T = /* @__PURE__ */ C({
@@ -44,10 +45,10 @@ const T = /* @__PURE__ */ C({
44
45
  },
45
46
  setup(e) {
46
47
  const u = e, y = j(() => {
47
- const { option: s, scope: i } = u;
48
- return typeof s.show == "function" ? s.show(i.row, i.$index) : s.show !== !1;
48
+ const { option: p, scope: i } = u;
49
+ return typeof p.show == "function" ? p.show(i.row, i.$index) : p.show !== !1;
49
50
  });
50
- return (s, i) => {
51
+ return (p, i) => {
51
52
  const w = Q, h = K;
52
53
  return y.value ? (t(), l(c, { key: 0 }, [
53
54
  e.option.needCheck ? (t(), d(h, {
@@ -122,11 +123,11 @@ const T = /* @__PURE__ */ C({
122
123
  },
123
124
  emits: ["sortChange"],
124
125
  setup(e, { emit: u }) {
125
- const y = u, s = e, i = j(() => s.column.filter((r) => r.show !== !1)), w = (r) => {
126
+ const y = u, p = e, i = j(() => p.column.filter((r) => r.show !== !1)), w = (r) => {
126
127
  y("sortChange", r);
127
- }, h = (r, x) => r.filter((p) => typeof p.show == "function" && p.show(x.row, x.$index) === !1 ? !1 : p.show !== !1);
128
+ }, h = (r, x) => r.filter((s) => typeof s.show == "function" && s.show(x.row, x.$index) === !1 ? !1 : s.show !== !1);
128
129
  return (r, x) => {
129
- const p = J, M = R, q = V, z = D, B = P, O = L;
130
+ const s = J, M = R, q = V, z = D, B = P, O = L;
130
131
  return t(), d(B, { locale: S(N) }, {
131
132
  default: n(() => [
132
133
  W((t(), d(z, {
@@ -176,7 +177,7 @@ const T = /* @__PURE__ */ C({
176
177
  "popper-style": { minWidth: "0px", width: null }
177
178
  }, {
178
179
  reference: n(() => [
179
- m(p, {
180
+ m(s, {
180
181
  style: { marginLeft: "10px", verticalAlign: "-5px", cursor: "pointer" },
181
182
  size: "20"
182
183
  }, {
@@ -219,11 +220,11 @@ const T = /* @__PURE__ */ C({
219
220
  }, 8, ["locale"]);
220
221
  };
221
222
  }
222
- }), Ee = {
223
+ }), Se = {
223
224
  install(e) {
224
225
  e.component("st-table", X);
225
226
  }
226
227
  };
227
228
  export {
228
- Ee as default
229
+ Se as default
229
230
  };