diff --git a/src/boot/defaults/qInput.js b/src/boot/defaults/qInput.js new file mode 100644 index 000000000..a31c1c9ec --- /dev/null +++ b/src/boot/defaults/qInput.js @@ -0,0 +1,20 @@ +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); diff --git a/src/boot/defaults/qSelect.js b/src/boot/defaults/qSelect.js new file mode 100644 index 000000000..b7de7f0c8 --- /dev/null +++ b/src/boot/defaults/qSelect.js @@ -0,0 +1,14 @@ +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'); diff --git a/src/boot/defaults/qTable.js b/src/boot/defaults/qTable.js index 23bc7d922..b4fd5a835 100644 --- a/src/boot/defaults/qTable.js +++ b/src/boot/defaults/qTable.js @@ -1,34 +1,9 @@ import { QTable } from 'quasar'; -import { QInput } from 'quasar'; + import setDefault from './setDefault'; -import { QSelect } from 'quasar'; setDefault(QTable, 'pagination', { rowsPerPage: 0 }); setDefault(QTable, 'hidePagination', true); -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, -}; -QSelect.props.optionLabel = { - type: QSelect.props.optionLabel, - default: 'name', -}; -QSelect.props.optionValue = { - type: QSelect.props.optionValue, - default: 'id', -}; -QInput.props.hideBottomSpace = { - type: QInput.props.hideBottomSpace, - default: true, -}; QTable.props.columns = { type: QTable.props.columns, align: 'right', @@ -38,7 +13,6 @@ QTable.props.noDataLabel = { default: 'asd', }; -setDefault(QInput, 'outlined', false); // setDefault(QTable, "noDataLabel", t('globalfs.noResults')); setDefault(QTable, 'gridHeader', true); setDefault(QTable, 'color', 'red-8'); @@ -47,5 +21,3 @@ setDefault(QTable, 'rowKey', 'id'); // setDefault(QTable, 'columns', (data) => { // console.log(this); // }); -// setDefault(QSelect, 'optionValue', 'id'); -// setDefault(QSelect, 'optionLabel', 'name'); diff --git a/src/boot/quasar.defaults.js b/src/boot/quasar.defaults.js index c792100d7..9638e2057 100644 --- a/src/boot/quasar.defaults.js +++ b/src/boot/quasar.defaults.js @@ -1 +1,3 @@ export * from './defaults/qTable'; +export * from './defaults/qInput'; +export * from './defaults/qSelect';