no message

This commit is contained in:
kuaifan 2025-08-06 10:53:06 +08:00
parent eabb897f96
commit 27b64df870
2 changed files with 20 additions and 9 deletions

View File

@ -41,15 +41,16 @@ export default {
return {
visible: false,
list: [], // : [{label: '', value: ''}]
size: 'small', //
active: '', //
activeClick: false, //
onUpdate: null, //
scrollHide: true, //
tickShow: true, // true active === undefined false
maxHeight: 0, //
language: true, // item.labeltrue
list: [], // : [{label: '', value: ''}]
size: 'small', //
active: '', //
activeClick: false, //
onVisibleChange: null, //
onUpdate: null, //
scrollHide: true, //
tickShow: true, // true active === undefined false
maxHeight: 0, //
language: true, // item.labeltrue
scrollTarget: null,
menuTarget: null,
@ -87,6 +88,7 @@ export default {
this.size = ['small', 'medium', 'large'].includes(data.size) ? data.size : 'small';
this.active = data.active && this.list.find(item => item.value === data.active) ? data.active : '';
this.activeClick = typeof data.activeClick === "boolean" ? data.activeClick : false;
this.onVisibleChange = typeof data.onVisibleChange === "function" ? data.onVisibleChange : null;
this.onUpdate = typeof data.onUpdate === "function" ? data.onUpdate : null;
this.scrollHide = typeof data.scrollHide === "boolean" ? data.scrollHide : true;
this.tickShow = typeof data.tickShow === "boolean" ? data.tickShow : (typeof data.active !== "undefined");
@ -120,6 +122,9 @@ export default {
if (!v) {
this.removeEventListeners()
}
if (typeof this.onVisibleChange === "function") {
this.onVisibleChange(v);
}
}
},
@ -218,6 +223,9 @@ export default {
},
getStyleComputedProperty(element, property) {
if (!element || !(element instanceof HTMLElement)) {
return null;
}
const css = window.getComputedStyle(element, null);
return css[property];
}

View File

@ -460,6 +460,9 @@ export default {
},
getStyleComputedProperty(element, property) {
if (!element || !(element instanceof HTMLElement)) {
return null;
}
const css = window.getComputedStyle(element, null);
return css[property];
},