11<template >
2- <div class =" vcron -select-container " >
2+ <div class =" cl -select" >
33 <span
4- class =" vcron-select-input "
5- :class =" { 'vcron-select- disabled' : disabled }"
4+ class =" cl-btn "
5+ :class =" { disabled: disabled }"
66 @click ="
77 () => {
88 if (!disabled) toggleMenu()
1212 >
1313 {{ selection ?? selectedStr }}
1414
15- <span v-if =" clearable && !isEmpty" @click =" clear" >✕ ; </span >
15+ <span v-if =" clearable && !isEmpty" class = " cl-btn-clear " @click =" clear" >✕ ; </span >
1616 </span >
1717
18- <div v-if =" menu" class =" vcron-select-list " :style =" floatingStyles" ref =" floating" >
19- <div class =" vcron-select -row" v-for =" (row, i) in itemRows" :key =" i" >
18+ <div v-if =" menu" class =" cl-menu " :style =" floatingStyles" ref =" floating" >
19+ <div class =" cl -row" v-for =" (row, i) in itemRows" :key =" i" >
2020 <div
2121 v-for =" (item, j) in row"
2222 :key =" i + '-' + j"
23- class =" vcron-select -col"
24- :class =" { 'vcron-select- selected' : has(item) }"
23+ class =" cl -col"
24+ :class =" { selected: has(item) }"
2525 @click =" select(item)"
2626 @click.stop =" multiple ? () => {} : toggleMenu()"
2727 >
@@ -84,50 +84,54 @@ export default defineComponent({
8484 </script >
8585
8686<style >
87- .vcron -select-container {
87+ .cl -select {
8888 display : inline-block ;
8989 position : relative ;
90- margin : 0 0.2 em ;
90+ /* margin: 0.2em 0.3em; */
9191}
9292
93- .vcron-select-input {
94- display : inline-block ;
95- border-radius : 3px ;
93+ .cl-btn {
94+ display : inline-flex ;
95+ align-items : center ;
96+ color : black ;
97+ background-color : #eee ;
9698 border : 1px solid #ddd ;
99+ border-radius : 3px ;
100+ margin : 0.2em 0.3em ;
101+ padding : 0.1em 0.5em ;
97102 user-select : none ;
98- padding : 0 0.5em ;
99- color : black ;
103+ min-height : 1.2em ;
100104}
101105
102- .vcron-select- disabled {
106+ .cl-btn. disabled {
103107 background-color : #ccc ;
104108 color : #444 ;
105109}
106110
107- :not (.vcron-select-disabled ).vcron-select-input {
108- background-color : #eee ;
111+ .cl-btn :not (.disabled ):hover {
112+ /* border: 1px solid #ccc; */
113+ background-color : #ddd ;
109114}
110115
111- :not (.vcron-select-disabled ).vcron-select-input :hover {
112- border : 1px solid #ccc ;
113- background-color : #ddd ;
116+ .cl-btn-clear {
117+ font-size : 1.2em ;
118+ margin-left : 3px ;
119+ line-height : 1 ;
114120}
115121
116- .vcron-select-list {
117- margin : 0 ;
118- padding : 0 ;
122+ .cl-menu {
119123 box-shadow : 2px 2px 3px rgba (0 , 0 , 0 , 0.5 );
120124 border : 1px solid #aaa ;
121125 background-color : #eee ;
122126 list-style : none ;
123127 z-index : 100 ;
124128}
125129
126- .vcron-select -row {
130+ .cl -row {
127131 display : flex ;
128132}
129133
130- .vcron-select -col {
134+ .cl -col {
131135 flex-grow : 1 ;
132136 flex-basis : 0% ;
133137 display : inline-block ;
@@ -138,17 +142,17 @@ export default defineComponent({
138142 color : black ;
139143}
140144
141- .vcron-select -col :hover {
145+ .cl -col :hover {
142146 background-color : rgb (52 , 147 , 190 );
143147 color : white ;
144148}
145149
146- .vcron-select- selected {
150+ .cl-col. selected {
147151 background-color : rgb (43 , 108 , 138 );
148152 color : white ;
149153}
150154
151- .vcron-select- selected :hover {
155+ .cl-col. selected :hover {
152156 background-color : rgb (43 , 108 , 138 );
153157 color : white ;
154158}
0 commit comments