ソースを参照

fixed obsolete this

tags/0.0.1
diaseu 4年前
コミット
bcd52e27eb
1個のファイルの変更7行の追加6行の削除
  1. 7
    6
      frontend/src/components/ProfileCardList.vue

+ 7
- 6
frontend/src/components/ProfileCardList.vue ファイルの表示

51
     },
51
     },
52
 })
52
 })
53
 // from the computed section
53
 // from the computed section
54
-const currentCard = computed(() => this.profiles[this.profiles.length - 1]);
54
+const currentCard = computed(() => props.profiles[props.profiles.length - 1]);
55
 // from the method section
55
 // from the method section
56
 const logOut = () => {};
56
 const logOut = () => {};
57
 const reject = () => {
57
 const reject = () => {
58
-    this.swipped(this.currentCard)
58
+    swipped(currentCard)
59
 }
59
 }
60
 const swipped = profile => {
60
 const swipped = profile => {
61
-    const index = this.profiles.findIndex(u => u.uid == profile.uid)
62
-    this.profiles.splice(index, 1)
61
+    const index = props.profiles.findIndex(u => u.uid == profile.uid)
62
+    props.profiles.splice(index, 1)
63
     profile.id = Date.now() + (Math.random() * 100000).toFixed()
63
     profile.id = Date.now() + (Math.random() * 100000).toFixed()
64
-    this.profiles.unshift({ ...profile })
64
+    props.profiles.unshift({ ...profile })
65
 }
65
 }
66
 const getUser = () => {
66
 const getUser = () => {
67
 }
67
 }
68
 const onRequest = () => {
68
 const onRequest = () => {
69
-    const data = { ...this.currentCard }
69
+    const data = { ...currentCard }
70
 }
70
 }
71
+// AHP Button behavior
71
 const accept = () => {
72
 const accept = () => {
72
     console.log('accepted')
73
     console.log('accepted')
73
 }
74
 }

読み込み中…
キャンセル
保存