简体   繁体   中英

How to extend/modify an existing Laravel Nova field?

I'd like to modify the Code component of Laravel Nova. For example in the file: vendor/laravel/nova/resources/js/components/Detail/CodeField.vue

I'd like to modify the config object near the bottom, specifically, I'd like to change the following line to false :

indentWithTabs: true,

How would I go about modifying this value and having it persist with the ephemeral nature of the vendor folder?

I do not think that you can "modify" an existing Field, but you can create the same Field containing the same logic, and adding your customizations as described here .

You can also check if you're able to extend a custom field and override it - as described here .

You could also try to apply this change in the root repository and check if the maintainers of nova will apply this change.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM