|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <ProDialog title="查看" v-model="visible" destroy-on-close draggable> | 
|---|
|  |  |  | <json-viewer | 
|---|
|  |  |  | :copyable="true" | 
|---|
|  |  |  | :boxed="true" | 
|---|
|  |  |  | :preview-mode="true" | 
|---|
|  |  |  | :value="form.json" | 
|---|
|  |  |  | expanded | 
|---|
|  |  |  | ></json-viewer> | 
|---|
|  |  |  | <ProForm :model="form" ref="dialogForm" label-width="120px"> | 
|---|
|  |  |  | <ProFormItemV2 | 
|---|
|  |  |  | v-for="(item, index) in jsonList" | 
|---|
|  |  |  | :label="`${item}:`" | 
|---|
|  |  |  | :key="index" | 
|---|
|  |  |  | prop="electronSignAccesses" | 
|---|
|  |  |  | required | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <json-viewer | 
|---|
|  |  |  | :copyable="true" | 
|---|
|  |  |  | :boxed="true" | 
|---|
|  |  |  | :preview-mode="true" | 
|---|
|  |  |  | :value="form.json?.[item]" | 
|---|
|  |  |  | expanded | 
|---|
|  |  |  | ></json-viewer> | 
|---|
|  |  |  | </ProFormItemV2> | 
|---|
|  |  |  | </ProForm> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <template #footer> | 
|---|
|  |  |  | <span class="dialog-footer"> | 
|---|
|  |  |  | <el-button @click="emit('onCancel')">取 消</el-button> | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup lang="ts"> | 
|---|
|  |  |  | import { ProDialog } from '@bole-core/components'; | 
|---|
|  |  |  | import { ProDialog, ProForm, ProFormItemV2 } from '@bole-core/components'; | 
|---|
|  |  |  | import JsonViewer from 'vue-json-viewer'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | defineOptions({ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const form = defineModel<Form>('form'); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const jsonList = computed(() => { | 
|---|
|  |  |  | return Object.keys(form.value.json); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const emit = defineEmits<{ | 
|---|
|  |  |  | (e: 'onConfirm'): void; | 
|---|
|  |  |  | (e: 'onCancel'): void; | 
|---|