Browse Source

组件属性重命名及拆分属性

main
likunming 1 year ago
parent
commit
ae9b714b0a
  1. 14
      io.sc.platform.core.frontend/src/platform/components/grid/WGrid.vue

14
io.sc.platform.core.frontend/src/platform/components/grid/WGrid.vue

@ -28,7 +28,7 @@
<div class="flex-none">{{ title }}</div> <div class="flex-none">{{ title }}</div>
<div class="flex-1"> <div class="flex-1">
<w-toolbar <w-toolbar
v-bind="toolbarConfigre" v-bind="toolbarConfigure"
:buttons="buttons_" :buttons="buttons_"
:grid-prop="{ :grid-prop="{
gridSelected: table.selected, gridSelected: table.selected,
@ -87,7 +87,10 @@
</template> </template>
</template> </template>
<template #body="scope"> <template #body="scope">
<q-tr :props="scope" @click="rowClick($el, scope.row, scope.rowIndex)" @dblclick="rowDbClick($el, scope.row, scope.rowIndex)"> <template v-if="tree">
<TreeGridRow :cols="scope.cols" :data="scope.row"></TreeGridRow>
</template>
<q-tr v-else :props="scope" @click="rowClick($el, scope.row, scope.rowIndex)" @dblclick="rowDbClick($el, scope.row, scope.rowIndex)">
<q-td v-if="!attrs.selection || attrs.selection !== 'none'" class="text-center" style="padding: 0; width: 50px"> <q-td v-if="!attrs.selection || attrs.selection !== 'none'" class="text-center" style="padding: 0; width: 50px">
<q-checkbox v-model="scope.selected" flat /> <q-checkbox v-model="scope.selected" flat />
</q-td> </q-td>
@ -193,6 +196,7 @@ import { axios, Environment, NotifyManager, TreeBuilder } from '@/platform';
import { useQuasar, getCssVar, exportFile } from 'quasar'; import { useQuasar, getCssVar, exportFile } from 'quasar';
import { IconEnum } from '@/platform/enums'; import { IconEnum } from '@/platform/enums';
import { extractTableColumnsProps, arrayToMap, OperatorTypeEnum, isEmpty, PageStatusEnum } from '@/platform/components/utils'; import { extractTableColumnsProps, arrayToMap, OperatorTypeEnum, isEmpty, PageStatusEnum } from '@/platform/components/utils';
import TreeGridRow from './TreeGridRow.vue';
const attrs = useAttrs(); const attrs = useAttrs();
const gc = Environment.getConfigure(); const gc = Environment.getConfigure();
@ -249,7 +253,7 @@ const props = defineProps({
return []; return [];
}, },
}, },
toolbarConfigre: { toolbarConfigure: {
type: Object, type: Object,
default: () => { default: () => {
return {}; return {};
@ -540,8 +544,8 @@ const buttonObj = {
NotifyManager.warn('请选择要查看的记录'); NotifyManager.warn('请选择要查看的记录');
} else { } else {
viewInfo.infoArray = <any>[]; viewInfo.infoArray = <any>[];
if (props.viewer.infoPanel.fields && props.viewer.infoPanel.fields.length > 0) { if (props.viewer.panel.fields && props.viewer.panel.fields.length > 0) {
for (let item of props.viewer.infoPanel.fields) { for (let item of props.viewer.panel.fields) {
if (item.format) { if (item.format) {
viewInfo.infoArray.push({ label: item.label, value: item.format(table.selected[0][item.name]) }); viewInfo.infoArray.push({ label: item.label, value: item.format(table.selected[0][item.name]) });
} else { } else {

Loading…
Cancel
Save