mirror of
https://github.com/jumpserver/lina.git
synced 2025-04-27 11:10:51 +00:00
62 lines
1.0 KiB
Vue
62 lines
1.0 KiB
Vue
<template>
|
|
<div />
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'BaseFormatter',
|
|
props: {
|
|
reload: {
|
|
type: Function,
|
|
default: ({ reloading }) => ({})
|
|
},
|
|
row: {
|
|
type: Object,
|
|
default: () => ({})
|
|
},
|
|
col: {
|
|
type: Object,
|
|
default: () => ({})
|
|
},
|
|
cellValue: {
|
|
type: [String, Boolean, Number, Object, Array],
|
|
default: null
|
|
},
|
|
tableData: {
|
|
type: Array,
|
|
default: () => ([])
|
|
},
|
|
url: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
column: {
|
|
type: Object,
|
|
default: null
|
|
},
|
|
index: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
formatterArgsDefault: {
|
|
type: Object,
|
|
default: () => ({})
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
formatterArgs: Object.assign(this.formatterArgsDefault, this.col.formatterArgs)
|
|
}
|
|
},
|
|
methods: {
|
|
cellValueIsLabelChoice() {
|
|
return typeof this.cellValue === 'object' && this.cellValue['value'] !== undefined
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|