From b97baeb97d4aff133517e47414236436cc869ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=97=A4=E4=B9=8B=E5=86=85?= Date: Wed, 12 Sep 2018 17:54:52 +0800 Subject: [PATCH] d --- rap.1.1.1.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rap.1.1.1.js b/rap.1.1.1.js index b9b6eb4..3a60fe6 100644 --- a/rap.1.1.1.js +++ b/rap.1.1.1.js @@ -61,6 +61,10 @@ } function addCss(id,content) { + var el=document.getElementById(id); + if(el||!content){ + return; + } var style = document.createElement('style'); style.type = 'text/css'; style.id=id; @@ -367,10 +371,7 @@ this.$options.RapViews.apply(this); }, activated:function () { - var el=document.getElementById(modName); - if(style&&!el){ - addCss(modName,style); - } + addCss(modName,style); }, deactivated:function () { var el=document.getElementById(modName);