mazipan / vue-google-adsense

💰 Vue.js Google Adsense Component with InFeed and InArticle Ads support
https://mazipan.github.io/vue-google-adsense/
MIT License
257 stars 42 forks source link

Attribute is not applied to the ins tag #45

Closed 158008001 closed 4 years ago

158008001 commented 5 years ago

Final effect screenshot: Snipaste_2019-08-25_00-33-06

The results of the following two methods are displayed on the root element: data-full-width-responsive="true" :data-full-width-responsive="true"

Or, my operation is wrong? -, -

mazipan commented 5 years ago

Can not reproduce

vesper8 commented 4 years ago

I can certainly reproduce it @mazipan !

in my case applying

:data-full-width-responsive="false"

Causes the data-full-wdith-responsive to be completely missing, thus defaulting to "true" and making my ads appear much larger than I intend for them to be.

The way to make it work is to pass the boolean as a string like so:

:data-full-width-responsive="'false'"

Notice the extra single quotes

I imagine the same applies to true

This is probably occuring because of

dataFullWidthResponsive: {
    type: Boolean,
    default: false
  }

? It should be set to a string instead.. or it should be cast as a string

You probably didn't notice this because you've been happy with all your ads being "responsive" all this time

vesper8 commented 4 years ago

I imagine the is-non-personalized-ads is probably non-working as well for the same reason, though I can't test this because I don't use those types of ads

mazipan commented 4 years ago

Will change into string