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/radio/index.js
CHANGED
@@ -1,41 +1,103 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory(require("../shared"), require("vue"));
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define(["../shared", "vue"], factory);
|
6
|
+
else {
|
7
|
+
var a = typeof exports === 'object' ? factory(require("../shared"), require("vue")) : factory(root["../shared"], root["vue"]);
|
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__) => {
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
14
|
+
|
15
|
+
/***/ 4212:
|
16
|
+
/***/ ((module) => {
|
17
|
+
|
18
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
|
19
|
+
|
20
|
+
/***/ }),
|
21
|
+
|
22
|
+
/***/ 748:
|
23
|
+
/***/ ((module) => {
|
24
|
+
|
25
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
|
26
|
+
|
27
|
+
/***/ })
|
28
|
+
|
29
|
+
/******/ });
|
6
30
|
/************************************************************************/
|
7
|
-
/******/
|
8
|
-
/******/
|
9
|
-
/******/
|
10
|
-
/******/
|
11
|
-
/******/
|
12
|
-
/******/
|
13
|
-
/******/
|
14
|
-
/******/
|
31
|
+
/******/ // The module cache
|
32
|
+
/******/ var __webpack_module_cache__ = {};
|
33
|
+
/******/
|
34
|
+
/******/ // The require function
|
35
|
+
/******/ function __webpack_require__(moduleId) {
|
36
|
+
/******/ // Check if module is in cache
|
37
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
38
|
+
/******/ if (cachedModule !== undefined) {
|
39
|
+
/******/ return cachedModule.exports;
|
15
40
|
/******/ }
|
16
|
-
/******/
|
17
|
-
/******/
|
18
|
-
/******/
|
19
|
-
/******/
|
20
|
-
/******/
|
21
|
-
/******/
|
22
|
-
/******/
|
23
|
-
/******/
|
41
|
+
/******/ // Create a new module (and put it into the cache)
|
42
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
43
|
+
/******/ // no module.id needed
|
44
|
+
/******/ // no module.loaded needed
|
45
|
+
/******/ exports: {}
|
46
|
+
/******/ };
|
47
|
+
/******/
|
48
|
+
/******/ // Execute the module function
|
49
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
50
|
+
/******/
|
51
|
+
/******/ // Return the exports of the module
|
52
|
+
/******/ return module.exports;
|
53
|
+
/******/ }
|
54
|
+
/******/
|
55
|
+
/************************************************************************/
|
56
|
+
/******/ /* webpack/runtime/define property getters */
|
57
|
+
/******/ (() => {
|
58
|
+
/******/ // define getter functions for harmony exports
|
59
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
60
|
+
/******/ for(var key in definition) {
|
61
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
62
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
63
|
+
/******/ }
|
64
|
+
/******/ }
|
65
|
+
/******/ };
|
66
|
+
/******/ })();
|
67
|
+
/******/
|
68
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
69
|
+
/******/ (() => {
|
70
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
71
|
+
/******/ })();
|
72
|
+
/******/
|
73
|
+
/******/ /* webpack/runtime/make namespace object */
|
74
|
+
/******/ (() => {
|
75
|
+
/******/ // define __esModule on exports
|
76
|
+
/******/ __webpack_require__.r = (exports) => {
|
77
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
78
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
79
|
+
/******/ }
|
80
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
81
|
+
/******/ };
|
82
|
+
/******/ })();
|
83
|
+
/******/
|
24
84
|
/************************************************************************/
|
25
85
|
var __webpack_exports__ = {};
|
86
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
87
|
+
(() => {
|
88
|
+
// ESM COMPAT FLAG
|
89
|
+
__webpack_require__.r(__webpack_exports__);
|
26
90
|
|
27
91
|
// EXPORTS
|
28
92
|
__webpack_require__.d(__webpack_exports__, {
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
93
|
+
"BkRadio": () => (/* binding */ BkRadio),
|
94
|
+
"BkRadioButton": () => (/* reexport */ radio_button),
|
95
|
+
"BkRadioGroup": () => (/* reexport */ radio_group),
|
96
|
+
"default": () => (/* binding */ src)
|
33
97
|
});
|
34
98
|
|
35
|
-
|
36
|
-
var
|
37
|
-
var y = x => () => x
|
38
|
-
const external_shared_namespaceObject = x({ ["EMPTY_OBJ"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.EMPTY_OBJ, ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.classes, ["isEmptyObj"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.isEmptyObj, ["useFormItem"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.useFormItem, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstallProps });
|
99
|
+
// EXTERNAL MODULE: external "../shared"
|
100
|
+
var external_shared_ = __webpack_require__(4212);
|
39
101
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
40
102
|
function _arrayWithHoles(arr) {
|
41
103
|
if (Array.isArray(arr)) return arr;
|
@@ -102,10 +164,8 @@ function _nonIterableRest() {
|
|
102
164
|
function _slicedToArray(arr, i) {
|
103
165
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
104
166
|
}
|
105
|
-
|
106
|
-
var
|
107
|
-
var external_vue_y = x => () => x
|
108
|
-
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, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
|
167
|
+
// EXTERNAL MODULE: external "vue"
|
168
|
+
var external_vue_ = __webpack_require__(748);
|
109
169
|
;// CONCATENATED MODULE: ../../packages/radio/src/common.ts
|
110
170
|
/*
|
111
171
|
* Tencent is pleased to support the open source community by making
|
@@ -136,7 +196,7 @@ const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBP
|
|
136
196
|
|
137
197
|
var radioGroupKey = Symbol('RadioGroup');
|
138
198
|
function useFocus() {
|
139
|
-
var isFocused = (0,
|
199
|
+
var isFocused = (0,external_vue_.ref)(false);
|
140
200
|
|
141
201
|
var blur = function blur() {
|
142
202
|
isFocused.value = false;
|
@@ -153,14 +213,14 @@ function useFocus() {
|
|
153
213
|
}
|
154
214
|
;
|
155
215
|
var useRadio = function useRadio() {
|
156
|
-
var currentInstance = (0,
|
216
|
+
var currentInstance = (0,external_vue_.getCurrentInstance)();
|
157
217
|
var props = currentInstance.props,
|
158
218
|
emit = currentInstance.emit;
|
159
|
-
var radioGroup = (0,
|
160
|
-
var isGroup = !(0,
|
161
|
-
var isChecked = (0,
|
219
|
+
var radioGroup = (0,external_vue_.inject)(radioGroupKey, external_shared_.EMPTY_OBJ);
|
220
|
+
var isGroup = !(0,external_shared_.isEmptyObj)(radioGroup);
|
221
|
+
var isChecked = (0,external_vue_.ref)(false); // 禁用状态
|
162
222
|
|
163
|
-
var isDisabled = (0,
|
223
|
+
var isDisabled = (0,external_vue_.computed)(function () {
|
164
224
|
if (isGroup && radioGroup.props.disabled) {
|
165
225
|
return true;
|
166
226
|
}
|
@@ -169,7 +229,7 @@ var useRadio = function useRadio() {
|
|
169
229
|
}); // 响应modelValue
|
170
230
|
|
171
231
|
if (isGroup) {
|
172
|
-
(0,
|
232
|
+
(0,external_vue_.watch)(function () {
|
173
233
|
return radioGroup.props.modelValue;
|
174
234
|
}, function (modelValue) {
|
175
235
|
isChecked.value = modelValue === props.label;
|
@@ -177,7 +237,7 @@ var useRadio = function useRadio() {
|
|
177
237
|
immediate: true
|
178
238
|
});
|
179
239
|
} else {
|
180
|
-
(0,
|
240
|
+
(0,external_vue_.watch)(function () {
|
181
241
|
return props.modelValue;
|
182
242
|
}, function (modelValue) {
|
183
243
|
if (modelValue === '') {
|
@@ -211,7 +271,7 @@ var useRadio = function useRadio() {
|
|
211
271
|
radioGroup.handleChange(currentInstance.proxy);
|
212
272
|
}
|
213
273
|
|
214
|
-
(0,
|
274
|
+
(0,external_vue_.nextTick)(function () {
|
215
275
|
// 选中状态保持同步
|
216
276
|
if ($targetInput.checked !== isChecked.value) {
|
217
277
|
$targetInput.checked = isChecked.value;
|
@@ -219,12 +279,12 @@ var useRadio = function useRadio() {
|
|
219
279
|
});
|
220
280
|
};
|
221
281
|
|
222
|
-
(0,
|
282
|
+
(0,external_vue_.onMounted)(function () {
|
223
283
|
if (isGroup) {
|
224
284
|
radioGroup.register(currentInstance.proxy);
|
225
285
|
}
|
226
286
|
});
|
227
|
-
(0,
|
287
|
+
(0,external_vue_.onBeforeUnmount)(function () {
|
228
288
|
if (isGroup) {
|
229
289
|
radioGroup.unregister(currentInstance.proxy);
|
230
290
|
}
|
@@ -269,13 +329,13 @@ var useRadio = function useRadio() {
|
|
269
329
|
|
270
330
|
|
271
331
|
var radioProps = {
|
272
|
-
name:
|
273
|
-
label:
|
274
|
-
modelValue:
|
275
|
-
checked:
|
276
|
-
disabled:
|
332
|
+
name: external_shared_.PropTypes.string.def(''),
|
333
|
+
label: external_shared_.PropTypes.oneOfType([String, Number, Boolean]).isRequired,
|
334
|
+
modelValue: external_shared_.PropTypes.oneOfType([String, Number, Boolean]).def(''),
|
335
|
+
checked: external_shared_.PropTypes.bool.def(false),
|
336
|
+
disabled: external_shared_.PropTypes.bool.def(false)
|
277
337
|
};
|
278
|
-
/* harmony default export */ const src_radio = ((0,
|
338
|
+
/* harmony default export */ const src_radio = ((0,external_vue_.defineComponent)({
|
279
339
|
name: 'Radio',
|
280
340
|
props: radioProps,
|
281
341
|
emits: ['change', 'update:modelValue'],
|
@@ -306,7 +366,7 @@ var radioProps = {
|
|
306
366
|
render: function render() {
|
307
367
|
var _this = this;
|
308
368
|
|
309
|
-
var radioClass = (0,
|
369
|
+
var radioClass = (0,external_shared_.classes)({
|
310
370
|
'bk-radio': true,
|
311
371
|
'is-focused': this.isFocused,
|
312
372
|
'is-disabled': this.isDisabled,
|
@@ -318,15 +378,15 @@ var radioProps = {
|
|
318
378
|
return null;
|
319
379
|
}
|
320
380
|
|
321
|
-
return (0,
|
381
|
+
return (0,external_vue_.createVNode)("span", {
|
322
382
|
"class": "bk-radio-label"
|
323
383
|
}, [_this.$slots["default"] ? _this.$slots["default"]() : _this.label]);
|
324
384
|
};
|
325
385
|
|
326
|
-
return (0,
|
386
|
+
return (0,external_vue_.createVNode)("label", {
|
327
387
|
"class": radioClass,
|
328
388
|
"tabindex": "0"
|
329
|
-
}, [(0,
|
389
|
+
}, [(0,external_vue_.createVNode)("input", {
|
330
390
|
"class": "bk-radio-input",
|
331
391
|
"type": "radio",
|
332
392
|
"tabindex": "0",
|
@@ -372,14 +432,14 @@ var radioProps = {
|
|
372
432
|
|
373
433
|
|
374
434
|
var radioButtonProps = {
|
375
|
-
name:
|
376
|
-
label:
|
377
|
-
modelValue:
|
378
|
-
checked:
|
379
|
-
disabled:
|
380
|
-
size:
|
435
|
+
name: external_shared_.PropTypes.string.def(''),
|
436
|
+
label: external_shared_.PropTypes.oneOfType([String, Number, Boolean]).isRequired,
|
437
|
+
modelValue: external_shared_.PropTypes.oneOfType([String, Number, Boolean]).def(''),
|
438
|
+
checked: external_shared_.PropTypes.bool.def(false),
|
439
|
+
disabled: external_shared_.PropTypes.bool.def(false),
|
440
|
+
size: external_shared_.PropTypes.size()
|
381
441
|
};
|
382
|
-
/* harmony default export */ const radio_button = ((0,
|
442
|
+
/* harmony default export */ const radio_button = ((0,external_vue_.defineComponent)({
|
383
443
|
name: 'RadioButton',
|
384
444
|
props: radioButtonProps,
|
385
445
|
emits: ['change', 'update:modelValue'],
|
@@ -410,7 +470,7 @@ var radioButtonProps = {
|
|
410
470
|
render: function render() {
|
411
471
|
var _this = this;
|
412
472
|
|
413
|
-
var radioClass = (0,
|
473
|
+
var radioClass = (0,external_shared_.classes)({
|
414
474
|
'bk-radio-button': true,
|
415
475
|
'is-focused': this.isFocused,
|
416
476
|
'is-disabled': this.isDisabled,
|
@@ -422,15 +482,15 @@ var radioButtonProps = {
|
|
422
482
|
return null;
|
423
483
|
}
|
424
484
|
|
425
|
-
return (0,
|
485
|
+
return (0,external_vue_.createVNode)("div", {
|
426
486
|
"class": "bk-radio-button-label"
|
427
487
|
}, [_this.$slots["default"] ? _this.$slots["default"]() : _this.label]);
|
428
488
|
};
|
429
489
|
|
430
|
-
return (0,
|
490
|
+
return (0,external_vue_.createVNode)("label", {
|
431
491
|
"class": radioClass,
|
432
492
|
"tabindex": "0"
|
433
|
-
}, [(0,
|
493
|
+
}, [(0,external_vue_.createVNode)("input", {
|
434
494
|
"class": "bk-radio-button-input",
|
435
495
|
"type": "radio",
|
436
496
|
"tabindex": "0",
|
@@ -475,17 +535,17 @@ var radioButtonProps = {
|
|
475
535
|
|
476
536
|
|
477
537
|
var radioGroupProps = {
|
478
|
-
name:
|
479
|
-
modelValue:
|
480
|
-
disabled:
|
481
|
-
withValidate:
|
538
|
+
name: external_shared_.PropTypes.string.def(''),
|
539
|
+
modelValue: external_shared_.PropTypes.oneOfType([String, Number, Boolean]),
|
540
|
+
disabled: external_shared_.PropTypes.bool,
|
541
|
+
withValidate: external_shared_.PropTypes.bool.def(true)
|
482
542
|
};
|
483
|
-
/* harmony default export */ const radio_group = ((0,
|
543
|
+
/* harmony default export */ const radio_group = ((0,external_vue_.defineComponent)({
|
484
544
|
name: 'RadioGroup',
|
485
545
|
props: radioGroupProps,
|
486
546
|
emits: ['change', 'update:modelValue'],
|
487
547
|
setup: function setup(props, context) {
|
488
|
-
var formItem = (0,
|
548
|
+
var formItem = (0,external_shared_.useFormItem)();
|
489
549
|
var radioInstanceList = [];
|
490
550
|
|
491
551
|
var register = function register(radioContext) {
|
@@ -511,13 +571,13 @@ var radioGroupProps = {
|
|
511
571
|
context.emit('change', nextValue);
|
512
572
|
};
|
513
573
|
|
514
|
-
(0,
|
574
|
+
(0,external_vue_.provide)(radioGroupKey, {
|
515
575
|
props: props,
|
516
576
|
register: register,
|
517
577
|
unregister: unregister,
|
518
578
|
handleChange: handleChange
|
519
579
|
});
|
520
|
-
(0,
|
580
|
+
(0,external_vue_.watch)(function () {
|
521
581
|
return props.modelValue;
|
522
582
|
}, function () {
|
523
583
|
var _a;
|
@@ -526,7 +586,7 @@ var radioGroupProps = {
|
|
526
586
|
(_a = formItem === null || formItem === void 0 ? void 0 : formItem.validate) === null || _a === void 0 ? void 0 : _a.call(formItem, 'change');
|
527
587
|
}
|
528
588
|
});
|
529
|
-
(0,
|
589
|
+
(0,external_vue_.onMounted)(function () {
|
530
590
|
if (props.modelValue === '') {
|
531
591
|
return;
|
532
592
|
}
|
@@ -540,7 +600,7 @@ var radioGroupProps = {
|
|
540
600
|
render: function render() {
|
541
601
|
var _a;
|
542
602
|
|
543
|
-
return (0,
|
603
|
+
return (0,external_vue_.createVNode)("div", {
|
544
604
|
"class": "bk-radio-group"
|
545
605
|
}, [(_a = this.$slots) === null || _a === void 0 ? void 0 : _a["default"]()]);
|
546
606
|
}
|
@@ -575,14 +635,15 @@ var radioGroupProps = {
|
|
575
635
|
|
576
636
|
|
577
637
|
|
578
|
-
var BkRadio = (0,
|
638
|
+
var BkRadio = (0,external_shared_.withInstallProps)(src_radio, {
|
579
639
|
Group: radio_group,
|
580
640
|
Button: radio_button
|
581
641
|
});
|
582
642
|
/* harmony default export */ const src = (BkRadio);
|
583
643
|
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
644
|
+
})();
|
645
|
+
|
646
|
+
/******/ return __webpack_exports__;
|
647
|
+
/******/ })()
|
648
|
+
;
|
649
|
+
});
|