download and:
npm install
npm run serve
npm run build
npm run lint
In the root folder title.js
.
Code likes:
{
index: '主页',
'user/login': '登录',
'customer/home': '用户首页'
}
A multiple Pages Starter use Vue-cli3
download and:
npm install
npm run serve
npm run build
npm run lint
In the root folder title.js
.
Code likes:
{
index: '主页',
'user/login': '登录',
'customer/home': '用户首页'
}
大神,为什么我弄得icon,刚添加文件的时候可以显示,但是清除缓存后就显示不出来了?
[Vue warn]: Cannot find element: #app
比如每个页面 引入头header和footer 这部分是死的,不想用vue组件,直接写进html文件里面, webpack 可以配置
这样的引入 ,
@require('../lib/app/components/footer.html', { "name": "home" })
nj能够加入这种配置
需要引入babel-polyfill解决axios在IE9的问题,但是这种多个app.js的不知道如何解决。。。
新建一个页面的文件夹后,访问对应的页面是 Cannot GET 请问如何配置才能避免重新 run dev
问题描述: 当我在使用import导入一张静态的图片,
import loginBg from 'assets/img/login-bg.png'
//然后在方法里将它设置为屏幕背景,body
setBg: () => {
var bodyNode = document.getElementsByTagName('body')[0]
bodyNode.style.background = 'url(' + loginBg + ') no-repeat'
bodyNode.style.backgroundSize = 'cover'
}
在dev下是完全可以显示正常的,
但是build以后,这张图的路径在与生成页面的同级目录下,并没有生成。
想请问一下为什么,以及有什么好的解决方案,谢谢
我写了应该侧边栏组件,里面的路径都是用相对路径,然后在各个页面调用,但是用相对路径就会出现链接不对的问题,请问你是如何写子组件里面的url路径呢
<ul> <li><a href="../index.html"><i class="home"></i>Homepage</a></li> <li><a href="./search.html"><i class="search"></i>Search</a></li> <li><a href="./category.html"><i class="categroy"></i>Category</a></li> <li><a href="javascript:void(0);"><i class="message"></i>Message<sup></sup></a> </li> <li><a href="./cart.html"><i class="cart"></i>Cart<sup></sup></a></li> <li><a href="./member.html"><i class="member"></i>My account</a></li> </ul>
想请教作者如何结合vue-cli写一个项目生成器,或者类似express
的应用生成器express-generator -g
,用户终端输入命令参数,即可生成对应的项目骨架,求设计思路或者项目案例,十分感谢!!
Hi ! First of all thanks for this awsome work !
I have a question concerning the creation of new pasges , i follow your pattern : folder + inside 3 different files all name app.(html/js/vue) but when i try to reach my new page that crash and it's impossible to reach the page ! So i just want to know if it's possible to create new pages and if we can what i'm doing wrong ?
Thanks !
最近配置webpack有少少问题,可以问一下你吗?
I created modal.vue components which looks like this:
<template>
...
</template>
<script>
...
</script>
<style lang="css">
.modal {...}
</style>
Works good, but when I run npm run build css doesn't have css code for modal. What's wrong?
Looks like it doesn't extract css from .vue files.
localhost:8080/user/ 这个域名 默认能不能指向某个区块
比如 localhost:8080/user/ 这区块 我想默认设置为首页,访问域名为localhost:8080,后面没有参数 user 参数
不想重复造轮子了,这个很好,感觉多页面需求很多,
建议合入
https://github.com/vuejs/awesome-vue
应该在输出的html里的引用中加上../,求大神更新,改了好久都不对
(function (exports, require, module, __filename, __dirname) { const { join, resolve } = require('path')
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at requireConfig (/home/web/newProject/node_modules/webpack/bin/convert-argv.js:96:18)
at /home/web/newProject/node_modules/webpack/bin/convert-argv.js:109:17
at Array.forEach (native)
Can you help me solve this problem. Otherwise , I see this architecture is greate
再app.vue里面用
export default {
component:{
modalDialog:modalDialog
}
}
注册组件不行,要重新Vue.component('modalDialog',modalDialog)才行
如果在每个页面都引入一段相同的css 或js代码? 在每个页面 的app.js里面引入每次都要写一遍.
以及html里面如何引入静态文件? 目前html里面用link或者script标签方式引入都路径不对 ,vue-cli那样可以直接在index.html里面引入static目录下的文件.
Hello! Thanks for boilerplate, its exactly what I was looking for. But need to write markup of the page directly in html. Is it possible?
Hi
First of all thanks for this awesome starter kit , really helped me <3
I was wondering is it possible to also render pages server side whenever javascript is not available !?
Thanks in advance
启动项目成功后,无法通过ip访问。localhost和127.0.0.1可以访问。请问这是什么原因,需要修改哪个配置?
请教一下作者, 我想在你这个基础上把对应模块的静态资源 img、css 全部打包到对应的�文件夹,我发布的时候就需要提取一个文件夹。
每次修改提交都会重新生成hash值,不能有效利用缓存,改过的hash才变比较好吧
-
+
import 'element-ui/lib/theme-default/index.css'
import 'mint-ui/lib/style.min.css'
同样的方法element能加载出样式,mint-ui无法加载
多页面seo该如何解决?
项目初始准备用vue在一个多页网站上应用试水,脚手架基本能满足我们的需求,必须给出大大的赞。
有问题在开发过程中请教吧。
要配置开发环境、测试环境、生产环境的接口请求url,该怎么配置?
如果再项目里面引入公共层的hash缓存以及如何配合DllReferencePlugin插件提高打包的速度,希望老铁有新的方案不,比如,我想第三方库我不想每次都打包,可以一次打包,重复引用,然后CommonsChunkPlugin抽出公共的,每次改变了,才会改变hash值,业务的打包则可以每次打包都改变,如果方面,能加下老铁的微信或者其他联系方式不,很希望能多多沟通下
想请教你个问题,我的也报这个错误,看到你sf的回答,我用的是vue-cil脚手架,不知道怎么改解决这个错误
。
output里面的publicPath路径好像有问题
module.exports = { plugins: [ require('postcss-flexbugs-fixes'), require('autoprefixer')({ "browsers": [ "last 10 version", "FF >= 2" ], remove:false }) ] }
试了好多种方式,就是没有看到
我现在用的这一套打包,请求接口是用的fetch,但在部分移动端浏览器上报fetch is not defined,你们有谁遇到过吗?求解决方案
npm run dev
后Vue Devtools提示模式是生产模式,无法使用.这样不方便管理vuex
,有没有解决的办法呢?
因为有需求打包完成后复制dist文件夹到其它目录下,不知道怎么做呢?
我想支持Vue组件中的<style lang="scss">代码段,请赐教!
npm WARN deprecated [email protected]: We're super 😸 excited that you're trying to use ES2015 syntax, but instead of making more yearly presets 😭 , Babel now has a better preset that we recommend you use instead: npm install babel-preset-env --save-dev. preset-env without options will compile ES2015+ down to ES5 just like using all the presets together and thus is more future proof. It also allows you to target specific browsers so that Babel can do less work and you can ship native ES2015+ to user 😎 ! We are also in the process of releasing v7, so please give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read and help test it out in beta! Thanks so much for using Babel 🙏, please give us a follow on Twitter @babeljs for news on Babel, join slack.babeljs.io for discussion/development and help support the project at opencollective.com/babel
在vue文件可以正常调用显示,在html页面title加上去不能识别,要怎么解决呢
<title>{{$t('en.money')}}Purchase guru - purchase guru shopping and seller website</title>在assets/css下建了一个common文件夹,里面有个common.scss的文件,比如login/app.html要用到它,应该怎么引用?该怎么写?求解,多谢
Sass文件里这样引用:例如:background: url('../../img/bg.png') no-repeat bottom center;
打包后的结果:background:url(assets/img/bg.f0d3576.png)
放到服务器上部署后,就变成了根目录+/assets/css/assets/img/bg.f0d3576.png,多了个/assets/css,所以背景图样式出不来了
这个问题是webpack哪个地方设置的不对吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.