Detailed explanation with Vue2.x version + adminLte open source framework to build a background application template

1. Creating a project

NPM Install – Global Vue-CLI Installation Scaff Vue Init WebPack Vue-Admin LTE Initialization WebPack Item CD Vue-AdminLTE Switching Project Folder NPM INSTALL installation dependent library NPM Run DEV running project
   
2, install jQuery

npm install jquery -save- DEV
   and in build / webpack.base.conf.js, introduced WebPack 

VAR WebPack = Require (‘WebPack’);
 Under the current file, "Resolve> Alias ​​is found in" Resolve> alias   
Alias: {‘Vue $’: ‘Vue / Dist / Vue.esm.js’, ‘@’: Resolve (‘src’), ‘Components: Path.Resolve (__ DIRNAME,’ ../src/components ‘),’ jQuery ‘: path.resolve (__ DIRNAME,’ .. / node_modules / jquery / src / jquery ‘)}}, // and add as follows: Plugins: [New WebPack.ProvidePlugin ({$: “jQuery”, jQuery : “jQuery”, “Windows.jqUry “:” jQuery “})]

   
Import $ from ‘jQuery’Window. $ = $ window.jQuery = $

If an ESLINT error may be set up, ESLINT is turned off when it is built, and the ESLINT check is left.

Delete CreatelintingRule (remove ESLINT check preference “setting)
" vetur.validation.template ": false," eslint.enable ": false   does not report an error after testing See if you really introduce jQuery 
3, install Bootstrap

NPM I Bootstrap@3.3.0 –save

In build / WebPack.Base.conf.js, the contrast is complete:

Alias: {‘Vue $’: ‘Vue / Dist / vue.esm.js’, ‘@’: resolve (‘src’), ‘Components’: path.resolve (__ DIRNAME,’ ../src/components’,’jquery’ :path.resolve(__dirname, ‘../node_modules/jquery/src/jQuery’)},
   
in main.js

   
Import ‘bootstrap / dist / css / bootstrap.min.css’Import’ bootstrap / dist / js / bootstrap.min.js’

4 , Install Font-Awesome
  NPM I font-awesome --save  

In Main.js

Import ‘Font-Awesome / CSS / FONT-AWESME.CSS’
   
5, if the process is wrong This Dependency Was Not Found: * !! Vue-Style-Loader! CSS-Loader. .

NPM Install Stylus-loader CSS-Loader Style-Loader –save-dev
 If still as follows:   This Dependency Was Not Found: 
* !! Vue-style-loader! Css-loader? {“SourceMap”: true}! ../../ node_modules / vue-loadinger / lib / style-compiler / index? {“Vue”: True, “ID”: “DATA-V-3C7429A2”, “Scope”: False, “HasinlineConfig”: false}! Sass-loader? {“SourceMap”: TruE}! ../../ node_. .
Installation

 NPM I Sass-loader --savenpm I node-scr --save   
6, download / install adminlte

github: https://github.com/almasaeed2010/adminltle

git download:
gitclone https: // GitHub.com/almasaeed2010/adminlte

NPM I Admin-LTE –SAVE-DEV
   

Import ‘admin-lte / dist / css’.

. CSS’IMPORT ‘admin-LTE / DIST / CSS / SKINS / _ALL-SKINS.MIN.CSS’IMPORT’ Admin-LTE / DIST / JS / Admin DE.MIN ‘

7, streamline your code test to introduce bootstrap, font-awesome

Startup item NPM Run DEV
   
8, then start to quote some of the code you want to use in Admin1LTE

New Starter.Vue file under Components
Open Node-modules “admin-lt” Starter.html
  and copy the entire Wrapper content, put it under Template in Starter.html  

Reproduction Body’s Class class name is placed in the body in Index.html

详解用vue2.x版本+adminLTE开源框架搭建后台应用模版

Modify Routing Information SRC / ROUTER / INDEX.JS

详解用vue2.x版本+adminLTE开源框架搭建后台应用模版

9, save operation NPM Run dev

  • No panic open app.Vue
10, what else, what you need, you can directly change the modification change

详解用vue2.x版本+adminLTE开源框架搭建后台应用模版 Node-modules “admin-lt” dist

The above is all the content of this article, I hope to everyone I have helpful, I hope everyone will support Tumi Clouds.

© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment