Преглед на файлове

:arrow_up: Upgrading dependencies. form-design version 1.1.1

冷冷 преди 6 години
родител
ревизия
fb264744f2
променени са 3 файла, в които са добавени 38 реда и са изтрити 44 реда
  1. 1 1
      package.json
  2. 1 6
      src/views/admin/client/index.vue
  3. 36 37
      src/views/gen/design.vue

+ 1 - 1
package.json

@@ -10,7 +10,7 @@
   },
   "dependencies": {
     "@xkeshi/vue-qrcode": "^1.0.0",
-    "avue-form-design": "^1.1.0",
+    "avue-form-design": "^1.1.1",
     "axios": "^0.18.0",
     "babel-polyfill": "^6.26.0",
     "classlist-polyfill": "^1.2.0",

+ 1 - 6
src/views/admin/client/index.vue

@@ -88,12 +88,7 @@
                 }).then(function () {
                     return delObj(row.clientId)
                 }).then(() => {
-                    _this.tableData.splice(index, 1)
-                    _this.$message({
-                        showClose: true,
-                        message: '删除成功',
-                        type: 'success'
-                    })
+                    _this.$message.success('删除成功')
                     this.refreshChange()
                 }).catch(function () {
                 })

+ 36 - 37
src/views/gen/design.vue

@@ -10,46 +10,45 @@
 
 
 <script>
-  import {getForm, postForm} from '@/api/gen/gen'
-  import {validatenull} from "../../util/validate";
+    import {getForm, postForm} from '@/api/gen/gen'
+    import {validatenull} from "../../util/validate";
 
-  export default {
-    data() {
-      return {
-        box: true,
-        option: {
-          column: []
+    export default {
+        data() {
+            return {
+                box: true,
+                option: {
+                    column: []
+                }
+            }
+        },
+        created() {
+            this.getFormInfo()
+        },
+        methods: {
+            handleSubmit(json) {
+                let params = this.$route.query;
+                if (validatenull(params)) {
+                    return false
+                }
+                let result = JSON.stringify(json)
+                postForm(result, params.tableName, params.dsId).then(response => {
+                    this.$message.success('生成并保存成功')
+                })
+            },
+            getFormInfo() {
+                let params = this.$route.query;
+                if (validatenull(params)) {
+                    return false
+                }
+                getForm(params.tableName, params.dsId).then(response => {
+                    if (!validatenull(response.data.data)) {
+                        this.option = JSON.parse(response.data.data)
+                    }
+                })
+            }
         }
-      }
-    },
-    created() {
-      this.getFormInfo()
-    },
-    methods: {
-      handleSubmit(json) {
-        let params = this.$route.query;
-        if (validatenull(params)) {
-          return false
-        }
-        let result = JSON.stringify(json)
-        postForm(result, params.tableName, params.dsId).then(response => {
-          this.$message.success('生成并保存成功')
-        })
-      },
-      getFormInfo() {
-        let params = this.$route.query;
-        if (validatenull(params)) {
-          return false
-        }
-        getForm(params.tableName, params.dsId).then(response => {
-          if (!validatenull(response.data.data)) {
-            console.log(response.data.data)
-            this.option = JSON.parse(response.data.data)
-          }
-        })
-      }
     }
-  }
 </script>
 <style lang="scss">
   .webapp {