current position:Home>Vuetify: install vuetify from scratch
Vuetify: install vuetify from scratch
2022-04-29 09:15:07【Ayou10031】
List of articles
install
Webpack install Vuetify
# establish Vue project
vue create vuetify
cd vuetify
npm install vuetify
Add dependency ( Not necessary )
npm install [email protected]~1.32 sass-loader deepmerge -D
Install Fonts
The easiest way to install is in your public\index.html
Join their CDN
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet">
Add entry
stay src
New at root plugins/vuetify.js
// src/plugins/vuetify.js
import Vue from 'vue';
import Vuetify from 'vuetify/lib/framework';
Vue.use(Vuetify);
export default new Vuetify({
});
find main.js
Add in
import Vue from 'vue'
import App from './App.vue'
import vuetify from './plugins/vuetify'
Vue.config.productionTip = false
new Vue({
vuetify,
render: h => h(App)
}).$mount('#app')
thus ,Vuetify The installation of has been completed , Now add some components to see the effect ~
Vue UI install ( recommend )
# Make sure Vue CLI edition >= 3.0
vue --version
vue ui
On the left side of the screen , single click plug-in unit . Search the input box for Vuetify And install plug-ins
If you use Vue UI Installation will automatically solve problems such as browser compatibility , Directly enter the project to start .
Browser compatibility
browser
Browser name | Support status |
---|---|
Chromium (Chrome, Edge Insider) | Support |
Edge | Support |
Firefox | Support |
Safari 10+ | Support |
IE11/Safari 10 | need polyfill |
IE9 / IE10 | I won't support it |
Support IE11 and Safari 9 problem
Vuetify Use ES2015/2017 The function of , These functions require the use of polyfills Compatible Internet Explorer 11 and Safari 9/10.
Vue CLI Solve compatibility problems
In order to solve Vue CLI stay IE11 Compatibility on , You need to webpack.config.js
Add manually in transpileDependencies
Parameters
// vue.config.js
module.exports = {
transpileDependencies: ['vuetify']
}
add to IE11 and Safari 9 Support
polyfills
npm install core-js regenerator-runtime --save
And then in main.js
File or application entry to install plug-ins
// Polyfills
import 'core-js/stable'
import 'regenerator-runtime/runtime'
// Imports
import Vue from 'vue'
import vuetify from '@/plugins/vuetify'
new Vue({
vuetify }).$mount('#app')
Babel preset-evn( recommend )
npm install @babel/preset-env -D
After installation , Add preset to babel.config.js
In the file
// babel.config.js
module.exports = {
presets: ['@babel/preset-env']
}
Template Warning
because Internet Explorer Yes <template>
Tag support is limited , You must send a fully compiled... To the browser dom Elements . This can be done by building your Vue Code or replace by creating auxiliary components dom Element to implement . for example , If sent directly to IE, Will fail :
<!-- Vue Component -->
<template v-slot:items="props">
<td>{
{ props.item.name }}</td>
</template>
Page effects
Reference material
copyright notice
author[Ayou10031],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/119/202204290629024526.html
The sidebar is recommended
- Lesson 3 of ROS quick start - subscriber subscriber of ROS
- A lifeless face
- Mock in Vue JS preliminary simple use
- The Java Web servlet triggers the alert box on the front end
- CSS sets the color of the small vertical bar in front of the title
- Incomplete display of CSS background image
- [front end learning notes] save the front-end related codes
- Precautions for AWS serverless design dynamodb
- AWS serverless design - apigateway
- AWS serverless design lambda
guess what you like
AWS serverless design - firewall WAF
AWS serverless design-s3
Python repeated element determination function program
Nginx direction agent solves cross domain Problems-2
The foundation of JavaScript
DOM based on JavaScript
Javascript based BOM
JavaScript advanced functions
Basic summary of JavaScript advanced
Object oriented JavaScript
Random recommended
- JavaScript advanced threading mechanism and event mechanism
- HTML+CSS
- Introduction to less
- CSS3 media query
- Learn about bootstrap
- JQuery learning
- Ajax case
- Ajax sends a post request
- Ajax sends get requests
- Ajax notes
- Ajax learning notes
- Relearn react (1) - recognize the life cycle
- Small problems encountered by react usereducer and Solutions
- CSS realizes the square of adaptive screen width
- Nginx + ModSecurity setup
- Bootstrap web job
- bootstrap
- Swoft 2. X Foundation (HTTP, database, redis)
- Docker actual combat case 2: nginx load balancing
- Vue basic syntax
- Go basic syntax 3 (socket, httpserver)
- Nginx configures HTTPS and calls http
- Nginx parsing vulnerability
- How can the backend package Vue projects quickly
- Netty configures WSS protocol access through nginx (Practical)
- Total permutation problem_ Not containing the same element and containing the same element_ Leetcode46_ Leetcode47_ Backtracking solution + java code
- How to upload and download files using Axios in nodejs
- Vue excel file upload
- CondaHTTPError: HTTP 000 CONNECTION FAILED for url < https://conda.anaconda.org/fastai/noarch/repodat
- Multi function environmental monitoring pole scheme based on wireless gateway
- JPS in Hadoop, but http://hadoop01:50070/ How to solve the problem if there is no interface? 500ha70 cluster can't be accessed?
- Tool class for obtaining specific information in HTTP request
- UAV project tracking record 65 - wireless transceiver module circuit
- UAV project tracking record 76 - wireless transceiver module circuit
- Basic concept of angular velocity
- Front end login password encryption and decryption
- Vue parent-child component mutual transmission and intermodulation
- Vue nested loop array, select one of them and add the selected style
- The Vue seamless scroll list scrolls automatically
- Vue line graph moves dynamically to the right