forked from smeup/ketchup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request smeup#2055 from apuliasoft/feat/codver-cases
feat: uipopup blank tpk case
- Loading branch information
Showing
9 changed files
with
651 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...owcase/src/views/components/advanced/datatable/examples/DatatableCommandsWithEmptyObj.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<template> | ||
<div> | ||
<kup-lazy | ||
ref="dataTable" | ||
component-name="kup-data-table" | ||
:data.prop="data" | ||
></kup-lazy> | ||
|
||
<ul> | ||
<li v-if="action" | ||
>Clicked action: text: {{ action.text }} - icon: {{ action.icon }}</li | ||
> | ||
<li v-if="actionIndex >= 0">Action index: {{ actionIndex }}</li> | ||
<li v-if="actionType">Action type: {{ actionType }}</li> | ||
<li v-if="row">Row: {{ row }}</li> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { dataTableWithEmptyObjCommands } from '@/mock/dataTable'; | ||
export default { | ||
data() { | ||
return { | ||
data: { | ||
data: dataTableWithEmptyObjCommands, | ||
commands: [ | ||
{ | ||
icon: 'magnify', | ||
obj: { | ||
k: '', | ||
p: '', | ||
t: '', | ||
}, | ||
text: 'Dettaglio', | ||
}, | ||
], | ||
['onkup-datatable-rowaction-item-click']: (e) => { | ||
const action = e.detail.action; | ||
const index = e.detail.index; | ||
const type = e.detail.type; | ||
const row = e.detail.row; | ||
this.actionType = type; | ||
this.row = row; | ||
if ('default' === type || 'variable' === type) { | ||
this.action = action; | ||
this.actionIndex = index; | ||
} else if ('expander' === type) { | ||
this.action = null; | ||
this.actionIndex = -1; | ||
e.target.data = { ...e.target.data }; | ||
} | ||
}, | ||
}, | ||
action: null, | ||
actionIndex: -1, | ||
actionType: null, | ||
row: null, | ||
}; | ||
}, | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
ul { | ||
margin-top: 1rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.