vue/test/e2e/basic-ssr.html
2022-05-31 15:32:44 +08:00

25 lines
555 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script src="../../dist/vue.min.js"></script>
<script src="../../packages/server-renderer/basic.js"></script>
<div id="result">wtf</div>
<script>
var vm = new Vue({
data: { msg: 'foo' },
template: '<div>{{ msg }}</div>'
})
renderVueComponentToString(vm, function (err, result) {
document.getElementById('result').textContent = err && err.toString() || result
})
</script>
</body>
</html>