@king-design/intact 3.0.0-beta.2 → 3.0.0
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/components/badge/styles.ts +1 -1
- package/components/breadcrumb/demos/separator.md +1 -1
- package/components/button/demos/group.md +7 -0
- package/components/button/group.ts +3 -1
- package/components/button/group.vdt +2 -1
- package/components/button/index.md +1 -0
- package/components/button/index.vdt +1 -1
- package/components/button/styles.ts +18 -3
- package/components/checkbox/styles.ts +6 -10
- package/components/collapse/styles.ts +0 -2
- package/components/dropdown/dropdown.ts +1 -0
- package/components/form/index.spec.ts +21 -0
- package/components/icon/index.vdt +1 -1
- package/components/message/demos/config.md +2 -2
- package/components/message/index.md +1 -1
- package/components/message/message.ts +1 -1
- package/components/pagination/styles.ts +1 -4
- package/components/popover/styles.ts +1 -1
- package/components/radio/styles.ts +4 -1
- package/components/scrollSelect/styles.ts +1 -1
- package/components/select/base.vdt +7 -4
- package/components/select/styles.ts +1 -1
- package/components/switch/styles.ts +17 -1
- package/components/table/column.vdt +3 -2
- package/components/table/demos/showIndeterminate.md +2 -2
- package/components/table/index.md +1 -1
- package/components/table/styles.ts +1 -0
- package/components/table/table.ts +1 -0
- package/components/table/useGroup.ts +2 -1
- package/components/tabs/demos/closable.md +1 -1
- package/components/tip/styles.ts +1 -1
- package/components/tooltip/index.spec.ts +30 -0
- package/components/tooltip/tooltip.ts +3 -0
- package/es/components/badge/styles.js +1 -1
- package/es/components/button/group.d.ts +1 -0
- package/es/components/button/group.js +2 -1
- package/es/components/button/group.vdt.js +4 -2
- package/es/components/button/index.vdt.js +1 -1
- package/es/components/button/styles.js +11 -4
- package/es/components/checkbox/styles.js +4 -8
- package/es/components/collapse/styles.js +2 -2
- package/es/components/dropdown/dropdown.js +2 -1
- package/es/components/form/index.spec.js +45 -0
- package/es/components/icon/index.vdt.js +3 -2
- package/es/components/message/message.js +1 -1
- package/es/components/pagination/styles.js +2 -5
- package/es/components/popover/styles.js +1 -1
- package/es/components/radio/styles.js +1 -1
- package/es/components/scrollSelect/styles.js +1 -1
- package/es/components/select/base.vdt.js +4 -1
- package/es/components/select/styles.js +1 -1
- package/es/components/switch/styles.js +10 -2
- package/es/components/table/column.vdt.js +4 -2
- package/es/components/table/styles.js +1 -1
- package/es/components/table/table.js +2 -1
- package/es/components/table/useGroup.d.ts +1 -1
- package/es/components/table/useGroup.js +2 -1
- package/es/components/tip/styles.js +1 -1
- package/es/components/tooltip/index.spec.js +57 -0
- package/es/components/tooltip/tooltip.js +5 -1
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/site/data/components/button/demos/group/react.js +17 -0
- package/es/site/data/components/message/demos/config/index.js +1 -1
- package/es/site/data/components/message/demos/config/react.js +1 -1
- package/es/site/data/components/table/demos/showIndeterminate/react.js +1 -1
- package/es/site/data/components/tabs/demos/closable/react.js +2 -1
- package/es/site/src/pages/layout.js +1 -3
- package/es/styles/fonts/iconfont.eot +0 -0
- package/es/styles/fonts/iconfont.js +1 -1
- package/es/styles/fonts/iconfont.svg +1 -1
- package/es/styles/fonts/iconfont.ttf +0 -0
- package/es/styles/fonts/iconfont.woff +0 -0
- package/es/styles/theme.js +1 -1
- package/index.ts +2 -2
- package/package.json +2 -2
- package/styles/fonts/demo_index.html +6 -6
- package/styles/fonts/iconfont.css +6 -6
- package/styles/fonts/iconfont.eot +0 -0
- package/styles/fonts/iconfont.js +1 -1
- package/styles/fonts/iconfont.svg +1 -1
- package/styles/fonts/iconfont.ts +1 -1
- package/styles/fonts/iconfont.ttf +0 -0
- package/styles/fonts/iconfont.woff +0 -0
- package/styles/fonts/iconfont.woff2 +0 -0
- package/styles/theme.ts +1 -1
|
@@ -14,7 +14,7 @@ var btnStyles = {
|
|
|
14
14
|
lineHeight: '1.15',
|
|
15
15
|
|
|
16
16
|
get padding() {
|
|
17
|
-
return "0 "
|
|
17
|
+
return "0 16px";
|
|
18
18
|
},
|
|
19
19
|
|
|
20
20
|
get borderColor() {
|
|
@@ -146,6 +146,13 @@ var btnSizeStyles = sizes.reduce(function (memo, size) {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
};
|
|
149
|
+
|
|
150
|
+
if (size === 'large') {
|
|
151
|
+
Object.defineProperty(memo[size], 'padding', {
|
|
152
|
+
value: "0 24px"
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
149
156
|
return memo;
|
|
150
157
|
}, {});
|
|
151
158
|
var defaults = deepDefaults({
|
|
@@ -255,13 +262,13 @@ export function makeButtonStyles(_ref) {
|
|
|
255
262
|
}) + "\n }\n }\n ", ";"));
|
|
256
263
|
}
|
|
257
264
|
export function makeButtonGroupStyles() {
|
|
258
|
-
return /*#__PURE__*/css("display:inline-
|
|
265
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;flex-wrap:wrap;vertical-align:middle;.k-btn{margin:0;vertical-align:middle;&:hover,&:focus,&.k-active{z-index:1;position:relative;}}&.k-fluid{width:100%;}&:not(.k-vertical){>.k-btn{", _mapInstanceProperty(types).call(types, function (type) {
|
|
259
266
|
if (type === 'active') return;
|
|
260
267
|
var borderColor = button.group[type].borderColor;
|
|
261
268
|
return /*#__PURE__*/css("&.k-", type, ":not(:first-child){border-left-color:", borderColor, ";}&.k-", type, ":not(:last-child){border-right-color:", borderColor, ";}");
|
|
262
|
-
}), ";&:not(:first-child){margin-left:-1px;&:not(:last-child){border-radius:0;}}&:not(:only-child):first-child{border-top-right-radius:0;border-bottom-right-radius:0;}&:not(:only-child):last-child{border-top-left-radius:0;border-bottom-left-radius:0;}}&.k-fluid{display:flex;>.k-btn{flex:1;}}}&.k-vertical{
|
|
269
|
+
}), ";&:not(:first-child){margin-left:-1px;&:not(:last-child){border-radius:0;}}&:not(:only-child):first-child{border-top-right-radius:0;border-bottom-right-radius:0;}&:not(:only-child):last-child{border-top-left-radius:0;border-bottom-left-radius:0;}}&.k-fluid{display:flex;>.k-btn{flex:1;}}}&.k-vertical{flex-direction:column;>.k-btn{", _mapInstanceProperty(types).call(types, function (type) {
|
|
263
270
|
if (type === 'active') return;
|
|
264
271
|
var borderColor = button.group[type].borderColor;
|
|
265
272
|
return /*#__PURE__*/css("&.k-", type, ":not(:first-child){border-top-color:", borderColor, ";}&.k-", type, ":not(:last-child){border-bottom-color:", borderColor, ";}");
|
|
266
|
-
}), ";&:not(.k-btn-icon){width:100%;}&:not(:first-child){margin-top:-1px;&:not(:last-child){border-radius:0;}}&:not(:only-child):first-child{border-bottom-left-radius:0;border-bottom-right-radius:0;}&:not(:only-child):last-child{border-top-left-radius:0;border-top-right-radius:0;}}}");
|
|
273
|
+
}), ";&:not(.k-btn-icon){width:100%;}&:not(:first-child){margin-top:-1px;&:not(:last-child){border-radius:0;}}&:not(:only-child):first-child{border-bottom-left-radius:0;border-bottom-right-radius:0;}&:not(:only-child):last-child{border-top-left-radius:0;border-top-right-radius:0;}}}&.k-seperate{gap:8px;>.k-btn{border-radius:", button.borderRadius, "!important;}}");
|
|
267
274
|
}
|
|
@@ -38,11 +38,11 @@ var defaults = {
|
|
|
38
38
|
|
|
39
39
|
},
|
|
40
40
|
inner: {
|
|
41
|
-
width: '
|
|
41
|
+
width: '6px',
|
|
42
42
|
height: '10px',
|
|
43
43
|
top: '0px',
|
|
44
|
-
left: '
|
|
45
|
-
border: '
|
|
44
|
+
left: '4px',
|
|
45
|
+
border: '2px solid #fff'
|
|
46
46
|
},
|
|
47
47
|
// disabled
|
|
48
48
|
disabled: {
|
|
@@ -69,10 +69,6 @@ var defaults = {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
}
|
|
72
|
-
},
|
|
73
|
-
// indeterminate
|
|
74
|
-
indeterminate: {
|
|
75
|
-
innerLeft: '4px'
|
|
76
72
|
}
|
|
77
73
|
};
|
|
78
74
|
var checkbox;
|
|
@@ -82,5 +78,5 @@ setDefault(function () {
|
|
|
82
78
|
}).checkbox;
|
|
83
79
|
});
|
|
84
80
|
export default function makeStyles() {
|
|
85
|
-
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-checkbox-wrapper{width:", checkbox.width, ";height:", checkbox.width, ";border:1px solid ", checkbox.borderColor, ";border-radius:", checkbox.borderRadius, ";position:relative;transition:all ", checkbox.transition, ";background:", checkbox.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", checkbox.inner.width, ";height:", checkbox.inner.height, ";top:", checkbox.inner.top, ";left:", checkbox.inner.left, ";border:", checkbox.inner.border, ";border-top:0;border-left:0;transform:rotate(45deg) scale(0);transition:all ", checkbox.transition, ";}&:hover{border:", checkbox.hoverBorder, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;left:0;top:0;margin:0;}.k-checkbox-text{margin-left:", checkbox.text.gap, ";flex:0 1 auto;}&.k-checked,&.k-indeterminate{.k-checkbox-wrapper{border-color:", checkbox.checked.borderColor, ";background:", checkbox.checked.bgColor, ";}}&.k-indeterminate{.k-checkbox-wrapper{&:before{transform:rotate(90deg) scale(1);border-bottom:0;
|
|
81
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-checkbox-wrapper{width:", checkbox.width, ";height:", checkbox.width, ";border:1px solid ", checkbox.borderColor, ";border-radius:", checkbox.borderRadius, ";position:relative;transition:all ", checkbox.transition, ";background:", checkbox.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", checkbox.inner.width, ";height:", checkbox.inner.height, ";top:", checkbox.inner.top, ";left:", checkbox.inner.left, ";border:", checkbox.inner.border, ";border-top:0;border-left:0;transform:rotate(45deg) scale(0);transition:all ", checkbox.transition, ";}}&:hover{.k-checkbox-wrapper{border:", checkbox.hoverBorder, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;left:0;top:0;margin:0;}.k-checkbox-text{margin-left:", checkbox.text.gap, ";flex:0 1 auto;}&.k-checked,&.k-indeterminate{.k-checkbox-wrapper{border-color:", checkbox.checked.borderColor, ";background:", checkbox.checked.bgColor, ";}}&.k-indeterminate{.k-checkbox-wrapper{&:before{transform:rotate(90deg) scale(1);border-bottom:0;}}}&.k-checked{.k-checkbox-wrapper{&:before{transform:rotate(45deg) scale(1);}}}&:focus{outline:none;.k-checkbox-wrapper{border-color:", checkbox.checked.borderColor, ";}}&.k-disabled{color:", checkbox.disabled.color, ";cursor:not-allowed;.k-checkbox-wrapper{border-color:", checkbox.disabled.borderColor, ";background:", checkbox.disabled.bgColor, ";&:before{border-color:", checkbox.disabled.innerColor, ";}}input{cursor:not-allowed;}&.k-checked,&.k-indeterminate{.k-checkbox-wrapper{border-color:", checkbox.disabled.checked.borderColor, ";background:", checkbox.disabled.checked.bgColor, ";}}}");
|
|
86
82
|
}
|
|
@@ -32,9 +32,9 @@ setDefault(function () {
|
|
|
32
32
|
}).collapse;
|
|
33
33
|
});
|
|
34
34
|
export function makeStyles() {
|
|
35
|
-
return /*#__PURE__*/css("font-size:", collapse.fontSize, ";&.k-left{.", kls('arrow'), "{float:left;margin-right:", collapse.titleMarginRight, ";
|
|
35
|
+
return /*#__PURE__*/css("font-size:", collapse.fontSize, ";&.k-left{.", kls('arrow'), "{float:left;margin-right:", collapse.titleMarginRight, ";}}&.k-border{border-radius:", collapse.borderRadius, ";padding:", collapse.borderPadding, ";border:", collapse.collBorder, ";}");
|
|
36
36
|
}
|
|
37
37
|
export function makeItemStyles() {
|
|
38
38
|
var collapseItem = collapse.item;
|
|
39
|
-
return /*#__PURE__*/css("border-bottom:", collapseItem.borderBottom, ";&:last-of-type{border-bottom-color:transparent;}.", kls('title'), "{cursor:pointer;font-weight:bold;height:", collapseItem.titleHeight, ";line-height:", collapseItem.titleHeight, ";transition:color ", collapse.transition, ";}.", kls('arrow'), "{float:right;transition:transform ", collapse.transition, ";line-height:", collapseItem.titleHeight, ";height:", collapseItem.titleHeight, ";
|
|
39
|
+
return /*#__PURE__*/css("border-bottom:", collapseItem.borderBottom, ";&:last-of-type{border-bottom-color:transparent;}.", kls('title'), "{cursor:pointer;font-weight:bold;height:", collapseItem.titleHeight, ";line-height:", collapseItem.titleHeight, ";transition:color ", collapse.transition, ";}.", kls('arrow'), "{float:right;transition:transform ", collapse.transition, ";line-height:", collapseItem.titleHeight, ";height:", collapseItem.titleHeight, ";}&:not(.k-disabled){.", kls('title'), "{&:hover{color:", theme.color.primary, ";}}}.", kls('content'), "{overflow:hidden;.", kls('wrapper'), "{overflow:hidden;padding:", collapseItem.contentPadding, ";}}&.k-active{.", kls('arrow'), "{transform:rotate(90deg);}}&.k-disabled{color:", theme.color.disabledBorder, ";.", kls('title'), "{cursor:not-allowed;}}");
|
|
40
40
|
}
|
|
@@ -12,6 +12,7 @@ import { mount, unmount, dispatchEvent, wait } from '../../test/utils';
|
|
|
12
12
|
import { Component } from 'intact';
|
|
13
13
|
import { Form, FormItem } from './';
|
|
14
14
|
import { Input } from '../input';
|
|
15
|
+
import { Select } from '../select';
|
|
15
16
|
|
|
16
17
|
RemoteDemo.prototype.validateUserName = function (value) {
|
|
17
18
|
// mock api
|
|
@@ -1317,4 +1318,48 @@ describe('Form', function () {
|
|
|
1317
1318
|
}
|
|
1318
1319
|
}, _callee7);
|
|
1319
1320
|
})));
|
|
1321
|
+
it('should not validate when select is disabled on init', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
|
1322
|
+
var Demo, _mount8, instance, element;
|
|
1323
|
+
|
|
1324
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context11) {
|
|
1325
|
+
while (1) {
|
|
1326
|
+
switch (_context11.prev = _context11.next) {
|
|
1327
|
+
case 0:
|
|
1328
|
+
Demo = /*#__PURE__*/function (_Component3) {
|
|
1329
|
+
_inheritsLoose(Demo, _Component3);
|
|
1330
|
+
|
|
1331
|
+
function Demo() {
|
|
1332
|
+
var _context10;
|
|
1333
|
+
|
|
1334
|
+
var _this3;
|
|
1335
|
+
|
|
1336
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
1337
|
+
args[_key3] = arguments[_key3];
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
_this3 = _Component3.call.apply(_Component3, _concatInstanceProperty(_context10 = [this]).call(_context10, args)) || this;
|
|
1341
|
+
_this3.Form = Form;
|
|
1342
|
+
_this3.FormItem = FormItem;
|
|
1343
|
+
_this3.Select = Select;
|
|
1344
|
+
return _this3;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
return Demo;
|
|
1348
|
+
}(Component);
|
|
1349
|
+
|
|
1350
|
+
Demo.template = "\n const {Form, FormItem, Select} = this;\n <Form ref=\"form\">\n <FormItem rules={{required: true}}>\n <Select disabled />\n </FormItem>\n </Form>\n ";
|
|
1351
|
+
_mount8 = mount(Demo), instance = _mount8[0], element = _mount8[1];
|
|
1352
|
+
_context11.next = 5;
|
|
1353
|
+
return wait(500);
|
|
1354
|
+
|
|
1355
|
+
case 5:
|
|
1356
|
+
expect(element.querySelector('.k-form-error')).to.be.null;
|
|
1357
|
+
|
|
1358
|
+
case 6:
|
|
1359
|
+
case "end":
|
|
1360
|
+
return _context11.stop();
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
}, _callee8);
|
|
1364
|
+
})));
|
|
1320
1365
|
});
|
|
@@ -44,8 +44,9 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
return _$cv('i', _extends({
|
|
47
|
-
'className': _$cn(classNameObj)
|
|
47
|
+
'className': _$cn(classNameObj)
|
|
48
|
+
}, getRestProps(this), {
|
|
48
49
|
'style': addStyle(style, _style)
|
|
49
|
-
}
|
|
50
|
+
}), children);
|
|
50
51
|
}
|
|
51
52
|
;
|
|
@@ -27,11 +27,8 @@ var defaults = deepDefaults({
|
|
|
27
27
|
|
|
28
28
|
get borderRadius() {
|
|
29
29
|
return theme.borderRadius;
|
|
30
|
-
}
|
|
30
|
+
} // get hoverBgColor() { return theme.color.hoverBg }
|
|
31
31
|
|
|
32
|
-
get hoverBgColor() {
|
|
33
|
-
return theme.color.hoverBg;
|
|
34
|
-
}
|
|
35
32
|
|
|
36
33
|
},
|
|
37
34
|
// goto
|
|
@@ -64,7 +61,7 @@ setDefault(function () {
|
|
|
64
61
|
}).pagination;
|
|
65
62
|
});
|
|
66
63
|
export function makeStyles() {
|
|
67
|
-
return /*#__PURE__*/css("font-size:", pagination.fontSize, ";>*{display:inline-block;vertical-align:middle;&:not(:first-child){margin-left:", pagination.gap, ";}}.k-pagination-ellipsis{background-color:transparent;border-color:transparent;}.k-btns{.k-btn{width:auto!important;min-width:", button.height, ";padding:", pagination.btn.padding, ";margin-right:", pagination.btn.gap, ";border-radius:", pagination.btn.borderRadius, "!important;&:last-of-type{margin:0!important;}
|
|
64
|
+
return /*#__PURE__*/css("font-size:", pagination.fontSize, ";>*{display:inline-block;vertical-align:middle;&:not(:first-child){margin-left:", pagination.gap, ";}}.k-pagination-ellipsis{background-color:transparent;border-color:transparent;}.k-btns{.k-btn{width:auto!important;min-width:", button.height, ";padding:", pagination.btn.padding, ";margin-right:", pagination.btn.gap, ";border-radius:", pagination.btn.borderRadius, "!important;&:last-of-type{margin:0!important;}}.k-icon{font-size:18px;}}.k-pagination-goto{.k-input{font-size:inherit;width:", pagination.goto.width, ";margin:", pagination.goto.gap, ";}.k-input-inner{text-align:center;}}.k-select{width:auto;}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
68
65
|
var styles = pagination[size];
|
|
69
66
|
var btnStyles = button[size];
|
|
70
67
|
return /*#__PURE__*/css("&.k-", size, "{font-size:", styles.fontSize, ";.k-btn{margin-right:", styles.btnGap, ";min-width:", btnStyles.height, ";.k-icon{font-size:", styles.iconFontSize, ";}}}");
|
|
@@ -61,5 +61,5 @@ setDefault(function () {
|
|
|
61
61
|
}).radio;
|
|
62
62
|
});
|
|
63
63
|
export function makeStyles() {
|
|
64
|
-
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-radio-wrapper{width:", radio.width, ";height:", radio.width, ";border:1px solid ", radio.borderColor, ";border-radius:50%;transition:all ", radio.transition, ";position:relative;background:", radio.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", radio.innerWidth, ";height:", radio.innerWidth, ";top:50%;left:50%;margin-left:calc(-", radio.innerWidth, " / 2);margin-top:calc(-", radio.innerWidth, " / 2);border-radius:50%;background-color:", radio.checkedColor, ";transform:scale(0);transition:all ", radio.transition, ";}&:hover{border:1px solid ", radio.hoverBorderColor, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;}.k-radio-text{margin-left:", radio.textGap, ";flex:0 1 auto;}&.k-checked{.k-radio-wrapper{border-color:", radio.checkedColor, ";&:before{transform:scale(1);}}}&:focus{outline:none;.k-radio-wrapper{border-color:", radio.checkedColor, ";}}&.k-disabled{color:", radio.disabled.color, ";cursor:not-allowed;.k-radio-wrapper{border-color:", radio.disabled.borderColor, ";background:", radio.disabled.bgColor, ";}input{cursor:not-allowed;}&.k-checked{.k-radio-wrapper{border-color:", radio.disabled.checked.borderColor, ";background:", radio.disabled.checked.bgColor, ";&:before{background:", radio.disabled.checked.innerColor, ";}}}}");
|
|
64
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-radio-wrapper{width:", radio.width, ";height:", radio.width, ";border:1px solid ", radio.borderColor, ";border-radius:50%;transition:all ", radio.transition, ";position:relative;background:", radio.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", radio.innerWidth, ";height:", radio.innerWidth, ";top:50%;left:50%;margin-left:calc(-", radio.innerWidth, " / 2);margin-top:calc(-", radio.innerWidth, " / 2);border-radius:50%;background-color:", radio.checkedColor, ";transform:scale(0);transition:all ", radio.transition, ";}}&:hover{.k-radio-wrapper{border:1px solid ", radio.hoverBorderColor, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;}.k-radio-text{margin-left:", radio.textGap, ";flex:0 1 auto;}&.k-checked{.k-radio-wrapper{border-color:", radio.checkedColor, ";&:before{transform:scale(1);}}}&:focus{outline:none;.k-radio-wrapper{border-color:", radio.checkedColor, ";}}&.k-disabled{color:", radio.disabled.color, ";cursor:not-allowed;.k-radio-wrapper{border-color:", radio.disabled.borderColor, ";background:", radio.disabled.bgColor, ";}input{cursor:not-allowed;}&.k-checked{.k-radio-wrapper{border-color:", radio.disabled.checked.borderColor, ";background:", radio.disabled.checked.bgColor, ";&:before{background:", radio.disabled.checked.innerColor, ";}}}}");
|
|
65
65
|
}
|
|
@@ -16,6 +16,9 @@ var _$tmp0 = {
|
|
|
16
16
|
'className': 'ion-load-c',
|
|
17
17
|
'rotate': true
|
|
18
18
|
};
|
|
19
|
+
var _$tmp1 = {
|
|
20
|
+
'className': 'k-icon-search'
|
|
21
|
+
};
|
|
19
22
|
export default function ($props, $blocks, $__proto__) {
|
|
20
23
|
var _classNameObj,
|
|
21
24
|
_this = this;
|
|
@@ -198,7 +201,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
198
201
|
'ev-click': _this.clear,
|
|
199
202
|
'hoverable': true
|
|
200
203
|
}) : undefined, _$ce(2, 'span', (_$blocks['suffix'] = function ($super) {
|
|
201
|
-
return loading ? _$cc(Icon, _$tmp0) : !hideIcon ? _$cc(Icon, {
|
|
204
|
+
return loading ? _$cc(Icon, _$tmp0) : !hideIcon ? filterable && show ? _$cc(Icon, _$tmp1) : _$cc(Icon, {
|
|
202
205
|
'className': 'k-select-arrow k-icon-down',
|
|
203
206
|
'disabled': $props.isDisableArrow
|
|
204
207
|
}) : undefined;
|
|
@@ -12,6 +12,10 @@ var defaults = {
|
|
|
12
12
|
return theme.color.border;
|
|
13
13
|
},
|
|
14
14
|
|
|
15
|
+
get hoverBgColor() {
|
|
16
|
+
return theme.color.placeholder;
|
|
17
|
+
},
|
|
18
|
+
|
|
15
19
|
fontSize: "12px",
|
|
16
20
|
color: '#fff',
|
|
17
21
|
handleBorderRadius: "100%",
|
|
@@ -24,6 +28,10 @@ var defaults = {
|
|
|
24
28
|
|
|
25
29
|
get disabledBgColor() {
|
|
26
30
|
return palette(theme.color.primary, -3);
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
get hoverBgColor() {
|
|
34
|
+
return theme.color.linkHover;
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
},
|
|
@@ -65,11 +73,11 @@ setDefault(function () {
|
|
|
65
73
|
}).switch;
|
|
66
74
|
});
|
|
67
75
|
export function makeStyles() {
|
|
68
|
-
return /*#__PURE__*/css("display:inline-block;vertical-align:middle;background:", kswitch.bgColor, ";position:relative;cursor:pointer;user-select:none;overflow:hidden;box-sizing:content-box;input{opacity:0;position:absolute;}.k-switch-bar,.k-switch-off{box-sizing:border-box;}.k-switch-bar{position:absolute;text-align:right;overflow:hidden;}.k-switch-wrapper{display:inline-block;position:relative;z-index:1;border-radius:", kswitch.handleBorderRadius, ";}.k-switch-bar,.k-switch-wrapper{height:100%;background:", kswitch.bgColor, ";transition:all ", kswitch.transition, ";}.k-switch-handle{border-radius:", kswitch.handleBorderRadius, ";background:", kswitch.handleBgColor, ";height:100%;cursor:pointer;transition:left ", kswitch.transition, ";display:inline-block;img{height:100%;visibility:hidden;}}.k-switch-on,.k-switch-off{position:absolute;font-size:", kswitch.fontSize, ";color:", kswitch.color, ";text-align:center;}&.k-dragging{.k-switch-bar,.k-switch-wrapper{background:", kswitch.checked.bgColor, ";transition:background ", kswitch.transition, ";}}&:focus{outline:none;}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
76
|
+
return /*#__PURE__*/css("display:inline-block;vertical-align:middle;background:", kswitch.bgColor, ";position:relative;cursor:pointer;user-select:none;overflow:hidden;box-sizing:content-box;transition:background ", kswitch.transition, ";input{opacity:0;position:absolute;}.k-switch-bar,.k-switch-off{box-sizing:border-box;}.k-switch-bar{position:absolute;text-align:right;overflow:hidden;}.k-switch-wrapper{display:inline-block;position:relative;z-index:1;border-radius:", kswitch.handleBorderRadius, ";}.k-switch-bar,.k-switch-wrapper{height:100%;background:", kswitch.bgColor, ";transition:all ", kswitch.transition, ";}&:hover{&,.k-switch-bar,.k-switch-wrapper{background:", kswitch.hoverBgColor, ";}}.k-switch-handle{border-radius:", kswitch.handleBorderRadius, ";background:", kswitch.handleBgColor, ";height:100%;cursor:pointer;transition:left ", kswitch.transition, ";display:inline-block;img{height:100%;visibility:hidden;}}.k-switch-on,.k-switch-off{position:absolute;font-size:", kswitch.fontSize, ";color:", kswitch.color, ";text-align:center;}&.k-dragging{.k-switch-bar,.k-switch-wrapper{background:", kswitch.checked.bgColor, ";transition:background ", kswitch.transition, ";}}&:focus{outline:none;}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
69
77
|
var _kswitch$size = kswitch[size],
|
|
70
78
|
width = _kswitch$size.width,
|
|
71
79
|
height = _kswitch$size.height,
|
|
72
80
|
padding = _kswitch$size.padding;
|
|
73
81
|
return /*#__PURE__*/css("&.k-", size, ",&.k-", size, " .k-switch-on,&.k-", size, " .k-switch-off{width:", width, ";height:", height, ";}&.k-", size, "{border-radius:", height, ";.k-switch-bar{width:", height, ";border-radius:", height, ";}.k-switch-wrapper{padding:", padding, ";}.k-switch-on,.k-switch-off{line-height:", height, ";left:0;}.k-switch-on{padding:0 ", height, " 0 calc(", height, " / 3);}.k-switch-off{padding:0 calc(", height, " / 3) 0 ", height, ";}}");
|
|
74
|
-
}), "&.k-checked{.k-switch-bar,.k-switch-wrapper{background:", kswitch.checked.bgColor, ";}.k-switch-bar{width:100%;}}&.k-disabled{&,.k-switch-handle{cursor:not-allowed;}&,.k-switch-bar,.k-switch-wrapper{background:", kswitch.disabledBgColor, ";}&.k-checked{&,.k-switch-bar,.k-switch-wrapper{background:", kswitch.checked.disabledBgColor, ";}}}");
|
|
82
|
+
}), "&.k-checked{.k-switch-bar,.k-switch-wrapper{background:", kswitch.checked.bgColor, ";}.k-switch-bar{width:100%;}&:hover{.k-switch-bar,.k-switch-wrapper{background:", kswitch.checked.hoverBgColor, ";}}}&.k-disabled{&,.k-switch-handle{cursor:not-allowed;}&,.k-switch-bar,.k-switch-wrapper{background:", kswitch.disabledBgColor, ";}&.k-checked{&,.k-switch-bar,.k-switch-wrapper{background:", kswitch.checked.disabledBgColor, ";}}}");
|
|
75
83
|
}
|
|
@@ -162,10 +162,12 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
162
162
|
}) : _$ce(2, 'span', $value.label, 0)
|
|
163
163
|
});
|
|
164
164
|
}, $this), 4, 'k-table-group-body'), multiple ? _$ce(2, 'div', [_$cc(Button, {
|
|
165
|
-
'type': 'none',
|
|
166
165
|
'size': 'small',
|
|
167
166
|
'disabled': isEmptyValue(localGroupValue.value),
|
|
168
|
-
'
|
|
167
|
+
'type': 'secondary',
|
|
168
|
+
'ev-click': function evClick() {
|
|
169
|
+
return reset(onChange);
|
|
170
|
+
},
|
|
169
171
|
'children': '重置'
|
|
170
172
|
}), _$cc(Button, {
|
|
171
173
|
'type': 'primary',
|
|
@@ -102,7 +102,7 @@ setDefault(function () {
|
|
|
102
102
|
}).table;
|
|
103
103
|
});
|
|
104
104
|
export function makeStyles() {
|
|
105
|
-
return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.k-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-spacing:0;table-layout:fixed;td,th{transition:all ", table.transition, ";}}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";position:sticky;top:0;z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&:first-of-type:before{display:none;}}.k-table-title{display:inline-flex;align-items:center;max-width:100%;color:", table.thead.color, ";}.k-table-title-text{flex:1;display:inline-flex;}tbody{tr{&:hover td{background:", table.tbody.hoverBgcolor, ";}&:last-of-type td{border-bottom-color:transparent;}}}td{padding:", table.tbody.padding, ";border-bottom:", table.border, ";background:", table.bgColor, ";word-wrap:break-word;}.k-fixed-left,.k-fixed-right{position:sticky;z-index:1;&:after{content:'';display:block;transition:box-shadow ", table.transition, ";position:absolute;top:0;bottom:0px;width:10px;pointer-events:none;}}.k-fixed-left:after{right:-11px;}.k-fixed-right:after{left:-11px;}&.k-scroll-left .k-fixed-right:after{box-shadow:", table.fixRightShadow, ";}&.k-scroll-right .k-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}&.k-scroll-middle{.k-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}.k-fixed-right:after{box-shadow:", table.fixRightShadow, ";}}.k-fixed-right+.k-fixed-right:after{display:none;}.k-table-affix-header{position:sticky;top:0;left:0;.k-affix-wrapper{overflow:hidden;}&.k-fixed{position:relative;}}&.k-border,&.k-grid{.k-table-wrapper{border-top:", table.border, ";border-left:", table.border, ";border-right:", table.border, ";}}&.k-grid{td:not(:last-of-type),th:not(:last-of-type){border-right:", table.border, ";}th:before{display:none;}}&.k-stripe{tr:nth-child(even):not(:hover) td{background:", table.stripeBgColor, ";}}.k-table-group{margin-left:", table.group.gap, ";}.k-table-check{.k-checkbox,.k-radio{position:relative;top:-1px;}}.k-column-sortable{cursor:pointer;}.k-column-sort{.k-icon{display:block;height:", _sortInstanceProperty(table).iconHeight, ";line-height:", _sortInstanceProperty(table).iconHeight, ";margin:0 0 1px ", _sortInstanceProperty(table).gap, ";}&.k-desc .k-icon.k-desc,&.k-asc .k-icon.k-asc{color:", _sortInstanceProperty(table).enabledColor, ";}}.k-table-spin.k-overlay{z-index:2;}.k-table-empty{text-align:center;}tr.k-expand{td{padding:0;background:#fdfcff;}}&.k-with-expand{tr:not(.k-expand){td{border-bottom:none;}}}.k-table-expand{border-top:", table.border, ";box-sizing:content-box;}tbody tr.k-selected td{background:", table.selectedBgColor, ";}.k-table-arrow{margin-right:", table.arrow.gap, ";transition:transform ", table.transition, ";position:relative;top:-1px;}tr.k-spreaded{.k-table-arrow{transform:rotate(90deg);}}.k-table-resize{height:100%;width:", table.resizeWidth, ";position:absolute;top:0;left:-1px;cursor:ew-resize;}tr.k-dragging{opacity:", table.draggingOpacity, ";}.k-table-scrollbar{overflow-x:auto;overflow-y:hidden;}.k-table-scrollbar-inner{height:1px;}", _mapInstanceProperty(aligns).call(aligns, function (type) {
|
|
105
|
+
return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.k-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-spacing:0;table-layout:fixed;td,th{transition:all ", table.transition, ";}}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";position:sticky;top:0;z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&:first-of-type:before{display:none;}}.k-table-title{display:inline-flex;align-items:center;max-width:100%;color:", table.thead.color, ";}.k-table-title-text{flex:1;display:inline-flex;line-height:1.4;}tbody{tr{&:hover td{background:", table.tbody.hoverBgcolor, ";}&:last-of-type td{border-bottom-color:transparent;}}}td{padding:", table.tbody.padding, ";border-bottom:", table.border, ";background:", table.bgColor, ";word-wrap:break-word;}.k-fixed-left,.k-fixed-right{position:sticky;z-index:1;&:after{content:'';display:block;transition:box-shadow ", table.transition, ";position:absolute;top:0;bottom:0px;width:10px;pointer-events:none;}}.k-fixed-left:after{right:-11px;}.k-fixed-right:after{left:-11px;}&.k-scroll-left .k-fixed-right:after{box-shadow:", table.fixRightShadow, ";}&.k-scroll-right .k-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}&.k-scroll-middle{.k-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}.k-fixed-right:after{box-shadow:", table.fixRightShadow, ";}}.k-fixed-right+.k-fixed-right:after{display:none;}.k-table-affix-header{position:sticky;top:0;left:0;.k-affix-wrapper{overflow:hidden;}&.k-fixed{position:relative;}}&.k-border,&.k-grid{.k-table-wrapper{border-top:", table.border, ";border-left:", table.border, ";border-right:", table.border, ";}}&.k-grid{td:not(:last-of-type),th:not(:last-of-type){border-right:", table.border, ";}th:before{display:none;}}&.k-stripe{tr:nth-child(even):not(:hover) td{background:", table.stripeBgColor, ";}}.k-table-group{margin-left:", table.group.gap, ";}.k-table-check{.k-checkbox,.k-radio{position:relative;top:-1px;}}.k-column-sortable{cursor:pointer;}.k-column-sort{.k-icon{display:block;height:", _sortInstanceProperty(table).iconHeight, ";line-height:", _sortInstanceProperty(table).iconHeight, ";margin:0 0 1px ", _sortInstanceProperty(table).gap, ";}&.k-desc .k-icon.k-desc,&.k-asc .k-icon.k-asc{color:", _sortInstanceProperty(table).enabledColor, ";}}.k-table-spin.k-overlay{z-index:2;}.k-table-empty{text-align:center;}tr.k-expand{td{padding:0;background:#fdfcff;}}&.k-with-expand{tr:not(.k-expand){td{border-bottom:none;}}}.k-table-expand{border-top:", table.border, ";box-sizing:content-box;}tbody tr.k-selected td{background:", table.selectedBgColor, ";}.k-table-arrow{margin-right:", table.arrow.gap, ";transition:transform ", table.transition, ";position:relative;top:-1px;}tr.k-spreaded{.k-table-arrow{transform:rotate(90deg);}}.k-table-resize{height:100%;width:", table.resizeWidth, ";position:absolute;top:0;left:-1px;cursor:ew-resize;}tr.k-dragging{opacity:", table.draggingOpacity, ";}.k-table-scrollbar{overflow-x:auto;overflow-y:hidden;}.k-table-scrollbar-inner{height:1px;}", _mapInstanceProperty(aligns).call(aligns, function (type) {
|
|
106
106
|
return /*#__PURE__*/css(".k-align-", type, "{text-align:", type, ";}");
|
|
107
107
|
}), ">.k-pagination{margin:16px 0;}");
|
|
108
108
|
}
|
|
@@ -14,7 +14,7 @@ export declare function useGroup(): {
|
|
|
14
14
|
keywords: import("../../hooks/useState").State<string>;
|
|
15
15
|
filteredGroup: import("../../hooks/useState").State<TableColumnGroupItem[] | undefined>;
|
|
16
16
|
onShow: (groupValue: any) => void;
|
|
17
|
-
reset: () => void;
|
|
17
|
+
reset: (onChange: ContextValue['onChange']) => void;
|
|
18
18
|
confirm: (onChange: ContextValue['onChange']) => void;
|
|
19
19
|
dropdownRef: import("intact").RefObject<Dropdown>;
|
|
20
20
|
localGroupValue: import("../../hooks/useState").State<any>;
|
|
@@ -14,6 +14,7 @@ import { Tooltip } from './';
|
|
|
14
14
|
import { Dialog } from '../dialog';
|
|
15
15
|
import { mount, unmount, dispatchEvent, getElement, wait } from '../../test/utils';
|
|
16
16
|
import { tooltip as tooltipTheme } from './styles';
|
|
17
|
+
import { Select, Option } from '../select';
|
|
17
18
|
describe('Tooltip', function () {
|
|
18
19
|
afterEach(function (done) {
|
|
19
20
|
unmount();
|
|
@@ -633,4 +634,60 @@ describe('Tooltip', function () {
|
|
|
633
634
|
}
|
|
634
635
|
}, _callee10);
|
|
635
636
|
})));
|
|
637
|
+
it('should not impact select when wrap select with tooltip', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11() {
|
|
638
|
+
var Demo, _mount11, instance, element, menu;
|
|
639
|
+
|
|
640
|
+
return _regeneratorRuntime.wrap(function _callee11$(_context16) {
|
|
641
|
+
while (1) {
|
|
642
|
+
switch (_context16.prev = _context16.next) {
|
|
643
|
+
case 0:
|
|
644
|
+
Demo = /*#__PURE__*/function (_Component5) {
|
|
645
|
+
_inheritsLoose(Demo, _Component5);
|
|
646
|
+
|
|
647
|
+
function Demo() {
|
|
648
|
+
var _context15;
|
|
649
|
+
|
|
650
|
+
var _this5;
|
|
651
|
+
|
|
652
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
653
|
+
args[_key5] = arguments[_key5];
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
_this5 = _Component5.call.apply(_Component5, _concatInstanceProperty(_context15 = [this]).call(_context15, args)) || this;
|
|
657
|
+
_this5.Tooltip = Tooltip;
|
|
658
|
+
_this5.Select = Select;
|
|
659
|
+
_this5.Option = Option;
|
|
660
|
+
return _this5;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
return Demo;
|
|
664
|
+
}(Component);
|
|
665
|
+
|
|
666
|
+
Demo.template = "\n const {Tooltip, Select, Option} = this;\n <Tooltip>\n <Select>\n <Option value=\"1\">Option 1</Option>\n <Option value=\"2\">Option 2</Option>\n </Select>\n </Tooltip>\n ";
|
|
667
|
+
_mount11 = mount(Demo), instance = _mount11[0], element = _mount11[1];
|
|
668
|
+
dispatchEvent(element, 'mouseenter');
|
|
669
|
+
_context16.next = 6;
|
|
670
|
+
return wait();
|
|
671
|
+
|
|
672
|
+
case 6:
|
|
673
|
+
dispatchEvent(element, 'click');
|
|
674
|
+
_context16.next = 9;
|
|
675
|
+
return wait();
|
|
676
|
+
|
|
677
|
+
case 9:
|
|
678
|
+
menu = getElement(".k-select-menu");
|
|
679
|
+
dispatchEvent(element, 'mouseleave');
|
|
680
|
+
_context16.next = 13;
|
|
681
|
+
return wait(500);
|
|
682
|
+
|
|
683
|
+
case 13:
|
|
684
|
+
expect(menu.style.display).to.eql('');
|
|
685
|
+
|
|
686
|
+
case 14:
|
|
687
|
+
case "end":
|
|
688
|
+
return _context16.stop();
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}, _callee11);
|
|
692
|
+
})));
|
|
636
693
|
});
|
|
@@ -64,7 +64,11 @@ export var Tooltip = /*#__PURE__*/function (_Dropdown) {
|
|
|
64
64
|
|
|
65
65
|
if (this.get('hoverable')) {
|
|
66
66
|
return _Dropdown.prototype.hide.call(this, immediately);
|
|
67
|
-
}
|
|
67
|
+
} // tooltip can show any number sub-tooltips, we should not close the showed tooltip
|
|
68
|
+
// #885
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
this.showedDropdown = null;
|
|
68
72
|
|
|
69
73
|
_Dropdown.prototype.hide.call(this, true);
|
|
70
74
|
};
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.0.0
|
|
2
|
+
* @king-design v3.0.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -59,4 +59,4 @@ export * from './components/tree';
|
|
|
59
59
|
export * from './components/treeSelect';
|
|
60
60
|
export * from './components/upload';
|
|
61
61
|
export * from './components/wave';
|
|
62
|
-
export declare const version = "3.0.0
|
|
62
|
+
export declare const version = "3.0.0";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.0.0
|
|
2
|
+
* @king-design v3.0.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -61,5 +61,5 @@ export * from './components/tree';
|
|
|
61
61
|
export * from './components/treeSelect';
|
|
62
62
|
export * from './components/upload';
|
|
63
63
|
export * from './components/wave';
|
|
64
|
-
export var version = '3.0.0
|
|
64
|
+
export var version = '3.0.0';
|
|
65
65
|
/* generate end */
|
|
@@ -121,6 +121,23 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
121
121
|
}, "\u5E7F\u5DDE"), /*#__PURE__*/React.createElement(Button, {
|
|
122
122
|
value: "shenzhen",
|
|
123
123
|
size: "small"
|
|
124
|
+
}, "\u6DF1\u5733")), /*#__PURE__*/React.createElement("p", null, "\u6709\u95F4\u9694\u7684\u6309\u94AE\u7EC4"), /*#__PURE__*/React.createElement(ButtonGroup, {
|
|
125
|
+
checkType: "radio",
|
|
126
|
+
value: this.state.city,
|
|
127
|
+
onChangeValue: function onChangeValue(city) {
|
|
128
|
+
return _this2.setState({
|
|
129
|
+
city: city
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
seperate: true
|
|
133
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
134
|
+
value: "beijing"
|
|
135
|
+
}, "\u5317\u4EAC"), /*#__PURE__*/React.createElement(Button, {
|
|
136
|
+
value: "shanghai"
|
|
137
|
+
}, "\u4E0A\u6D77"), /*#__PURE__*/React.createElement(Button, {
|
|
138
|
+
value: "guangzhou"
|
|
139
|
+
}, "\u5E7F\u5DDE"), /*#__PURE__*/React.createElement(Button, {
|
|
140
|
+
value: "shenzhen"
|
|
124
141
|
}, "\u6DF1\u5733")));
|
|
125
142
|
};
|
|
126
143
|
|
|
Binary file
|