Browse Source

update doc

Bay 7 years ago
parent
commit
3102ee4322
3 changed files with 15 additions and 10 deletions
  1. 8 0
      src/layouts/ExampleLayout.vue
  2. 1 1
      src/util/request.js
  3. 6 9
      src/views/Home.vue

+ 8 - 0
src/layouts/ExampleLayout.vue

@@ -0,0 +1,8 @@
+<template>
+  <div>
+    <div></div>
+    <router-view></router-view>
+  </div>
+</template>
+
+<style lang="scss"></style>

+ 1 - 1
src/util/request.js

@@ -37,7 +37,7 @@ function checkStatus(response) {
  *
  * @param  {string} url       The URL we want to request
  * @param  {{method:string,body}} [options] The options we want to pass to "fetch"
- * @return {object}           An object containing either "data" or "err"
+ * @return {Promise<*>}           An object containing either "data" or "err"
  */
 export default async function request(url, options) {
   const defaultOptions = {

+ 6 - 9
src/views/Home.vue

@@ -1,18 +1,15 @@
 <template>
-  <div class="home">
-    <img alt="Vue logo" src="../assets/logo.png" />
-    <HelloWorld msg="Welcome to Your Vue.js App" />
-  </div>
+  <div></div>
 </template>
 
 <script>
 // @ is an alias to /src
-import HelloWorld from "@/components/HelloWorld.vue";
+// import HelloWorld from "@/components/HelloWorld.vue";
 
 export default {
-  name: "home",
-  components: {
-    HelloWorld
-  }
+  name: "home"
+  // components: {
+  //   HelloWorld
+  // }
 };
 </script>