@web-utils/component 1.2.5 → 1.2.6

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.
Files changed (111) hide show
  1. package/README.md +27 -27
  2. package/dist/chunks/163eed3b.js +16 -1
  3. package/dist/chunks/2bd4e340.js +184 -0
  4. package/dist/chunks/6499de3a.js +30 -1
  5. package/dist/chunks/7af3ceb1.js +75 -0
  6. package/dist/chunks/86bcadec.js +24 -0
  7. package/dist/chunks/8bbde9bf.js +81 -1
  8. package/dist/chunks/90bd3d52.js +26 -1
  9. package/dist/chunks/92404ceb.js +126 -0
  10. package/dist/chunks/a73fe8ee.js +11 -0
  11. package/dist/chunks/df803484.js +60 -0
  12. package/dist/components/address-input/index.js +113 -1
  13. package/dist/components/aside-menu/index.js +58 -1
  14. package/dist/components/awesome-button/index.js +82 -1
  15. package/dist/components/capsule-tab/index.js +52 -1
  16. package/dist/components/chunk-file-uploader/index.js +119 -1
  17. package/dist/components/chunk-file-uploader-button/index.js +60 -1
  18. package/dist/components/chunk-file-uploader-drop/index.js +65 -1
  19. package/dist/components/chunk-file-uploader-file/index.js +311 -1
  20. package/dist/components/chunk-file-uploader-files/index.js +49 -1
  21. package/dist/components/chunk-file-uploader-list/index.js +50 -1
  22. package/dist/components/chunk-file-uploader-un-support/index.js +51 -1
  23. package/dist/components/code-mirror-editor/index.js +310 -6
  24. package/dist/components/color-picker/index.js +110 -1
  25. package/dist/components/confirm-button/index.js +57 -1
  26. package/dist/components/confirmable/index.js +28 -1
  27. package/dist/components/context-menu/index.js +236 -1
  28. package/dist/components/custom-scrollbar/index.js +150 -1
  29. package/dist/components/data-table-picker/index.js +137 -1
  30. package/dist/components/dynamic-table/index.js +195 -1
  31. package/dist/components/e-charts/index.js +229 -1
  32. package/dist/components/editable-progress/index.js +141 -1
  33. package/dist/components/editable-tree/index.js +789 -1
  34. package/dist/components/egd-collapse/index.js +79 -1
  35. package/dist/components/egd-collapse-item/index.js +132 -1
  36. package/dist/components/el-color-picker-dropdown/index.js +170 -1
  37. package/dist/components/element-dialog/index.js +242 -1
  38. package/dist/components/empty-view/index.js +69 -1
  39. package/dist/components/error-view/index.js +61 -1
  40. package/dist/components/flex-column/index.js +50 -1
  41. package/dist/components/flex-item/index.js +66 -1
  42. package/dist/components/flex-row/index.js +50 -1
  43. package/dist/components/flex-scroller/index.js +47 -1
  44. package/dist/components/form-button/index.js +80 -1
  45. package/dist/components/form-cascader/index.js +151 -1
  46. package/dist/components/form-checkbox-group/index.js +192 -1
  47. package/dist/components/form-date-picker/index.js +182 -1
  48. package/dist/components/form-holder/index.js +90 -1
  49. package/dist/components/form-input/index.js +106 -1
  50. package/dist/components/form-input-email/index.js +97 -1
  51. package/dist/components/form-input-id-card/index.js +104 -1
  52. package/dist/components/form-input-number/index.js +123 -1
  53. package/dist/components/form-input-phone-number/index.js +98 -1
  54. package/dist/components/form-input-time/index.js +124 -1
  55. package/dist/components/form-item/index.js +120 -1
  56. package/dist/components/form-item-config-provider/index.js +63 -1
  57. package/dist/components/form-item-group/index.js +169 -1
  58. package/dist/components/form-radio-group/index.js +170 -1
  59. package/dist/components/form-select/index.js +154 -1
  60. package/dist/components/form-switch/index.js +97 -1
  61. package/dist/components/form-textarea/index.js +102 -1
  62. package/dist/components/form-view/index.js +343 -1
  63. package/dist/components/guide-steps/index.js +94 -1
  64. package/dist/components/icon-card/index.js +62 -1
  65. package/dist/components/iframe-window/index.js +99 -1
  66. package/dist/components/input-number/index.js +274 -1
  67. package/dist/components/input-number-range/index.js +110 -1
  68. package/dist/components/j-s-x-component/index.js +16 -1
  69. package/dist/components/keep-view-alive/index.js +119 -1
  70. package/dist/components/loading-view/index.js +61 -1
  71. package/dist/components/nav-bar/index.js +52 -1
  72. package/dist/components/not-implement/index.js +35 -1
  73. package/dist/components/page/index.js +40 -1
  74. package/dist/components/page-header/index.js +56 -1
  75. package/dist/components/page-index/index.js +151 -1
  76. package/dist/components/page-index-top/index.js +119 -1
  77. package/dist/components/page-skeleton/index.js +56 -1
  78. package/dist/components/page-skeleton-new/index.js +98 -1
  79. package/dist/components/pageable-table/index.js +429 -1
  80. package/dist/components/pageable-view/index.js +328 -2
  81. package/dist/components/photo-swipe/index.js +187 -1
  82. package/dist/components/resize-observer/index.js +62 -1
  83. package/dist/components/search-popover/index.js +391 -2
  84. package/dist/components/sign-panel/index.js +242 -1
  85. package/dist/components/split-pane/index.js +209 -1
  86. package/dist/components/stateful/index.js +84 -1
  87. package/dist/components/static-pageable-table/index.js +92 -1
  88. package/dist/components/swiper/index.js +158 -1
  89. package/dist/components/tab/index.js +145 -1
  90. package/dist/components/tab-item/index.js +73 -1
  91. package/dist/components/table-column/index.js +89 -1
  92. package/dist/components/table-view/index.js +363 -1
  93. package/dist/components/tag-render/index.js +97 -1
  94. package/dist/components/tinymce-editor/index.js +173 -1
  95. package/dist/components/tinymce-wrapper/index.js +618 -1
  96. package/dist/components/toolbar/index.js +217 -1
  97. package/dist/components/toolbar-button/index.js +90 -1
  98. package/dist/components/trigger/index.js +71 -1
  99. package/dist/components/vue-tags-input/index.js +439 -1
  100. package/dist/components/watermark/index.js +63 -1
  101. package/dist/components/x-dialog/index.js +173 -1
  102. package/dist/index.css +2102 -1
  103. package/dist/index.es.js +2992 -2075
  104. package/package.json +29 -29
  105. package/web-types.json +22 -16
  106. package/dist/chunks/23bd3525.js +0 -1
  107. package/dist/chunks/65f4f4f2.js +0 -1
  108. package/dist/chunks/8473fc69.js +0 -1
  109. package/dist/chunks/a125d16c.js +0 -1
  110. package/dist/chunks/addb6ed5.js +0 -1
  111. package/dist/chunks/f15477c7.js +0 -1
@@ -1 +1,236 @@
1
- import{n as d}from"../../chunks/6499de3a.js";var u=function(){var t=this,i=t.$createElement,e=t._self._c||i;return t.visible?e("div",{staticClass:"cm-container",style:t.axisComputed},[e("svg",{staticStyle:{position:"absolute",width:"0",height:"0",overflow:"hidden"},attrs:{"aria-hidden":"true"}},[e("symbol",{attrs:{id:"icon-arrow",viewBox:"0 0 1024 1024"}},[e("path",{attrs:{d:"M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"}})])]),e("ul",{staticClass:"cm-ul cm-ul-1 easy-cm-ul",class:t.underline?"cm-underline":""},t._l(t.list,function(n,o){return e("li",{key:o,style:t.liStyle},[e("div",{class:t.firstLeft?"cm-left":"",on:{click:function(s){return s.stopPropagation(),t.onItemClick(n,[o])}}},[e("i",{staticClass:"cm-item-icon",class:n.icon}),e("span",{staticClass:"cm-item-label"},[t._v(t._s(n.text))]),t.arrow&&n.children&&n.children.length>0?e("svg",{staticClass:"icon",attrs:{"aria-hidden":"true"}},[e("use",{attrs:{"xlink:href":"#icon-arrow"}})]):t._e()]),n.children&&n.children.length>0?e("ul",{staticClass:"cm-ul cm-ul-2 easy-cm-ul",class:t.underline?"cm-underline":"",style:t.secondBorderCheck(o)},t._l(n.children,function(s,r){return e("li",{key:r,style:t.liStyle},[e("div",{class:t.secondLeft?"cm-left":"",on:{click:function(l){return l.stopPropagation(),t.onItemClick(s,[o,r])}}},[e("i",{staticClass:"cm-item-icon",class:s.icon}),e("span",{staticClass:"cm-item-label"},[t._v(t._s(s.text))]),t.arrow&&s.children&&s.children.length>0?e("svg",{staticClass:"icon",attrs:{"aria-hidden":"true"}},[e("use",{attrs:{"xlink:href":"#icon-arrow"}})]):t._e()]),s.children&&s.children.length>0?e("ul",{staticClass:"cm-ul cm-ul-3 easy-cm-ul",class:t.underline?"cm-underline":"",style:t.thirdBorderCheck(o,r)},t._l(s.children,function(l,c){return e("li",{key:c,style:t.liStyle},[e("div",{on:{click:function(h){return h.stopPropagation(),t.onItemClick(l,[o,r,c])}}},[e("i",{staticClass:"cm-item-icon",class:l.icon}),e("span",{staticClass:"cm-item-label"},[t._v(t._s(l.text))])])])}),0):t._e()])}),0):t._e()])}),0)]):t._e()},m=[];const f={name:"ContextMenu",props:{list:{type:Array,required:!0},underline:{type:Boolean,default:!1},arrow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},itemWidth:{type:Number,default:140},itemHeight:{type:Number,default:36},itemFontSize:{type:[Number,String],default:12},offset:{type:Object,default:()=>({x:6,y:2})},borderWidth:{type:Number,default:6}},data(){return{visible:!1,axis:{x:0,y:0}}},computed:{axisComputed(){return{top:`${this.axis.y+this.offset.y}px`,left:`${this.axis.x+this.offset.x}px`}},liStyle(){return{width:`${this.itemWidth}px`,height:`${this.itemHeight}px`,lineHeight:`${this.itemHeight}px`,fontSize:`${this.itemFontSize}px`}},firstLeft(){const t=document.body.offsetWidth;return this.axis.x+this.itemWidth*2>=t},secondLeft(){const t=document.body.offsetWidth;return this.axis.x+this.itemWidth*3>=t}},watch:{axis(){if(this.border){const t=document.body.offsetWidth,i=document.body.offsetHeight;this.axis.x+this.offset.x+this.itemWidth>=t&&(this.axis.x=t-this.itemWidth-this.borderWidth-this.offset.x),this.axis.y+this.offset.y+this.itemHeight*this.list.length>=i&&(this.axis.y=i-this.itemHeight*this.list.length-this.borderWidth-this.offset.y)}}},methods:{secondBorderCheck(t){const i=document.body.offsetWidth,e=document.body.offsetHeight,n=this.axis.y+(t+this.list[t].children.length)*this.itemHeight;return{left:this.axis.x+this.itemWidth*2>=i?"-100%":"100%",top:e>=n?0:`${-(this.list[t].children.length-1)*this.itemHeight}px`}},thirdBorderCheck(t,i){const e=document.body.offsetWidth,n=document.body.offsetHeight,o=this.axis.y+this.list[t].children[i].children.length*this.itemHeight+(t+i)*this.itemHeight+parseInt(this.secondBorderCheck(t).top);return{left:this.axis.x+this.itemWidth*3>=e?"-100%":"100%",top:o>n?`${-(this.list[t].children[i].children.length-1)*this.itemHeight}px`:0}},show(t){document.addEventListener("click",this.hide,!0),this.axis={x:t.clientX,y:t.clientY},this.visible=!0},hide(){this.visible=!1,document.removeEventListener("click",this.hide)},onItemClick(t,i){this.$emit("on-item-click",t,i)}}},a={};var p=d(f,u,m,!1,x,null,null,null);function x(t){for(let i in a)this[i]=a[i]}var y=function(){return p.exports}();export{y as default};
1
+ import { n as d } from "../../chunks/6499de3a.js";
2
+ var u = function() {
3
+ var t = this, i = t.$createElement, e = t._self._c || i;
4
+ return t.visible ? e("div", {
5
+ staticClass: "cm-container",
6
+ style: t.axisComputed
7
+ }, [e("svg", {
8
+ staticStyle: {
9
+ position: "absolute",
10
+ width: "0",
11
+ height: "0",
12
+ overflow: "hidden"
13
+ },
14
+ attrs: {
15
+ "aria-hidden": "true"
16
+ }
17
+ }, [e("symbol", {
18
+ attrs: {
19
+ id: "icon-arrow",
20
+ viewBox: "0 0 1024 1024"
21
+ }
22
+ }, [e("path", {
23
+ attrs: {
24
+ d: "M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"
25
+ }
26
+ })])]), e("ul", {
27
+ staticClass: "cm-ul cm-ul-1 easy-cm-ul",
28
+ class: t.underline ? "cm-underline" : ""
29
+ }, t._l(t.list, function(s, l) {
30
+ return e("li", {
31
+ key: l,
32
+ style: t.liStyle
33
+ }, [e("div", {
34
+ class: t.firstLeft ? "cm-left" : "",
35
+ on: {
36
+ click: function(n) {
37
+ return n.stopPropagation(), t.onItemClick(s, [l]);
38
+ }
39
+ }
40
+ }, [e("i", {
41
+ staticClass: "cm-item-icon",
42
+ class: s.icon
43
+ }), e("span", {
44
+ staticClass: "cm-item-label"
45
+ }, [t._v(t._s(s.text))]), t.arrow && s.children && s.children.length > 0 ? e("svg", {
46
+ staticClass: "icon",
47
+ attrs: {
48
+ "aria-hidden": "true"
49
+ }
50
+ }, [e("use", {
51
+ attrs: {
52
+ "xlink:href": "#icon-arrow"
53
+ }
54
+ })]) : t._e()]), s.children && s.children.length > 0 ? e("ul", {
55
+ staticClass: "cm-ul cm-ul-2 easy-cm-ul",
56
+ class: t.underline ? "cm-underline" : "",
57
+ style: t.secondBorderCheck(l)
58
+ }, t._l(s.children, function(n, o) {
59
+ return e("li", {
60
+ key: o,
61
+ style: t.liStyle
62
+ }, [e("div", {
63
+ class: t.secondLeft ? "cm-left" : "",
64
+ on: {
65
+ click: function(r) {
66
+ return r.stopPropagation(), t.onItemClick(n, [l, o]);
67
+ }
68
+ }
69
+ }, [e("i", {
70
+ staticClass: "cm-item-icon",
71
+ class: n.icon
72
+ }), e("span", {
73
+ staticClass: "cm-item-label"
74
+ }, [t._v(t._s(n.text))]), t.arrow && n.children && n.children.length > 0 ? e("svg", {
75
+ staticClass: "icon",
76
+ attrs: {
77
+ "aria-hidden": "true"
78
+ }
79
+ }, [e("use", {
80
+ attrs: {
81
+ "xlink:href": "#icon-arrow"
82
+ }
83
+ })]) : t._e()]), n.children && n.children.length > 0 ? e("ul", {
84
+ staticClass: "cm-ul cm-ul-3 easy-cm-ul",
85
+ class: t.underline ? "cm-underline" : "",
86
+ style: t.thirdBorderCheck(l, o)
87
+ }, t._l(n.children, function(r, c) {
88
+ return e("li", {
89
+ key: c,
90
+ style: t.liStyle
91
+ }, [e("div", {
92
+ on: {
93
+ click: function(a) {
94
+ return a.stopPropagation(), t.onItemClick(r, [l, o, c]);
95
+ }
96
+ }
97
+ }, [e("i", {
98
+ staticClass: "cm-item-icon",
99
+ class: r.icon
100
+ }), e("span", {
101
+ staticClass: "cm-item-label"
102
+ }, [t._v(t._s(r.text))])])]);
103
+ }), 0) : t._e()]);
104
+ }), 0) : t._e()]);
105
+ }), 0)]) : t._e();
106
+ }, m = [];
107
+ const f = {
108
+ name: "ContextMenu",
109
+ props: {
110
+ list: {
111
+ type: Array,
112
+ required: !0
113
+ },
114
+ underline: {
115
+ type: Boolean,
116
+ default: !1
117
+ },
118
+ arrow: {
119
+ type: Boolean,
120
+ default: !0
121
+ },
122
+ border: {
123
+ type: Boolean,
124
+ default: !0
125
+ },
126
+ itemWidth: {
127
+ type: Number,
128
+ default: 140
129
+ },
130
+ itemHeight: {
131
+ type: Number,
132
+ default: 36
133
+ },
134
+ itemFontSize: {
135
+ type: [Number, String],
136
+ default: 12
137
+ },
138
+ offset: {
139
+ type: Object,
140
+ default: () => ({
141
+ x: 6,
142
+ y: 2
143
+ })
144
+ },
145
+ borderWidth: {
146
+ type: Number,
147
+ default: 6
148
+ }
149
+ },
150
+ data() {
151
+ return {
152
+ visible: !1,
153
+ axis: {
154
+ x: 0,
155
+ y: 0
156
+ }
157
+ };
158
+ },
159
+ computed: {
160
+ axisComputed() {
161
+ return {
162
+ top: `${this.axis.y + this.offset.y}px`,
163
+ left: `${this.axis.x + this.offset.x}px`
164
+ };
165
+ },
166
+ liStyle() {
167
+ return {
168
+ width: `${this.itemWidth}px`,
169
+ height: `${this.itemHeight}px`,
170
+ lineHeight: `${this.itemHeight}px`,
171
+ fontSize: `${this.itemFontSize}px`
172
+ };
173
+ },
174
+ firstLeft() {
175
+ const t = document.body.offsetWidth;
176
+ return this.axis.x + this.itemWidth * 2 >= t;
177
+ },
178
+ secondLeft() {
179
+ const t = document.body.offsetWidth;
180
+ return this.axis.x + this.itemWidth * 3 >= t;
181
+ }
182
+ },
183
+ watch: {
184
+ axis() {
185
+ if (this.border) {
186
+ const t = document.body.offsetWidth, i = document.body.offsetHeight;
187
+ this.axis.x + this.offset.x + this.itemWidth >= t && (this.axis.x = t - this.itemWidth - this.borderWidth - this.offset.x), this.axis.y + this.offset.y + this.itemHeight * this.list.length >= i && (this.axis.y = i - this.itemHeight * this.list.length - this.borderWidth - this.offset.y);
188
+ }
189
+ }
190
+ },
191
+ methods: {
192
+ secondBorderCheck(t) {
193
+ const i = document.body.offsetWidth, e = document.body.offsetHeight, s = this.axis.y + (t + this.list[t].children.length) * this.itemHeight;
194
+ return {
195
+ left: this.axis.x + this.itemWidth * 2 >= i ? "-100%" : "100%",
196
+ top: e >= s ? 0 : `${-(this.list[t].children.length - 1) * this.itemHeight}px`
197
+ };
198
+ },
199
+ thirdBorderCheck(t, i) {
200
+ const e = document.body.offsetWidth, s = document.body.offsetHeight, l = this.axis.y + this.list[t].children[i].children.length * this.itemHeight + (t + i) * this.itemHeight + parseInt(this.secondBorderCheck(t).top);
201
+ return {
202
+ left: this.axis.x + this.itemWidth * 3 >= e ? "-100%" : "100%",
203
+ top: l > s ? `${-(this.list[t].children[i].children.length - 1) * this.itemHeight}px` : 0
204
+ };
205
+ },
206
+ show(t) {
207
+ document.addEventListener("click", this.hide, !0), this.axis = { x: t.clientX, y: t.clientY }, this.visible = !0;
208
+ },
209
+ hide() {
210
+ this.visible = !1, document.removeEventListener("click", this.hide);
211
+ },
212
+ onItemClick(t, i) {
213
+ this.$emit("on-item-click", t, i);
214
+ }
215
+ }
216
+ }, h = {};
217
+ var y = /* @__PURE__ */ d(
218
+ f,
219
+ u,
220
+ m,
221
+ !1,
222
+ x,
223
+ null,
224
+ null,
225
+ null
226
+ );
227
+ function x(t) {
228
+ for (let i in h)
229
+ this[i] = h[i];
230
+ }
231
+ const _ = /* @__PURE__ */ function() {
232
+ return y.exports;
233
+ }();
234
+ export {
235
+ _ as default
236
+ };
@@ -1 +1,150 @@
1
- var c=Object.defineProperty,h=Object.defineProperties;var d=Object.getOwnPropertyDescriptors;var o=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;var l=(t,e,s)=>e in t?c(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,i=(t,e)=>{for(var s in e||(e={}))v.call(e,s)&&l(t,s,e[s]);if(o)for(var s of o(e))p.call(e,s)&&l(t,s,e[s]);return t},a=(t,e)=>h(t,d(e));import r from"overlayscrollbars";import"overlayscrollbars/css/OverlayScrollbars.css";import{n as f}from"../../chunks/6499de3a.js";var u=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"os-host"},[s("div",{staticClass:"os-resize-observer-host"}),s("div",{staticClass:"os-padding"},[s("div",{ref:"viewport",staticClass:"os-viewport"},[s("div",{ref:"content",staticClass:"os-content"},[t._t("default")],2)])]),t._m(0),t._m(1),s("div",{staticClass:"os-scrollbar-corner"})])},m=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"os-scrollbar os-scrollbar-horizontal "},[s("div",{staticClass:"os-scrollbar-track"},[s("div",{staticClass:"os-scrollbar-handle"})])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"os-scrollbar os-scrollbar-vertical"},[s("div",{staticClass:"os-scrollbar-track"},[s("div",{staticClass:"os-scrollbar-handle"})])])}];const _={name:"CustomScrollbar",props:{options:{type:Object,default:void 0},extensions:{type:[String,Array,Object],default:void 0},theme:{type:String,default:void 0},onLoadMore:{type:Function,default:null},onScroll:{type:Function},reverse:{type:Boolean,default:!1},textarea:{type:Boolean,default:!1}},computed:{innerOptions(){const t=this.options||{};return a(i({},t),{className:this.theme||"os-theme-dark",scrollbars:{autoHide:"l",autoHideDelay:100},callbacks:{onScroll:this.internalScroll}})}},watch:{innerOptions(t){const e=this.scroller;r.valid(e)&&e.options(t)}},mounted(){this.viewport=this.$refs.viewport,this.scroller=r(this.getContentWrapper(),this.options||{className:this.theme||"os-theme-dark",scrollbars:{autoHide:"l",autoHideDelay:100},callbacks:{onScroll:this.internalScroll}},this.extensions)},activated(){var t;this.$refs.viewport.scrollTop=(t=this.scrollOffset)!=null?t:0},deactivated(){this.scrollOffset=this.$refs.viewport.scrollTop},beforeDestroy(){const t=this.scroller;r.valid(t)&&(t.destroy(),this.scroller=null)},methods:{scrollBottom(){this.$refs.viewport.scrollTop=this.$refs.viewport.scrollHeight},getScroller(){return this.scroller},getScrollHeight(){return this.$refs.viewport.scrollHeight},setScrollTop(t){this.$refs.viewport.scrollTop=t},getContentWrapper(){return this.textarea?this.$refs.content.querySelector("textarea"):this.$el},internalScroll(t){this.onScroll&&this.onScroll(t);const e=t.target;if(!this.reverse&&Math.ceil(e.clientHeight+e.scrollTop)>=e.scrollHeight){this.onLoadMore&&this.onLoadMore();return}this.reverse&&e.scrollTop===0&&this.onLoadMore&&this.onLoadMore()}}},n={};var b=f(_,u,m,!1,S,null,null,null);function S(t){for(let e in n)this[e]=n[e]}var C=function(){return b.exports}();export{C as default};
1
+ import r from "overlayscrollbars";
2
+ import "overlayscrollbars/css/OverlayScrollbars.css";
3
+ import { n as l } from "../../chunks/6499de3a.js";
4
+ var i = function() {
5
+ var t = this, e = t.$createElement, s = t._self._c || e;
6
+ return s("div", {
7
+ staticClass: "os-host"
8
+ }, [s("div", {
9
+ staticClass: "os-resize-observer-host"
10
+ }), s("div", {
11
+ staticClass: "os-padding"
12
+ }, [s("div", {
13
+ ref: "viewport",
14
+ staticClass: "os-viewport"
15
+ }, [s("div", {
16
+ ref: "content",
17
+ staticClass: "os-content"
18
+ }, [t._t("default")], 2)])]), t._m(0), t._m(1), s("div", {
19
+ staticClass: "os-scrollbar-corner"
20
+ })]);
21
+ }, a = [function() {
22
+ var t = this, e = t.$createElement, s = t._self._c || e;
23
+ return s("div", {
24
+ staticClass: "os-scrollbar os-scrollbar-horizontal"
25
+ }, [s("div", {
26
+ staticClass: "os-scrollbar-track"
27
+ }, [s("div", {
28
+ staticClass: "os-scrollbar-handle"
29
+ })])]);
30
+ }, function() {
31
+ var t = this, e = t.$createElement, s = t._self._c || e;
32
+ return s("div", {
33
+ staticClass: "os-scrollbar os-scrollbar-vertical"
34
+ }, [s("div", {
35
+ staticClass: "os-scrollbar-track"
36
+ }, [s("div", {
37
+ staticClass: "os-scrollbar-handle"
38
+ })])]);
39
+ }];
40
+ const n = {
41
+ name: "CustomScrollbar",
42
+ props: {
43
+ options: {
44
+ type: Object,
45
+ default: void 0
46
+ },
47
+ extensions: {
48
+ type: [String, Array, Object],
49
+ default: void 0
50
+ },
51
+ theme: {
52
+ type: String,
53
+ default: void 0
54
+ },
55
+ onLoadMore: {
56
+ type: Function,
57
+ default: null
58
+ },
59
+ onScroll: {
60
+ type: Function
61
+ },
62
+ reverse: {
63
+ type: Boolean,
64
+ default: !1
65
+ },
66
+ textarea: {
67
+ type: Boolean,
68
+ default: !1
69
+ }
70
+ },
71
+ computed: {
72
+ innerOptions() {
73
+ return { ...this.options || {}, className: this.theme || "os-theme-dark", scrollbars: { autoHide: "l", autoHideDelay: 100 }, callbacks: { onScroll: this.internalScroll } };
74
+ }
75
+ },
76
+ watch: {
77
+ innerOptions(t) {
78
+ const e = this.scroller;
79
+ r.valid(e) && e.options(t);
80
+ }
81
+ },
82
+ mounted() {
83
+ this.viewport = this.$refs.viewport, this.scroller = r(
84
+ this.getContentWrapper(),
85
+ this.options || {
86
+ className: this.theme || "os-theme-dark",
87
+ scrollbars: { autoHide: "l", autoHideDelay: 100 },
88
+ callbacks: { onScroll: this.internalScroll }
89
+ },
90
+ this.extensions
91
+ );
92
+ },
93
+ activated() {
94
+ var t;
95
+ this.$refs.viewport.scrollTop = (t = this.scrollOffset) != null ? t : 0;
96
+ },
97
+ deactivated() {
98
+ this.scrollOffset = this.$refs.viewport.scrollTop;
99
+ },
100
+ beforeDestroy() {
101
+ const t = this.scroller;
102
+ r.valid(t) && (t.destroy(), this.scroller = null);
103
+ },
104
+ methods: {
105
+ scrollBottom() {
106
+ this.$refs.viewport.scrollTop = this.$refs.viewport.scrollHeight;
107
+ },
108
+ getScroller() {
109
+ return this.scroller;
110
+ },
111
+ getScrollHeight() {
112
+ return this.$refs.viewport.scrollHeight;
113
+ },
114
+ setScrollTop(t) {
115
+ this.$refs.viewport.scrollTop = t;
116
+ },
117
+ getContentWrapper() {
118
+ return this.textarea ? this.$refs.content.querySelector("textarea") : this.$el;
119
+ },
120
+ internalScroll(t) {
121
+ this.onScroll && this.onScroll(t);
122
+ const e = t.target;
123
+ if (!this.reverse && Math.ceil(e.clientHeight + e.scrollTop) >= e.scrollHeight) {
124
+ this.onLoadMore && this.onLoadMore();
125
+ return;
126
+ }
127
+ this.reverse && e.scrollTop === 0 && this.onLoadMore && this.onLoadMore();
128
+ }
129
+ }
130
+ }, o = {};
131
+ var c = /* @__PURE__ */ l(
132
+ n,
133
+ i,
134
+ a,
135
+ !1,
136
+ h,
137
+ null,
138
+ null,
139
+ null
140
+ );
141
+ function h(t) {
142
+ for (let e in o)
143
+ this[e] = o[e];
144
+ }
145
+ const f = /* @__PURE__ */ function() {
146
+ return c.exports;
147
+ }();
148
+ export {
149
+ f as default
150
+ };
@@ -1 +1,137 @@
1
- import{dialog as o}from"@web-utils/core/dist/mixin/index";import{f as r}from"../../chunks/8473fc69.js";import{n as s}from"../../chunks/6499de3a.js";var a=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("ElementDialog",{attrs:{visible:e.show,title:e.title,width:e.width,height:e.height,"flex-column":""},on:{"update:visible":function(n){e.show=n},close:e.close,closed:e.closed},scopedSlots:e._u([{key:"default",fn:function(){return[e._t("search-form"),l("PageableTable",{ref:"pageableTable",staticStyle:{height:"60vh"},attrs:{"highlight-current-row":"","hide-on-single-page":"",model:e.model,columns:e.columns,api:e.api,"row-class-name":"pointer",multiple:e.multiple},on:{"selection-change":e.selectionChange,"row-click":e.toggleRowSelection,"current-change":e.currentChange}},[e._t("default")],2)]},proxy:!0},{key:"footer",fn:function(){return[l("ElButton",{attrs:{size:"mini",type:"primary"},on:{click:e.confirm}},[e._v(" \u786E \u5B9A ")]),l("ElButton",{attrs:{size:"mini"},on:{click:e.close}},[e._v(" \u5173 \u95ED ")])]},proxy:!0}],null,!0)})},c=[];const u={name:"DataTablePicker",mixins:[o],props:{api:Function,columns:Array,title:String,width:{type:String,default:"60vw"},height:{type:String,default:null},model:{type:Object,default:()=>{}},multiple:{type:Boolean,default:!0}},data(){return{selectedRows:[],currentRow:null}},methods:{filterTableColumnProperties:r,selectionChange(e){this.selectedRows=e},currentChange(e){this.currentRow=e},toggleRowSelection(e){this.$refs.pageableTable.$refs.table.toggleRowSelection(e)},confirm(){var e;this.multiple?(e=this.selectedRows)!=null&&e.length?(this.$emit("confirm",this.selectedRows),this.close()):this.$message.warning("\u8BF7\u9009\u62E9"):this.currentRow?(this.$emit("confirm",this.currentRow),this.close()):this.$message.warning("\u8BF7\u9009\u62E9")}}},i={};var h=s(u,a,c,!1,m,null,null,null);function m(e){for(let t in i)this[t]=i[t]}var f=function(){return h.exports}();export{f as default};
1
+ import { dialog as o } from "@web-utils/core/dist/mixin/index";
2
+ import { f as r } from "../../chunks/2bd4e340.js";
3
+ import { n as s } from "../../chunks/6499de3a.js";
4
+ var a = function() {
5
+ var e = this, t = e.$createElement, l = e._self._c || t;
6
+ return l("ElementDialog", {
7
+ attrs: {
8
+ visible: e.show,
9
+ title: e.title,
10
+ width: e.width,
11
+ height: e.height,
12
+ "flex-column": ""
13
+ },
14
+ on: {
15
+ "update:visible": function(n) {
16
+ e.show = n;
17
+ },
18
+ close: e.close,
19
+ closed: e.closed
20
+ },
21
+ scopedSlots: e._u([{
22
+ key: "default",
23
+ fn: function() {
24
+ return [e._t("search-form"), l("PageableTable", {
25
+ ref: "pageableTable",
26
+ staticStyle: {
27
+ height: "60vh"
28
+ },
29
+ attrs: {
30
+ "highlight-current-row": "",
31
+ "hide-on-single-page": "",
32
+ model: e.model,
33
+ columns: e.columns,
34
+ api: e.api,
35
+ "row-class-name": "pointer",
36
+ multiple: e.multiple
37
+ },
38
+ on: {
39
+ "selection-change": e.selectionChange,
40
+ "row-click": e.toggleRowSelection,
41
+ "current-change": e.currentChange
42
+ }
43
+ }, [e._t("default")], 2)];
44
+ },
45
+ proxy: !0
46
+ }, {
47
+ key: "footer",
48
+ fn: function() {
49
+ return [l("ElButton", {
50
+ attrs: {
51
+ size: "mini",
52
+ type: "primary"
53
+ },
54
+ on: {
55
+ click: e.confirm
56
+ }
57
+ }, [e._v(" \u786E \u5B9A ")]), l("ElButton", {
58
+ attrs: {
59
+ size: "mini"
60
+ },
61
+ on: {
62
+ click: e.close
63
+ }
64
+ }, [e._v(" \u5173 \u95ED ")])];
65
+ },
66
+ proxy: !0
67
+ }], null, !0)
68
+ });
69
+ }, c = [];
70
+ const u = {
71
+ name: "DataTablePicker",
72
+ mixins: [o],
73
+ props: {
74
+ api: Function,
75
+ columns: Array,
76
+ title: String,
77
+ width: {
78
+ type: String,
79
+ default: "60vw"
80
+ },
81
+ height: {
82
+ type: String,
83
+ default: null
84
+ },
85
+ model: {
86
+ type: Object,
87
+ default: () => {
88
+ }
89
+ },
90
+ multiple: {
91
+ type: Boolean,
92
+ default: !0
93
+ }
94
+ },
95
+ data() {
96
+ return {
97
+ selectedRows: [],
98
+ currentRow: null
99
+ };
100
+ },
101
+ methods: {
102
+ filterTableColumnProperties: r,
103
+ selectionChange(e) {
104
+ this.selectedRows = e;
105
+ },
106
+ currentChange(e) {
107
+ this.currentRow = e;
108
+ },
109
+ toggleRowSelection(e) {
110
+ this.$refs.pageableTable.$refs.table.toggleRowSelection(e);
111
+ },
112
+ confirm() {
113
+ var e;
114
+ this.multiple ? (e = this.selectedRows) != null && e.length ? (this.$emit("confirm", this.selectedRows), this.close()) : this.$message.warning("\u8BF7\u9009\u62E9") : this.currentRow ? (this.$emit("confirm", this.currentRow), this.close()) : this.$message.warning("\u8BF7\u9009\u62E9");
115
+ }
116
+ }
117
+ }, i = {};
118
+ var h = /* @__PURE__ */ s(
119
+ u,
120
+ a,
121
+ c,
122
+ !1,
123
+ m,
124
+ null,
125
+ null,
126
+ null
127
+ );
128
+ function m(e) {
129
+ for (let t in i)
130
+ this[t] = i[t];
131
+ }
132
+ const d = /* @__PURE__ */ function() {
133
+ return h.exports;
134
+ }();
135
+ export {
136
+ d as default
137
+ };