From c4008db665e0d65c813dc92217db432fb61a0051 Mon Sep 17 00:00:00 2001 From: chiayin Date: Sat, 25 Feb 2023 19:42:47 +0800 Subject: [PATCH] Discover: cy node style done --- src/views/Discover/index.vue | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/views/Discover/index.vue b/src/views/Discover/index.vue index e7463bc..2a58fcc 100644 --- a/src/views/Discover/index.vue +++ b/src/views/Discover/index.vue @@ -368,10 +368,7 @@ export default { 'background-color': 'data(backgroundColor)', 'border-color':'data(bordercolor)', 'border-width': function(node) { - if(node.data("type") == "activity"){ - return "1" - } - return "2" + node.data('type') === 'activity' ? '1' : '2'; }, //'border-radius': '5', 'shape':'data(shape)', @@ -383,10 +380,7 @@ export default { 'width': 'data(width)', 'color': '#001933', 'font-size':function(node) { - if(node.data("type") == "activity"){ - return 14 - } - return 22 + node.data('type') === 'activity' ? 14 : 22; }, }, },