sk_fems_ui commit
This commit is contained in:
67
components/common/button/Buttons.vue
Normal file
67
components/common/button/Buttons.vue
Normal file
@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div>
|
||||
<component
|
||||
:is="buttonAuth.add ? 'BtnAddRow' : null"
|
||||
:btnActionsFnc="btnActionsFnc"
|
||||
/>
|
||||
<component
|
||||
:is="buttonAuth.remove ? 'BtnRemoveRow' : null"
|
||||
:btnActionsFnc="btnActionsFnc"
|
||||
/>
|
||||
<component
|
||||
:is="buttonAuth.save ? 'BtnSave' : null"
|
||||
:btnActionsFnc="btnActionsFnc"
|
||||
/>
|
||||
<component
|
||||
:is="buttonAuth.excel ? 'BtnExcelDownload' : null"
|
||||
:parentPrgmId="parentPrgmId"
|
||||
:gridName="bindingData"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex';
|
||||
import BtnAddRow from './BtnAddRow';
|
||||
import BtnRemoveRow from './BtnRemoveRow';
|
||||
import BtnSave from './BtnSave';
|
||||
import BtnExcelDownload from './BtnExcelDownload';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
parentPrgmId: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
bindingData: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
btnActionsFnc: {
|
||||
type: Function,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
components: {
|
||||
BtnAddRow,
|
||||
BtnRemoveRow,
|
||||
BtnSave,
|
||||
BtnExcelDownload,
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
buttonAuth(state) {
|
||||
return state.pageData[this.parentPrgmId][this.bindingData].buttonAuth;
|
||||
},
|
||||
}),
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({ setPageData: 'setPageData' }),
|
||||
getSearch() {
|
||||
this.setPageData({ isFind: true });
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
Reference in New Issue
Block a user