perf: add-param-box按钮的文字改成图标

This commit is contained in:
陈劲松
2020-04-16 15:02:50 +08:00
parent 555a8e3b3c
commit 1ea8c4a460
2 changed files with 24 additions and 8 deletions

View File

@@ -256,10 +256,10 @@
<div class="right-box-form-btns" v-if="rightBox.isEdit">
<button style="display: none;">第一个button会出现意料之外的hover样式找不到原因只好加个不可见的button规避问题</button>
<button id="module-clear-all" type="button" @click="clearAllParam" class="nz-btn nz-btn-size-normal nz-btn-style-light">
<span class="top-tool-btn-txt">{{$t('overall.clear')}}</span>
<span><i class="el-icon-delete"></i></span>
</button>
<button id="module-add-param" type="button" @click="addParam" class="nz-btn nz-btn-size-normal nz-btn-style-normal">
<span class="top-tool-btn-txt">{{$t('overall.add')}}</span>
<button id="module-add-param" type="button" @click="addParam" class="nz-btn nz-btn-size-normal nz-btn-style-light">
<span><i style="font-size: 12px;" class="nz-icon nz-icon-create-square"></i></span>
</button>
</div>
</template>
@@ -610,17 +610,25 @@
// 清除param
clearAllParam: function() {
this.currentModule.paramObj = [];
this.$nextTick(() => {
this.$refs.paramBoxScrollbar.update();
});
},
// 新增param
addParam: function() {
this.currentModule.paramObj.push({key: '', value: ''});
this.$refs.paramBoxScrollbar.update();
this.$nextTick(() => {
this.$refs.paramBoxScrollbar.update();
});
},
// 移除单个param
removeParam: function(index) {
this.currentModule.paramObj.splice(index, 1);
this.$nextTick(() => {
this.$refs.paramBoxScrollbar.update();
});
},
//将param转为json字符串格式