its_ui_vite 0.0.2 → 0.0.4
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 +72 -29
- package/package.json +4 -1
- package/src/assets/js/helpers.js +19 -1
- package/src/components/CAlert.vue +8 -0
- package/src/components/CButton.vue +50 -7
- package/src/components/CCheckbox.vue +40 -21
- package/src/components/CInput.vue +53 -6
- package/src/components/CPopup.vue +26 -5
- package/src/components/CSelect.vue +366 -43
- package/src/components/CTabs.vue +226 -33
- package/src/components/CTooltip.vue +99 -22
- package/src/pages/index.vue +294 -70
package/src/pages/index.vue
CHANGED
|
@@ -351,24 +351,88 @@
|
|
|
351
351
|
<div class="table__item table__title">
|
|
352
352
|
Tabs
|
|
353
353
|
</div>
|
|
354
|
-
<
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
354
|
+
<div class="table">
|
|
355
|
+
|
|
356
|
+
<div class="table__col">
|
|
357
|
+
<div class="table__item">
|
|
358
|
+
<CTabs @tabChange="log" :activeId="null" :tabs="null" />
|
|
359
|
+
</div>
|
|
360
|
+
|
|
361
|
+
<div class="table__item">
|
|
362
|
+
<div style="max-width: 600px; white-space: nowrap;">
|
|
363
|
+
<CTabs
|
|
364
|
+
@tabChange="log"
|
|
365
|
+
:scroll="false"
|
|
366
|
+
:activeId="4756500"
|
|
367
|
+
:tabs="[
|
|
368
|
+
{
|
|
369
|
+
value: 2,
|
|
370
|
+
text: 'tab 1'
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
value: 47565,
|
|
374
|
+
text: 'tab 2 Lorem Ipsum is simply dummy text of the printing'
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
value: 'jj889',
|
|
378
|
+
text: 'tab 3'
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
value: 4756500,
|
|
382
|
+
text: 'big tab 4 big tab 4'
|
|
383
|
+
}
|
|
384
|
+
]"
|
|
385
|
+
/>
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
|
|
389
|
+
<div class="table__item">
|
|
390
|
+
<div style="max-width: 500px; white-space: nowrap;">
|
|
391
|
+
<CTabs
|
|
392
|
+
@change="log"
|
|
393
|
+
animationType="worm"
|
|
394
|
+
:scroll="true"
|
|
395
|
+
:activeId="4756500"
|
|
396
|
+
:tabs="[
|
|
397
|
+
{
|
|
398
|
+
value: 2,
|
|
399
|
+
text: 'tab 1'
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
value: 47565,
|
|
403
|
+
text: 'tab 2 Lorem Ipsum is simply dummy text of the printing'
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
value: 'jj889',
|
|
407
|
+
text: 'tab 3'
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
value: 4756500,
|
|
411
|
+
text: 'big tab 4 big tab 4'
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
value: 'jj889--',
|
|
415
|
+
text: 'tab 3 Lorem Ipsum is'
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
value: 47565099990,
|
|
419
|
+
text: 'big tab 4 big tab 4 Lorem Ipsum is'
|
|
420
|
+
}
|
|
421
|
+
]"
|
|
422
|
+
/>
|
|
423
|
+
</div>
|
|
424
|
+
</div>
|
|
425
|
+
<div class="table__item">
|
|
426
|
+
<div class="">
|
|
427
|
+
<CButton @click.native="toggleTabs">
|
|
428
|
+
toggle tabs
|
|
429
|
+
</CButton>
|
|
430
|
+
</div>
|
|
431
|
+
<CTabs @change="log" :activeId="tabs.activeId" :tabs="tabs.tabs" />
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
|
|
435
|
+
</div>
|
|
372
436
|
</div>
|
|
373
437
|
<!-- ./tabs -->
|
|
374
438
|
|
|
@@ -388,6 +452,10 @@
|
|
|
388
452
|
<div class="table__item">
|
|
389
453
|
<CInput v-model="inpFocus" status="focus" />
|
|
390
454
|
</div>
|
|
455
|
+
|
|
456
|
+
<div class="table__item">
|
|
457
|
+
<CInput v-model="inpFocus" :disabled="true" status="focus" />
|
|
458
|
+
</div>
|
|
391
459
|
</div>
|
|
392
460
|
<!-- ./col -->
|
|
393
461
|
|
|
@@ -402,6 +470,22 @@
|
|
|
402
470
|
</div>
|
|
403
471
|
</div>
|
|
404
472
|
<!-- ./col -->
|
|
473
|
+
|
|
474
|
+
<!-- col -->
|
|
475
|
+
<div class="table__col">
|
|
476
|
+
<div class="table__item">
|
|
477
|
+
<CInput v-model="inpSuccess" :status="successStatus"/>
|
|
478
|
+
</div>
|
|
479
|
+
|
|
480
|
+
<div class="table__item">
|
|
481
|
+
<CInput v-model="inpError" size="md" :status="errorStatus" />
|
|
482
|
+
</div>
|
|
483
|
+
|
|
484
|
+
<div class="table__item">
|
|
485
|
+
<CInput v-model="inpError" size="sm" :status="errorStatus" />
|
|
486
|
+
</div>
|
|
487
|
+
</div>
|
|
488
|
+
<!-- ./col -->
|
|
405
489
|
</div>
|
|
406
490
|
</div>
|
|
407
491
|
</div>
|
|
@@ -415,16 +499,17 @@
|
|
|
415
499
|
</div>
|
|
416
500
|
<div class="table">
|
|
417
501
|
<!-- col -->
|
|
418
|
-
<div class="table__col">
|
|
502
|
+
<div class="table__col checkboxes">
|
|
419
503
|
<div class="table__item">
|
|
420
|
-
<CCheckbox v-model
|
|
421
|
-
{{ checkboxes.
|
|
504
|
+
<CCheckbox v-model="checkboxes.checkbox_1">
|
|
505
|
+
default: {{ checkboxes.checkbox_1 ? 'true' : 'false' }}
|
|
422
506
|
</CCheckbox>
|
|
423
|
-
|
|
424
507
|
</div>
|
|
425
508
|
|
|
426
509
|
<div class="table__item">
|
|
427
|
-
<CCheckbox
|
|
510
|
+
<CCheckbox :modelValue="true" v-model="checkboxes.checkbox_2">
|
|
511
|
+
checked: {{ checkboxes.checkbox_2 ? 'true' : 'false' }}
|
|
512
|
+
</CCheckbox>
|
|
428
513
|
</div>
|
|
429
514
|
|
|
430
515
|
<div class="table__item">
|
|
@@ -434,29 +519,29 @@
|
|
|
434
519
|
<!-- ./col -->
|
|
435
520
|
|
|
436
521
|
<!-- col -->
|
|
437
|
-
<div class="table__col">
|
|
522
|
+
<div class="table__col checkboxes">
|
|
438
523
|
<div class="table__item">
|
|
439
|
-
<CCheckbox variant="radio"
|
|
524
|
+
<CCheckbox variant="radio" name="CCheckbox_radio" value="radio_1" text="default" v-model="checkboxes.radio" />
|
|
440
525
|
</div>
|
|
441
526
|
|
|
442
527
|
<div class="table__item">
|
|
443
|
-
<CCheckbox variant="radio"
|
|
528
|
+
<CCheckbox variant="radio" name="CCheckbox_radio" value="radio_2" text="checked" v-model="checkboxes.radio" />
|
|
444
529
|
</div>
|
|
445
|
-
|
|
530
|
+
|
|
446
531
|
<div class="table__item">
|
|
447
|
-
<CCheckbox variant="radio" :disabled="true" text="
|
|
532
|
+
<CCheckbox variant="radio" :disabled="true" :text="checkboxes.radio" />
|
|
448
533
|
</div>
|
|
449
534
|
</div>
|
|
450
535
|
<!-- ./col -->
|
|
451
536
|
|
|
452
537
|
<!-- col -->
|
|
453
|
-
<div class="table__col">
|
|
538
|
+
<div class="table__col checkboxes">
|
|
454
539
|
<div class="table__item">
|
|
455
540
|
<CCheckbox variant="toggle" text="default" />
|
|
456
541
|
</div>
|
|
457
542
|
|
|
458
543
|
<div class="table__item">
|
|
459
|
-
<CCheckbox variant="toggle" :
|
|
544
|
+
<CCheckbox variant="toggle" :modelValue="true" text="checked" />
|
|
460
545
|
</div>
|
|
461
546
|
|
|
462
547
|
<div class="table__item">
|
|
@@ -479,24 +564,7 @@
|
|
|
479
564
|
<!-- col -->
|
|
480
565
|
<div class="table__col">
|
|
481
566
|
<div class="table__item">
|
|
482
|
-
<CSelect :options="
|
|
483
|
-
{
|
|
484
|
-
id: 2,
|
|
485
|
-
text: 'btn 1'
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
id: 47565,
|
|
489
|
-
text: 'btn 2'
|
|
490
|
-
},
|
|
491
|
-
{
|
|
492
|
-
id: 'jj889',
|
|
493
|
-
text: 'btn 3'
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
id: 4756500,
|
|
497
|
-
text: 'btn 4'
|
|
498
|
-
},
|
|
499
|
-
]" />
|
|
567
|
+
<CSelect @change="(evt) => log(['CSelect default', ...evt])" v-model="VModelOption" :options="option" />
|
|
500
568
|
</div>
|
|
501
569
|
</div>
|
|
502
570
|
<!-- ./col -->
|
|
@@ -505,43 +573,85 @@
|
|
|
505
573
|
<div class="table__col">
|
|
506
574
|
|
|
507
575
|
<div class="table__item">
|
|
508
|
-
<CSelect variant="multiple" :options="[
|
|
576
|
+
<CSelect variant="multiple" @change="(evt) => log(['CSelect multiple', ...evt])" :options="[
|
|
509
577
|
{
|
|
510
|
-
|
|
578
|
+
value: 2,
|
|
511
579
|
text: 'btn 1'
|
|
512
580
|
},
|
|
513
581
|
{
|
|
514
|
-
|
|
582
|
+
value: 47565,
|
|
515
583
|
text: 'btn 2'
|
|
516
584
|
},
|
|
517
585
|
{
|
|
518
|
-
|
|
586
|
+
value: 'jj889',
|
|
519
587
|
text: 'btn 3'
|
|
520
588
|
},
|
|
521
589
|
{
|
|
522
|
-
|
|
590
|
+
value: 4756500,
|
|
523
591
|
text: 'btn 4'
|
|
524
592
|
},
|
|
525
593
|
{
|
|
526
|
-
|
|
594
|
+
value: 12,
|
|
527
595
|
text: 'btn 5'
|
|
528
596
|
},
|
|
529
597
|
{
|
|
530
|
-
|
|
598
|
+
value: 475651,
|
|
531
599
|
text: 'btn 6'
|
|
532
600
|
},
|
|
533
601
|
{
|
|
534
|
-
|
|
602
|
+
value: 'jj8891',
|
|
535
603
|
text: 'btn 7'
|
|
536
604
|
},
|
|
537
605
|
{
|
|
538
|
-
|
|
606
|
+
value: 4756510,
|
|
539
607
|
text: 'btn 8'
|
|
540
608
|
}
|
|
541
609
|
]" />
|
|
542
610
|
</div>
|
|
543
611
|
</div>
|
|
544
612
|
<!-- ./col -->
|
|
613
|
+
|
|
614
|
+
<!-- col -->
|
|
615
|
+
<div class="table__col">
|
|
616
|
+
<div class="table__item">
|
|
617
|
+
<CSelect @change="(evt) => log(['CSelect default', ...evt])" :autocomplete="true" size="md" :options="[
|
|
618
|
+
{
|
|
619
|
+
value: 2,
|
|
620
|
+
text: 'btn 1'
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
value: 47565,
|
|
624
|
+
text: 'btn 2'
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
value: 'jj889',
|
|
628
|
+
text: 'btn 3'
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
value: 4756500,
|
|
632
|
+
text: 'btn 4'
|
|
633
|
+
},
|
|
634
|
+
]" />
|
|
635
|
+
</div>
|
|
636
|
+
</div>
|
|
637
|
+
<!-- ./col -->
|
|
638
|
+
|
|
639
|
+
<!-- col -->
|
|
640
|
+
<div class="table__col">
|
|
641
|
+
|
|
642
|
+
<div class="table__item">
|
|
643
|
+
<CSelect variant="multiple" @change="(evt) => log(['CSelect multiple', ...evt])" size="sm" :select-all="true" :options="option.slice(-2)" v-model="VModelOption" />
|
|
644
|
+
</div>
|
|
645
|
+
|
|
646
|
+
<div class="table__item">
|
|
647
|
+
<CSelect variant="multiple" @change="(evt) => log(['CSelect multiple', ...evt])" size="sm" :select-all="true" :options="option" v-model="VModelOption" />
|
|
648
|
+
</div>
|
|
649
|
+
|
|
650
|
+
<div class="table__item">
|
|
651
|
+
<CSelect @change="(evt) => log(['CSelect default', ...evt])" size="sm" :select-all="true" :disabled="true" :options="option" v-model="VModelOption" />
|
|
652
|
+
</div>
|
|
653
|
+
</div>
|
|
654
|
+
<!-- ./col -->
|
|
545
655
|
</div>
|
|
546
656
|
</div>
|
|
547
657
|
</div>
|
|
@@ -563,13 +673,45 @@
|
|
|
563
673
|
</template>
|
|
564
674
|
</CTooltip>
|
|
565
675
|
</div>
|
|
676
|
+
|
|
677
|
+
<div class="table__item">
|
|
678
|
+
<CTooltip position="top_left" style="white-space: nowrap;">
|
|
679
|
+
<template #content>
|
|
680
|
+
Text helper
|
|
681
|
+
</template>
|
|
682
|
+
</CTooltip>
|
|
683
|
+
</div>
|
|
684
|
+
|
|
685
|
+
<div class="table__item">
|
|
686
|
+
<CTooltip position="top_right" style="white-space: nowrap;">
|
|
687
|
+
<template #content>
|
|
688
|
+
Text helper
|
|
689
|
+
</template>
|
|
690
|
+
</CTooltip>
|
|
691
|
+
</div>
|
|
566
692
|
</div>
|
|
567
693
|
<!-- ./col -->
|
|
568
694
|
|
|
569
695
|
<!-- col -->
|
|
570
696
|
<div class="table__col">
|
|
571
697
|
<div class="table__item">
|
|
572
|
-
<CTooltip style="white-space: nowrap;"
|
|
698
|
+
<CTooltip style="white-space: nowrap;" position="bottom">
|
|
699
|
+
<template #content>
|
|
700
|
+
Text helper
|
|
701
|
+
</template>
|
|
702
|
+
</CTooltip>
|
|
703
|
+
</div>
|
|
704
|
+
|
|
705
|
+
<div class="table__item">
|
|
706
|
+
<CTooltip position="bottom_left" style="white-space: nowrap;">
|
|
707
|
+
<template #content>
|
|
708
|
+
Text helper
|
|
709
|
+
</template>
|
|
710
|
+
</CTooltip>
|
|
711
|
+
</div>
|
|
712
|
+
|
|
713
|
+
<div class="table__item">
|
|
714
|
+
<CTooltip position="bottom_right" style="white-space: nowrap;">
|
|
573
715
|
<template #content>
|
|
574
716
|
Text helper
|
|
575
717
|
</template>
|
|
@@ -673,31 +815,71 @@ export default {
|
|
|
673
815
|
inpFocus: 'focus',
|
|
674
816
|
inpSuccess: 'success',
|
|
675
817
|
inpError: 'error',
|
|
676
|
-
|
|
677
|
-
checkboxes: {
|
|
678
|
-
check_1: false,
|
|
679
|
-
check_2: true,
|
|
680
818
|
|
|
681
|
-
|
|
682
|
-
radio_2: true,
|
|
819
|
+
isToggleTabs: true,
|
|
683
820
|
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
821
|
+
option: [
|
|
822
|
+
{
|
|
823
|
+
value: 2,
|
|
824
|
+
text: 'Регулируемый железнодорожный переезд без дежурного'
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
value: 47565,
|
|
828
|
+
text: 'btn 2'
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
value: 'jj889',
|
|
832
|
+
text: 'btn 3'
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
value: 4756500,
|
|
836
|
+
text: 'btn 4'
|
|
837
|
+
},
|
|
838
|
+
// {
|
|
839
|
+
// value: 12,
|
|
840
|
+
// text: 'btn 5'
|
|
841
|
+
// },
|
|
842
|
+
// {
|
|
843
|
+
// value: 475651,
|
|
844
|
+
// text: 'btn 6'
|
|
845
|
+
// },
|
|
846
|
+
// {
|
|
847
|
+
// value: 'jj8891',
|
|
848
|
+
// text: 'btn 7'
|
|
849
|
+
// },
|
|
850
|
+
// {
|
|
851
|
+
// value: 4756510,
|
|
852
|
+
// text: 'btn 8'
|
|
853
|
+
// }
|
|
854
|
+
],
|
|
855
|
+
VModelOption: [
|
|
856
|
+
'jj889',
|
|
857
|
+
],
|
|
687
858
|
|
|
688
859
|
showBlock: {
|
|
689
860
|
btn: true,
|
|
690
861
|
tabs: true,
|
|
691
862
|
input: true,
|
|
692
863
|
checkbox: true,
|
|
693
|
-
}
|
|
864
|
+
},
|
|
865
|
+
|
|
866
|
+
checkboxes: {
|
|
867
|
+
checkbox_1: false,
|
|
868
|
+
checkbox_2: true,
|
|
869
|
+
|
|
870
|
+
radio: 'radio_2',
|
|
871
|
+
},
|
|
694
872
|
}
|
|
695
873
|
},
|
|
696
874
|
|
|
697
875
|
methods: {
|
|
698
876
|
log(e) {
|
|
699
877
|
console.log('log', e);
|
|
700
|
-
}
|
|
878
|
+
},
|
|
879
|
+
|
|
880
|
+
toggleTabs() {
|
|
881
|
+
this.isToggleTabs = !this.isToggleTabs;
|
|
882
|
+
},
|
|
701
883
|
},
|
|
702
884
|
|
|
703
885
|
computed: {
|
|
@@ -706,7 +888,43 @@ export default {
|
|
|
706
888
|
},
|
|
707
889
|
successStatus() {
|
|
708
890
|
return this.inpSuccess === 'success' ? 'success' : 'static';
|
|
709
|
-
}
|
|
891
|
+
},
|
|
892
|
+
|
|
893
|
+
tabs() {
|
|
894
|
+
return this.isToggleTabs ? {
|
|
895
|
+
activeId: 'jj889',
|
|
896
|
+
tabs: [
|
|
897
|
+
{
|
|
898
|
+
value: 2,
|
|
899
|
+
text: 'v1 tab 1'
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
value: 47565,
|
|
903
|
+
text: 'v1 tab 2'
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
value: 'jj889',
|
|
907
|
+
text: 'v1 tab 3'
|
|
908
|
+
},
|
|
909
|
+
]
|
|
910
|
+
} : {
|
|
911
|
+
activeId: 980987,
|
|
912
|
+
tabs: [
|
|
913
|
+
{
|
|
914
|
+
value: 2,
|
|
915
|
+
text: 'variant 2 tab 1'
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
value: 980987,
|
|
919
|
+
text: 'variant 2 tab 2'
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
value: 'jj889',
|
|
923
|
+
text: 'variant 2 tab 3'
|
|
924
|
+
},
|
|
925
|
+
]
|
|
926
|
+
}
|
|
927
|
+
},
|
|
710
928
|
},
|
|
711
929
|
|
|
712
930
|
components: {
|
|
@@ -751,6 +969,12 @@ body {
|
|
|
751
969
|
&__col {
|
|
752
970
|
display: flex;
|
|
753
971
|
flex-direction: column;
|
|
972
|
+
|
|
973
|
+
&.checkboxes {
|
|
974
|
+
.table__item {
|
|
975
|
+
justify-content: flex-start;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
754
978
|
}
|
|
755
979
|
|
|
756
980
|
&__item {
|