Download your preferred version of vue.global.js 3.x.x from VUE CDN links - CDNPKG
Be sure to choose a stable release. For the later versions there is a problem with the REGEX optional flag ‘s’ not working with older versions of javascript.
Here’s a working HTML example.
<!doctype html>
<html lang = "en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://unpkg.com/vue@3.2.29"></script>
</head>
<body>
<div id='app'>
{{ greeting }}
</div>
<script>
Vue.createApp({
data() {
return {
greeting: 'Hello World'
};
}
}).mount('#app');
</script>
</body>
</html>
To use the local copy of vue.global.js we just need to change the source location:
<script src="js/vue.global.js"></script>
and the Sketchup Ruby script
dialog = UI::HtmlDialog.new(
{
:dialog_title => "Dialog Example",
:preferences_key => "com.sample.plugin",
:scrollable => true,
:resizable => true,
:width => 600,
:height => 400,
:left => 100,
:top => 100,
:min_width => 50,
:min_height => 50,
:max_width =>1000,
:max_height => 1000,
:style => UI::HtmlDialog::STYLE_DIALOG
})
dialog.set_url('file:///c:/users/user/desktop/vue3.html')
dialog.show
Hope this helps.