fix: refs #6972 fix components

This commit is contained in:
Carlos Satorres 2025-01-16 08:39:04 +01:00
parent c6d7008ed5
commit d130ad70d4
9 changed files with 111 additions and 8 deletions

30
src/boot/defaults/qBtn.js Normal file
View File

@ -0,0 +1,30 @@
import { QBtn } from 'quasar';
import { QBtnGroup } from 'quasar';
QBtn.props.size = {
type: QBtn.props.size,
default: 'md',
};
QBtn.props.flat = {
type: QBtn.props.flat,
default: false,
};
// QBtnGroup.props.class = {
// type: QBtn.props.class,
// default: ['q-gutter-x-sm'],
// };
// QBtnGroup.props.style = {
// type: QBtn.props.style,
// default: 'column-gap: 10px',
// };
QBtnGroup.props.push = {
type: QBtn.props.push,
default: true,
};
// QTable.props.columns = {
// type: QTable.props.columns,
// align: 'right',
// format: (value) => `${value}*`,
// };
// QTable.props.noDataLabel = {
// default: 'asd',
// };

View File

@ -1,4 +1,23 @@
import { QInput } from 'quasar';
// import setDefault from './setDefault';
QInput.props.outlined = {
type: QInput.props.outlined,
default: false,
};
QInput.props.dense = {
type: QInput.props.dense,
default: false,
};
QInput.props.stackLabel = {
type: QInput.props.stackLabel,
default: true,
};
QInput.props.hideBottomSpace = {
type: QInput.props.hideBottomSpace,
default: true,
};
// setDefault(QInput, 'outlined', false); (preguntar jsegarra)
import setDefault from './setDefault';
setDefault(QInput, 'dense', true);

View File

@ -0,0 +1,4 @@
import { QList } from 'quasar';
import setDefault from './setDefault';
setDefault(QList, 'dense', true);

View File

@ -0,0 +1,19 @@
import { QScrollArea } from 'quasar';
// QScrollArea.props.visible = {
// type: QScrollArea.props.visible,
// default: true,
// };
// QScrollArea.props.contentStyle = {
// type: QScrollArea.props.contentStyle,
// default: {
// width: '100%',
// height: '100%',
// borderRadius: '25px',
// background: 'red',
// opacity: 1,
// },
// };
// QScrollArea.props.class = {
// type: QScrollArea.props.class,
// default: ['fit text-grey-8'],
// };

View File

@ -1,4 +1,16 @@
import { QSelect } from 'quasar';
import setDefault from './setDefault';
import { QSelect } from 'quasar';
QSelect.props.optionLabel = {
type: QSelect.props.optionLabel,
default: 'name',
};
QSelect.props.optionValue = {
type: QSelect.props.optionValue,
default: 'id',
};
// setDefault(QSelect, 'optionValue', 'id');
// setDefault(QSelect, 'optionLabel', 'name');
setDefault(QSelect, 'dense', true);

View File

@ -1,5 +1,23 @@
import { QTable } from 'quasar';
import setDefault from './setDefault';
setDefault(QTable, 'pagination', { rowsPerPage: 0 });
setDefault(QTable, 'hidePagination', true);
QTable.props.columns = {
type: QTable.props.columns,
align: 'right',
format: (value) => `${value}*`,
};
QTable.props.noDataLabel = {
default: 'asd',
};
// setDefault(QTable, "noDataLabel", t('globalfs.noResults'));
setDefault(QTable, 'gridHeader', true);
setDefault(QTable, 'color', 'red-8');
setDefault(QTable, 'pagination', { rowsPerPage: 25 });
setDefault(QTable, 'rowKey', 'id');
// setDefault(QTable, 'columns', (data) => {
// console.log(this);
// });

View File

@ -1,3 +1,7 @@
export * from './defaults/qTable';
export * from './defaults/qInput';
export * from './defaults/qSelect';
export * from './defaults/qBtn';
export * from './defaults/qDrawer';
export * from './defaults/qList';
export * from './defaults/qScrollArea';

View File

@ -303,12 +303,9 @@ watch(formUrl, async () => {
></slot>
</template>
</VnPaginate>
<SkeletonTable
v-if="!formData && $attrs.autoLoad"
:columns="$attrs.columns?.length"
/>
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown() && hasSubToolbar">
<QBtnGroup push style="column-gap: 10px">
<SkeletonTable v-if="!formData" />
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown()">
<QBtnGroup push>
<slot name="moreBeforeActions" />
<QBtn
:label="tMobile('globals.remove')"

View File

@ -177,7 +177,7 @@ function normalize(text) {
</script>
<template>
<QList padding class="column-max-width">
<QList padding class="column-max-width" :dense="false">
<template v-if="$props.source === 'main'">
<template v-if="$route?.matched[1]?.name === 'Dashboard'">
<QItem class="q-pb-md">