bugfix for AppSelectBox
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ref, PropType } from 'vue';
|
||||
import { ref, PropType, watchEffect } from 'vue';
|
||||
import { api } from 'boot/axios';
|
||||
import DetailFieldTable from './dialog/DetailFieldTable.vue';
|
||||
|
||||
@@ -33,6 +33,9 @@ export default {
|
||||
filter: String,
|
||||
filterInitRowsFunc: {
|
||||
type: Function as PropType<(app: IAppDisplay) => boolean>,
|
||||
},
|
||||
updateSelectApp: {
|
||||
type: Function
|
||||
}
|
||||
},
|
||||
setup(props) {
|
||||
@@ -44,6 +47,12 @@ export default {
|
||||
{ name: 'createdate', label: '作成日時', field: 'createdate', align: 'left' }
|
||||
];
|
||||
|
||||
watchEffect(()=>{
|
||||
if (selected.value && selected.value[0] && props.updateSelectApp) {
|
||||
props.updateSelectApp(selected.value[0])
|
||||
}
|
||||
});
|
||||
|
||||
const fetchApps = async () => {
|
||||
const res = await api.get('api/v1/allapps');
|
||||
return res.data.apps.map((item: any) => ({
|
||||
|
||||
Reference in New Issue
Block a user