mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-06 13:15:35 +00:00
no message
This commit is contained in:
parent
eabb897f96
commit
27b64df870
@ -41,15 +41,16 @@ export default {
|
|||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
|
|
||||||
list: [], // 数据列表: [{label: '', value: ''}]
|
list: [], // 数据列表: [{label: '', value: ''}]
|
||||||
size: 'small', // 下拉框大小
|
size: 'small', // 下拉框大小
|
||||||
active: '', // 当前选中的值
|
active: '', // 当前选中的值
|
||||||
activeClick: false, // 当前选中的值是否可以被点击
|
activeClick: false, // 当前选中的值是否可以被点击
|
||||||
onUpdate: null, // 选中后的回调函数
|
onVisibleChange: null, // 可见性变化的回调函数
|
||||||
scrollHide: true, // 滚动立即隐藏
|
onUpdate: null, // 选中后的回调函数
|
||||||
tickShow: true, // 是否显示打勾(默认为:true,如果 active === undefined 默认为:false)
|
scrollHide: true, // 滚动立即隐藏
|
||||||
maxHeight: 0, // 滚动区域最大高度
|
tickShow: true, // 是否显示打勾(默认为:true,如果 active === undefined 默认为:false)
|
||||||
language: true, // 是否国际化 item.label(默认:true)
|
maxHeight: 0, // 滚动区域最大高度
|
||||||
|
language: true, // 是否国际化 item.label(默认:true)
|
||||||
|
|
||||||
scrollTarget: null,
|
scrollTarget: null,
|
||||||
menuTarget: null,
|
menuTarget: null,
|
||||||
@ -87,6 +88,7 @@ export default {
|
|||||||
this.size = ['small', 'medium', 'large'].includes(data.size) ? data.size : 'small';
|
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.active = data.active && this.list.find(item => item.value === data.active) ? data.active : '';
|
||||||
this.activeClick = typeof data.activeClick === "boolean" ? data.activeClick : false;
|
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.onUpdate = typeof data.onUpdate === "function" ? data.onUpdate : null;
|
||||||
this.scrollHide = typeof data.scrollHide === "boolean" ? data.scrollHide : true;
|
this.scrollHide = typeof data.scrollHide === "boolean" ? data.scrollHide : true;
|
||||||
this.tickShow = typeof data.tickShow === "boolean" ? data.tickShow : (typeof data.active !== "undefined");
|
this.tickShow = typeof data.tickShow === "boolean" ? data.tickShow : (typeof data.active !== "undefined");
|
||||||
@ -120,6 +122,9 @@ export default {
|
|||||||
if (!v) {
|
if (!v) {
|
||||||
this.removeEventListeners()
|
this.removeEventListeners()
|
||||||
}
|
}
|
||||||
|
if (typeof this.onVisibleChange === "function") {
|
||||||
|
this.onVisibleChange(v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -218,6 +223,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getStyleComputedProperty(element, property) {
|
getStyleComputedProperty(element, property) {
|
||||||
|
if (!element || !(element instanceof HTMLElement)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
const css = window.getComputedStyle(element, null);
|
const css = window.getComputedStyle(element, null);
|
||||||
return css[property];
|
return css[property];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -460,6 +460,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getStyleComputedProperty(element, property) {
|
getStyleComputedProperty(element, property) {
|
||||||
|
if (!element || !(element instanceof HTMLElement)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
const css = window.getComputedStyle(element, null);
|
const css = window.getComputedStyle(element, null);
|
||||||
return css[property];
|
return css[property];
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user