Commit afd82645 authored by wflmax's avatar wflmax

header

parent 14f20e30
Pipeline #145 canceled with stages
...@@ -8,23 +8,8 @@ ...@@ -8,23 +8,8 @@
<link rel="stylesheet" href="./static/css/order.css"> <link rel="stylesheet" href="./static/css/order.css">
</head> </head>
<body> <body>
<div id='app'> <div id="app">
<div class="header"> <common-header></common-header>
<div class="header-content">
<div class="header-logo">
<img src="./static/images/dog.jpeg" alt="" width="42px" height="42px">
<p class='header-title'>Hi!隔壁老王</p>
</div>
<div class="header-side">
<el-menu mode="horizontal" :router="false" :unique-opened="true" @select='selectRoute' :default-active="onRoutes" background-color="#708DF1" text-color="#ffffff" active-text-color="#708DF1" class='mian_side'>
<el-menu-item :index="item.value" :key='index' v-for='(item,index) in headmenus' >
<i :class="item.icon"></i>{{item.name}}
</el-menu-item>
</el-menu>
</div>
</div>
</div>
<div class="content"> <div class="content">
<div class="order"> <div class="order">
<div class='order-left'> <div class='order-left'>
...@@ -114,9 +99,11 @@ ...@@ -114,9 +99,11 @@
<script src="https://unpkg.com/vue/dist/vue.js"></script> <script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- 引入组件库 --> <!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script> <script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="./static/js/common.js"></script>
<script> <script>
new Vue({ new Vue({
el: '#app', el: '#app',
components: {commonHeader},
data: function() { data: function() {
return { return {
onRoutes:'./order.html', onRoutes:'./order.html',
......
var commonHeader={
template: '<div class="header"><div class="header-content"><div class="header-logo"><img src="./static/images/dog.jpeg" alt="" width="42px" height="42px"><p class="header-title">Hi!隔壁老王</p></div><div class="header-side"><el-menu mode="horizontal" :router="false" :unique-opened="true" @select="selectRoute" :default-active="onRoutes" background-color="#708DF1" text-color="#ffffff" active-text-color="#708DF1" class="mian_side"> <el-menu-item :index="item.value" :key="index" v-for="(item,index) in headmenus"><i :class="item.icon"></i>{{item.name}}</el-menu-item> </el-menu></div></div></div>'
}
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