[Vuejs]-Unexpected character '#' in LinearGradient

0👍

You need pass colors as array of string

<LinearGradient colors={["#4c669f", "#3b5998", "#192f6a"]}>
   <view class="login">
     <text class="loginWording">login</text> 
   </view>
</LinearGradient>

0👍

Did you try to write it like so:

<linear-gradient :colors="['#4c669f', '#3b5998', '#192f6a']">
   <view class="login">
     <text class="loginWording">login</text> 
   </view>
</linear-gradient>

Leave a comment