File tree Expand file tree Collapse file tree
src/packages/drop-down/source Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 v-model =" choosenValue"
5252 :options =" options"
5353 :multiple =" multiple"
54+ :maxHeight =" maxHeight"
5455 :borderRadius =" borderRadius"
5556 :checkBoxBackground =" checkBoxBackground"
5657 :dropDownListForeground =" dropDownListForeground"
Original file line number Diff line number Diff line change @@ -160,13 +160,19 @@ export default {
160160 },
161161 methods: {
162162 stylesInit () {
163+ const hasMaxHeight =
164+ this .maxHeight !== ' ' &&
165+ this .maxHeight !== undefined &&
166+ this .maxHeight !== null ;
163167 this .styles .listContainer .borderRadius = ` ${ this .borderRadius } px` ;
164168 this .styles .listContainer .background = this .dropDownListBackground ;
165169 this .styles .listContainer .top = this .showStatus .top ;
166170 this .styles .listContainer .bottom = this .showStatus .bottom ;
167171 this .styles .listContainer .height = this .showStatus .height ;
168- this .styles .listContainer .maxHeight = ` ${ this .showStatus .maxHeight } px` ;
169- this .styles .listContainer .overflow = this .showStatus .overflow ;
172+ this .styles .listContainer .maxHeight = this .maxHeight ;
173+ this .styles .listContainer .overflow = hasMaxHeight
174+ ? ' auto'
175+ : this .showStatus .overflow ;
170176 this .styles .title .color = this .dropDownListForeground ;
171177 },
172178 valueTrigger (val ) {
You can’t perform that action at this time.
0 commit comments