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