[Web] When the data source is not available list disables selection

This commit is contained in:
qianmoQ 2023-08-09 14:55:55 +08:00
parent fbb0ee12c7
commit 044a458ec5
2 changed files with 10 additions and 3 deletions

View File

@ -1,7 +1,10 @@
<template>
<div>
<Select v-model="applySource" style="width: 160px" :loading="loading" @on-change="handlerChangeValue">
<Option v-for="column in columns" :value="column.id + ':' + column.type" v-bind:key="column.id">
<Option v-for="column in columns"
:value="column.id + ':' + column.type"
v-bind:key="column.id"
:disabled="!column.available">
<Tooltip transfer :content="column.type">
<Avatar :src="'/static/images/plugin/' + column.type.split(' ')[0] + '.png'" size="small"/>
{{ column.name }}

View File

@ -68,8 +68,12 @@
</Poptip>
</Tooltip>
<Tooltip :content="$t('common.admin')" transfer>
<Button :disabled="currentUserId !== row.user.id" shape="circle" type="info" size="small" icon="md-construct"
:to="'/admin/source/' + row.id + '/manager'"/>
<Button :disabled="currentUserId !== row.user.id || !row.available"
shape="circle" type="info"
size="small"
icon="md-construct"
:to="'/admin/source/' + row.id + '/manager'">
</Button>
</Tooltip>
</Space>
</template>