|
|
@@ -74,6 +74,10 @@ export default {
|
|
|
filter: {
|
|
|
type: Function,
|
|
|
default: null
|
|
|
+ },
|
|
|
+ customTransform: {
|
|
|
+ type: Function,
|
|
|
+ default: null
|
|
|
}
|
|
|
},
|
|
|
data () {
|
|
|
@@ -199,9 +203,18 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
- transform ({ id, name, productId }) {
|
|
|
+ transform (device) {
|
|
|
+ const { id, name, productId } = device
|
|
|
+ if (this.customTransform) {
|
|
|
+ return {
|
|
|
+ id, name, productId,
|
|
|
+ ...this.customTransform(device)
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
- id, name, productId
|
|
|
+ id,
|
|
|
+ name,
|
|
|
+ productId
|
|
|
}
|
|
|
},
|
|
|
setCache (device, { key, ids, map, cache }) {
|