From 738a3dc02da7a3633137e8f0831ec8404e1ba85b Mon Sep 17 00:00:00 2001 From: taehoon Date: Wed, 3 Apr 2019 22:28:08 -0400 Subject: refactor using List component --- src/components/user_profile/user_profile.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/components/user_profile/user_profile.vue') diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue index 89900f60..39f3c381 100644 --- a/src/components/user_profile/user_profile.vue +++ b/src/components/user_profile/user_profile.vue @@ -14,10 +14,18 @@ :user-id="userId" />
- + + +
- + + +
Date: Thu, 4 Apr 2019 00:00:21 -0400 Subject: clean up --- src/components/list/list.vue | 2 +- src/components/selectable_list/selectable_list.js | 11 +---------- src/components/user_profile/user_profile.vue | 4 ++-- src/components/user_settings/user_settings.vue | 8 ++++---- 4 files changed, 8 insertions(+), 17 deletions(-) (limited to 'src/components/user_profile/user_profile.vue') diff --git a/src/components/list/list.vue b/src/components/list/list.vue index 1159898d..7d62283a 100644 --- a/src/components/list/list.vue +++ b/src/components/list/list.vue @@ -18,7 +18,7 @@ export default { }, getKey: { type: Function, - default: item => item + default: item => item.id } } } diff --git a/src/components/selectable_list/selectable_list.js b/src/components/selectable_list/selectable_list.js index 1fdd5a67..7856d725 100644 --- a/src/components/selectable_list/selectable_list.js +++ b/src/components/selectable_list/selectable_list.js @@ -6,16 +6,7 @@ const SelectableList = { List, Checkbox }, - props: { - items: { - type: Array, - default: () => [] - }, - getKey: { - type: Function, - default: item => item - } - }, + props: List.props, data () { return { selected: [] diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue index 39f3c381..8d78d2d2 100644 --- a/src/components/user_profile/user_profile.vue +++ b/src/components/user_profile/user_profile.vue @@ -16,14 +16,14 @@
diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index 741fbe3f..66ce6cea 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -200,9 +200,9 @@ - + @@ -214,9 +214,9 @@ - + -- cgit v1.2.3-70-g09d2 From fe7766bc618f9a994e2c0a9337deb7cce8b162cf Mon Sep 17 00:00:00 2001 From: taehoon Date: Thu, 4 Apr 2019 12:12:27 -0400 Subject: replace scope attributes by slot-scope --- src/components/follow_requests/follow_requests.vue | 2 +- src/components/selectable_list/selectable_list.vue | 2 +- src/components/user_profile/user_profile.vue | 4 ++-- src/components/user_search/user_search.vue | 2 +- src/components/user_settings/user_settings.vue | 4 ++-- src/components/who_to_follow/who_to_follow.vue | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/components/user_profile/user_profile.vue') diff --git a/src/components/follow_requests/follow_requests.vue b/src/components/follow_requests/follow_requests.vue index 0970713b..8b1e8f94 100644 --- a/src/components/follow_requests/follow_requests.vue +++ b/src/components/follow_requests/follow_requests.vue @@ -5,7 +5,7 @@
-