Last active
August 29, 2015 14:10
-
-
Save suzuki0keiichi/cf6a34cad496fe8365eb to your computer and use it in GitHub Desktop.
Scala.jsでfullOptJSすると良い感じにやってくれる件(Vueの宣言は別でしてある)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Vue(VueInstantiationOptions(el = "#editor", template = "template")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object VueInstantiationOptions { | |
def apply(data: js.Object = null, el: String = null, template: String = null) = { | |
val opt = js.Dynamic.literal() | |
if (data != null) { | |
opt.data = data | |
} | |
if (el != null) { | |
opt.el = el | |
} | |
if (template != null) { | |
opt.template = template | |
} | |
opt | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new g.Vue({el: "#editor", template: "template"}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment