技术标签: vue es6 vue.js javascript
<template>
<div>
我的home 页面
<a href="about.html">abc</a>
</div>
</template>
<script>
export default {
name: "Home"
}
</script>
<style lang="stylus" rel="stylesheet/stylus">
</style>
import Vue from 'vue'
import Home from './App'
import router from './router'
import '@/plugins/element.js'
// 阻止启动生产消息,常用作指令
Vue.config.productionTip = false
new Vue({
router,
render: h => h(Home)
}).$mount('#home')
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
mode: 'history',
base: process.env.BASE_URL,
routes:[
]
})
module.exports = {
pages: {
index: {
entry: 'src/views/home/index.js', // 指定你刚才创建的index.js位置
template: 'public/index.html', // 主的htmml页面位置
filename: 'index.html',
title: 'home Page'
}
}
};
<template>
<div>
我的about页面
<el-button type="primary" @click="goMain"> main</el-button>
<el-button type="primary" @click="goPage1"> Page1</el-button>
<el-button type="primary" @click="goPage2"> Page2</el-button>
<router-view></router-view>
</div>
</template>
<script>
export default {
name: "App.vue",
methods:{
goMain(){
this.$router.push("/")
},
goPage1(){
this.$router.push("/page1")
},
goPage2(){
this.$router.push("/page2")
}
}
}
</script>
<style lang="stylus" rel="stylesheet/stylus">
</style>
import Vue from 'vue'
import About from './App'
import router from './router'
import '@/plugins/element.js'
// 阻止启动生产消息,常用作指令
Vue.config.productionTip = false
new Vue({
router,
render: h => h(About)
}).$mount('#about')
import Vue from 'vue'
import Router from 'vue-router'
const main1 = () =>import('./page/main1.vue');
const page1 = () =>import('./page/page1.vue');
const page2 = () =>import('./page/page2.vue');
Vue.use(Router)
export default new Router({
mode: 'history',
base: process.env.BASE_URL,
routes:[
{
path:"/",
name: 'page1',
component: main1
},
{
path:"/page1",
name: 'page1',
component: page1
},
{
path:"/page2",
name: 'page2',
component: page2
}
]
})
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<!--这个id必须指定成 index.js中写的id-->
<div id="about"></div>
<!-- built files will be auto injected -->
</body>
</html>
注: 这里需要注意的一点是,千万不要忘记这个id的配置需要和index.js中的vue指定id一致
module.exports = {
pages: {
index: {
entry: 'src/views/home/index.js',
template: 'public/index.html',
filename: 'index.html',
title: 'home Page'
},
about: {
entry: 'src/views/about/index.js',
template: 'public/about.html',
filename: 'about.html',
title: 'About Page'
}
}
};
大数据可视化研究应用摘要:伴随着大数据时代的到来,数据可视化成为一个热门的话题,引起了人们极大的关注。本文从研究背景、数据可视化的定义、常用数据可视化工具、可视化效果的评估、可视化面临的挑战及发展方向介绍数据可视化。 关键词:数据可视化 可视化工具 效果评估 挑战 发展方向 1.研究背景 普通意义上讲,数据可视化伴随着统计学的出现而出现。事实上,从人们开始观察世界之时,就在利用图形图像记录、描
如何从在安卓Android手机获取微信小程序源代码获取微信小程序源代码两种方法:1、在手机中获取。但需要获取手机的root权限,获得微信小程序的wxapkg包;2、运用模拟器,在电脑上运行微信小程序,获得微信小程序的wxapkg包;第一个方法有点难,下文以第二种方法展开。使用到的工具:1、“电脑端的安卓模拟器”安装包:推荐使用“夜神模拟器”,可从其官方网站获得该安装包:https://...
适合的读者1.能够熟练使用iptables和ipset命令,增删改查等2.心里好奇iptables的命令是如何生效的?3.对研究netfilter源代码有浓厚兴趣的技术人员4.用户态的iptables和内核态的netfilter是如何交互的一、研究背景使用iptables来针对某ip指定规则,从而达到抵御网络攻击的目的。但有时可能对成千上万的ip进行封禁,如过添加成千上万条iptabl...
推荐系统–矩阵分解(1)推荐系统–矩阵分解(2)推荐系统–矩阵分解(3)推荐系统–矩阵分解(4)8 基于隐式反馈的矩阵分解
php发送短信有两个方法一个就是通过审请的接口接入网站,之后就可以使用啦。但是上面的这一种是收费的。下面给大家介绍一种免费的,使用飞信发送的方法,这个发送短信的类是一位高手写出来的。/*** PHP飞信发送类** @author quanhengzhuang * @version 1.5.0*/class PHPFetion{/*** 发送者手机号* @var string*/protected ...
参与嘉宾:Anastasija [email protected]主持人:BlockBank社区志愿者-喵喵AMAQuestions:提问:BlockBank will conduct IDO on the Ignition platform. What are the plans for the next secondary market?BlockBank将在Ignition平台上进行IDO,接下来二级市场有哪些布局?Darren: BlockBan
在Struts2中主要有两个配置文件:web.xml和struts.xml,当新建一个web项目时,可以从Struts2的示例程序中复制一份,然后做相应的修改即可。web.xml的基本形式如下:&lt;web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi...
Ubuntu安装teamviewer注意事项。 首先通过浏览器到官方下载ubuntu对应teamviewer的安装包 但是通过dpkg –i安装之后发现安装过程出问题,安装好的包打开之后也闪退。 这个时候需要 使用如下命令处理依赖问题 sudo apt-get install –f 运行完了之后再dpkg -i安装一遍,就会发现没有出错了。 ...
使用HttpServletRequest对象获取参数@Controllerpublic class HelloController { //请求的url路径 @RequestMapping("/hello.do") public ModelAndView hello(HttpServletRequest request){ System.out.println("Hello Co...
关联分析又称关联挖掘,就是在交易数据、关系数据或其他信息载体中,查找存在于项目集合或对象集合之间的频繁模式、关联、相关性或因果结构。
菜菜哥,告诉你一个消息你有男票啦?非也非也,我昨天出去偷偷面试,结果又挂了哦,看来公司是真的不想让你走呀面试官让我说一下乐观锁和悲观锁,我没回答上来,回来之后我查了,数据...
程序员的成长课第1章 如何选择技术方向努力只有在方向正确时才有价值。1.1 技术成长三阶段模型这个阶段最重要的就是提升专项能力,让自己能够迅速搞定一些别人安排给你的事情,体现出你的价值。这个阶段持续的时间长短因人而异,可能会是1~3年。如果超过3年还没有进入下一个阶段,那么你的成长速度就需要提升了。进入这个阶段非常重要的一种标志就是,你遇到问题,不再从下而上去思考(即从技术实现细节来考虑问题好不好实现、拿技术去裁剪问题或重定义问题),而是从实现细节跳脱出来,站到更高的层面,自顶向下去思考、去分析