Change default options (props) for elements
Learn how to set global component props on a config level.
We can override any of the props of any element to change its default value. For example we can change the default max
value for SliderElement
js
// vueform.config.js
import { defineConfig } from '@vueform/vueform'
import { ref } from 'vue'
const sliderDefaultMaxPlugin = {
apply: 'SliderElement',
props: {
max: {
required: false,
type: [Number],
default: 1000,
},
}
}
export default defaultConfig({
plugins: [
sliderDefaultMaxPlugin,
],
})