Commit 37ecd3a8 authored by 黄奎's avatar 黄奎

页面修改

parent 1cd691f0
...@@ -209,6 +209,12 @@ ...@@ -209,6 +209,12 @@
<div class="nav-edit-options"> <div class="nav-edit-options">
<el-button type="primary" icon="el-icon-delete" @click="delIcon(index)" <el-button type="primary" icon="el-icon-delete" @click="delIcon(index)"
style="top: -6px; right: -31px;"></el-button> style="top: -6px; right: -31px;"></el-button>
<a v-if="index>0" @click="Move('up',index)" style="color:blue;cursor:pointer;">
上移
</a>
<a v-if="index!=navData.data.navs.length-1" @click="Move('down',index)" style="color:blue;cursor:pointer;">
下移
</a>
</div> </div>
<div flex="dir:left box:first cross:center"> <div flex="dir:left box:first cross:center">
<div> <div>
...@@ -232,7 +238,7 @@ ...@@ -232,7 +238,7 @@
<el-radio :label="1">模板</el-radio> <el-radio :label="1">模板</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div v-if="item.ShowType==0" style="margin-bottom:5px;"> <div v-if="item.ShowType==0" style="margin-bottom:5px;">
<el-input type="text" v-model="item.ComponentName" placeholder="选择组件" size="small"> <el-input type="text" v-model="item.ComponentName" placeholder="选择组件" size="small">
<el-button slot="append" @click="isShowModule=true,commonIndex=index">选择组件</el-button> <el-button slot="append" @click="isShowModule=true,commonIndex=index">选择组件</el-button>
</el-input> </el-input>
...@@ -357,6 +363,19 @@ ...@@ -357,6 +363,19 @@
}, },
methods: { methods: {
Move(type, index) {
var currentItem = this.navData.data.navs[index];
if (type == 'up') {
var upItem = this.navData.data.navs[index - 1];
this.$set(this.navData.data.navs, index - 1, currentItem);
this.$set(this.navData.data.navs, index, upItem);
}
if (type == 'down') {
var downItem = this.navData.data.navs[index + 1];
this.$set(this.navData.data.navs, index + 1, currentItem);
this.$set(this.navData.data.navs, index, downItem);
}
},
//选择模板 //选择模板
getCustom(obj) { getCustom(obj) {
if (this.commonIndex > -1) { if (this.commonIndex > -1) {
...@@ -392,9 +411,9 @@ ...@@ -392,9 +411,9 @@
let obj = { let obj = {
icon: '', icon: '',
name: '', name: '',
ShowType:0,//0-组件,1-模板 ShowType: 0, //0-组件,1-模板
ComponentName:"",//组件名称 ComponentName: "", //组件名称
url:"",//组件URL url: "", //组件URL
TemplateId: 0, TemplateId: 0,
TemplateShowName: "", TemplateShowName: "",
} }
......
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