喀左大屏改造,追加监控轮播大屏组件

This commit is contained in:
aixianling
2024-02-01 19:10:03 +08:00
parent f9684bb0c4
commit 06eb7a30bf
6 changed files with 104 additions and 15 deletions

View File

@@ -59,7 +59,8 @@ export default {
default: () => ({})
},
filterable: Boolean,
disabled: Boolean
disabled: Boolean,
condition: Function
},
data() {
return {
@@ -89,11 +90,11 @@ export default {
},
methods: {
getOptions() {
this.instance?.post(this.action, null, {
this.action && this.instance?.post(this.action, null, {
params: {size: 999}
}).then(res => {
if (res?.data) {
this.options = res.data.records || res.data
this.options = (res.data.records || res.data || []).filter(e => !this.condition || this.condition(e))
}
}).then(() => this.handleSelect())
},