فهرست منبع

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	sourcecode/h5app/vue/package.json
StephenArk30 6 سال پیش
والد
کامیت
ac2144cbc3
3فایلهای تغییر یافته به همراه259 افزوده شده و 239 حذف شده
  1. 237 237
      sourcecode/h5app/vue/package-lock.json
  2. 4 2
      sourcecode/h5app/vue/src/connector/simple-demo.js
  3. 18 0
      sourcecode/h5app/vue/src/views/login.vue

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 237 - 237
sourcecode/h5app/vue/package-lock.json


+ 4 - 2
sourcecode/h5app/vue/src/connector/simple-demo.js

@@ -66,6 +66,7 @@ function js_load_something(){
  //
  *****************************************************************************/
 
+//Module means some component (need only to draw);
 var test_vue_module = new Module("nothing", "smartUsers");
 test_vue_module.drawData = function (data) {
     test_vue_app.data.userlist.pop();
@@ -76,7 +77,8 @@ test_vue_module.drawData = function (data) {
 
 var loader = new (function(){
 
-    this.userListServ = new DataObjectService("smartUsers", AUTO, "");
+    /* this is the main data service that is auto-updating your data*/
+    this.userListServ = new DataObjectService("smartUsers", AUTO, "?ext=1");
 
     // Optional for setting up self-defined interval
     // this.userListServ.autoInterval = 300;
@@ -94,7 +96,7 @@ var loader = new (function(){
      * loadOften : to auto-load some data
      */
     this.loadOften = function(){
-        // Intervals
+        // Binding Intervals to DataService
         this.userListServ.bind(function (data) {
             // auto call
             test_vue_module.setData(data);

+ 18 - 0
sourcecode/h5app/vue/src/views/login.vue

@@ -42,6 +42,7 @@
 </template>
 
 <script>
+    import 'whatwg-fetch';
     import {
         Field,
         CellGroup,
@@ -101,6 +102,23 @@
             }
         }
     }
+
+    /** Post JSON **/
+    /*
+    // 怎么把一段放到另一个文件?
+
+    fetch('/users', {
+        method: 'POST',
+        headers: {
+            'Content-Type': 'application/json'
+        },
+        body: JSON.stringify({
+            name: 'Hubot',
+            login: 'hubot',
+        })
+    })
+
+    */
 </script>
 
 <style scoped>

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است