Commit ad094813 authored by 王文琼's avatar 王文琼

头部标题绑定

parent b8bb00b3
...@@ -63,6 +63,6 @@ html::-webkit-scrollbar { ...@@ -63,6 +63,6 @@ html::-webkit-scrollbar {
width: 0px; width: 0px;
} }
#app div{ #app div{
overflow: hidden; /* overflow: hidden; */
} }
</style> </style>
<template> <template>
<!--头部--> <!--头部-->
<div class="header"> <div class="header">
飞天兔数字工厂大数据展示 <!-- 飞天兔数字工厂大数据展示 -->
<div class="header_title">
<el-input class="input" v-model="input" placeholder="请输入您的标题"></el-input>
</div>
<a href="javascript:;" class="a-access"> <a href="javascript:;" class="a-access">
<button class="button type1" @click="created">生成</button> <button class="button type1" @click="created">生成</button>
</a> </a>
...@@ -13,17 +16,18 @@ export default { ...@@ -13,17 +16,18 @@ export default {
name: "chartHeader", name: "chartHeader",
data() { data() {
return { return {
// key: value input: ""
}; };
}, },
// props:{ // props:{
// chartList:Array, // chartList:Array,
// selectChartList:Array // selectChartList:Array
// }, // },
methods: { methods: {
created() { created() {
this.$emit("created"); this.$emit("created",this.input);
console.log("我要去生成了"); console.log("我要去生成了",this.input);
} }
} }
}; };
...@@ -39,12 +43,26 @@ export default { ...@@ -39,12 +43,26 @@ export default {
text-align: center; text-align: center;
background: url(../../../assets/image/chartHeaderBg.png) top center no-repeat; background: url(../../../assets/image/chartHeaderBg.png) top center no-repeat;
box-sizing: border-box; box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
} }
.header a.a-access { .header a.a-access {
position: absolute; position: absolute;
right: 3%; right: 3%;
top: -18%; top: -18%;
} }
.header_title {
height: 50px;
width: 28%;
display: flex;
}
/deep/ .el-input--small .el-input__inner {
background: none;
border:1px solid #00ffff ;
color: #00ffff;
}
.button { .button {
position: relative; position: relative;
padding: 0.5em 1.5em; padding: 0.5em 1.5em;
......
...@@ -180,10 +180,11 @@ export default { ...@@ -180,10 +180,11 @@ export default {
chartMain chartMain
}, },
methods: { methods: {
created() { created(input) {
console.log("1111"+JSON.stringify(this.chartListLeft)) console.log("1111"+input)
console.log("222222222"+JSON.stringify(this.chartListMain)) console.log("222222222"+JSON.stringify(this.chartListMain))
console.log("3333"+JSON.stringify(this.chartListRight)) console.log("3333"+JSON.stringify(this.chartListRight))
localStorage.setItem("chartListtitle",input);
localStorage.setItem("chartListLeft",JSON.stringify(this.chartListLeft)); localStorage.setItem("chartListLeft",JSON.stringify(this.chartListLeft));
localStorage.setItem("chartListMain",JSON.stringify(this.chartListMain)); localStorage.setItem("chartListMain",JSON.stringify(this.chartListMain));
localStorage.setItem("chartListRight",JSON.stringify(this.chartListRight)); localStorage.setItem("chartListRight",JSON.stringify(this.chartListRight));
...@@ -202,7 +203,7 @@ export default { ...@@ -202,7 +203,7 @@ export default {
<style> <style>
.el-header { .el-header {
background-color: #040f3c; background-color: #040f3c !important;
} }
div { div {
overflow: initial !important; overflow: initial !important;
......
<template> <template>
<!--头部--> <!--头部-->
<div class="header"> <div class="header">
飞天兔数字工厂大数据展示 <div style="width:30%;margin:0 auto;overflow:hidden !important; white-space: nowrap; text-overflow: ellipsis;" >{{title}}</div>
<!-- <a href="javascript:;" class="a-access"> <!-- <a href="javascript:;" class="a-access">
<button class="button type1"> <button class="button type1">
返回 返回
...@@ -15,7 +16,7 @@ ...@@ -15,7 +16,7 @@
name: "chartHeader", name: "chartHeader",
data() { data() {
return { return {
// key: value title:localStorage.getItem("chartListtitle"),
} }
}, },
methods: { methods: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment