bkui-vue 0.0.1-beta.391 → 0.0.1-beta.392
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/lib/affix/index.js +128 -60
- package/lib/alert/index.js +124 -56
- package/lib/animate-number/index.js +106 -42
- package/lib/backtop/index.js +133 -61
- package/lib/badge/index.js +114 -50
- package/lib/breadcrumb/index.js +133 -67
- package/lib/button/index.js +147 -68
- package/lib/card/index.js +154 -69
- package/lib/cascader/index.js +242 -168
- package/lib/checkbox/index.js +139 -77
- package/lib/code-diff/index.js +121 -79
- package/lib/collapse/index.js +150 -84
- package/lib/color-picker/index.js +245 -193
- package/lib/components.js +671 -434
- package/lib/container/index.js +125 -64
- package/lib/date-picker/index.js +563 -462
- package/lib/dialog/index.js +198 -108
- package/lib/directives/index.js +138 -92
- package/lib/dist.index.js +133 -48
- package/lib/divider/index.js +118 -50
- package/lib/dropdown/index.js +155 -73
- package/lib/exception/index.js +145 -97
- package/lib/fixed-navbar/index.js +107 -43
- package/lib/form/index.js +193 -107
- package/lib/icon/angle-double-down-line.js +90 -30
- package/lib/icon/angle-double-left-line.js +90 -30
- package/lib/icon/angle-double-left.js +90 -30
- package/lib/icon/angle-double-right-line.js +90 -30
- package/lib/icon/angle-double-right.js +90 -30
- package/lib/icon/angle-double-up-line.js +90 -30
- package/lib/icon/angle-down-fill.js +90 -30
- package/lib/icon/angle-down-line.js +90 -30
- package/lib/icon/angle-down.js +90 -30
- package/lib/icon/angle-left.js +90 -30
- package/lib/icon/angle-right.js +90 -30
- package/lib/icon/angle-up-fill.js +90 -30
- package/lib/icon/angle-up.js +90 -30
- package/lib/icon/archive-fill.js +90 -30
- package/lib/icon/arrows-left.js +90 -30
- package/lib/icon/arrows-right.js +90 -30
- package/lib/icon/audio-fill.js +90 -30
- package/lib/icon/bk.js +90 -30
- package/lib/icon/circle.js +90 -30
- package/lib/icon/close-line.js +90 -30
- package/lib/icon/close.js +90 -30
- package/lib/icon/code.js +90 -30
- package/lib/icon/cog-shape.js +90 -30
- package/lib/icon/collapse-left.js +90 -30
- package/lib/icon/copy.js +90 -30
- package/lib/icon/data-shape.js +90 -30
- package/lib/icon/del.js +90 -30
- package/lib/icon/doc-fill.js +90 -30
- package/lib/icon/done.js +90 -30
- package/lib/icon/down-shape.js +90 -30
- package/lib/icon/down-small.js +90 -30
- package/lib/icon/edit-line.js +90 -30
- package/lib/icon/ellipsis.js +90 -30
- package/lib/icon/enlarge-line.js +90 -30
- package/lib/icon/error.js +90 -30
- package/lib/icon/excel-fill.js +90 -30
- package/lib/icon/exclamation-circle-shape.js +90 -30
- package/lib/icon/eye.js +90 -30
- package/lib/icon/filliscreen-line.js +90 -30
- package/lib/icon/folder-open.js +90 -30
- package/lib/icon/folder-shape-open.js +90 -30
- package/lib/icon/folder-shape.js +90 -30
- package/lib/icon/folder.js +90 -30
- package/lib/icon/funnel.js +90 -30
- package/lib/icon/help-document-fill.js +90 -30
- package/lib/icon/help-fill.js +90 -30
- package/lib/icon/help.js +90 -30
- package/lib/icon/image-fill.js +90 -30
- package/lib/icon/img-placehoulder.js +88 -52
- package/lib/icon/index.js +255 -267
- package/lib/icon/info-line.js +88 -52
- package/lib/icon/info.js +88 -52
- package/lib/icon/left-shape.js +88 -52
- package/lib/icon/left-turn-line.js +88 -52
- package/lib/icon/narrow-line.js +88 -52
- package/lib/icon/original.js +88 -52
- package/lib/icon/pdf-fill.js +88 -52
- package/lib/icon/play-shape.js +88 -52
- package/lib/icon/plus.js +88 -52
- package/lib/icon/ppt-fill.js +88 -52
- package/lib/icon/qq.js +88 -52
- package/lib/icon/right-shape.js +88 -52
- package/lib/icon/right-turn-line.js +88 -52
- package/lib/icon/search.js +88 -52
- package/lib/icon/share.js +88 -52
- package/lib/icon/spinner.js +88 -52
- package/lib/icon/success.js +88 -52
- package/lib/icon/switcher-loading.js +88 -52
- package/lib/icon/text-file.js +88 -52
- package/lib/icon/text-fill.js +88 -52
- package/lib/icon/transfer.js +88 -52
- package/lib/icon/tree-application-shape.js +88 -52
- package/lib/icon/unfull-screen.js +88 -52
- package/lib/icon/unvisible.js +88 -52
- package/lib/icon/up-shape.js +88 -52
- package/lib/icon/upload.js +88 -52
- package/lib/icon/video-fill.js +88 -52
- package/lib/icon/warn.js +88 -52
- package/lib/icon/weixin.js +88 -52
- package/lib/image/index.js +213 -164
- package/lib/index.js +134 -50
- package/lib/info-box/index.js +206 -152
- package/lib/input/index.js +167 -99
- package/lib/link/index.js +115 -47
- package/lib/loading/index.js +127 -67
- package/lib/menu/index.js +156 -92
- package/lib/message/index.js +148 -76
- package/lib/modal/index.js +151 -85
- package/lib/navigation/index.js +134 -66
- package/lib/notify/index.js +153 -81
- package/lib/overflow-title/index.js +128 -92
- package/lib/pagination/index.js +220 -131
- package/lib/plugin-popover/index.js +190 -143
- package/lib/plugins/index.js +100 -33
- package/lib/popover/index.js +193 -148
- package/lib/popover2/index.js +99 -35
- package/lib/preset.js +104 -37
- package/lib/process/index.js +134 -92
- package/lib/progress/index.js +127 -63
- package/lib/radio/index.js +142 -81
- package/lib/rate/index.js +127 -63
- package/lib/resize-layout/index.js +147 -79
- package/lib/search-select/index.js +220 -168
- package/lib/select/index.js +394 -315
- package/lib/shared/index.js +203 -228
- package/lib/sideslider/index.js +137 -88
- package/lib/slider/index.js +196 -147
- package/lib/steps/index.js +152 -105
- package/lib/swiper/index.js +126 -62
- package/lib/switcher/index.js +133 -65
- package/lib/tab/index.js +188 -118
- package/lib/table/index.js +572 -457
- package/lib/table-column/index.js +197 -129
- package/lib/tag/index.js +130 -58
- package/lib/tag-input/index.js +277 -175
- package/lib/time-picker/index.js +111 -40
- package/lib/timeline/index.js +114 -50
- package/lib/transfer/index.js +174 -89
- package/lib/tree/index.js +235 -158
- package/lib/upload/index.js +227 -173
- package/lib/virtual-render/index.js +154 -86
- package/package.json +1 -1
package/lib/form/index.js
CHANGED
@@ -1,48 +1,138 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory(require("../shared"), require("vue"), require("lodash"), require("../directives"), require("../icon"));
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define(["../shared", "vue", "lodash", "../directives", "../icon"], factory);
|
6
|
+
else {
|
7
|
+
var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("lodash"), require("../directives"), require("../icon")) : factory(root["../shared"], root["vue"], root["lodash"], root["../directives"], root["../icon"]);
|
8
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
9
|
+
}
|
10
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__467__, __WEBPACK_EXTERNAL_MODULE__4061__, __WEBPACK_EXTERNAL_MODULE__6870__) => {
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
14
|
+
|
15
|
+
/***/ 4061:
|
16
|
+
/***/ ((module) => {
|
17
|
+
|
18
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__4061__;
|
19
|
+
|
20
|
+
/***/ }),
|
21
|
+
|
22
|
+
/***/ 6870:
|
23
|
+
/***/ ((module) => {
|
24
|
+
|
25
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__6870__;
|
26
|
+
|
27
|
+
/***/ }),
|
28
|
+
|
29
|
+
/***/ 4212:
|
30
|
+
/***/ ((module) => {
|
31
|
+
|
32
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
|
33
|
+
|
34
|
+
/***/ }),
|
35
|
+
|
36
|
+
/***/ 467:
|
37
|
+
/***/ ((module) => {
|
38
|
+
|
39
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__467__;
|
40
|
+
|
41
|
+
/***/ }),
|
42
|
+
|
43
|
+
/***/ 748:
|
44
|
+
/***/ ((module) => {
|
45
|
+
|
46
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
|
47
|
+
|
48
|
+
/***/ })
|
49
|
+
|
50
|
+
/******/ });
|
9
51
|
/************************************************************************/
|
10
|
-
/******/
|
11
|
-
/******/
|
12
|
-
/******/
|
13
|
-
/******/
|
14
|
-
/******/
|
15
|
-
/******/
|
16
|
-
/******/
|
17
|
-
/******/
|
52
|
+
/******/ // The module cache
|
53
|
+
/******/ var __webpack_module_cache__ = {};
|
54
|
+
/******/
|
55
|
+
/******/ // The require function
|
56
|
+
/******/ function __webpack_require__(moduleId) {
|
57
|
+
/******/ // Check if module is in cache
|
58
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
59
|
+
/******/ if (cachedModule !== undefined) {
|
60
|
+
/******/ return cachedModule.exports;
|
18
61
|
/******/ }
|
19
|
-
/******/
|
20
|
-
/******/
|
21
|
-
/******/
|
22
|
-
/******/
|
23
|
-
/******/
|
24
|
-
/******/
|
25
|
-
/******/
|
26
|
-
/******/
|
62
|
+
/******/ // Create a new module (and put it into the cache)
|
63
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
64
|
+
/******/ // no module.id needed
|
65
|
+
/******/ // no module.loaded needed
|
66
|
+
/******/ exports: {}
|
67
|
+
/******/ };
|
68
|
+
/******/
|
69
|
+
/******/ // Execute the module function
|
70
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
71
|
+
/******/
|
72
|
+
/******/ // Return the exports of the module
|
73
|
+
/******/ return module.exports;
|
74
|
+
/******/ }
|
75
|
+
/******/
|
76
|
+
/************************************************************************/
|
77
|
+
/******/ /* webpack/runtime/compat get default export */
|
78
|
+
/******/ (() => {
|
79
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
80
|
+
/******/ __webpack_require__.n = (module) => {
|
81
|
+
/******/ var getter = module && module.__esModule ?
|
82
|
+
/******/ () => (module['default']) :
|
83
|
+
/******/ () => (module);
|
84
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
85
|
+
/******/ return getter;
|
86
|
+
/******/ };
|
87
|
+
/******/ })();
|
88
|
+
/******/
|
89
|
+
/******/ /* webpack/runtime/define property getters */
|
90
|
+
/******/ (() => {
|
91
|
+
/******/ // define getter functions for harmony exports
|
92
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
93
|
+
/******/ for(var key in definition) {
|
94
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
95
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
96
|
+
/******/ }
|
97
|
+
/******/ }
|
98
|
+
/******/ };
|
99
|
+
/******/ })();
|
100
|
+
/******/
|
101
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
102
|
+
/******/ (() => {
|
103
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
104
|
+
/******/ })();
|
105
|
+
/******/
|
106
|
+
/******/ /* webpack/runtime/make namespace object */
|
107
|
+
/******/ (() => {
|
108
|
+
/******/ // define __esModule on exports
|
109
|
+
/******/ __webpack_require__.r = (exports) => {
|
110
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
111
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
112
|
+
/******/ }
|
113
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
114
|
+
/******/ };
|
115
|
+
/******/ })();
|
116
|
+
/******/
|
27
117
|
/************************************************************************/
|
28
118
|
var __webpack_exports__ = {};
|
119
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
120
|
+
(() => {
|
121
|
+
// ESM COMPAT FLAG
|
122
|
+
__webpack_require__.r(__webpack_exports__);
|
29
123
|
|
30
124
|
// EXPORTS
|
31
125
|
__webpack_require__.d(__webpack_exports__, {
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"
|
126
|
+
"BkComposeFormItem": () => (/* reexport */ compose_form_item),
|
127
|
+
"BkForm": () => (/* binding */ BkForm),
|
128
|
+
"BkFormItem": () => (/* reexport */ form_item),
|
129
|
+
"default": () => (/* binding */ src)
|
36
130
|
});
|
37
131
|
|
38
|
-
|
39
|
-
var
|
40
|
-
|
41
|
-
|
42
|
-
;// CONCATENATED MODULE: external "vue"
|
43
|
-
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
44
|
-
var external_vue_y = x => () => x
|
45
|
-
const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
|
132
|
+
// EXTERNAL MODULE: external "../shared"
|
133
|
+
var external_shared_ = __webpack_require__(4212);
|
134
|
+
// EXTERNAL MODULE: external "vue"
|
135
|
+
var external_vue_ = __webpack_require__(748);
|
46
136
|
;// CONCATENATED MODULE: ../../packages/form/src/compose-form-item.tsx
|
47
137
|
/*
|
48
138
|
* Tencent is pleased to support the open source community by making
|
@@ -75,7 +165,7 @@ var isCustomComponent = function isCustomComponent(node) {
|
|
75
165
|
return node.__v_isVNode;
|
76
166
|
};
|
77
167
|
|
78
|
-
/* harmony default export */ const compose_form_item = ((0,
|
168
|
+
/* harmony default export */ const compose_form_item = ((0,external_vue_.defineComponent)({
|
79
169
|
name: 'ComposeFormItem',
|
80
170
|
props: {
|
81
171
|
headBackgroundColor: {
|
@@ -156,7 +246,7 @@ var isCustomComponent = function isCustomComponent(node) {
|
|
156
246
|
}
|
157
247
|
}
|
158
248
|
|
159
|
-
return (0,
|
249
|
+
return (0,external_vue_.h)('div', {
|
160
250
|
"class": 'bk-compose-form-item'
|
161
251
|
}, childrenArr);
|
162
252
|
}
|
@@ -182,13 +272,13 @@ function _defineProperty(obj, key, value) {
|
|
182
272
|
|
183
273
|
|
184
274
|
var formProps = {
|
185
|
-
formType:
|
186
|
-
labelWidth:
|
187
|
-
labelPosition:
|
188
|
-
model:
|
189
|
-
rules:
|
275
|
+
formType: external_shared_.PropTypes.oneOf(['default', 'vertical']).def('default'),
|
276
|
+
labelWidth: external_shared_.PropTypes.oneOfType([Number, String]).def(150),
|
277
|
+
labelPosition: external_shared_.PropTypes.oneOf(['left', 'center', 'right']),
|
278
|
+
model: external_shared_.PropTypes.object,
|
279
|
+
rules: external_shared_.PropTypes.object
|
190
280
|
};
|
191
|
-
/* harmony default export */ const src_form = ((0,
|
281
|
+
/* harmony default export */ const src_form = ((0,external_vue_.defineComponent)({
|
192
282
|
name: 'Form',
|
193
283
|
props: formProps,
|
194
284
|
emits: ['submit'],
|
@@ -219,7 +309,7 @@ var formProps = {
|
|
219
309
|
}, []);
|
220
310
|
};
|
221
311
|
|
222
|
-
(0,
|
312
|
+
(0,external_vue_.provide)(external_shared_.formKey, {
|
223
313
|
props: props,
|
224
314
|
register: register,
|
225
315
|
unregister: unregister
|
@@ -298,10 +388,10 @@ var formProps = {
|
|
298
388
|
render: function render() {
|
299
389
|
var _a, _b;
|
300
390
|
|
301
|
-
var formClasses = (0,
|
391
|
+
var formClasses = (0,external_shared_.classes)(_defineProperty({
|
302
392
|
'bk-form': true
|
303
393
|
}, "bk-form--".concat(this.formType), true));
|
304
|
-
return (0,
|
394
|
+
return (0,external_vue_.createVNode)("form", {
|
305
395
|
"class": formClasses,
|
306
396
|
"onSubmit": this.handleSubmit
|
307
397
|
}, [(_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)]);
|
@@ -348,18 +438,13 @@ function _nonIterableSpread() {
|
|
348
438
|
function _toConsumableArray(arr) {
|
349
439
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
350
440
|
}
|
351
|
-
|
352
|
-
var
|
353
|
-
var
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
var
|
358
|
-
const external_directives_namespaceObject = external_directives_x({ ["bkTooltips"]: () => __WEBPACK_EXTERNAL_MODULE__directives_9cc9ba10__.bkTooltips });
|
359
|
-
;// CONCATENATED MODULE: external "../icon"
|
360
|
-
var external_icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
361
|
-
var external_icon_y = x => () => x
|
362
|
-
const external_icon_namespaceObject = external_icon_x({ ["ExclamationCircleShape"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.ExclamationCircleShape });
|
441
|
+
// EXTERNAL MODULE: external "lodash"
|
442
|
+
var external_lodash_ = __webpack_require__(467);
|
443
|
+
var external_lodash_default = /*#__PURE__*/__webpack_require__.n(external_lodash_);
|
444
|
+
// EXTERNAL MODULE: external "../directives"
|
445
|
+
var external_directives_ = __webpack_require__(4061);
|
446
|
+
// EXTERNAL MODULE: external "../icon"
|
447
|
+
var external_icon_ = __webpack_require__(6870);
|
363
448
|
;// CONCATENATED MODULE: ../../packages/form/src/utils.ts
|
364
449
|
/*
|
365
450
|
* Tencent is pleased to support the open source community by making
|
@@ -422,11 +507,11 @@ var getRuleMessage = function getRuleMessage(rule) {
|
|
422
507
|
|
423
508
|
/* harmony default export */ const src_validator = ({
|
424
509
|
required: function required(value) {
|
425
|
-
if (typeof value === 'number' || typeof value === 'boolean' ||
|
510
|
+
if (typeof value === 'number' || typeof value === 'boolean' || external_lodash_default().isDate(value)) {
|
426
511
|
return true;
|
427
512
|
}
|
428
513
|
|
429
|
-
return !
|
514
|
+
return !external_lodash_default().isEmpty(value);
|
430
515
|
},
|
431
516
|
min: function min(value, _min) {
|
432
517
|
return value >= _min;
|
@@ -483,19 +568,19 @@ var getRuleMessage = function getRuleMessage(rule) {
|
|
483
568
|
|
484
569
|
;
|
485
570
|
var formItemProps = {
|
486
|
-
label:
|
487
|
-
labelWidth:
|
488
|
-
labelPosition:
|
489
|
-
property:
|
490
|
-
required:
|
491
|
-
email:
|
492
|
-
max:
|
493
|
-
min:
|
494
|
-
maxlength:
|
495
|
-
rules:
|
496
|
-
autoCheck:
|
497
|
-
description:
|
498
|
-
errorDisplayType:
|
571
|
+
label: external_shared_.PropTypes.string,
|
572
|
+
labelWidth: external_shared_.PropTypes.oneOfType([Number, String]),
|
573
|
+
labelPosition: external_shared_.PropTypes.oneOf(['left', 'center', 'right']),
|
574
|
+
property: external_shared_.PropTypes.string.def(''),
|
575
|
+
required: external_shared_.PropTypes.bool.def(false),
|
576
|
+
email: external_shared_.PropTypes.bool.def(false),
|
577
|
+
max: external_shared_.PropTypes.number,
|
578
|
+
min: external_shared_.PropTypes.number,
|
579
|
+
maxlength: external_shared_.PropTypes.number,
|
580
|
+
rules: external_shared_.PropTypes.array,
|
581
|
+
autoCheck: external_shared_.PropTypes.bool.def(false),
|
582
|
+
description: external_shared_.PropTypes.string,
|
583
|
+
errorDisplayType: external_shared_.PropTypes.oneOf(['tooltips', 'normal']).def('normal')
|
499
584
|
};
|
500
585
|
|
501
586
|
var hasOwn = function hasOwn(obj, key) {
|
@@ -564,10 +649,10 @@ var mergeRules = function mergeRules(configRules, propRules) {
|
|
564
649
|
var rulevalidator;
|
565
650
|
|
566
651
|
if (rule.required) {
|
567
|
-
rulevalidator = (0,
|
652
|
+
rulevalidator = (0,external_lodash_.isFunction)(rule.validator) ? rule.validator : src_validator.required;
|
568
653
|
customRequired = true;
|
569
654
|
} else if (rule.email) {
|
570
|
-
rulevalidator = (0,
|
655
|
+
rulevalidator = (0,external_lodash_.isFunction)(rule.validator) ? rule.validator : src_validator.email;
|
571
656
|
customEmail = true;
|
572
657
|
} else if (Number(rule.max) > -1) {
|
573
658
|
rulevalidator = function rulevalidator(value) {
|
@@ -585,7 +670,7 @@ var mergeRules = function mergeRules(configRules, propRules) {
|
|
585
670
|
rulevalidator = function rulevalidator(value) {
|
586
671
|
return src_validator.pattern(value, rule.pattern);
|
587
672
|
};
|
588
|
-
} else if ((0,
|
673
|
+
} else if ((0,external_lodash_.isFunction)(rule.validator)) {
|
589
674
|
rulevalidator = rule.validator;
|
590
675
|
} else {
|
591
676
|
// 不支持的配置规则
|
@@ -636,37 +721,37 @@ var isValid = function isValid(value) {
|
|
636
721
|
return value !== undefined;
|
637
722
|
};
|
638
723
|
|
639
|
-
/* harmony default export */ const form_item = ((0,
|
724
|
+
/* harmony default export */ const form_item = ((0,external_vue_.defineComponent)({
|
640
725
|
name: 'FormItem',
|
641
726
|
directives: {
|
642
|
-
bkTooltips:
|
727
|
+
bkTooltips: external_directives_.bkTooltips
|
643
728
|
},
|
644
729
|
props: formItemProps,
|
645
730
|
setup: function setup(props, context) {
|
646
|
-
var form = (0,
|
731
|
+
var form = (0,external_shared_.useForm)();
|
647
732
|
var isForm = Boolean(form);
|
648
|
-
var parentFormItem = (0,
|
733
|
+
var parentFormItem = (0,external_shared_.useFormItem)();
|
649
734
|
var isNested = Boolean(parentFormItem);
|
650
|
-
var currentInstance = (0,
|
651
|
-
var state = (0,
|
735
|
+
var currentInstance = (0,external_vue_.getCurrentInstance)();
|
736
|
+
var state = (0,external_vue_.reactive)({
|
652
737
|
isError: false,
|
653
738
|
errorMessage: ''
|
654
739
|
});
|
655
|
-
var isFormTypeVertical = (0,
|
740
|
+
var isFormTypeVertical = (0,external_vue_.computed)(function () {
|
656
741
|
if (!isForm) {
|
657
742
|
return false;
|
658
743
|
}
|
659
744
|
|
660
745
|
return form.props.formType === 'vertical';
|
661
746
|
});
|
662
|
-
var isShowLabel = (0,
|
747
|
+
var isShowLabel = (0,external_vue_.computed)(function () {
|
663
748
|
if (props.label || context.slots.label) {
|
664
749
|
return true;
|
665
750
|
}
|
666
751
|
|
667
752
|
return false;
|
668
753
|
});
|
669
|
-
var labelStyles = (0,
|
754
|
+
var labelStyles = (0,external_vue_.computed)(function () {
|
670
755
|
var styles = {
|
671
756
|
width: '',
|
672
757
|
paddingRight: '',
|
@@ -691,7 +776,7 @@ var isValid = function isValid(value) {
|
|
691
776
|
|
692
777
|
return styles;
|
693
778
|
});
|
694
|
-
var contentStyles = (0,
|
779
|
+
var contentStyles = (0,external_vue_.computed)(function () {
|
695
780
|
return _defineProperty({}, 'margin-left', labelStyles.value.width);
|
696
781
|
});
|
697
782
|
/**
|
@@ -723,7 +808,7 @@ var isValid = function isValid(value) {
|
|
723
808
|
state.errorMessage = '';
|
724
809
|
}
|
725
810
|
|
726
|
-
var value = (0,
|
811
|
+
var value = (0,external_lodash_.get)(form.props.model, props.property);
|
727
812
|
|
728
813
|
var doValidate = function () {
|
729
814
|
var stepIndex = -1;
|
@@ -779,21 +864,21 @@ var isValid = function isValid(value) {
|
|
779
864
|
state.errorMessage = '';
|
780
865
|
};
|
781
866
|
|
782
|
-
(0,
|
867
|
+
(0,external_vue_.provide)(external_shared_.formItemKey, Object.assign(Object.assign({}, props), {
|
783
868
|
validate: validate,
|
784
869
|
clearValidate: clearValidate
|
785
870
|
}));
|
786
|
-
(0,
|
871
|
+
(0,external_vue_.onMounted)(function () {
|
787
872
|
if (isForm) {
|
788
873
|
form.register(currentInstance.proxy);
|
789
874
|
}
|
790
875
|
});
|
791
|
-
(0,
|
876
|
+
(0,external_vue_.onBeforeUnmount)(function () {
|
792
877
|
if (isForm) {
|
793
878
|
form.unregister(currentInstance.proxy);
|
794
879
|
}
|
795
880
|
});
|
796
|
-
return Object.assign(Object.assign({}, (0,
|
881
|
+
return Object.assign(Object.assign({}, (0,external_vue_.toRefs)(state)), {
|
797
882
|
isShowLabel: isShowLabel,
|
798
883
|
labelStyles: labelStyles,
|
799
884
|
contentStyles: contentStyles,
|
@@ -807,7 +892,7 @@ var isValid = function isValid(value) {
|
|
807
892
|
|
808
893
|
var _a, _b, _c, _d;
|
809
894
|
|
810
|
-
var itemClassees = (0,
|
895
|
+
var itemClassees = (0,external_shared_.classes)({
|
811
896
|
'bk-form-item': true,
|
812
897
|
'is-error': this.isError,
|
813
898
|
'is-required': this.required
|
@@ -819,11 +904,11 @@ var isValid = function isValid(value) {
|
|
819
904
|
}
|
820
905
|
|
821
906
|
if (_this.description) {
|
822
|
-
return (0,
|
907
|
+
return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
|
823
908
|
"class": {
|
824
909
|
'bk-form-label-description': Boolean(_this.description)
|
825
910
|
}
|
826
|
-
}, [_this.label]), [[(0,
|
911
|
+
}, [_this.label]), [[(0,external_vue_.resolveDirective)("bk-tooltips"), _this.description]]);
|
827
912
|
}
|
828
913
|
|
829
914
|
return _this.label;
|
@@ -835,22 +920,22 @@ var isValid = function isValid(value) {
|
|
835
920
|
}
|
836
921
|
|
837
922
|
if (_this.errorDisplayType === 'tooltips') {
|
838
|
-
return (0,
|
923
|
+
return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
839
924
|
"class": "bk-form-error-tips"
|
840
|
-
}, [(0,
|
925
|
+
}, [(0,external_vue_.createVNode)(external_icon_.ExclamationCircleShape, null, null)]), [[(0,external_vue_.resolveDirective)("bk-tooltips"), _this.errorMessage]]);
|
841
926
|
}
|
842
927
|
|
843
|
-
return (0,
|
928
|
+
return (0,external_vue_.createVNode)("div", {
|
844
929
|
"class": "bk-form-error"
|
845
930
|
}, [_this.$slots.error ? _this.$slots.error(_this.errorMessage) : _this.errorMessage]);
|
846
931
|
};
|
847
932
|
|
848
|
-
return (0,
|
933
|
+
return (0,external_vue_.createVNode)("div", {
|
849
934
|
"class": itemClassees
|
850
|
-
}, [this.isShowLabel && (0,
|
935
|
+
}, [this.isShowLabel && (0,external_vue_.createVNode)("div", {
|
851
936
|
"class": "bk-form-label",
|
852
937
|
"style": this.labelStyles
|
853
|
-
}, [renderLabel(), this.isFormTypeVertical && ((_b = (_a = this.$slots).labelAppend) === null || _b === void 0 ? void 0 : _b.call(_a))]), (0,
|
938
|
+
}, [renderLabel(), this.isFormTypeVertical && ((_b = (_a = this.$slots).labelAppend) === null || _b === void 0 ? void 0 : _b.call(_a))]), (0,external_vue_.createVNode)("div", {
|
854
939
|
"class": "bk-form-content",
|
855
940
|
"style": this.contentStyles
|
856
941
|
}, [(_d = (_c = this.$slots)["default"]) === null || _d === void 0 ? void 0 : _d.call(_c), renderError()])]);
|
@@ -887,14 +972,15 @@ var isValid = function isValid(value) {
|
|
887
972
|
|
888
973
|
|
889
974
|
|
890
|
-
var BkForm = (0,
|
975
|
+
var BkForm = (0,external_shared_.withInstallProps)(src_form, {
|
891
976
|
FormItem: form_item,
|
892
977
|
ComposeFormItem: compose_form_item
|
893
978
|
});
|
894
979
|
/* harmony default export */ const src = (BkForm);
|
895
980
|
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
981
|
+
})();
|
982
|
+
|
983
|
+
/******/ return __webpack_exports__;
|
984
|
+
/******/ })()
|
985
|
+
;
|
986
|
+
});
|
@@ -1,37 +1,93 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory(require("vue"));
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define(["vue"], factory);
|
6
|
+
else {
|
7
|
+
var a = typeof exports === 'object' ? factory(require("vue")) : factory(root["vue"]);
|
8
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
9
|
+
}
|
10
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE__748__) => {
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
14
|
+
|
15
|
+
/***/ 748:
|
16
|
+
/***/ ((module) => {
|
17
|
+
|
18
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
|
19
|
+
|
20
|
+
/***/ })
|
21
|
+
|
22
|
+
/******/ });
|
5
23
|
/************************************************************************/
|
6
|
-
/******/
|
7
|
-
/******/
|
8
|
-
/******/
|
9
|
-
/******/
|
10
|
-
/******/
|
11
|
-
/******/
|
12
|
-
/******/
|
13
|
-
/******/
|
24
|
+
/******/ // The module cache
|
25
|
+
/******/ var __webpack_module_cache__ = {};
|
26
|
+
/******/
|
27
|
+
/******/ // The require function
|
28
|
+
/******/ function __webpack_require__(moduleId) {
|
29
|
+
/******/ // Check if module is in cache
|
30
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
31
|
+
/******/ if (cachedModule !== undefined) {
|
32
|
+
/******/ return cachedModule.exports;
|
14
33
|
/******/ }
|
15
|
-
/******/
|
16
|
-
/******/
|
17
|
-
/******/
|
18
|
-
/******/
|
19
|
-
/******/
|
20
|
-
/******/
|
21
|
-
/******/
|
22
|
-
/******/
|
34
|
+
/******/ // Create a new module (and put it into the cache)
|
35
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
36
|
+
/******/ // no module.id needed
|
37
|
+
/******/ // no module.loaded needed
|
38
|
+
/******/ exports: {}
|
39
|
+
/******/ };
|
40
|
+
/******/
|
41
|
+
/******/ // Execute the module function
|
42
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
43
|
+
/******/
|
44
|
+
/******/ // Return the exports of the module
|
45
|
+
/******/ return module.exports;
|
46
|
+
/******/ }
|
47
|
+
/******/
|
48
|
+
/************************************************************************/
|
49
|
+
/******/ /* webpack/runtime/define property getters */
|
50
|
+
/******/ (() => {
|
51
|
+
/******/ // define getter functions for harmony exports
|
52
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
53
|
+
/******/ for(var key in definition) {
|
54
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
55
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
56
|
+
/******/ }
|
57
|
+
/******/ }
|
58
|
+
/******/ };
|
59
|
+
/******/ })();
|
60
|
+
/******/
|
61
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
62
|
+
/******/ (() => {
|
63
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
64
|
+
/******/ })();
|
65
|
+
/******/
|
66
|
+
/******/ /* webpack/runtime/make namespace object */
|
67
|
+
/******/ (() => {
|
68
|
+
/******/ // define __esModule on exports
|
69
|
+
/******/ __webpack_require__.r = (exports) => {
|
70
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
71
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
72
|
+
/******/ }
|
73
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
74
|
+
/******/ };
|
75
|
+
/******/ })();
|
76
|
+
/******/
|
23
77
|
/************************************************************************/
|
24
78
|
var __webpack_exports__ = {};
|
79
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
80
|
+
(() => {
|
81
|
+
// ESM COMPAT FLAG
|
82
|
+
__webpack_require__.r(__webpack_exports__);
|
25
83
|
|
26
84
|
// EXPORTS
|
27
85
|
__webpack_require__.d(__webpack_exports__, {
|
28
|
-
"
|
86
|
+
"default": () => (/* binding */ angle_double_down_line)
|
29
87
|
});
|
30
88
|
|
31
|
-
|
32
|
-
var
|
33
|
-
var y = x => () => x
|
34
|
-
const external_vue_namespaceObject = x({ ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps });
|
89
|
+
// EXTERNAL MODULE: external "vue"
|
90
|
+
var external_vue_ = __webpack_require__(748);
|
35
91
|
;// CONCATENATED MODULE: ../../node_modules/tslib/tslib.es6.js
|
36
92
|
/******************************************************************************
|
37
93
|
Copyright (c) Microsoft Corporation.
|
@@ -314,7 +370,7 @@ function __classPrivateFieldIn(state, receiver) {
|
|
314
370
|
|
315
371
|
|
316
372
|
function generate(node, key, rootAttrs) {
|
317
|
-
return (0,
|
373
|
+
return (0,external_vue_.h)(node.name, Object.assign(Object.assign({
|
318
374
|
key: key
|
319
375
|
}, node.attributes), {
|
320
376
|
style: "".concat(node.attributes.style, " ").concat(rootAttrs || '')
|
@@ -338,7 +394,7 @@ var bkIcon = function bkIcon(props, context) {
|
|
338
394
|
'align-items': 'center',
|
339
395
|
'justify-content': 'center'
|
340
396
|
};
|
341
|
-
return (0,
|
397
|
+
return (0,external_vue_.createVNode)("span", (0,external_vue_.mergeProps)({
|
342
398
|
"style": iconBoxStyle
|
343
399
|
}, restProps), [generate(data, name, rootAttrs)]);
|
344
400
|
};
|
@@ -353,7 +409,7 @@ var data = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"htt
|
|
353
409
|
|
354
410
|
var angleDoubleDownLine = function angleDoubleDownLine(props, context) {
|
355
411
|
var p = Object.assign(Object.assign({}, props), context.attrs);
|
356
|
-
return (0,
|
412
|
+
return (0,external_vue_.createVNode)(icon, (0,external_vue_.mergeProps)(p, {
|
357
413
|
"data": data,
|
358
414
|
"name": "angleDoubleDownLine"
|
359
415
|
}), null);
|
@@ -362,5 +418,9 @@ var angleDoubleDownLine = function angleDoubleDownLine(props, context) {
|
|
362
418
|
angleDoubleDownLine.displayName = 'angleDoubleDownLine';
|
363
419
|
angleDoubleDownLine.inheritAttrs = false;
|
364
420
|
/* harmony default export */ const angle_double_down_line = (angleDoubleDownLine);
|
365
|
-
|
366
|
-
|
421
|
+
})();
|
422
|
+
|
423
|
+
/******/ return __webpack_exports__;
|
424
|
+
/******/ })()
|
425
|
+
;
|
426
|
+
});
|