@autobest-ui/components 1.1.4 → 1.1.10
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/README.md +10 -10
- package/esm/affix/style/index.scss +34 -34
- package/esm/base.scss +42 -42
- package/esm/carousel/style/index.scss +37 -37
- package/esm/checkbox/style/index.scss +117 -117
- package/esm/collapse/style/index.scss +42 -42
- package/esm/confirm/style/index.scss +44 -44
- package/esm/date-picker/calendar/grid/index.scss +85 -85
- package/esm/date-picker/calendar/index.d.ts +4 -0
- package/esm/date-picker/calendar/index.js +1 -1
- package/esm/date-picker/calendar/index.scss +57 -57
- package/esm/date-picker/index.d.ts +17 -6
- package/esm/date-picker/index.js +49 -8
- package/esm/date-picker/style/index.css +1 -1
- package/esm/date-picker/style/index.scss +23 -19
- package/esm/drawer/style/index.scss +44 -44
- package/esm/ellipsis/style/index.scss +35 -35
- package/esm/guide/style/index.scss +17 -17
- package/esm/icon/style/index.scss +6 -6
- package/esm/index.d.ts +2 -1
- package/esm/input-number/index.d.ts +30 -17
- package/esm/input-number/index.js +116 -36
- package/esm/input-number/style/index.scss +86 -86
- package/esm/lazy-image/style/index.scss +24 -24
- package/esm/link-list/style/index.scss +125 -125
- package/esm/loading/style/index.scss +30 -30
- package/esm/loading-bar/style/index.scss +62 -62
- package/esm/loading-container/style/index.scss +27 -27
- package/esm/loading-icon/style/index.scss +23 -23
- package/esm/mask/style/index.scss +34 -34
- package/esm/message/style/index.scss +70 -70
- package/esm/modal/style/index.scss +112 -112
- package/esm/move/style/index.scss +7 -7
- package/esm/popover/style/index.scss +59 -59
- package/esm/select/style/index.scss +126 -126
- package/esm/show-more/style/index.scss +22 -22
- package/esm/skeleton/style/index.scss +26 -26
- package/esm/style.css +5 -19
- package/esm/table/body/BodyRow.d.ts +9 -3
- package/esm/table/body/BodyRow.js +6 -2
- package/esm/table/body/index.d.ts +2 -2
- package/esm/table/body/index.js +8 -7
- package/esm/table/header/HeaderCell.d.ts +2 -2
- package/esm/table/header/HeaderRow.d.ts +2 -2
- package/esm/table/index.d.ts +4 -4
- package/esm/table/index.js +3 -3
- package/esm/table/interface.d.ts +9 -3
- package/esm/table/style/index.scss +51 -51
- package/esm/tabs/style/index.scss +62 -62
- package/esm/tooltip/style/index.scss +61 -61
- package/esm/trigger/style/index.scss +79 -79
- package/lib/affix/style/index.scss +34 -34
- package/lib/base.scss +42 -42
- package/lib/carousel/style/index.scss +37 -37
- package/lib/checkbox/style/index.scss +117 -117
- package/lib/collapse/style/index.scss +42 -42
- package/lib/confirm/style/index.scss +44 -44
- package/lib/date-picker/calendar/grid/index.scss +85 -85
- package/lib/date-picker/calendar/index.d.ts +4 -0
- package/lib/date-picker/calendar/index.js +1 -1
- package/lib/date-picker/calendar/index.scss +57 -57
- package/lib/date-picker/index.d.ts +17 -6
- package/lib/date-picker/index.js +49 -8
- package/lib/date-picker/style/index.css +1 -1
- package/lib/date-picker/style/index.scss +23 -19
- package/lib/drawer/style/index.scss +44 -44
- package/lib/ellipsis/style/index.scss +35 -35
- package/lib/guide/style/index.scss +17 -17
- package/lib/icon/style/index.scss +6 -6
- package/lib/index.d.ts +2 -1
- package/lib/input-number/index.d.ts +30 -17
- package/lib/input-number/index.js +116 -36
- package/lib/input-number/style/index.scss +86 -86
- package/lib/lazy-image/style/index.scss +24 -24
- package/lib/link-list/style/index.scss +125 -125
- package/lib/loading/style/index.scss +30 -30
- package/lib/loading-bar/style/index.scss +62 -62
- package/lib/loading-container/style/index.scss +27 -27
- package/lib/loading-icon/style/index.scss +23 -23
- package/lib/mask/style/index.scss +34 -34
- package/lib/message/style/index.scss +70 -70
- package/lib/modal/style/index.scss +112 -112
- package/lib/move/style/index.scss +7 -7
- package/lib/popover/style/index.scss +59 -59
- package/lib/select/style/index.scss +126 -126
- package/lib/show-more/style/index.scss +22 -22
- package/lib/skeleton/style/index.scss +26 -26
- package/lib/style.css +5 -19
- package/lib/table/body/BodyRow.d.ts +9 -3
- package/lib/table/body/BodyRow.js +6 -2
- package/lib/table/body/index.d.ts +2 -2
- package/lib/table/body/index.js +8 -7
- package/lib/table/header/HeaderCell.d.ts +2 -2
- package/lib/table/header/HeaderRow.d.ts +2 -2
- package/lib/table/index.d.ts +4 -4
- package/lib/table/index.js +3 -3
- package/lib/table/interface.d.ts +9 -3
- package/lib/table/style/index.scss +51 -51
- package/lib/tabs/style/index.scss +62 -62
- package/lib/tooltip/style/index.scss +61 -61
- package/lib/trigger/style/index.scss +79 -79
- package/package.json +2 -2
- package/esm/accordion/__stories__/style.css +0 -1
- package/esm/accordion/__stories__/style.scss +0 -59
- package/esm/affix/__stories__/style.css +0 -1
- package/esm/affix/__stories__/style.scss +0 -13
- package/esm/carousel/__stories__/style.css +0 -1
- package/esm/carousel/__stories__/style.scss +0 -41
- package/esm/collapse/__stories__/style.css +0 -1
- package/esm/collapse/__stories__/style.scss +0 -19
- package/esm/guide/__stories__/style.css +0 -1
- package/esm/guide/__stories__/style.scss +0 -14
- package/esm/icon/__stories__/iconNames.d.ts +0 -2
- package/esm/icon/__stories__/iconNames.js +0 -1
- package/esm/icon/__stories__/style.css +0 -1
- package/esm/icon/__stories__/style.scss +0 -40
- package/esm/lazy-image/__stories__/style.css +0 -1
- package/esm/lazy-image/__stories__/style.scss +0 -9
- package/esm/loading-container/__stories__/style.css +0 -1
- package/esm/loading-container/__stories__/style.scss +0 -6
- package/esm/move/__stories__/style.css +0 -1
- package/esm/move/__stories__/style.scss +0 -6
- package/esm/popover/__stories__/style.css +0 -1
- package/esm/popover/__stories__/style.scss +0 -16
- package/esm/select/__stories__/style.css +0 -1
- package/esm/select/__stories__/style.scss +0 -8
- package/esm/skeleton/__stories__/style.css +0 -1
- package/esm/skeleton/__stories__/style.scss +0 -3
- package/esm/table/__stories__/style.css +0 -1
- package/esm/table/__stories__/style.scss +0 -34
- package/esm/tabs/__stories__/style.css +0 -1
- package/esm/tabs/__stories__/style.scss +0 -8
- package/lib/accordion/__stories__/style.css +0 -1
- package/lib/accordion/__stories__/style.scss +0 -59
- package/lib/affix/__stories__/style.css +0 -1
- package/lib/affix/__stories__/style.scss +0 -13
- package/lib/carousel/__stories__/style.css +0 -1
- package/lib/carousel/__stories__/style.scss +0 -41
- package/lib/collapse/__stories__/style.css +0 -1
- package/lib/collapse/__stories__/style.scss +0 -19
- package/lib/guide/__stories__/style.css +0 -1
- package/lib/guide/__stories__/style.scss +0 -14
- package/lib/icon/__stories__/iconNames.d.ts +0 -2
- package/lib/icon/__stories__/iconNames.js +0 -8
- package/lib/icon/__stories__/style.css +0 -1
- package/lib/icon/__stories__/style.scss +0 -40
- package/lib/lazy-image/__stories__/style.css +0 -1
- package/lib/lazy-image/__stories__/style.scss +0 -9
- package/lib/loading-container/__stories__/style.css +0 -1
- package/lib/loading-container/__stories__/style.scss +0 -6
- package/lib/move/__stories__/style.css +0 -1
- package/lib/move/__stories__/style.scss +0 -6
- package/lib/popover/__stories__/style.css +0 -1
- package/lib/popover/__stories__/style.scss +0 -16
- package/lib/select/__stories__/style.css +0 -1
- package/lib/select/__stories__/style.scss +0 -8
- package/lib/skeleton/__stories__/style.css +0 -1
- package/lib/skeleton/__stories__/style.scss +0 -3
- package/lib/table/__stories__/style.css +0 -1
- package/lib/table/__stories__/style.scss +0 -34
- package/lib/tabs/__stories__/style.css +0 -1
- package/lib/tabs/__stories__/style.scss +0 -8
|
@@ -55,7 +55,7 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
55
55
|
return __assign.apply(this, arguments);
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
var cls = 'ab-input-number';
|
|
58
|
+
var cls = 'ab-input-number'; // TODO: 重构组件
|
|
59
59
|
|
|
60
60
|
var InputNumber =
|
|
61
61
|
/** @class */
|
|
@@ -317,6 +317,19 @@ function (_super) {
|
|
|
317
317
|
return ceilNumber;
|
|
318
318
|
};
|
|
319
319
|
|
|
320
|
+
_this.getPadDigitalValue = function (value) {
|
|
321
|
+
var _a = _this.props,
|
|
322
|
+
digital = _a.digital,
|
|
323
|
+
padDigital = _a.padDigital;
|
|
324
|
+
|
|
325
|
+
if (!padDigital || (0, _utils.isBlank)(value) || !digital) {
|
|
326
|
+
return value;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
var resultArr = value.split('.');
|
|
330
|
+
return resultArr[0] + "." + (resultArr[1] || '').padEnd(digital, '0');
|
|
331
|
+
};
|
|
332
|
+
|
|
320
333
|
_this.onChangePackMultipleValue = function (value) {
|
|
321
334
|
var currentValue = _this.getCurrentValue(value).toString();
|
|
322
335
|
|
|
@@ -331,60 +344,97 @@ function (_super) {
|
|
|
331
344
|
}
|
|
332
345
|
};
|
|
333
346
|
|
|
334
|
-
_this.
|
|
335
|
-
|
|
336
|
-
|
|
347
|
+
_this.onPadDigital = function (value) {
|
|
348
|
+
var currentValue = _this.getPadDigitalValue(value);
|
|
349
|
+
|
|
350
|
+
var _a = _this.props,
|
|
351
|
+
onChange = _a.onChange,
|
|
352
|
+
name = _a.name;
|
|
353
|
+
|
|
354
|
+
if (value !== currentValue) {
|
|
355
|
+
onChange(currentValue, name);
|
|
337
356
|
}
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
_this.getPadDigitalDebounce = function () {
|
|
360
|
+
if (_this.padDigitalDebounce) {
|
|
361
|
+
return _this.padDigitalDebounce;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
_this.padDigitalDebounce = (0, _utils.debounce)(_this.onPadDigital, _this.props.delay);
|
|
365
|
+
return _this.padDigitalDebounce;
|
|
366
|
+
};
|
|
338
367
|
|
|
339
|
-
|
|
340
|
-
|
|
368
|
+
_this.getChangePackMultipleValueDebounce = function () {
|
|
369
|
+
if (_this.changePackMultipleValueDebounce) {
|
|
370
|
+
return _this.changePackMultipleValueDebounce;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
_this.changePackMultipleValueDebounce = (0, _utils.debounce)(_this.onChangePackMultipleValue, _this.props.delay);
|
|
374
|
+
return _this.changePackMultipleValueDebounce;
|
|
341
375
|
};
|
|
342
376
|
|
|
343
|
-
_this.callback = function (value) {
|
|
377
|
+
_this.callback = function (value, ignoreDelay) {
|
|
344
378
|
var _a = _this.props,
|
|
345
379
|
name = _a.name,
|
|
346
380
|
onChange = _a.onChange,
|
|
347
|
-
onChangePackMultipleBefore = _a.onChangePackMultipleBefore
|
|
348
|
-
|
|
381
|
+
onChangePackMultipleBefore = _a.onChangePackMultipleBefore,
|
|
382
|
+
packMultiple = _a.packMultiple,
|
|
383
|
+
padDigital = _a.padDigital;
|
|
349
384
|
|
|
350
|
-
if (onChange) {
|
|
385
|
+
if (onChange && value !== _this.props.value) {
|
|
351
386
|
onChange(value, name);
|
|
352
387
|
}
|
|
353
388
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
if (!(0, _utils.isBlank)(packMultiple) && !(0, _utils.isBlank)(value) && valueNumber % packMultiple !== 0) {
|
|
389
|
+
if (packMultiple && !(0, _utils.isBlank)(value) && parseFloat(value) % packMultiple !== 0) {
|
|
357
390
|
if (onChangePackMultipleBefore) {
|
|
358
391
|
onChangePackMultipleBefore(value, name);
|
|
359
392
|
}
|
|
360
393
|
|
|
361
|
-
|
|
394
|
+
if (ignoreDelay) {
|
|
395
|
+
_this.onChangePackMultipleValue(value);
|
|
396
|
+
} else {
|
|
397
|
+
_this.getChangePackMultipleValueDebounce()(value);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
if (padDigital) {
|
|
404
|
+
if (ignoreDelay) {
|
|
405
|
+
_this.onPadDigital(value);
|
|
406
|
+
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
_this.getPadDigitalDebounce()(value);
|
|
362
411
|
}
|
|
363
412
|
};
|
|
364
413
|
|
|
365
|
-
_this.onValueChange = function (ev) {
|
|
366
|
-
if (_this.
|
|
367
|
-
_this.
|
|
414
|
+
_this.onValueChange = function (ev, ignoreDelay) {
|
|
415
|
+
if (_this.changePackMultipleValueDebounce) {
|
|
416
|
+
_this.changePackMultipleValueDebounce.cancel();
|
|
368
417
|
}
|
|
369
418
|
|
|
370
419
|
var _a = _this.props,
|
|
371
420
|
min = _a.min,
|
|
372
421
|
max = _a.max,
|
|
373
|
-
|
|
422
|
+
digital = _a.digital,
|
|
374
423
|
value = _a.value;
|
|
375
|
-
var currentValue = ev.target.value.toString();
|
|
424
|
+
var currentValue = ev.target.value.toString(); // 输入为空
|
|
376
425
|
|
|
377
426
|
if ((0, _utils.isBlank)(currentValue)) {
|
|
378
|
-
_this.callback('');
|
|
427
|
+
_this.callback('', ignoreDelay);
|
|
379
428
|
|
|
380
429
|
return;
|
|
381
430
|
}
|
|
382
431
|
|
|
383
|
-
var preValue = value.toString();
|
|
432
|
+
var preValue = value.toString(); // 输入的不是数字格式
|
|
433
|
+
|
|
384
434
|
var reg = /^-$|(^(-?\d+)(\.\d*)?)$/;
|
|
385
435
|
|
|
386
436
|
if (!reg.test(currentValue)) {
|
|
387
|
-
_this.callback(preValue);
|
|
437
|
+
_this.callback(preValue, ignoreDelay);
|
|
388
438
|
|
|
389
439
|
return;
|
|
390
440
|
} // 0开头后面直接是数字,没有点如:011, 这是不合法的
|
|
@@ -393,41 +443,59 @@ function (_super) {
|
|
|
393
443
|
var zeroReg = /^0\d+$/;
|
|
394
444
|
|
|
395
445
|
if (zeroReg.test(currentValue)) {
|
|
396
|
-
_this.callback(preValue);
|
|
446
|
+
_this.callback(preValue, ignoreDelay);
|
|
397
447
|
|
|
398
448
|
return;
|
|
449
|
+
} // 小数位数限制
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
if (digital) {
|
|
453
|
+
currentValue = new RegExp("[^.]+([.](\\d{0," + digital + "}))?").exec(currentValue)[0].toString();
|
|
399
454
|
}
|
|
400
455
|
|
|
401
456
|
var valueNumber = parseFloat(currentValue);
|
|
402
457
|
|
|
403
458
|
if (!(0, _utils.isBlank)(min)) {
|
|
404
459
|
if (min > valueNumber) {
|
|
405
|
-
_this.callback(preValue);
|
|
460
|
+
_this.callback(preValue, ignoreDelay);
|
|
406
461
|
|
|
407
462
|
return;
|
|
408
463
|
} // 如果min>= 0, 将阻止输入-
|
|
409
464
|
|
|
410
465
|
|
|
411
466
|
if (min >= 0 && currentValue.indexOf('-') > -1) {
|
|
412
|
-
_this.callback('');
|
|
467
|
+
_this.callback('', ignoreDelay);
|
|
413
468
|
|
|
414
469
|
return;
|
|
415
470
|
}
|
|
416
471
|
}
|
|
417
472
|
|
|
418
473
|
if (!(0, _utils.isBlank)(max) && max < valueNumber) {
|
|
419
|
-
_this.callback(preValue);
|
|
474
|
+
_this.callback(preValue, ignoreDelay);
|
|
420
475
|
|
|
421
476
|
return;
|
|
422
477
|
}
|
|
423
478
|
|
|
424
|
-
if (
|
|
425
|
-
_this.callback(preValue);
|
|
479
|
+
if (!digital && currentValue.indexOf('.') > -1) {
|
|
480
|
+
_this.callback(preValue, ignoreDelay);
|
|
426
481
|
|
|
427
482
|
return;
|
|
428
483
|
}
|
|
429
484
|
|
|
430
|
-
_this.callback(currentValue);
|
|
485
|
+
_this.callback(currentValue, ignoreDelay);
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
_this.getValueCalculate = function (value, offset) {
|
|
489
|
+
var valueStr = value.toString();
|
|
490
|
+
var offsetStr = offset.toString();
|
|
491
|
+
|
|
492
|
+
if (valueStr.indexOf('.') < 0 && offsetStr.indexOf('.') < 0) {
|
|
493
|
+
return value + offset;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
var digital = _this.props.digital;
|
|
497
|
+
var powValue = Math.pow(10, digital);
|
|
498
|
+
return Math.round((value + offset) * powValue) / powValue;
|
|
431
499
|
};
|
|
432
500
|
|
|
433
501
|
_this.onAdd = function () {
|
|
@@ -438,7 +506,7 @@ function (_super) {
|
|
|
438
506
|
|
|
439
507
|
var ev = {
|
|
440
508
|
target: {
|
|
441
|
-
value: (
|
|
509
|
+
value: _this.getPadDigitalValue(_this.getValueCalculate(Number(value), step).toString())
|
|
442
510
|
}
|
|
443
511
|
};
|
|
444
512
|
|
|
@@ -452,7 +520,7 @@ function (_super) {
|
|
|
452
520
|
var step = packMultiple || 1;
|
|
453
521
|
var ev = {
|
|
454
522
|
target: {
|
|
455
|
-
value: (
|
|
523
|
+
value: _this.getPadDigitalValue(_this.getValueCalculate(Number(value), step * -1).toString())
|
|
456
524
|
}
|
|
457
525
|
};
|
|
458
526
|
|
|
@@ -485,6 +553,11 @@ function (_super) {
|
|
|
485
553
|
|
|
486
554
|
InputNumber.prototype.componentDidMount = function () {
|
|
487
555
|
this.addMouseMoveListener();
|
|
556
|
+
this.onValueChange({
|
|
557
|
+
target: {
|
|
558
|
+
value: this.props.value
|
|
559
|
+
}
|
|
560
|
+
}, true);
|
|
488
561
|
};
|
|
489
562
|
|
|
490
563
|
InputNumber.prototype.componentWillUnmount = function () {
|
|
@@ -498,9 +571,14 @@ function (_super) {
|
|
|
498
571
|
this.mouseMoveHandler = null;
|
|
499
572
|
}
|
|
500
573
|
|
|
501
|
-
if (this.
|
|
502
|
-
this.
|
|
503
|
-
this.
|
|
574
|
+
if (this.padDigitalDebounce) {
|
|
575
|
+
this.padDigitalDebounce.cancel();
|
|
576
|
+
this.padDigitalDebounce = null;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
if (this.changePackMultipleValueDebounce) {
|
|
580
|
+
this.changePackMultipleValueDebounce.cancel();
|
|
581
|
+
this.changePackMultipleValueDebounce = null;
|
|
504
582
|
}
|
|
505
583
|
};
|
|
506
584
|
|
|
@@ -509,7 +587,8 @@ function (_super) {
|
|
|
509
587
|
|
|
510
588
|
delete copyProps.onChangePackMultipleBefore;
|
|
511
589
|
delete copyProps.onChangePackMultipleAfter;
|
|
512
|
-
delete copyProps.
|
|
590
|
+
delete copyProps.digital;
|
|
591
|
+
delete copyProps.padDigital;
|
|
513
592
|
delete copyProps.packMultiple;
|
|
514
593
|
delete copyProps.visibleButton;
|
|
515
594
|
delete copyProps.onChange;
|
|
@@ -551,7 +630,8 @@ function (_super) {
|
|
|
551
630
|
name: '',
|
|
552
631
|
size: 3,
|
|
553
632
|
disabled: false,
|
|
554
|
-
|
|
633
|
+
digital: 0,
|
|
634
|
+
padDigital: false,
|
|
555
635
|
delay: 1000,
|
|
556
636
|
visibleButton: false
|
|
557
637
|
};
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
$namespace: ab-input-number;
|
|
2
|
-
|
|
3
|
-
.#{$namespace} {
|
|
4
|
-
padding: .06rem .07rem;
|
|
5
|
-
-webkit-appearance: none;
|
|
6
|
-
outline: none;
|
|
7
|
-
width: 100%;
|
|
8
|
-
border: 1px solid #ccc;
|
|
9
|
-
border-radius: 2px;
|
|
10
|
-
resize: none;
|
|
11
|
-
font-size: .12rem;
|
|
12
|
-
transition: all .3s;
|
|
13
|
-
position: relative;
|
|
14
|
-
background-color: transparent;
|
|
15
|
-
z-index: 2;
|
|
16
|
-
|
|
17
|
-
&:focus {
|
|
18
|
-
box-shadow: 0 0 4px rgba(#348FEE, 0.8);
|
|
19
|
-
border-color: rgba(#348FEE, 0.8);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&-wrap {
|
|
23
|
-
position: relative;
|
|
24
|
-
background-color: #fff;
|
|
25
|
-
display: inline-block;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&-button-wrap {
|
|
29
|
-
position: absolute;
|
|
30
|
-
user-select: none;
|
|
31
|
-
top: 50%;
|
|
32
|
-
transform: translateY(-50%);
|
|
33
|
-
right: .02rem;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&-button {
|
|
37
|
-
position: relative;
|
|
38
|
-
width: .16rem;
|
|
39
|
-
height: .1rem;
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
background-color: #f1f1f1;
|
|
42
|
-
&.#{$namespace}-hover {
|
|
43
|
-
background-color: #d0d0d0;
|
|
44
|
-
}
|
|
45
|
-
&.#{$namespace}-active {
|
|
46
|
-
background-color: #787878;
|
|
47
|
-
.#{$namespace}-add {
|
|
48
|
-
border-bottom-color: #fff;
|
|
49
|
-
}
|
|
50
|
-
.#{$namespace}-sub {
|
|
51
|
-
border-top-color: #fff;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&:first-child {
|
|
56
|
-
margin-bottom: .02rem;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&-add {
|
|
61
|
-
position: absolute;
|
|
62
|
-
top: -.01rem;
|
|
63
|
-
left: .04rem;
|
|
64
|
-
display: block;
|
|
65
|
-
border-top-color: transparent;
|
|
66
|
-
border-right-color: transparent;
|
|
67
|
-
border-bottom-color: #505050;
|
|
68
|
-
border-left-color: transparent;
|
|
69
|
-
border-width: .04rem;
|
|
70
|
-
border-style: solid;
|
|
71
|
-
width: 0;
|
|
72
|
-
height: 0;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&-sub {
|
|
76
|
-
display: block;
|
|
77
|
-
margin: .03rem 0 0 .04rem;
|
|
78
|
-
border-top-color: #505050;
|
|
79
|
-
border-right-color: transparent;
|
|
80
|
-
border-bottom-color: transparent;
|
|
81
|
-
border-left-color: transparent;
|
|
82
|
-
border-width: .04rem;
|
|
83
|
-
border-style: solid;
|
|
84
|
-
width: 0;
|
|
85
|
-
height: 0;
|
|
86
|
-
}
|
|
1
|
+
$namespace: ab-input-number;
|
|
2
|
+
|
|
3
|
+
.#{$namespace} {
|
|
4
|
+
padding: .06rem .07rem;
|
|
5
|
+
-webkit-appearance: none;
|
|
6
|
+
outline: none;
|
|
7
|
+
width: 100%;
|
|
8
|
+
border: 1px solid #ccc;
|
|
9
|
+
border-radius: 2px;
|
|
10
|
+
resize: none;
|
|
11
|
+
font-size: .12rem;
|
|
12
|
+
transition: all .3s;
|
|
13
|
+
position: relative;
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
z-index: 2;
|
|
16
|
+
|
|
17
|
+
&:focus {
|
|
18
|
+
box-shadow: 0 0 4px rgba(#348FEE, 0.8);
|
|
19
|
+
border-color: rgba(#348FEE, 0.8);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-wrap {
|
|
23
|
+
position: relative;
|
|
24
|
+
background-color: #fff;
|
|
25
|
+
display: inline-block;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-button-wrap {
|
|
29
|
+
position: absolute;
|
|
30
|
+
user-select: none;
|
|
31
|
+
top: 50%;
|
|
32
|
+
transform: translateY(-50%);
|
|
33
|
+
right: .02rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-button {
|
|
37
|
+
position: relative;
|
|
38
|
+
width: .16rem;
|
|
39
|
+
height: .1rem;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
background-color: #f1f1f1;
|
|
42
|
+
&.#{$namespace}-hover {
|
|
43
|
+
background-color: #d0d0d0;
|
|
44
|
+
}
|
|
45
|
+
&.#{$namespace}-active {
|
|
46
|
+
background-color: #787878;
|
|
47
|
+
.#{$namespace}-add {
|
|
48
|
+
border-bottom-color: #fff;
|
|
49
|
+
}
|
|
50
|
+
.#{$namespace}-sub {
|
|
51
|
+
border-top-color: #fff;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:first-child {
|
|
56
|
+
margin-bottom: .02rem;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&-add {
|
|
61
|
+
position: absolute;
|
|
62
|
+
top: -.01rem;
|
|
63
|
+
left: .04rem;
|
|
64
|
+
display: block;
|
|
65
|
+
border-top-color: transparent;
|
|
66
|
+
border-right-color: transparent;
|
|
67
|
+
border-bottom-color: #505050;
|
|
68
|
+
border-left-color: transparent;
|
|
69
|
+
border-width: .04rem;
|
|
70
|
+
border-style: solid;
|
|
71
|
+
width: 0;
|
|
72
|
+
height: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&-sub {
|
|
76
|
+
display: block;
|
|
77
|
+
margin: .03rem 0 0 .04rem;
|
|
78
|
+
border-top-color: #505050;
|
|
79
|
+
border-right-color: transparent;
|
|
80
|
+
border-bottom-color: transparent;
|
|
81
|
+
border-left-color: transparent;
|
|
82
|
+
border-width: .04rem;
|
|
83
|
+
border-style: solid;
|
|
84
|
+
width: 0;
|
|
85
|
+
height: 0;
|
|
86
|
+
}
|
|
87
87
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
$namespace: ab-lazy-image;
|
|
2
|
-
|
|
3
|
-
.#{$namespace} {
|
|
4
|
-
transition: opacity 500ms;
|
|
5
|
-
|
|
6
|
-
&-loading {
|
|
7
|
-
background: #f2f2f2;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
&-loading.#{$namespace}-active {
|
|
12
|
-
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);
|
|
13
|
-
background-size: 400% 100%;
|
|
14
|
-
animation: ab-skeleton-loading 1.4s ease infinite;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@keyframes ab-skeleton-loading {
|
|
18
|
-
0% {
|
|
19
|
-
background-position: 100% 50%;
|
|
20
|
-
}
|
|
21
|
-
100% {
|
|
22
|
-
background-position: 0 50%;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
$namespace: ab-lazy-image;
|
|
2
|
+
|
|
3
|
+
.#{$namespace} {
|
|
4
|
+
transition: opacity 500ms;
|
|
5
|
+
|
|
6
|
+
&-loading {
|
|
7
|
+
background: #f2f2f2;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&-loading.#{$namespace}-active {
|
|
12
|
+
background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);
|
|
13
|
+
background-size: 400% 100%;
|
|
14
|
+
animation: ab-skeleton-loading 1.4s ease infinite;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@keyframes ab-skeleton-loading {
|
|
18
|
+
0% {
|
|
19
|
+
background-position: 100% 50%;
|
|
20
|
+
}
|
|
21
|
+
100% {
|
|
22
|
+
background-position: 0 50%;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
25
|
}
|