fix: bug#19588

* fix: 菜单bug

* fix: bug#19588
This commit is contained in:
qiaochuLei 2023-11-02 10:09:32 +08:00 committed by GitHub
parent d2fd316ef5
commit 8d941fd875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 15 deletions

View File

@ -158,14 +158,14 @@ watch(
if (props.type === 'device') { if (props.type === 'device') {
detail(id as string).then((resp) => { detail(id as string).then((resp) => {
loading.value = false loading.value = false
instanceStore.setCurrent(resp.result) // instanceStore.setCurrent(resp.result)
value.value = resp.result.metadata value.value = resp.result.metadata
hideVirtualRule(resp.result.metadata) hideVirtualRule(resp.result.metadata)
}); });
} else { } else {
productDetail(id as string).then((resp) => { productDetail(id as string).then((resp) => {
loading.value = false loading.value = false
productStore.setCurrent(resp.result) // productStore.setCurrent(resp.result)
value.value = resp.result.metadata value.value = resp.result.metadata
hideVirtualRule(resp.result.metadata) hideVirtualRule(resp.result.metadata)
}); });

View File

@ -59,7 +59,7 @@
max-height="350px" max-height="350px"
v-model:value="form.data.permissions" v-model:value="form.data.permissions"
:disabled="props.mode === '查看'" :disabled="props.mode === '查看'"
:key="form.data.id || ''" :btnId="form.data.id "
/> />
</j-form-item> </j-form-item>
<j-form-item label="说明" name="describe"> <j-form-item label="说明" name="describe">

View File

@ -50,7 +50,7 @@ import { Form } from 'jetlinks-ui-components';
Form.useInjectFormItemContext(); Form.useInjectFormItemContext();
const props = defineProps<{ const props = defineProps<{
key: string; btnId: string;
value: any[]; value: any[];
firstWidth: number; firstWidth: number;
maxHeight: string; maxHeight: string;
@ -77,17 +77,17 @@ const permission = reactive({
init: () => { init: () => {
permission.getList(); permission.getList();
watch( // watch(
() => props.key, // () => props.btnId,
() => { // () => {
nextTick(() => { // nextTick(() => {
permission.list = permission.makeList( // permission.list = permission.makeList(
props.value, // props.value,
permission.sourceList, // permission.sourceList,
); // );
}); // });
}, // },
); // );
}, },
// //
getList: () => { getList: () => {