#6911 save on enter #207
|
@ -29,7 +29,8 @@ module.exports = configure(function (/* ctx */) {
|
|||
// app boot file (/src/boot)
|
||||
// --> boot files are part of "main.js"
|
||||
// https://v2.quasar.dev/quasar-cli/boot-files
|
||||
boot: ['i18n', 'axios', 'vnDate', 'validations'],
|
||||
//
|
||||
boot: ['i18n', 'axios', 'vnDate','quasar','setDefaults', 'validations'],
|
||||
|
||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
|
||||
css: ['app.scss'],
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
import { QInput, QSelect } from "quasar";
|
||||
import { QTable} from "quasar";
|
||||
const setDefault = (component, key, value) => {
|
||||
const prop = component.props[key];
|
||||
switch (typeof prop) {
|
||||
case "object":
|
||||
prop.default = value;
|
||||
break;
|
||||
case "function":
|
||||
component.props[key] = {
|
||||
type: prop,
|
||||
default: value
|
||||
};
|
||||
break;
|
||||
case "undefined":
|
||||
throw new Error("unknown prop: " + key);
|
||||
default:
|
||||
throw new Error("unhandled type: " + typeof prop);
|
||||
}
|
||||
};
|
||||
|
||||
QInput.props.outlined = {
|
||||
type: QInput.props.outlined,
|
||||
default: true
|
||||
};
|
||||
QInput.props.dense = {
|
||||
type: QInput.props.dense,
|
||||
default: true
|
||||
};
|
||||
QInput.props.stackLabel = {
|
||||
type: QInput.props.stackLabel,
|
||||
default: true
|
||||
};
|
||||
|
||||
setDefault(QInput, "outlined", false);
|
||||
setDefault(QTable, "gridHeader", true);
|
||||
setDefault(QTable, "color", 'red-8');
|
||||
setDefault(QTable, "pagination", { rowsPerPage: 25 });
|
||||
setDefault(QTable, "rowKey", 'id');
|
||||
setDefault(QSelect,'optionValue','id');
|
||||
setDefault(QSelect,'optionLabel','name');
|
Loading…
Reference in New Issue