查看Demo,在手机上效果更好,扫一扫体验
- 首页轮播图
- 新闻实时请求、点击加载更多
- 请求新闻时加载动画
- 菜单栏的显示和隐藏
- 搜索界面
- vuex
- 搜索
# 下载或克隆下来,然后安装依赖
npm install
# 开发预览
npm run start
# 打包发布,生成的文件在dist文件夹中
npm run build
Home Page: https://daoket.github.io/pages/news
查看Demo,在手机上效果更好,扫一扫体验
# 下载或克隆下来,然后安装依赖
npm install
# 开发预览
npm run start
# 打包发布,生成的文件在dist文件夹中
npm run build
// 路由配置
routes: [
{
path: '/select',
component: Select
}, {
path: '/select',
component: Select
}, {
path: '/point',
component: Point
}, {
path: '/author',
component: Author,
meta: { requiresAuth: true }
}, {
path: '/*',
component: Select
}
]
是不是重复了?
能请教一个小问题吗?
我看到关于mapState/mapMutations这些的地方,你的写法都是跟文档不一样的。、
computed: {
...mapState({ //这些写法你是从何得知的呢?然后你可以跟我说一下为什么可以这样写吗?
searchNews: state => state.SelectStore.searchNews
})
},
因为官方文档给出的事例是这样的
computed : mapState({
searchNews: state => state.SelectStore.searchNews
})
另外你的mapMutations也都是这样写的。还望指点一下:
你好 接口不能用了 请问 一般自己写项目练习 接口怎么弄......
你好,请教一个问题:
目录
__ src
|_ assets
|_ imgloading.gif
|_ imgerror.jpg
__ static
|_ imgloading.gif
|_ imgerror.jpg
// src/main.js
Vue.use(VueLazyload, {
error: './assets/imgs/imgerror.jpg',
loading: './assets/imgs/imgloading.gif',
preLoad: 1,
attempt: 1
});
执行npm run dev
在浏览器中报错http://localhost:8080/assets/images/.... 找不到
,把上面的路径改成/src/assets/imgs/imgerror.jpg
同样报错。
然后我把图片放在与src同级的文件夹static下面,改写代码:
// src/main.js
Vue.use(VueLazyload, {
error: '../static/imgerror.jpg',
loading: '../static/imgloading.gif',
preLoad: 1,
attempt: 1
});
图片就可以加载成功,想到很久没上面头绪。
请问给router-link绑定链接的时候,为啥不直接m.path,而需要写一个setPath方法返回?这样写是有什么特殊含义吗?
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.