bkui-vue 0.0.1-beta.44 → 0.0.1-beta.47
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/dist/index.cjs.js +27 -27
- package/dist/index.esm.js +689 -306
- package/dist/index.umd.js +28 -28
- package/dist/style.css +1 -1
- package/lib/alert/index.js +1 -0
- package/lib/animate-number/{animate-number.js → index.js} +1 -1
- package/lib/backtop/{backtop.js → index.js} +1 -1
- package/lib/badge/index.js +1 -0
- package/lib/breadcrumb/index.js +1 -0
- package/lib/button/index.js +1 -0
- package/lib/card/index.js +1 -0
- package/lib/checkbox/checkbox.css +12 -0
- package/lib/checkbox/checkbox.d.ts +5 -11
- package/lib/checkbox/checkbox.less +17 -0
- package/lib/checkbox/checkbox.variable.css +12 -0
- package/lib/checkbox/common.d.ts +3 -3
- package/lib/checkbox/index.d.ts +10 -18
- package/lib/checkbox/index.js +1 -0
- package/lib/checkbox/type.d.ts +2 -6
- package/lib/code-diff/index.js +1 -0
- package/lib/collapse/index.js +1 -0
- package/lib/date-picker/index.js +1 -0
- package/lib/dialog/dialog.css +3 -0
- package/lib/dialog/dialog.d.ts +89 -17
- package/lib/dialog/dialog.less +4 -0
- package/lib/dialog/dialog.variable.css +3 -0
- package/lib/dialog/index.d.ts +191 -36
- package/lib/dialog/index.js +1 -0
- package/lib/directives/index.js +2 -0
- package/lib/directives/{directives.js.LICENSE.txt → index.js.LICENSE.txt} +0 -0
- package/lib/divider/{divider.js → index.js} +0 -0
- package/lib/dropdown/{dropdown.js → index.js} +0 -0
- package/lib/exception/{exception.js → index.js} +1 -1
- package/lib/fixed-navbar/{fixed-navbar.js → index.js} +1 -1
- package/lib/form/compose-form-item.d.ts +16 -0
- package/lib/form/form.css +73 -12
- package/lib/form/form.less +120 -46
- package/lib/form/form.variable.css +167 -12
- package/lib/form/index.d.ts +17 -1
- package/lib/form/index.js +1 -0
- package/lib/icon/funnel.d.ts +4 -0
- package/lib/icon/funnel.js +1 -0
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/{icon.js → index.js} +1 -1
- package/lib/input/index.js +1 -0
- package/lib/link/{link.js → index.js} +0 -0
- package/lib/loading/index.js +1 -0
- package/lib/menu/index.js +1 -0
- package/lib/message/{message.js → index.js} +0 -0
- package/lib/modal/index.d.ts +149 -1
- package/lib/modal/index.js +1 -0
- package/lib/modal/modal.css +20 -0
- package/lib/modal/modal.d.ts +58 -0
- package/lib/modal/modal.less +25 -0
- package/lib/modal/modal.variable.css +20 -0
- package/lib/modal/props.mixin.d.ts +26 -0
- package/lib/navigation/index.js +1 -0
- package/lib/notify/index.js +1 -0
- package/lib/pagination/index.js +1 -0
- package/lib/popover/index.d.ts +33 -2
- package/lib/popover/index.js +1 -0
- package/lib/popover/popover.d.ts +16 -1
- package/lib/popover/props.d.ts +12 -0
- package/lib/process/index.js +1 -0
- package/lib/progress/index.js +1 -0
- package/lib/radio/common.d.ts +5 -5
- package/lib/radio/index.d.ts +17 -16
- package/lib/radio/index.js +1 -0
- package/lib/radio/radio-button.d.ts +5 -4
- package/lib/radio/radio.css +2 -2
- package/lib/radio/radio.d.ts +4 -4
- package/lib/radio/radio.less +2 -2
- package/lib/radio/radio.variable.css +2 -2
- package/lib/radio/type.d.ts +9 -4
- package/lib/rate/index.js +1 -0
- package/lib/resize-layout/index.js +1 -0
- package/lib/select/index.js +1 -0
- package/lib/shared/index.js +1 -0
- package/lib/sideslider/index.d.ts +123 -1
- package/lib/sideslider/index.js +1 -0
- package/lib/sideslider/sideslider.d.ts +58 -0
- package/lib/slider/index.js +1 -0
- package/lib/steps/index.js +1 -0
- package/lib/swiper/index.js +1 -0
- package/lib/switcher/index.js +1 -0
- package/lib/switcher/switcher.less +2 -0
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/index.js +1 -0
- package/lib/tab/tab-panel.d.ts +1 -1
- package/lib/table/index.js +1 -0
- package/lib/table/plugins/head-filter.css +68 -0
- package/lib/table/plugins/head-filter.less +83 -0
- package/lib/table/plugins/head-filter.variable.css +162 -0
- package/lib/table/plugins/head-sort.css +22 -0
- package/lib/table/plugins/head-sort.less +28 -0
- package/lib/table/plugins/head-sort.variable.css +116 -0
- package/lib/table/props.d.ts +8 -1
- package/lib/table/render.d.ts +10 -15
- package/lib/table/table.css +94 -26
- package/lib/table/table.less +9 -28
- package/lib/table/table.variable.css +108 -40
- package/lib/table/utils.d.ts +10 -1
- package/lib/tag/index.js +1 -0
- package/lib/tag-input/index.js +1 -0
- package/lib/timeline/{timeline.js → index.js} +0 -0
- package/lib/transfer/index.js +1 -0
- package/lib/tree/index.js +1 -0
- package/lib/virtual-render/index.js +1 -0
- package/package.json +30 -16
- package/lib/alert/alert.js +0 -1
- package/lib/badge/badge.js +0 -1
- package/lib/breadcrumb/breadcrumb.js +0 -1
- package/lib/button/button.js +0 -1
- package/lib/card/card.js +0 -1
- package/lib/checkbox/checkbox.js +0 -1
- package/lib/code-diff/code-diff.js +0 -1
- package/lib/collapse/collapse.js +0 -1
- package/lib/date-picker/date-picker.js +0 -1
- package/lib/dialog/dialog.js +0 -1
- package/lib/directives/directives.js +0 -2
- package/lib/form/form.js +0 -1
- package/lib/input/input.js +0 -1
- package/lib/loading/loading.js +0 -1
- package/lib/menu/menu.js +0 -1
- package/lib/modal/modal.js +0 -1
- package/lib/navigation/navigation.js +0 -1
- package/lib/notify/notify.js +0 -1
- package/lib/pagination/pagination.js +0 -1
- package/lib/popover/popover.js +0 -1
- package/lib/process/process.js +0 -1
- package/lib/progress/progress.js +0 -1
- package/lib/radio/radio.js +0 -1
- package/lib/rate/rate.js +0 -1
- package/lib/resize-layout/resize-layout.js +0 -1
- package/lib/select/select.js +0 -1
- package/lib/shared/shared.js +0 -1
- package/lib/sideslider/sideslider.js +0 -1
- package/lib/slider/slider.js +0 -1
- package/lib/steps/steps.js +0 -1
- package/lib/swiper/swiper.js +0 -1
- package/lib/switcher/switcher.js +0 -1
- package/lib/tab/tab.js +0 -1
- package/lib/table/table.js +0 -1
- package/lib/tag/tag.js +0 -1
- package/lib/tag-input/tag-input.js +0 -1
- package/lib/transfer/transfer.js +0 -1
- package/lib/tree/tree.js +0 -1
- package/lib/virtual-render/virtual-render.js +0 -1
package/lib/modal/index.d.ts
CHANGED
@@ -9,9 +9,15 @@ declare const BkModal: {
|
|
9
9
|
width: string | number;
|
10
10
|
height: string | number;
|
11
11
|
showMask: boolean;
|
12
|
+
size: string;
|
12
13
|
isShow: boolean;
|
13
14
|
customClass: string | unknown[];
|
14
15
|
scrollable: boolean;
|
16
|
+
closeIcon: boolean;
|
17
|
+
escClose: boolean;
|
18
|
+
maskClose: boolean;
|
19
|
+
fullscreen: boolean;
|
20
|
+
renderDirective: string;
|
15
21
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
16
22
|
isShow: {
|
17
23
|
type: BooleanConstructor;
|
@@ -37,7 +43,33 @@ declare const BkModal: {
|
|
37
43
|
type: BooleanConstructor;
|
38
44
|
default: boolean;
|
39
45
|
};
|
40
|
-
|
46
|
+
closeIcon: {
|
47
|
+
type: BooleanConstructor;
|
48
|
+
default: boolean;
|
49
|
+
};
|
50
|
+
escClose: {
|
51
|
+
type: BooleanConstructor;
|
52
|
+
default: boolean;
|
53
|
+
};
|
54
|
+
maskClose: {
|
55
|
+
type: BooleanConstructor;
|
56
|
+
default: boolean;
|
57
|
+
};
|
58
|
+
fullscreen: {
|
59
|
+
type: BooleanConstructor;
|
60
|
+
default: boolean;
|
61
|
+
};
|
62
|
+
size: {
|
63
|
+
type: StringConstructor;
|
64
|
+
default: string;
|
65
|
+
validator: (value: string) => boolean;
|
66
|
+
};
|
67
|
+
renderDirective: {
|
68
|
+
type: StringConstructor;
|
69
|
+
default: string;
|
70
|
+
validator: (value: string) => boolean;
|
71
|
+
};
|
72
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "width" | "height" | "showMask" | "size" | "isShow" | "customClass" | "scrollable" | "closeIcon" | "escClose" | "maskClose" | "fullscreen" | "renderDirective">;
|
41
73
|
$attrs: {
|
42
74
|
[x: string]: unknown;
|
43
75
|
};
|
@@ -76,6 +108,32 @@ declare const BkModal: {
|
|
76
108
|
type: BooleanConstructor;
|
77
109
|
default: boolean;
|
78
110
|
};
|
111
|
+
closeIcon: {
|
112
|
+
type: BooleanConstructor;
|
113
|
+
default: boolean;
|
114
|
+
};
|
115
|
+
escClose: {
|
116
|
+
type: BooleanConstructor;
|
117
|
+
default: boolean;
|
118
|
+
};
|
119
|
+
maskClose: {
|
120
|
+
type: BooleanConstructor;
|
121
|
+
default: boolean;
|
122
|
+
};
|
123
|
+
fullscreen: {
|
124
|
+
type: BooleanConstructor;
|
125
|
+
default: boolean;
|
126
|
+
};
|
127
|
+
size: {
|
128
|
+
type: StringConstructor;
|
129
|
+
default: string;
|
130
|
+
validator: (value: string) => boolean;
|
131
|
+
};
|
132
|
+
renderDirective: {
|
133
|
+
type: StringConstructor;
|
134
|
+
default: string;
|
135
|
+
validator: (value: string) => boolean;
|
136
|
+
};
|
79
137
|
}>>, unknown, {
|
80
138
|
visible: boolean;
|
81
139
|
}, {
|
@@ -86,9 +144,15 @@ declare const BkModal: {
|
|
86
144
|
width: string | number;
|
87
145
|
height: string | number;
|
88
146
|
showMask: boolean;
|
147
|
+
size: string;
|
89
148
|
isShow: boolean;
|
90
149
|
customClass: string | unknown[];
|
91
150
|
scrollable: boolean;
|
151
|
+
closeIcon: boolean;
|
152
|
+
escClose: boolean;
|
153
|
+
maskClose: boolean;
|
154
|
+
fullscreen: boolean;
|
155
|
+
renderDirective: string;
|
92
156
|
}> & {
|
93
157
|
beforeCreate?: (() => void) | (() => void)[];
|
94
158
|
created?: (() => void) | (() => void)[];
|
@@ -134,6 +198,32 @@ declare const BkModal: {
|
|
134
198
|
type: BooleanConstructor;
|
135
199
|
default: boolean;
|
136
200
|
};
|
201
|
+
closeIcon: {
|
202
|
+
type: BooleanConstructor;
|
203
|
+
default: boolean;
|
204
|
+
};
|
205
|
+
escClose: {
|
206
|
+
type: BooleanConstructor;
|
207
|
+
default: boolean;
|
208
|
+
};
|
209
|
+
maskClose: {
|
210
|
+
type: BooleanConstructor;
|
211
|
+
default: boolean;
|
212
|
+
};
|
213
|
+
fullscreen: {
|
214
|
+
type: BooleanConstructor;
|
215
|
+
default: boolean;
|
216
|
+
};
|
217
|
+
size: {
|
218
|
+
type: StringConstructor;
|
219
|
+
default: string;
|
220
|
+
validator: (value: string) => boolean;
|
221
|
+
};
|
222
|
+
renderDirective: {
|
223
|
+
type: StringConstructor;
|
224
|
+
default: string;
|
225
|
+
validator: (value: string) => boolean;
|
226
|
+
};
|
137
227
|
}>> & import("vue").ShallowUnwrapRef<{}> & {
|
138
228
|
visible: boolean;
|
139
229
|
} & {
|
@@ -169,6 +259,32 @@ declare const BkModal: {
|
|
169
259
|
type: BooleanConstructor;
|
170
260
|
default: boolean;
|
171
261
|
};
|
262
|
+
closeIcon: {
|
263
|
+
type: BooleanConstructor;
|
264
|
+
default: boolean;
|
265
|
+
};
|
266
|
+
escClose: {
|
267
|
+
type: BooleanConstructor;
|
268
|
+
default: boolean;
|
269
|
+
};
|
270
|
+
maskClose: {
|
271
|
+
type: BooleanConstructor;
|
272
|
+
default: boolean;
|
273
|
+
};
|
274
|
+
fullscreen: {
|
275
|
+
type: BooleanConstructor;
|
276
|
+
default: boolean;
|
277
|
+
};
|
278
|
+
size: {
|
279
|
+
type: StringConstructor;
|
280
|
+
default: string;
|
281
|
+
validator: (value: string) => boolean;
|
282
|
+
};
|
283
|
+
renderDirective: {
|
284
|
+
type: StringConstructor;
|
285
|
+
default: string;
|
286
|
+
validator: (value: string) => boolean;
|
287
|
+
};
|
172
288
|
}>>, unknown, {
|
173
289
|
visible: boolean;
|
174
290
|
}, {
|
@@ -179,9 +295,15 @@ declare const BkModal: {
|
|
179
295
|
width: string | number;
|
180
296
|
height: string | number;
|
181
297
|
showMask: boolean;
|
298
|
+
size: string;
|
182
299
|
isShow: boolean;
|
183
300
|
customClass: string | unknown[];
|
184
301
|
scrollable: boolean;
|
302
|
+
closeIcon: boolean;
|
303
|
+
escClose: boolean;
|
304
|
+
maskClose: boolean;
|
305
|
+
fullscreen: boolean;
|
306
|
+
renderDirective: string;
|
185
307
|
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & Readonly<{
|
186
308
|
propsMixin: {
|
187
309
|
isShow: {
|
@@ -208,6 +330,32 @@ declare const BkModal: {
|
|
208
330
|
type: BooleanConstructor;
|
209
331
|
default: boolean;
|
210
332
|
};
|
333
|
+
closeIcon: {
|
334
|
+
type: BooleanConstructor;
|
335
|
+
default: boolean;
|
336
|
+
};
|
337
|
+
escClose: {
|
338
|
+
type: BooleanConstructor;
|
339
|
+
default: boolean;
|
340
|
+
};
|
341
|
+
maskClose: {
|
342
|
+
type: BooleanConstructor;
|
343
|
+
default: boolean;
|
344
|
+
};
|
345
|
+
fullscreen: {
|
346
|
+
type: BooleanConstructor;
|
347
|
+
default: boolean;
|
348
|
+
};
|
349
|
+
size: {
|
350
|
+
type: StringConstructor;
|
351
|
+
default: string;
|
352
|
+
validator: (value: string) => boolean;
|
353
|
+
};
|
354
|
+
renderDirective: {
|
355
|
+
type: StringConstructor;
|
356
|
+
default: string;
|
357
|
+
validator: (value: string) => boolean;
|
358
|
+
};
|
211
359
|
};
|
212
360
|
}>;
|
213
361
|
export default BkModal;
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"));else if("function"==typeof define&&define.amd)define(["../shared","vue"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue")):t(e["../shared"],e.vue);for(var i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(self,((e,t)=>(()=>{"use strict";var o={4212:t=>{t.exports=e},748:e=>{e.exports=t}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return o[e](n,n.exports,r),n.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{BkModal:()=>a,default:()=>l,propsMixin:()=>o});var e=r(4212),t=r(748),o={isShow:{type:Boolean,default:!1},width:{type:[Number,String],default:"50%"},height:{type:[Number,String],default:"50%"},customClass:{type:[Array,String],default:""},scrollable:{type:Boolean,default:!0},showMask:{type:Boolean,default:!0},closeIcon:{type:Boolean,default:!0},escClose:{type:Boolean,default:!0},maskClose:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1},size:{type:String,default:"normal",validator:function(e){var t=["normal","small","medium","large"];return!(t.indexOf(e)<0&&(console.error("dialogSize property is not valid: '".concat(e,"',【").concat(t.join(" | "),"】")),1))}},renderDirective:{type:String,default:"show",validator:function(e){return!(["show","if"].indexOf(e)<0&&(console.error("type render-directive is not valid: '".concat(e,"'")),1))}}};const i=(0,t.defineComponent)({name:"Modal",props:Object.assign({},o),data:function(){return{visible:!1}},computed:{dialogWidth:function(){return/^\d+$/.test("".concat(this.width))?"".concat(this.width,"px"):this.width},dialogHeight:function(){return/^\d+$/.test("".concat(this.height))?"".concat(this.height,"px"):this.height},compStyle:function(){return{width:this.dialogWidth,height:this.dialogHeight,minHeigth:"".concat(200,"px"),display:this.visible?"inherit":"none"}}},watch:{isShow:{handler:function(e){this.visible=e}},visible:function(t){var o=this;t?this.$nextTick((function(){var t=o.showMask?{}:{"background-color":"rgba(0,0,0,0)"};e.bkPopIndexManager.show(o.$el,o.showMask,t)})):e.bkPopIndexManager.hide(this.$el)}},beforeUnmount:function(){e.bkPopIndexManager.hide(this.$el)},render:function(){var e,o,i,r,n,a,l,s,d;return(0,t.createVNode)("div",{class:["bk-modal-wrapper",this.size,this.customClass,this.fullscreen?"bk-model-fullscreen":""],style:this.compStyle},[this.isShow?(0,t.createVNode)("div",{class:"bk-modal-body"},[(0,t.createVNode)("div",{class:"bk-modal-header"},[null!==(i=null===(o=(e=this.$slots).header)||void 0===o?void 0:o.call(e))&&void 0!==i?i:""]),(0,t.createVNode)("div",{class:"bk-modal-content"},[null!==(a=null===(n=(r=this.$slots).default)||void 0===n?void 0:n.call(r))&&void 0!==a?a:""]),(0,t.createVNode)("div",{class:"bk-modal-footer"},[null!==(d=null===(s=(l=this.$slots).footer)||void 0===s?void 0:s.call(l))&&void 0!==d?d:""])]):""])}});var a=(0,e.withInstallProps)(i,{propsMixin:o},!0);const l=a})(),n})()));
|
package/lib/modal/modal.css
CHANGED
@@ -9,3 +9,23 @@
|
|
9
9
|
height: 100%;
|
10
10
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
11
11
|
}
|
12
|
+
.normal {
|
13
|
+
width: 480px;
|
14
|
+
height: 240px;
|
15
|
+
}
|
16
|
+
.small {
|
17
|
+
width: 400px;
|
18
|
+
height: 200px;
|
19
|
+
}
|
20
|
+
.medium {
|
21
|
+
width: 640px;
|
22
|
+
height: 400px;
|
23
|
+
}
|
24
|
+
.large {
|
25
|
+
width: 960px;
|
26
|
+
height: 720px;
|
27
|
+
}
|
28
|
+
.bk-model-fullscreen {
|
29
|
+
width: 100%;
|
30
|
+
height: 100%;
|
31
|
+
}
|
package/lib/modal/modal.d.ts
CHANGED
@@ -23,6 +23,32 @@ declare const _default: import("vue").DefineComponent<{
|
|
23
23
|
type: BooleanConstructor;
|
24
24
|
default: boolean;
|
25
25
|
};
|
26
|
+
closeIcon: {
|
27
|
+
type: BooleanConstructor;
|
28
|
+
default: boolean;
|
29
|
+
};
|
30
|
+
escClose: {
|
31
|
+
type: BooleanConstructor;
|
32
|
+
default: boolean;
|
33
|
+
};
|
34
|
+
maskClose: {
|
35
|
+
type: BooleanConstructor;
|
36
|
+
default: boolean;
|
37
|
+
};
|
38
|
+
fullscreen: {
|
39
|
+
type: BooleanConstructor;
|
40
|
+
default: boolean;
|
41
|
+
};
|
42
|
+
size: {
|
43
|
+
type: StringConstructor;
|
44
|
+
default: string;
|
45
|
+
validator: (value: string) => boolean;
|
46
|
+
};
|
47
|
+
renderDirective: {
|
48
|
+
type: StringConstructor;
|
49
|
+
default: string;
|
50
|
+
validator: (value: string) => boolean;
|
51
|
+
};
|
26
52
|
}, unknown, {
|
27
53
|
visible: boolean;
|
28
54
|
}, {
|
@@ -54,12 +80,44 @@ declare const _default: import("vue").DefineComponent<{
|
|
54
80
|
type: BooleanConstructor;
|
55
81
|
default: boolean;
|
56
82
|
};
|
83
|
+
closeIcon: {
|
84
|
+
type: BooleanConstructor;
|
85
|
+
default: boolean;
|
86
|
+
};
|
87
|
+
escClose: {
|
88
|
+
type: BooleanConstructor;
|
89
|
+
default: boolean;
|
90
|
+
};
|
91
|
+
maskClose: {
|
92
|
+
type: BooleanConstructor;
|
93
|
+
default: boolean;
|
94
|
+
};
|
95
|
+
fullscreen: {
|
96
|
+
type: BooleanConstructor;
|
97
|
+
default: boolean;
|
98
|
+
};
|
99
|
+
size: {
|
100
|
+
type: StringConstructor;
|
101
|
+
default: string;
|
102
|
+
validator: (value: string) => boolean;
|
103
|
+
};
|
104
|
+
renderDirective: {
|
105
|
+
type: StringConstructor;
|
106
|
+
default: string;
|
107
|
+
validator: (value: string) => boolean;
|
108
|
+
};
|
57
109
|
}>>, {
|
58
110
|
width: string | number;
|
59
111
|
height: string | number;
|
60
112
|
showMask: boolean;
|
113
|
+
size: string;
|
61
114
|
isShow: boolean;
|
62
115
|
customClass: string | unknown[];
|
63
116
|
scrollable: boolean;
|
117
|
+
closeIcon: boolean;
|
118
|
+
escClose: boolean;
|
119
|
+
maskClose: boolean;
|
120
|
+
fullscreen: boolean;
|
121
|
+
renderDirective: string;
|
64
122
|
}>;
|
65
123
|
export default _default;
|
package/lib/modal/modal.less
CHANGED
@@ -10,3 +10,28 @@
|
|
10
10
|
box-shadow: 0 4px 12px rgba(0,0,0,.15);
|
11
11
|
}
|
12
12
|
}
|
13
|
+
|
14
|
+
.normal {
|
15
|
+
width: 480px;
|
16
|
+
height: 240px;
|
17
|
+
}
|
18
|
+
|
19
|
+
.small {
|
20
|
+
width: 400px;
|
21
|
+
height: 200px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.medium {
|
25
|
+
width: 640px;
|
26
|
+
height: 400px;
|
27
|
+
}
|
28
|
+
|
29
|
+
.large {
|
30
|
+
width: 960px;
|
31
|
+
height: 720px;
|
32
|
+
}
|
33
|
+
|
34
|
+
.bk-model-fullscreen {
|
35
|
+
width: 100%;
|
36
|
+
height: 100%;
|
37
|
+
}
|
@@ -9,3 +9,23 @@
|
|
9
9
|
height: 100%;
|
10
10
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
11
11
|
}
|
12
|
+
.normal {
|
13
|
+
width: 480px;
|
14
|
+
height: 240px;
|
15
|
+
}
|
16
|
+
.small {
|
17
|
+
width: 400px;
|
18
|
+
height: 200px;
|
19
|
+
}
|
20
|
+
.medium {
|
21
|
+
width: 640px;
|
22
|
+
height: 400px;
|
23
|
+
}
|
24
|
+
.large {
|
25
|
+
width: 960px;
|
26
|
+
height: 720px;
|
27
|
+
}
|
28
|
+
.bk-model-fullscreen {
|
29
|
+
width: 100%;
|
30
|
+
height: 100%;
|
31
|
+
}
|
@@ -23,4 +23,30 @@ export declare const propsMixin: {
|
|
23
23
|
type: BooleanConstructor;
|
24
24
|
default: boolean;
|
25
25
|
};
|
26
|
+
closeIcon: {
|
27
|
+
type: BooleanConstructor;
|
28
|
+
default: boolean;
|
29
|
+
};
|
30
|
+
escClose: {
|
31
|
+
type: BooleanConstructor;
|
32
|
+
default: boolean;
|
33
|
+
};
|
34
|
+
maskClose: {
|
35
|
+
type: BooleanConstructor;
|
36
|
+
default: boolean;
|
37
|
+
};
|
38
|
+
fullscreen: {
|
39
|
+
type: BooleanConstructor;
|
40
|
+
default: boolean;
|
41
|
+
};
|
42
|
+
size: {
|
43
|
+
type: StringConstructor;
|
44
|
+
default: string;
|
45
|
+
validator: (value: string) => boolean;
|
46
|
+
};
|
47
|
+
renderDirective: {
|
48
|
+
type: StringConstructor;
|
49
|
+
default: string;
|
50
|
+
validator: (value: string) => boolean;
|
51
|
+
};
|
26
52
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("vue"),require("../icon"));else if("function"==typeof define&&define.amd)define(["vue","../icon"],t);else{var i="object"==typeof exports?t(require("vue"),require("../icon")):t(e.vue,e["../icon"]);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,((e,t)=>(()=>{"use strict";var i={6870:e=>{e.exports=t},748:t=>{t.exports=e}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return i[e](n,n.exports,a),n.exports}a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{a.r(n),a.d(n,{default:()=>s});var e=a(748),t=a(6870),i={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};const o=(0,e.defineComponent)({props:i,slots:["side-icon"],setup:function(t,i){var o=i.slots;return function(){var i,a;return(0,e.createVNode)("div",{class:"bk-navigation-title",style:{borderBottomWidth:"left-right"===t.navigationType?"0":"1px"}},[(null===(i=o.default)||void 0===i?void 0:i.call(o))||[(0,e.createVNode)("span",{class:"title-icon"},[(null===(a=o["side-icon"])||void 0===a?void 0:a.call(o))||(0,e.createVNode)("i",{class:"bk-icon icon-rtx"},null)]),(0,e.createVNode)("span",{class:"title-desc"},[t.sideTitle])]])}}});var r={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},sideTitle:{type:String,default:""},headerTitle:{type:String,default:""},hoverLeaveDelay:{type:Number,default:0},hoverEnterDelay:{type:Number,default:100},defaultOpen:Boolean,headHeight:{type:[Number,String],default:52},navigationType:{type:String,default:"left-right",validator:function(e){return["top-bottom","left-right"].includes(e)}},needMenu:{type:Boolean,default:!0}};const l=(0,e.defineComponent)({name:"Navigation",props:r,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup:function(t,i){var o=i.emit,a=(0,e.ref)(t.headerTitle),n=(0,e.reactive)({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});return t.defaultOpen&&(n.click=!n.click,n.hover=n.click,o("toggle",n.hover)),(0,e.onBeforeUnmount)((function(){n.timer&&window.clearTimeout(n.timer)})),{defaultHeaderTitle:a,nav:n,onBeforeUnmount:e.onBeforeUnmount,handleMouseOver:function(){n.click||(n.enterTimer=setTimeout((function(){n.hover=!0,n.enterTimer&&window.clearTimeout(n.enterTimer),n.timer&&window.clearTimeout(n.timer),o("hover",n.hover),o("toggle",n.hover)}),t.hoverEnterDelay))},handleMouseLeave:function(){n.click||(n.enterTimer&&window.clearTimeout(n.enterTimer),n.timer=setTimeout((function(){n.hover=!1,window.clearTimeout(n.timer),o("leave",n.hover),o("toggle",n.hover)}),t.hoverLeaveDelay))},handleClick:function(){n.click=!n.click,n.hover=n.click,o("toggle",n.hover),o("toggle-click",n.hover)}}},render:function(){var i,a,n,r,l,s,d,c,v,h,u,p;return(0,e.createVNode)("div",{class:"bk-navigation"},["top-bottom"===this.navigationType&&(0,e.createVNode)("div",{class:"bk-navigation-header",style:{flexBasis:"".concat(this.headHeight,"px")}},[(0,e.createVNode)(o,{sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),(0,e.createVNode)("div",{class:"header-right"},[null===(a=(i=this.$slots).header)||void 0===a?void 0:a.call(i)])]),(0,e.createVNode)("div",{class:"bk-navigation-wrapper"},[this.needMenu&&(0,e.createVNode)("div",{class:"navigation-nav",style:{width:this.nav.click?"".concat(this.hoverWidth,"px"):"".concat(this.navWidth,"px")}},[(0,e.createVNode)("div",{class:"nav-slider",onMouseenter:this.handleMouseOver,onMouseleave:this.handleMouseLeave,style:{width:this.nav.hover?"".concat(this.hoverWidth,"px"):"".concat(this.navWidth,"px"),borderRight:"top-bottom"!==this.navigationType?"none":"1px solid #DCDEE5"}},["top-bottom"!==this.navigationType&&(0,e.createVNode)(o,{style:{flexBasis:"".concat(this.headHeight,"px")},sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),(0,e.createVNode)("div",{class:"nav-slider-list",style:{height:"calc(100vh - ".concat(+this.headHeight+56,"px)")}},[null===(r=(n=this.$slots).menu)||void 0===r?void 0:r.call(n)]),(0,e.createVNode)("div",{class:"nav-slider-footer"},[(0,e.createVNode)("div",{class:{"is-left":"top-bottom"!==this.navigationType,"footer-icon":!0},onClick:this.handleClick},[(0,e.createVNode)(t.CollapseLeft,{class:"footer-icon-svg",style:{transform:this.nav.click?"rotate(180deg)":"rotate(0deg)"}},null)])])])]),(0,e.createVNode)("div",{class:"navigation-container",style:{maxWidth:this.needMenu?"calc(100vw - 60px)":"100vw"}},["top-bottom"!==this.navigationType&&(0,e.createVNode)("div",{class:"container-header",style:{flexBasis:"".concat(this.headHeight,"px")}},[(null===(s=(l=this.$slots).header)||void 0===s?void 0:s.call(l))||[(0,e.createVNode)("div",{class:"container-header-title"},[this.headerTitle]),(0,e.createVNode)("div",{class:"container-header-sets"},[null===(c=(d=this.$slots)["header-set"])||void 0===c?void 0:c.call(d)])]]),(0,e.createVNode)("div",{class:"container-content",style:{maxHeight:"calc(100vh - ".concat(this.headHeight,"px)")}},[null===(h=(v=this.$slots).default)||void 0===h?void 0:h.call(v),(0,e.createVNode)("div",{class:"container-footer"},[null===(p=(u=this.$slots).footer)||void 0===p?void 0:p.call(u)])])])])])}});l.install=function(e){e.component(l.name,l)};const s=l})(),n})()));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("vue"),require("../icon"),require("../shared"));else if("function"==typeof define&&define.amd)define(["vue","../icon","../shared"],t);else{var o="object"==typeof exports?t(require("vue"),require("../icon"),require("../shared")):t(e.vue,e["../icon"],e["../shared"]);for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,((e,t,o)=>(()=>{"use strict";var n={6870:e=>{e.exports=t},4212:e=>{e.exports=o},748:t=>{t.exports=e}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,i),o.exports}i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{i.r(s),i.d(s,{default:()=>l});var e=i(748),t={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},o=1;function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var r=i(6870),a=i(4212),c={id:a.PropTypes.string.def(""),title:a.PropTypes.string.def(""),message:a.PropTypes.string.def(""),theme:a.PropTypes.theme(["primary","warning","success","danger"]).def("primary"),position:a.PropTypes.position().def("top-right"),delay:a.PropTypes.number.def(3e3),offset:a.PropTypes.number.def(0),onClose:a.PropTypes.func};const u=(0,e.defineComponent)({name:"Notify",props:c,emits:["destory"],setup:function(t,o){var r=o.emit,i=(0,e.computed)((function(){return["bk-notify","bk-notify-".concat(t.theme)]})),s=a.bkZIndexManager.getMessageNextIndex(),c=(0,e.computed)((function(){return t.position.indexOf("right")>1?"right":"left"})),u=(0,e.computed)((function(){return t.position.startsWith("top")?"top":"bottom"})),l=(0,e.computed)((function(){var e;return n(e={},c.value,"10px"),n(e,u.value,"".concat(t.offset,"px")),n(e,"zIndex",s),e})),f=(0,e.ref)(!1),d=null;return(0,e.onMounted)((function(){d=setTimeout((function(){f.value=!1}),t.delay),f.value=!0})),(0,e.onUnmounted)((function(){clearTimeout(d)})),(0,e.watch)(f,(function(){f.value||r("destory",t.id)})),{classNames:i,styles:l,visible:f,handleClose:function(){f.value=!1}}},render:function(){var t=this;return(0,e.createVNode)(e.Transition,{name:"bk-notify-fade"},{default:function(){return[(0,e.withDirectives)((0,e.createVNode)("div",{class:t.classNames,style:t.styles},[(0,e.createVNode)("div",{class:"bk-notify-content"},[(0,e.createVNode)("div",{class:"bk-notify-icon"},[{primary:(0,e.createVNode)(r.Info,null,null),warning:(0,e.createVNode)(r.Warn,null,null),success:(0,e.createVNode)(r.Success,null,null),danger:(0,e.createVNode)(r.Close,null,null)}[t.theme]]),t.title?(0,e.createVNode)("h3",{class:"bk-notify-content-header"},[t.title]):"",(0,e.createVNode)("div",{class:"bk-notify-content-text"},[t.message])]),(0,e.createVNode)(r.Error,{class:"bk-notify-icon bk-notify-close",onClick:t.handleClose},null)]),[[e.vShow,t.visible]])]}})}}),l=function(n){!function(n,r){var i=r,s=i.position||"top-right";"string"==typeof r&&(i={message:r});var a=r.onClose,c=i.offsetY||30,u=i.spacing,l=void 0===u?10:u;t[s].forEach((function(e){c+=(e.el.offsetHeight||0)+l}));var f="message_".concat(o+=1);i=Object.assign(Object.assign({},i),{offsetY:c,id:f});var d=document.createElement("div"),p=(0,e.createVNode)(n,i);p.props.onDestory=function(o){!function(e,o,n,r){null==r||r();var i=o.startsWith("top")?"top":"bottom",s=-1;t[o].forEach((function(t,o){t.props.id===e&&(s=o)}));for(var a=t[o][s].el.offsetHeight,c=t[o].length,u=s;u<c;u++){var l=parseInt(t[o][u].el.style[i],10)-a-n;t[o][u].component.props.offsetY=l}t[o].splice(s,1)}(o,s,l,a),(0,e.render)(null,d)},(0,e.render)(p,d),t[s].push(p),document.body.appendChild(d.firstElementChild)}(u,n)}})(),s})()));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../select"),require("../icon"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../select","../icon","../popover"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("../select"),require("../icon"),require("../popover")):t(e["../shared"],e.vue,e["../select"],e["../icon"],e["../popover"]);for(var a in n)("object"==typeof exports?exports:e)[a]=n[a]}}(self,((e,t,n,a,r)=>(()=>{"use strict";var i={6870:e=>{e.exports=a},5537:e=>{e.exports=r},6422:e=>{e.exports=n},4212:t=>{t.exports=e},748:e=>{e.exports=t}},o={};function l(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return i[e](n,n.exports,l),n.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{l.r(u),l.d(u,{BkPagination:()=>v,default:()=>m});var e=l(4212);function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(e){l=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var r=l(748),i=l(6422),o=l.n(i),c=l(6870),s=l(5537),d=l.n(s);var f={modelValue:e.PropTypes.number.def(1),count:e.PropTypes.number.def(0).isRequired,limit:e.PropTypes.number.def(10),limitList:e.PropTypes.arrayOf(Number).def([10,20,50,100]),showLimit:e.PropTypes.bool.def(!0),type:e.PropTypes.oneOf(["default","compact"]).def("default"),location:e.PropTypes.oneOf(["left","right"]).def("right"),align:e.PropTypes.oneOf(["left","center","right"]).def("left"),size:e.PropTypes.size(),small:e.PropTypes.bool.def(!1),showTotalCount:e.PropTypes.bool.def(!0),prevText:e.PropTypes.string,nextText:e.PropTypes.string,disabled:e.PropTypes.bool.def(!1),layout:e.PropTypes.custom((function(e){var t={total:!0,list:!0,limit:!0};return e.some((function(e){return t[e]}))}),"layout 的值只支持 * total、list、limit *").def(["total","list","limit"])};const p=(0,r.defineComponent)({name:"Pagination",props:f,emits:["update:modelValue","change","update:limit","limitChange"],setup:function(e,t){var n=(0,r.ref)(0),l=(0,r.toRefs)(e),u=l.count,s=l.limit,f=function(){var e=(0,r.getCurrentInstance)().proxy,t=(0,r.ref)(1),n=(0,r.computed)((function(){return 1===t.value})),a=(0,r.computed)((function(){return t.value===e.totalPageNum})),i=(0,r.ref)(!1),o=(0,r.ref)(!1),l=(0,r.computed)((function(){i.value=!1,o.value=!1;var n=[];if(e.totalPageNum<=5){for(var a=2;a<=e.totalPageNum-1;a++)n.push(a);return n}var r=Math.floor(2.5);e.totalPageNum>5&&(i.value=t.value-r>2,o.value=t.value+r<e.totalPageNum-1);for(var l=Math.min(e.totalPageNum-5,Math.max(2,t.value-r)),u=l;u<l+5;u++)n.push(u);return n}));(0,r.watch)((function(){return e.modelValue}),(function(n){(0,r.nextTick)((function(){n>=1&&n<=e.totalPageNum?t.value=n:t.value=n<1?1:e.totalPageNum}))}),{immediate:!0}),(0,r.nextTick)((function(){(0,r.watch)((function(){return e.totalPageNum}),(function(e){t.value>e&&(t.value=e)}))}));var u=function(){n.value||(t.value=t.value-1)},s=function(){a.value||(t.value=t.value+1)},d=function(e){e!==t.value&&(t.value=e)},f=function(){t.value=Math.max(1,t.value-5)},p=function(){t.value=Math.min(e.totalPageNum,t.value+5)};return{current:t,render:function(v){var m=v.isFirst,g=v.isLast;return(0,r.createVNode)("div",{class:{"bk-pagination-list":!0,"is-first":m,"is-last":g}},[(0,r.createVNode)("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:u},[e.prevText||(0,r.createVNode)(c.AngleLeft,null,null)]),(0,r.createVNode)("div",{class:{"bk-pagination-list-item":!0,"is-active":1===t.value},key:"1",onClick:function(){return d(1)}},[(0,r.createTextVNode)("1")]),i.value&&(0,r.createVNode)("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:f},[(0,r.createVNode)(c.Ellipsis,null,null)]),l.value.map((function(e){return(0,r.createVNode)("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e},key:e,onClick:function(){return d(e)}},[e])})),o.value&&(0,r.createVNode)("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:p},[(0,r.createVNode)(c.Ellipsis,null,null)]),e.totalPageNum>1&&(0,r.createVNode)("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:function(){return d(e.totalPageNum)}},[e.totalPageNum]),(0,r.createVNode)("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":a.value},onClick:s},[e.nextText||(0,r.createVNode)(c.AngleRight,null,null)])])}}}(),p=f.current,v=f.render,m=function(){var e=(0,r.getCurrentInstance)().proxy,t=(0,r.ref)(null),n=(0,r.ref)(!1),a=(0,r.ref)(1),i=(0,r.computed)((function(){return 1===a.value})),o=(0,r.computed)((function(){return a.value===e.totalPageNum})),l=0,u=(0,r.computed)((function(){for(var t=[],n=1;n<=e.totalPageNum;n++)t.push(n);return t}));(0,r.watch)((function(){return e.modelValue}),(function(t){(0,r.nextTick)((function(){t>=1&&t<=e.totalPageNum?a.value=t:a.value=t<1?1:e.totalPageNum,l=a.value}))}),{immediate:!0}),(0,r.nextTick)((function(){(0,r.watch)((function(){return e.totalPageNum}),(function(e){a.value>e&&(a.value=e)}))}));var s=function(){i.value||(a.value=a.value-1)},f=function(){o.value||(a.value=a.value+1)},p=function(){(0,r.nextTick)((function(){t.value.focus();var e=window.getSelection();e.selectAllChildren(t.value),e.collapseToEnd()}))},v=function(){n.value=!0},m=function(){n.value=!1,t.value.textContent="".concat(l),l!==a.value&&(a.value=l)},g=function(t){var n=t.target,r=Number(n.textContent);!r||r<1||r>e.totalPageNum||r===a.value||(l=r,p())},b=function(e){["Enter","NumpadEnter"].includes(e.code)&&(e.preventDefault(),m(),p())};return{current:a,render:function(){return(0,r.createVNode)("div",{class:"bk-pagination-small-list"},[(0,r.createVNode)("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":i.value},onClick:s},[(0,r.createVNode)(c.LeftShape,null,null)]),(0,r.createVNode)(d(),{theme:"light",trigger:"click",arrow:!1,boundary:"body",placement:"bottom"},{default:function(){return(0,r.createVNode)("div",{class:{"bk-pagination-picker":!0,"is-focused":n.value}},[(0,r.createVNode)("span",{ref:t,class:"bk-pagination-editor",contenteditable:!0,spellcheck:"false",onFocus:v,onBlur:m,onInput:g,onKeydown:b},[a.value]),(0,r.createVNode)("span",null,[(0,r.createTextVNode)("/")]),(0,r.createVNode)("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])])},content:function(){return(0,r.createVNode)("div",{class:"bk-pagination-picker-list"},[u.value.map((function(e){return(0,r.createVNode)("div",{class:{item:!0,"is-actived":e===a.value},key:e,onClick:function(){return function(e){l=e,m()}(e)}},[e])}))])}}),(0,r.createVNode)("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:f},[(0,r.createVNode)(c.RightShape,null,null)])])}}}(),g=m.current,b=m.render,h=function(){var e=(0,r.getCurrentInstance)().proxy,t=(0,r.ref)(e.limit);(0,r.watch)((function(){return e.limit}),(function(e){t.value=e})),(0,r.watch)((function(){return e.limitList}),(function(e){(0,r.nextTick)((function(){if(!e.includes(t.value)){var n=a(e,1);t.value=n[0]}}))}),{immediate:!0});var n=function(e){t.value=e};return{limit:t,render:function(a){var l,u,c=a.isFirst,s=a.isLast;return e.showLimit?(0,r.createVNode)("div",(0,r.mergeProps)({class:{"bk-pagination-limit":!0,"is-first":c,"is-last":s}},{disabled:e.disabled}),[(0,r.createVNode)("div",null,[(0,r.createTextVNode)("每页")]),(0,r.createVNode)(o(),{class:"bk-pagination-limit-select",clearable:!1,modelValue:t.value,onChange:n,disabled:e.disabled},(u=l=e.limitList.map((function(e,t){return(0,r.createVNode)(i.BkOption,{value:e,label:e,key:"".concat(t,"_").concat(e)},null)})),"function"==typeof u||"[object Object]"===Object.prototype.toString.call(u)&&!(0,r.isVNode)(u)?l:{default:function(){return[l]}})),(0,r.createVNode)("div",null,[(0,r.createTextVNode)("条")])]):null}}}(),y=h.limit,N=h.render;return(0,r.watch)([u,y,s],(function(e){var t=a(e,2),r=t[0],i=t[1],o=Math.ceil(r/i);n.value=o<1?1:o}),{immediate:!0}),(0,r.watch)(p,(function(e){t.emit("update:modelValue",e),t.emit("change",e)})),(0,r.watch)(g,(function(e){t.emit("update:modelValue",e),t.emit("change",e)})),(0,r.watch)(y,(function(e){t.emit("limitChange",e)})),{totalPageNum:n,renderTotal:function(e){var t=e.isFirst,n=e.isLast,a=(0,r.getCurrentInstance)().props;return a.showTotalCount?(0,r.createVNode)("div",(0,r.mergeProps)({class:{"bk-pagination-total":!0,"is-first":t,"is-last":n}},{disabled:a.disabled}),[(0,r.createTextVNode)("共计"),(0,r.createVNode)("div",{class:"bk-pagination-total-num"},[a.count]),(0,r.createTextVNode)("条")]):null},renderList:v,renderLimit:N,renderSmallList:b}},render:function(){var n,a=this,i=(0,e.classes)((t(n={"bk-pagination":!0},"bk-pagination--".concat(this.size),!0),t(n,"is-align-".concat(this.align),!0),n)),o={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return(0,r.createVNode)("div",{class:i},[this.layout.map((function(e,t){return o[e]({isFirst:0===t,isLast:t===a.layout.length-1})}))])}});var v=(0,e.withInstall)(p);const m=v})(),u})()));
|
package/lib/popover/index.d.ts
CHANGED
@@ -13,11 +13,16 @@ declare const BkPopover: {
|
|
13
13
|
trigger: string;
|
14
14
|
arrow: boolean;
|
15
15
|
isShow: boolean;
|
16
|
+
stopBehaviors: string | string[];
|
16
17
|
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
17
18
|
fixOnBoundary: boolean;
|
18
19
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
20
|
+
onAfterHidden: FunctionConstructor;
|
21
|
+
onAfterShow: FunctionConstructor;
|
19
22
|
isShow: import("vue-types").VueTypeValidableDef<boolean> & {
|
20
23
|
default: boolean;
|
24
|
+
} & {
|
25
|
+
default: boolean;
|
21
26
|
};
|
22
27
|
width: import("vue-types").VueTypeDef<string | number> & {
|
23
28
|
default: string | number;
|
@@ -66,7 +71,10 @@ declare const BkPopover: {
|
|
66
71
|
} & {
|
67
72
|
default: boolean;
|
68
73
|
};
|
69
|
-
|
74
|
+
stopBehaviors: import("vue-types").VueTypeDef<string | string[]> & {
|
75
|
+
default: string | (() => string[]);
|
76
|
+
};
|
77
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "width" | "height" | "placement" | "modifiers" | "content" | "theme" | "transition" | "trigger" | "arrow" | "isShow" | "stopBehaviors" | "handleFirstUpdate" | "fixOnBoundary">;
|
70
78
|
$attrs: {
|
71
79
|
[x: string]: unknown;
|
72
80
|
};
|
@@ -81,8 +89,12 @@ declare const BkPopover: {
|
|
81
89
|
$emit: ((event: string, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
82
90
|
$el: any;
|
83
91
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
92
|
+
onAfterHidden: FunctionConstructor;
|
93
|
+
onAfterShow: FunctionConstructor;
|
84
94
|
isShow: import("vue-types").VueTypeValidableDef<boolean> & {
|
85
95
|
default: boolean;
|
96
|
+
} & {
|
97
|
+
default: boolean;
|
86
98
|
};
|
87
99
|
width: import("vue-types").VueTypeDef<string | number> & {
|
88
100
|
default: string | number;
|
@@ -131,6 +143,9 @@ declare const BkPopover: {
|
|
131
143
|
} & {
|
132
144
|
default: boolean;
|
133
145
|
};
|
146
|
+
stopBehaviors: import("vue-types").VueTypeDef<string | string[]> & {
|
147
|
+
default: string | (() => string[]);
|
148
|
+
};
|
134
149
|
}>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {
|
135
150
|
width: string | number;
|
136
151
|
height: string | number;
|
@@ -142,6 +157,7 @@ declare const BkPopover: {
|
|
142
157
|
trigger: string;
|
143
158
|
arrow: boolean;
|
144
159
|
isShow: boolean;
|
160
|
+
stopBehaviors: string | string[];
|
145
161
|
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
146
162
|
fixOnBoundary: boolean;
|
147
163
|
}> & {
|
@@ -165,8 +181,12 @@ declare const BkPopover: {
|
|
165
181
|
$nextTick: typeof import("vue").nextTick;
|
166
182
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
|
167
183
|
} & Readonly<import("vue").ExtractPropTypes<{
|
184
|
+
onAfterHidden: FunctionConstructor;
|
185
|
+
onAfterShow: FunctionConstructor;
|
168
186
|
isShow: import("vue-types").VueTypeValidableDef<boolean> & {
|
169
187
|
default: boolean;
|
188
|
+
} & {
|
189
|
+
default: boolean;
|
170
190
|
};
|
171
191
|
width: import("vue-types").VueTypeDef<string | number> & {
|
172
192
|
default: string | number;
|
@@ -215,13 +235,20 @@ declare const BkPopover: {
|
|
215
235
|
} & {
|
216
236
|
default: boolean;
|
217
237
|
};
|
238
|
+
stopBehaviors: import("vue-types").VueTypeDef<string | string[]> & {
|
239
|
+
default: string | (() => string[]);
|
240
|
+
};
|
218
241
|
}>> & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & {} & import("vue").ComponentCustomProperties;
|
219
242
|
__isFragment?: never;
|
220
243
|
__isTeleport?: never;
|
221
244
|
__isSuspense?: never;
|
222
245
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
246
|
+
onAfterHidden: FunctionConstructor;
|
247
|
+
onAfterShow: FunctionConstructor;
|
223
248
|
isShow: import("vue-types").VueTypeValidableDef<boolean> & {
|
224
249
|
default: boolean;
|
250
|
+
} & {
|
251
|
+
default: boolean;
|
225
252
|
};
|
226
253
|
width: import("vue-types").VueTypeDef<string | number> & {
|
227
254
|
default: string | number;
|
@@ -270,7 +297,10 @@ declare const BkPopover: {
|
|
270
297
|
} & {
|
271
298
|
default: boolean;
|
272
299
|
};
|
273
|
-
|
300
|
+
stopBehaviors: import("vue-types").VueTypeDef<string | string[]> & {
|
301
|
+
default: string | (() => string[]);
|
302
|
+
};
|
303
|
+
}>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "update:isShow" | "afterHidden" | "afterShow", {
|
274
304
|
width: string | number;
|
275
305
|
height: string | number;
|
276
306
|
placement: string;
|
@@ -281,6 +311,7 @@ declare const BkPopover: {
|
|
281
311
|
trigger: string;
|
282
312
|
arrow: boolean;
|
283
313
|
isShow: boolean;
|
314
|
+
stopBehaviors: string | string[];
|
284
315
|
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
285
316
|
fixOnBoundary: boolean;
|
286
317
|
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin;
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"));else if("function"==typeof define&&define.amd)define(["../shared","vue"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue")):t(e["../shared"],e.vue);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,((e,t)=>(()=>{"use strict";var o={4212:t=>{t.exports=e},748:e=>{e.exports=t}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return o[e](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{n.r(a),n.d(a,{default:()=>s});var e=n(4212),t=n(748),o={onAfterHidden:Function,onAfterShow:Function},r=Object.assign({isShow:e.PropTypes.bool.def(!1),width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),content:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def(""),transition:e.PropTypes.string.def("fade-in"),placement:e.PropTypes.placement(["auto","auto-start","auto-end","top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end"]).def("top"),theme:e.PropTypes.string.def("light"),handleFirstUpdate:{type:Function,default:function(){}},trigger:e.PropTypes.string.def("hover"),arrow:e.PropTypes.bool.def(!0),modifiers:e.PropTypes.array.def([{name:"offset",options:{offset:[0,8]}}]),boundary:e.PropTypes.oneOfType([e.PropTypes.string.def("parent"),e.PropTypes.instanceOf(HTMLElement)]),fixOnBoundary:e.PropTypes.bool.def(!1),stopBehaviors:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.commonType(["stopPropagation","stopImmediatePropagation","preventDefault"],"stopBehaviors")),e.PropTypes.string]).def([])},o);const i=(0,t.defineComponent)({name:"Popover",props:r,emits:["afterHidden","afterShow","update:isShow"],setup:function(o,r){var n=!1,a=Object.create(null),i=(0,t.toRefs)(o),s=i.width,p=i.height,u=i.theme,d=i.trigger,f=i.isShow,l=i.placement,c=i.modifiers,v=i.arrow,y=i.content,m=(0,t.ref)(),h=(0,t.ref)(),T=(0,t.computed)((function(){return{width:/^\d+$/.test(String(s.value))?"".concat(s.value,"px"):s.value,height:/^\d+$/.test(String(p.value))?"".concat(p.value,"px"):p.value,zIndex:e.bkZIndexManager.getModalNextIndex()}})),b=["dark","light"],g=(0,t.computed)((function(){var e=u.value.split(/\s+/);return e.sort((function(e,t){return Number(b.includes(t))-Number(b.includes(e))})),{systemThemes:e,customThemes:e.filter((function(e){return!b.includes(e)}))}})),P=function(e){var t,o;n&&(e?null===(t=a.show)||void 0===t||t.call(a):null===(o=a.hide)||void 0===o||o.call(a))};(0,t.watch)((function(){return o.isShow}),(function(e){P(e)}),{immediate:!0});var w=function(){r.emit("update:isShow",!1),r.emit("afterHidden",!1)},x=function(){r.emit("update:isShow",!0),r.emit("afterShow",!1)},O=function(){var e=a;e.constructor&&(e.isShow&&e.hide(),e.destroy(),a=Object.create(null))},S=function(){a=new e.BKPopover(m.value,h.value,{theme:g.value.systemThemes.join(" "),placement:l.value,trigger:d.value,modifiers:c.value,onFirstUpdate:o.handleFirstUpdate,afterShow:x,afterHidden:w,appendTo:o.boundary,fixOnBoundary:o.fixOnBoundary}),n=!0,P(f.value)},j=function(){O(),(0,t.nextTick)(S)};r.expose({update:j}),(0,t.onMounted)(j),(0,t.onBeforeUnmount)(O);var B=function(){r.emit("after-enter")},k=function(){r.emit("after-leave")},N=g.value.customThemes.join(" "),A=g.value.customThemes.reduce((function(e,t){return Object.assign((o={},!0,(r="data-".concat(t,"-theme"))in o?Object.defineProperty(o,r,{value:true,enumerable:!0,configurable:!0,writable:!0}):o[r]=true,o),e);var o,r}),{}),F="bk-popover-content ".concat(N),M=function(e){var t=function(t){"function"==typeof e[t]&&e[t]()};Array.isArray(o.stopBehaviors)&&o.stopBehaviors.forEach(t),"string"==typeof o.stopBehaviors&&t(o.stopBehaviors)};return function(){var e,n,a,i,s;return(0,t.createVNode)("div",{class:"bk-popover","data-bk-pop-container":!0},[(0,t.createVNode)("div",{ref:m,class:"bk-popover-reference"},[null===(n=(e=r.slots).default)||void 0===n?void 0:n.call(e)]),(0,t.createVNode)(t.Transition,{name:o.transition,onAfterEnter:B,onAfterLeave:k},{default:function(){return[(0,t.createVNode)("div",(0,t.mergeProps)({ref:h,class:F,style:T.value},A,{onClick:M}),[null!==(s=null===(i=(a=r.slots).content)||void 0===i?void 0:i.call(a))&&void 0!==s?s:y.value,v.value&&(0,t.createVNode)("div",{class:"arrow","data-popper-arrow":!0},null)])]}})])}}}),s=(0,e.withInstall)(i)})(),a})()));
|
package/lib/popover/popover.d.ts
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
2
|
+
onAfterHidden: FunctionConstructor;
|
3
|
+
onAfterShow: FunctionConstructor;
|
2
4
|
isShow: import("vue-types").VueTypeValidableDef<boolean> & {
|
3
5
|
default: boolean;
|
6
|
+
} & {
|
7
|
+
default: boolean;
|
4
8
|
};
|
5
9
|
width: import("vue-types").VueTypeDef<string | number> & {
|
6
10
|
default: string | number;
|
@@ -49,9 +53,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
49
53
|
} & {
|
50
54
|
default: boolean;
|
51
55
|
};
|
52
|
-
|
56
|
+
stopBehaviors: import("vue-types").VueTypeDef<string | string[]> & {
|
57
|
+
default: string | (() => string[]);
|
58
|
+
};
|
59
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "update:isShow" | "afterHidden" | "afterShow", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
60
|
+
onAfterHidden: FunctionConstructor;
|
61
|
+
onAfterShow: FunctionConstructor;
|
53
62
|
isShow: import("vue-types").VueTypeValidableDef<boolean> & {
|
54
63
|
default: boolean;
|
64
|
+
} & {
|
65
|
+
default: boolean;
|
55
66
|
};
|
56
67
|
width: import("vue-types").VueTypeDef<string | number> & {
|
57
68
|
default: string | number;
|
@@ -100,6 +111,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
100
111
|
} & {
|
101
112
|
default: boolean;
|
102
113
|
};
|
114
|
+
stopBehaviors: import("vue-types").VueTypeDef<string | string[]> & {
|
115
|
+
default: string | (() => string[]);
|
116
|
+
};
|
103
117
|
}>>, {
|
104
118
|
width: string | number;
|
105
119
|
height: string | number;
|
@@ -111,6 +125,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
111
125
|
trigger: string;
|
112
126
|
arrow: boolean;
|
113
127
|
isShow: boolean;
|
128
|
+
stopBehaviors: string | string[];
|
114
129
|
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
115
130
|
fixOnBoundary: boolean;
|
116
131
|
}>;
|
package/lib/popover/props.d.ts
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
2
2
|
import { OnFirstUpdateFnType } from '@bkui-vue/shared';
|
3
3
|
export declare const PopoverProps: {
|
4
|
+
onAfterHidden: FunctionConstructor;
|
5
|
+
onAfterShow: FunctionConstructor;
|
4
6
|
isShow: import("vue-types").VueTypeValidableDef<boolean> & {
|
5
7
|
default: boolean;
|
8
|
+
} & {
|
9
|
+
default: boolean;
|
6
10
|
};
|
7
11
|
width: import("vue-types").VueTypeDef<string | number> & {
|
8
12
|
default: string | number;
|
@@ -73,5 +77,13 @@ export declare const PopoverProps: {
|
|
73
77
|
} & {
|
74
78
|
default: boolean;
|
75
79
|
};
|
80
|
+
/**
|
81
|
+
* 弹出框鼠标点击事件是否阻止的点击事件行为
|
82
|
+
* 支持 stopPropagation stopImmediatePropagation preventDefault
|
83
|
+
* 用于在嵌套弹出或者元素定位导致的点击触发关闭问题
|
84
|
+
*/
|
85
|
+
stopBehaviors: import("vue-types").VueTypeDef<string | string[]> & {
|
86
|
+
default: string | (() => string[]);
|
87
|
+
};
|
76
88
|
};
|
77
89
|
export declare type PopoverPropTypes = Readonly<ExtractPropTypes<typeof PopoverProps>>;
|