🎨 粘贴安全策略提示.
This commit is contained in:
@@ -272,7 +272,9 @@ export default class LogAppender implements ILogAppender {
|
||||
.filter(Boolean)
|
||||
.forEach(s => s.dispose());
|
||||
// 卸载终端
|
||||
s.terminal?.dispose();
|
||||
setTimeout(() => {
|
||||
s.terminal?.dispose();
|
||||
}, 300);
|
||||
} catch (e) {
|
||||
// 卸载可能会报错
|
||||
}
|
||||
|
||||
@@ -49,7 +49,10 @@
|
||||
'field-value',
|
||||
field.ellipsis ? 'field-value-ellipsis' : ''
|
||||
]">
|
||||
<slot :name="field.slotName" :record="item" :index="index" :key="item[key as string]">
|
||||
<slot :name="field.slotName"
|
||||
:record="item"
|
||||
:index="index"
|
||||
:rowKey="item[rowKey as string]">
|
||||
<a-tooltip v-if="field.tooltip" :content="item[field.dataIndex]">
|
||||
<span v-if="field.render" v-html="field.render({ record: item, index })" />
|
||||
<span v-else>{{ item[field.dataIndex] }}</span>
|
||||
@@ -87,7 +90,7 @@
|
||||
|
||||
const props = defineProps<CardProps & {
|
||||
index: number,
|
||||
item: CardRecord
|
||||
item: CardRecord,
|
||||
}>();
|
||||
const emits = defineEmits(['emitter']);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</a-col>
|
||||
<!-- 数据卡片 -->
|
||||
<a-col v-for="(item, index) in list"
|
||||
:key="item[key]"
|
||||
:key="item[rowKey]"
|
||||
v-bind="cardLayoutCols"
|
||||
:class="{ 'disabled-col': item.disabled === true }">
|
||||
<!-- 右键菜单 -->
|
||||
@@ -41,12 +41,18 @@
|
||||
@emitter="dispatchEmitter">
|
||||
<!-- 自定义插槽 -->
|
||||
<template v-for="slot in Object.keys($slots)" :key="slot" #[slot]>
|
||||
<slot :name="slot" :record="item" :index="index" :key="item[key]" />
|
||||
<slot :name="slot"
|
||||
:record="item"
|
||||
:index="index"
|
||||
:rowKey="item[rowKey]" />
|
||||
</template>
|
||||
</card-item>
|
||||
<!-- 右键菜单 -->
|
||||
<template v-if="contextMenu" #content>
|
||||
<slot name="contextMenu" :record="item" :index="index" :key="item[key]" />
|
||||
<slot name="contextMenu"
|
||||
:record="item"
|
||||
:index="index"
|
||||
:rowKey="item[rowKey]" />
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</a-col>
|
||||
@@ -82,7 +88,7 @@
|
||||
import useEmitter from '@/hooks/emitter';
|
||||
|
||||
const props = withDefaults(defineProps<CardProps>(), {
|
||||
key: 'id',
|
||||
rowKey: 'id',
|
||||
pagination: false,
|
||||
loading: false,
|
||||
cardHeight: '100%',
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { CardFieldConfig, CardPosition, CardRecord, ColResponsiveValue, Han
|
||||
|
||||
// 卡片属性
|
||||
export interface CardProps {
|
||||
key?: string;
|
||||
rowKey?: string;
|
||||
pagination?: PaginationProps | boolean;
|
||||
loading?: boolean;
|
||||
fieldConfig?: CardFieldConfig;
|
||||
|
||||
Reference in New Issue
Block a user