Global Configuration API (vue.config)
The following content is excerpted from the official website
I prefer to go to the official website documents directly eat raw, encountered do not understand how to go back to see how others understand. Webpack’s publicPath, for example, is so abhorrent that it creates the illusion of “a thousand Hamlets”, which I don’t think is good.
Vue. Config is an object that contains the global configuration of Vue. You can modify the following properties before launching the application (ignoring the error-handling API and interested in exploring it on your own, as space is limited) :
// When enabled, vue will not be able to report errors or warnings on the console, but will still be useful when the project is onlinetrue-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- / / the thing need to look at the back of the extend the API later came back to see, or you don't know what is that thing / / bad to explain in detail, Below is the example Vue. Config. OptionMergeStrategies. _my_option =function (parent, child, vm) {
returnChild + 1} const Profile = vue. extend({// Profile is the child, and _my_option is called to return child + 1. 1}) / / Profile. The options. _my_option = 2 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- / / the tools to the console Vue.config.devtools =true-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- / / as follows, for key names Vue. Config. KeyCodes = {v: 86, f1: 112, // camelCase is not available because H5 does not support mediaPlayPause: 179, // instead kebab-case is enclosed in double quotes"media-play-pause": 179,
up: [38, 87]
}
<input type="text" @keyup.media-play-pause="method">
Copy the code