feat(WIP): vue-multiselect
This commit is contained in:
Vendored
+2
-1
@@ -11,4 +11,5 @@ $input-color: #303030;
|
||||
@import "./bootswatch_custom_variables.scss";
|
||||
@import "../../node_modules/bootstrap5/scss/bootstrap.scss";
|
||||
@import "./bootswatch_custom.scss";
|
||||
@import "./bootstrap_sammo.scss";
|
||||
@import "./bootstrap_sammo.scss";
|
||||
@import "./vue-multiselect.scss";
|
||||
@@ -3,15 +3,13 @@ $base2color: #00582c;
|
||||
$base3color: #704615;
|
||||
$base4color: #70153b;
|
||||
|
||||
$sammoColors: (
|
||||
'base1': $base1color,
|
||||
$sammoColors: ('base1': $base1color,
|
||||
'base2': $base2color,
|
||||
'base3': $base3color,
|
||||
'base4': $base4color,
|
||||
);
|
||||
|
||||
$nationColors: (
|
||||
"000000": #000000,
|
||||
$nationColors: ("000000": #000000,
|
||||
"FF0000": #FF0000,
|
||||
"800000": #800000,
|
||||
"A0522D": #A0522D,
|
||||
|
||||
@@ -0,0 +1,554 @@
|
||||
@use "sass:math";
|
||||
|
||||
$vue-multiselect-padding-x: $form-select-padding-x !default;
|
||||
$vue-multiselect-padding-y: $form-select-padding-y !default;
|
||||
$vue-multiselect-min-height: $input-height !default;
|
||||
$vue-multiselect-border-radius: $border-radius !default;
|
||||
$vue-multiselect-border-color: $form-select-border-color !default;
|
||||
$vue-multiselect-border-width: 1px !default;
|
||||
$vue-multiselect-disabled-opacity: $btn-disabled-opacity !default;
|
||||
$vue-multiselect-placeholder-color: $text-muted !default;
|
||||
$vue-multiselect-bg: $form-select-bg !default;
|
||||
$vue-multiselect-color: $form-select-color !default;
|
||||
$vue-multiselect-disabled-bg: $form-select-disabled-bg !default;
|
||||
$vue-multiselect-disabled-color: $form-select-disabled-color !default;
|
||||
|
||||
$vue-multiselect-option-selected-bg: #f3f3f3 !default;
|
||||
$vue-multiselect-option-selected-color: $body-color !default;
|
||||
$vue-multiselect-option-highlight-color: #fff !default;
|
||||
$vue-multiselect-option-highlight-bg: $primary !default;
|
||||
$vue-multiselect-option-selected-highlight-color: #fff !default;
|
||||
$vue-multiselect-option-selected-highlight-bg: $secondary !default;
|
||||
|
||||
$vue-multiselect-tag-color: $dark !default;
|
||||
$vue-multiselect-tag-bg: $light !default;
|
||||
$vue-multiselect-tag-font-size: $badge-font-size !default;
|
||||
$vue-multiselect-tag-font-weight: normal !default;
|
||||
$vue-multiselect-tag-icon-size: 1.7rem !default;
|
||||
$vue-multiselect-tag-icon-color: $vue-multiselect-tag-color !default;
|
||||
$vue-multiselect-tag-icon-color-hover: white !default;
|
||||
$vue-multiselect-tag-icon-bg-hover: $danger !default;
|
||||
$vue-multiselect-tag-padding-x: .4rem !default;
|
||||
$vue-multiselect-tag-padding-y: .25rem !default;
|
||||
$vue-multiselect-tag-border-radius: $badge-border-radius !default;
|
||||
|
||||
$vue-multiselect-arrow-color: $form-select-color !default;
|
||||
$vue-multiselect-arrow-size: 5px !default;
|
||||
$vue-multiselect-arrow-padding: 8px !default;
|
||||
|
||||
$vue-multiselect-spinner-size: 16px !default;
|
||||
$vue-multiselect-spinner-thickness: 2px !default;
|
||||
$vue-multiselect-spinner-margin: math.div(-$vue-multiselect-spinner-size, 2) !default;
|
||||
$vue-multiselect-spinner-color: $dark !default;
|
||||
|
||||
// --------------------------------
|
||||
// Select field
|
||||
//--
|
||||
|
||||
fieldset[disabled] .multiselect {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.multiselect,
|
||||
.multiselect__input,
|
||||
.multiselect__single {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.multiselect {
|
||||
box-sizing: content-box;
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: $vue-multiselect-min-height;
|
||||
text-align: left;
|
||||
color: $vue-multiselect-color;
|
||||
|
||||
& * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect--disabled {
|
||||
pointer-events: none;
|
||||
opacity: $vue-multiselect-disabled-opacity;
|
||||
}
|
||||
|
||||
.multiselect--active {
|
||||
z-index: 50;
|
||||
|
||||
&:not(.multiselect--above) .multiselect__current,
|
||||
&:not(.multiselect--above) .multiselect__input,
|
||||
&:not(.multiselect--above) .multiselect__tags {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
& .multiselect__select {
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect--above.multiselect--active .multiselect__current,
|
||||
.multiselect--above.multiselect--active .multiselect__input,
|
||||
.multiselect--above.multiselect--active .multiselect__tags {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.multiselect__input,
|
||||
.multiselect__single {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
min-height: $vue-multiselect-min-height / 2;
|
||||
line-height: $vue-multiselect-min-height / 2;
|
||||
border: none;
|
||||
border-radius: $vue-multiselect-border-radius;
|
||||
background: $vue-multiselect-bg;
|
||||
padding: 0 0 0 $vue-multiselect-padding-x;
|
||||
width: calc(100%);
|
||||
transition: border 0.1s ease;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: $vue-multiselect-padding-y;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.multiselect__input::placeholder {
|
||||
color: $vue-multiselect-placeholder-color;
|
||||
}
|
||||
|
||||
.multiselect__tag ~ .multiselect__input,
|
||||
.multiselect__tag ~ .multiselect__single {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.multiselect__input:hover,
|
||||
.multiselect__single:hover {
|
||||
border-color: #cfcfcf;
|
||||
}
|
||||
|
||||
.multiselect__input:focus,
|
||||
.multiselect__single:focus {
|
||||
border-color: #a8a8a8;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.multiselect__single {
|
||||
padding-left: $vue-multiselect-padding-x;
|
||||
margin-bottom: $vue-multiselect-padding-y;
|
||||
}
|
||||
|
||||
.multiselect__tags-wrap {
|
||||
display: inline
|
||||
}
|
||||
|
||||
.multiselect__tags {
|
||||
min-height: $vue-multiselect-min-height;
|
||||
display: block;
|
||||
padding: $vue-multiselect-padding-y $vue-multiselect-min-height 0 $vue-multiselect-padding-y;
|
||||
border-radius: $vue-multiselect-border-radius;
|
||||
border: $vue-multiselect-border-width solid $vue-multiselect-border-color;
|
||||
background: $vue-multiselect-bg;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.multiselect__tag {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding: $vue-multiselect-tag-padding-y ($vue-multiselect-tag-icon-size + $vue-multiselect-tag-padding-x) $vue-multiselect-tag-padding-y $vue-multiselect-tag-padding-x;
|
||||
border-radius: $vue-multiselect-tag-border-radius;
|
||||
margin-right: $vue-multiselect-tag-padding-x;
|
||||
color: $vue-multiselect-tag-color;
|
||||
background: $vue-multiselect-tag-bg;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
max-width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
font-size: $vue-multiselect-tag-font-size;
|
||||
font-weight: $vue-multiselect-tag-font-weight;
|
||||
}
|
||||
|
||||
.multiselect__tag-icon {
|
||||
cursor: pointer;
|
||||
margin-left: $vue-multiselect-tag-padding-y;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
font-style: initial;
|
||||
width: $vue-multiselect-tag-icon-size;
|
||||
text-align: center;
|
||||
line-height: $vue-multiselect-tag-icon-size;
|
||||
transition: all 0.2s ease;
|
||||
font-size: $vue-multiselect-tag-font-size;
|
||||
font-weight: $vue-multiselect-tag-font-weight;
|
||||
}
|
||||
|
||||
.multiselect__tag-icon:after {
|
||||
content: "×";
|
||||
color: $vue-multiselect-tag-icon-color;
|
||||
font-size: 220%;
|
||||
}
|
||||
|
||||
.multiselect__tag-icon:focus,
|
||||
.multiselect__tag-icon:hover {
|
||||
background: $vue-multiselect-tag-icon-bg-hover;
|
||||
}
|
||||
|
||||
.multiselect__tag-icon:focus:after,
|
||||
.multiselect__tag-icon:hover:after {
|
||||
color: $vue-multiselect-tag-icon-color-hover;
|
||||
}
|
||||
|
||||
.multiselect__current {
|
||||
line-height: $vue-multiselect-min-height / 2;
|
||||
min-height: $vue-multiselect-min-height;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
padding: 8px 30px 0 12px;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
border-radius: $vue-multiselect-border-radius;
|
||||
border: 1px solid $vue-multiselect-border-color;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.multiselect__select {
|
||||
line-height: $vue-multiselect-min-height / 2;
|
||||
display: block;
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
width: $vue-multiselect-min-height;
|
||||
height: $vue-multiselect-min-height;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: ($vue-multiselect-arrow-padding) $vue-multiselect-arrow-padding;
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.multiselect__select:before {
|
||||
position: relative;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
color: $vue-multiselect-arrow-color;
|
||||
border-style: solid;
|
||||
border-width: $vue-multiselect-arrow-size $vue-multiselect-arrow-size 0 $vue-multiselect-arrow-size;
|
||||
border-color: $vue-multiselect-arrow-color transparent transparent transparent;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.multiselect__placeholder {
|
||||
color: $vue-multiselect-placeholder-color;
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.multiselect--active .multiselect__placeholder {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.multiselect__content-wrapper {
|
||||
position: absolute;
|
||||
display: block;
|
||||
background: $vue-multiselect-bg;
|
||||
width: 100%;
|
||||
max-height: 240px;
|
||||
overflow: auto;
|
||||
border: $vue-multiselect-border-width solid $vue-multiselect-border-color;
|
||||
border-top: none;
|
||||
border-bottom-left-radius: $vue-multiselect-border-radius;
|
||||
border-bottom-right-radius: $vue-multiselect-border-radius;
|
||||
z-index: 50;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.multiselect__content {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
min-width: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.multiselect--above .multiselect__content-wrapper {
|
||||
bottom: 100%;
|
||||
border-radius: $vue-multiselect-border-radius $vue-multiselect-border-radius 0 0;
|
||||
border-bottom: none;
|
||||
border-top: $vue-multiselect-border-width solid $vue-multiselect-border-color;
|
||||
}
|
||||
|
||||
.multiselect__content::webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.multiselect__element {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.multiselect__option {
|
||||
display: block;
|
||||
padding: $vue-multiselect-padding-y $vue-multiselect-padding-x;
|
||||
min-height: $vue-multiselect-min-height;
|
||||
line-height: $vue-multiselect-min-height / 2;
|
||||
text-decoration: none;
|
||||
text-transform: none;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.multiselect__option:after {
|
||||
top: 0;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
line-height: $vue-multiselect-min-height;
|
||||
padding-right: 12px;
|
||||
padding-left: 20px;
|
||||
font-family: inherit;
|
||||
font-size: $small-font-size;
|
||||
}
|
||||
|
||||
.multiselect__option--highlight {
|
||||
background: $vue-multiselect-option-highlight-bg;
|
||||
outline: none;
|
||||
color: $vue-multiselect-option-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect__option--highlight:after {
|
||||
content: attr(data-select);
|
||||
background: $vue-multiselect-option-highlight-bg;
|
||||
color: $vue-multiselect-option-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect__option--selected {
|
||||
background: $vue-multiselect-option-selected-bg;
|
||||
color: $vue-multiselect-option-selected-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.multiselect__option--selected:after {
|
||||
content: attr(data-selected);
|
||||
color: silver;
|
||||
}
|
||||
|
||||
.multiselect__option--selected.multiselect__option--highlight {
|
||||
background: $vue-multiselect-option-selected-highlight-bg;
|
||||
color: $vue-multiselect-option-selected-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect__option--selected.multiselect__option--highlight:after {
|
||||
background: $vue-multiselect-option-selected-highlight-bg;
|
||||
content: attr(data-deselect);
|
||||
color: $vue-multiselect-option-selected-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect--disabled {
|
||||
background: $vue-multiselect-disabled-bg;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.multiselect--disabled .multiselect__current,
|
||||
.multiselect--disabled .multiselect__select {
|
||||
background: $vue-multiselect-disabled-bg;
|
||||
color: $vue-multiselect-disabled-color;
|
||||
}
|
||||
|
||||
.multiselect__option--disabled {
|
||||
background: $vue-multiselect-disabled-bg;
|
||||
color: $vue-multiselect-disabled-color;
|
||||
cursor: text;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.multiselect__option--group {
|
||||
background: $vue-multiselect-disabled-bg;
|
||||
color: $vue-multiselect-disabled-color;
|
||||
|
||||
&.multiselect__option--highlight {
|
||||
background: $vue-multiselect-disabled-color;
|
||||
color: $vue-multiselect-disabled-bg;
|
||||
}
|
||||
|
||||
&.multiselect__option--highlight:after {
|
||||
background: $vue-multiselect-disabled-color;
|
||||
}
|
||||
}
|
||||
|
||||
.multiselect__option--disabled.multiselect__option--highlight {
|
||||
background: $vue-multiselect-disabled-bg;
|
||||
}
|
||||
|
||||
.multiselect__option--group-selected.multiselect__option--highlight {
|
||||
background: $vue-multiselect-option-selected-highlight-bg;
|
||||
color: $vue-multiselect-option-selected-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect__option--group-selected.multiselect__option--highlight:after {
|
||||
background: $vue-multiselect-option-selected-highlight-bg;
|
||||
content: attr(data-deselect);
|
||||
color: $vue-multiselect-option-selected-highlight-color;
|
||||
}
|
||||
|
||||
.multiselect-enter-active,
|
||||
.multiselect-leave-active {
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.multiselect-enter,
|
||||
.multiselect-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.multiselect__strong {
|
||||
margin-bottom: $vue-multiselect-padding-y;
|
||||
line-height: $vue-multiselect-min-height/2;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
// Spinner
|
||||
//--
|
||||
|
||||
.multiselect__spinner {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: $vue-multiselect-min-height;
|
||||
height: $vue-multiselect-min-height;
|
||||
display: block;
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: $vue-multiselect-spinner-margin 0 0 $vue-multiselect-spinner-margin;
|
||||
width: $vue-multiselect-spinner-size;
|
||||
height: $vue-multiselect-spinner-size;
|
||||
border-radius: 100%;
|
||||
border: $vue-multiselect-spinner-thickness solid transparent;
|
||||
border-top-color: $vue-multiselect-spinner-color;
|
||||
box-shadow: 0 0 0 1px transparent;
|
||||
background: $vue-multiselect-bg;
|
||||
}
|
||||
|
||||
&:before {
|
||||
animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
&:after {
|
||||
animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spinning {
|
||||
from {
|
||||
transform: rotate(0)
|
||||
}
|
||||
to {
|
||||
transform: rotate(2turn)
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
// Loading state
|
||||
//--
|
||||
|
||||
.multiselect__loading-enter-active,
|
||||
.multiselect__loading-leave-active {
|
||||
transition: opacity 0.4s ease-in-out;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.multiselect__loading-enter,
|
||||
.multiselect__loading-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
// RTL adjustments
|
||||
//--
|
||||
|
||||
*[dir="rtl"] {
|
||||
.multiselect {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.multiselect__select {
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
.multiselect__tags {
|
||||
padding: $vue-multiselect-padding-y $vue-multiselect-padding-y 0 $vue-multiselect-min-height;
|
||||
}
|
||||
|
||||
.multiselect__content {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.multiselect__option:after {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.multiselect__clear {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
.multiselect__spinner {
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
// @see https://github.com/shentao/vue-multiselect/issues/718#issuecomment-471195859
|
||||
|
||||
.multiselect__placeholder {
|
||||
color: $vue-multiselect-placeholder-color;
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
padding-top: 0;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
// is-valid / is-invalid state handling
|
||||
// @see node_modules/bootstrap/scss/_forms.scss:262
|
||||
@each $state, $data in $form-validation-states {
|
||||
$color: map-get($data, color);
|
||||
$icon: map-get($data, icon);
|
||||
.form-group.is-#{$state} .multiselect__tags {
|
||||
border-color: $color;
|
||||
|
||||
@if $enable-validation-icons {
|
||||
padding-right: $form-select-feedback-icon-padding-end;
|
||||
background: escape-svg($icon) $form-select-bg no-repeat $form-select-feedback-icon-position / $form-select-feedback-icon-size;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-color: $color;
|
||||
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
declare module 'vue-multiselect' {
|
||||
// Type definitions for Vue-Multislect 2.1.0
|
||||
// Definitions by: Akshay Jat https://github.com/akki-jat
|
||||
|
||||
import { VueConstructor } from 'vue';
|
||||
|
||||
|
||||
declare class Multiselect extends VueConstructor { }
|
||||
declare class multiselectMixin extends VueConstructor { }
|
||||
declare class pointerMixin extends VueConstructor { }
|
||||
|
||||
export default Multiselect;
|
||||
export { Multiselect, multiselectMixin, pointerMixin };
|
||||
}
|
||||
@@ -129,7 +129,18 @@
|
||||
</div>
|
||||
<div class="row gx-0">
|
||||
<div class="col-9 d-grid">
|
||||
<b-form-select v-model="selectedCommand"
|
||||
<v-multiselect
|
||||
v-model="selectedCommand"
|
||||
:allow-empty="false"
|
||||
:options="compiledCommandList"
|
||||
:group-select="true"
|
||||
group-values="values"
|
||||
group-label="category"
|
||||
label="title"
|
||||
track-by="value"
|
||||
>
|
||||
</v-multiselect>
|
||||
<!--<b-form-select v-model="selectedCommand"
|
||||
><b-form-select-option-group
|
||||
v-for="cgroup in commandList"
|
||||
:key="cgroup['category']"
|
||||
@@ -142,7 +153,7 @@
|
||||
}}{{ citem.possible ? "" : "(불가)" }}</b-form-select-option
|
||||
>
|
||||
</b-form-select-option-group></b-form-select
|
||||
>
|
||||
>-->
|
||||
</div>
|
||||
<div class="col-3 d-grid">
|
||||
<b-button @click="reserveCommand()" variant="primary">실행</b-button>
|
||||
@@ -163,6 +174,7 @@ import { parseTime } from "./util/parseTime";
|
||||
import { parseYearMonth } from "./util/parseYearMonth";
|
||||
import { sammoAPI } from "./util/sammoAPI";
|
||||
import { unwrap_any } from "./util/unwrap_any";
|
||||
|
||||
type commandItem = {
|
||||
title: string;
|
||||
compensation: number;
|
||||
@@ -419,7 +431,7 @@ export default defineComponent({
|
||||
const pressed = Array.from<boolean>({ length: maxTurn }).fill(false);
|
||||
pressed[0] = true;
|
||||
|
||||
const selectedCommand = "휴식";
|
||||
const selectedCommand = "휴식";//FIXME: 새 구성에 따르면 Object임.
|
||||
|
||||
const emptyTurn: TurnObjWithTime[] = Array.from<TurnObjWithTime>({
|
||||
length: maxTurn,
|
||||
@@ -432,12 +444,43 @@ export default defineComponent({
|
||||
time: "",
|
||||
});
|
||||
|
||||
const compiledCommandList: {
|
||||
category: string;
|
||||
values: {
|
||||
title: string;
|
||||
value: null | string;
|
||||
reqArg: boolean,
|
||||
possible?: boolean;
|
||||
compensation?: number;
|
||||
}[];
|
||||
}[] = [];
|
||||
for (const category of commandList) {
|
||||
|
||||
const categoryList: (typeof compiledCommandList)[0]['values'] = [];
|
||||
for (const [commandValue, commandInfo] of Object.entries(
|
||||
category.values
|
||||
)) {
|
||||
categoryList.push({
|
||||
reqArg: commandInfo.reqArg,
|
||||
title: commandInfo.title,
|
||||
value: commandValue,
|
||||
possible: commandInfo.possible,
|
||||
compensation: commandInfo.compensation,
|
||||
});
|
||||
}
|
||||
compiledCommandList.push({
|
||||
category: category.category,
|
||||
values: categoryList,
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
maxTurn,
|
||||
flippedMaxTurn: 16,
|
||||
viewMaxTurn: 16,
|
||||
maxPushTurn,
|
||||
commandList,
|
||||
compiledCommandList,
|
||||
serverNow: formatTime(serverNowObj, "HH:mm:ss"),
|
||||
timeDiff,
|
||||
pressed,
|
||||
@@ -456,6 +499,7 @@ export default defineComponent({
|
||||
@import "../scss/variables.scss";
|
||||
@import "../scss/bootswatch_custom_variables.scss";
|
||||
@import "../../node_modules/bootstrap5/scss/bootstrap-utilities.scss";
|
||||
@import "vue-select/src/scss/vue-select.scss";
|
||||
|
||||
.commandPad {
|
||||
background-color: $gray-900;
|
||||
@@ -491,7 +535,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
.month_pad:hover{
|
||||
.month_pad:hover {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ import { createApp } from 'vue'
|
||||
import ReservedCommand from './ReservedCommand.vue';
|
||||
import BootstrapVue3 from 'bootstrap-vue-3'
|
||||
import { setAxiosXMLHttpRequest } from './util/setAxiosXMLHttpRequest';
|
||||
|
||||
import Multiselect from 'vue-multiselect';
|
||||
|
||||
setAxiosXMLHttpRequest();
|
||||
|
||||
createApp(ReservedCommand).use(BootstrapVue3).mount('#reservedCommandList')
|
||||
createApp(ReservedCommand).use(BootstrapVue3).component('v-multiselect', Multiselect).mount('#reservedCommandList')
|
||||
@@ -23,6 +23,7 @@
|
||||
"@types/linkifyjs": "^2.1.4",
|
||||
"@types/select2": "^4.0.54",
|
||||
"@types/summernote": "^0.8.6",
|
||||
"@types/vue-select": "^3.16.0",
|
||||
"async-validator": "^4.0.3",
|
||||
"axios": "^0.21.4",
|
||||
"bootstrap": "^4.6.0",
|
||||
|
||||
Reference in New Issue
Block a user