10 changed files with 207 additions and 39 deletions
@ -0,0 +1,23 @@ |
|||
<template> |
|||
<!-- <template v-if="typeof value === 'object' && value.componentType && col.value.bindModelValue"> |
|||
<component :is="col.value.componentType" v-bind="col.value.attrs" v-model="props.getRow(table.rows, row[props.rowKey], false)[col.name]"></component> |
|||
</template> |
|||
<template v-else-if="col.value && typeof col.value === 'object' && col.value.componentType"> |
|||
<component :is="col.value.componentType" v-bind="col.value.attrs"></component> |
|||
</template> |
|||
<template v-else> |
|||
<span v-dompurify-html="!Tools.isEmpty(col.value) ? col.value : ''"></span> |
|||
</template> --> |
|||
111 |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
const props = defineProps({ |
|||
value: { |
|||
type: [Object, String, Number], |
|||
default: () => { |
|||
return ''; |
|||
}, |
|||
}, |
|||
}); |
|||
</script> |
@ -0,0 +1,27 @@ |
|||
<template> |
|||
<q-tr v-for="(appendRow, rowIndex) in props.grid.props.appendRows" :key="rowIndex" :no-hover="true" :class="''"> |
|||
<q-td v-for="(col, colIndex) in appendRow" :key="colIndex" :rowspan="col['rowSpan'] ? col['rowSpan'] : 1" :colspan="col['colSpan'] ? col['colSpan'] : 1"> |
|||
<template v-if="typeof col['value'] === 'function'"> |
|||
<GridAppendContent :value="col.value({ grid: props.grid, rows: props.grid.getRows() })"></GridAppendContent> |
|||
</template> |
|||
<template v-else> |
|||
<span v-dompurify-html="!Tools.isEmpty(col['value']) ? col['value'] : ''"></span> |
|||
</template> |
|||
</q-td> |
|||
</q-tr> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import { Tools } from '@/platform'; |
|||
import GridAppendContent from './GridAppendContent.vue'; |
|||
|
|||
const props = defineProps({ |
|||
grid: { |
|||
// 表格实例 |
|||
type: Object, |
|||
default: () => { |
|||
return {}; |
|||
}, |
|||
}, |
|||
}); |
|||
</script> |
Loading…
Reference in new issue