export default {
props: {
tableData: {
type: Array
},
api: {
type: String
tableId: {
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.orderBy = n
setTimeout(() => {
this.renderFirst = true
})
orderBy: {
if (this.renderFirst) {
this.$emit('orderDetail', this.orderBy, this.orderType)
orderType: {
this.$emit('orderDetail', this.orderBy, n)