feat: asset详细视图 基本功能实现

This commit is contained in:
zhangyu
2021-10-13 18:24:09 +08:00
parent 3029a0db41
commit cfca72366c
35 changed files with 264 additions and 65 deletions

View File

@@ -8,12 +8,62 @@ export default {
},
tableId: {
type: String
}
},
detailViewRightObj: {},
orderByFa: {}
},
data () {
return {
orderBy: '',
orderType: 'ascending',
renderFirst: ''
}
},
methods: {
detailViewRightShow (item) {
this.$emit('detailViewRightShow', item)
},
orderTypeChange () {
if (this.orderType === 'ascending') {
this.orderType = 'descending'
} else {
this.orderType = 'ascending'
}
}
},
watch: {
orderByFa: {
immediate: true,
handler (n) {
console.log(n)
const index = n.indexOf('-')
this.renderFirst = false
if (index !== -1) {
this.orderBy = n.slice(index + 1)
this.orderType = 'descending'
} else {
this.orderBy = n
this.orderType = 'ascending'
}
setTimeout(() => {
this.renderFirst = true
})
}
},
orderBy: {
handler (n) {
console.log(n)
if (this.renderFirst) {
this.$emit('orderDetail', this.orderBy, this.orderType)
}
}
},
orderType: {
handler (n) {
if (this.renderFirst) {
this.$emit('orderDetail', this.orderBy, n)
}
}
}
}
}