scorpioyq 3 years ago
parent
commit
2932b87862
1 changed files with 10 additions and 10 deletions
  1. 10 10
      src/views/database/component/dialog_info.vue

+ 10 - 10
src/views/database/component/dialog_info.vue

@@ -70,41 +70,41 @@
 
 <script>
 import baseButton from '../../../components/base-button.vue'
-import {bytesToSize} from "../../../utils/tools.js";
+import { bytesToSize } from '@/utils/tools.js'
 
 export default {
-  name: "dialog_info",
-  components: {baseButton},
+  name: 'dialog_info',
+  components: { baseButton },
   props: {
     id: String
   },
   watch: {
     id: {
-      handler() {
+      handler () {
         this.getFileInfo()
       },
       immediate: true
-    },
+    }
   },
-  data() {
+  data () {
     return {
       size: '',
       info: {}
     }
   },
-  created() {
+  created () {
     this.getFileInfo()
   },
   methods: {
-    getFileInfo() {
-      this.$api.database.fileInfo({id: this.id}).then(res => {
+    getFileInfo () {
+      this.$api.database.fileInfo({ id: this.id }).then(res => {
         if (res.code === 200) {
           this.info = res.data
           this.toSize()
         }
       })
     },
-    toSize() {
+    toSize () {
       this.size = bytesToSize(this.info.volume)
     }
   }