소스 검색

自定义栏位上移问题

zhuliu 1 년 전
부모
커밋
0878374b4f
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/views/project/patentDetails/components/PatentField.vue

+ 3 - 3
src/views/project/patentDetails/components/PatentField.vue

@@ -135,11 +135,11 @@ export default {
   methods: {
     //上移下移
     handleOption(type, index) {
-      if (index == 0) {
+      if (index == 0 && type == 0) {
         this.$message.warning('已是最顶层')
         return false
       }
-      if (index == this.customField.length - 1) {
+      if (index == this.customField.length - 1 && type == 1) {
         this.$message.warning('已是最后一层')
         return false
       }
@@ -164,7 +164,7 @@ export default {
 
       this.$api.addAllPatentCustomFieldOrder(params).then(res => {
         if (res.code == 200) {
-          this.$message('移动成功')
+          this.$message.success('移动成功')
           // this.getCustomField()
           this.$forceUpdate()
         }