Vue.js index.html から json で props を渡す

● Vue.js index.html から json で props を渡す

index.html

<div id="app"
    my-option='{ "styles": { "td":"width" } }'
>

main.js

    const myOption           = JSON.parse(this.$el.getAttribute('my-option'));
No.2002
05/24 18:26

edit