这里的简单问题,但不幸的是无法解决。如标题中所述,我无法让 Riot 显示其自定义标签的内容。
<!DOCTYPE html>
<html>
<head></head>
<body>
<hello></hello>
<script type="text/javascript" src="node_modules/riot/riot.min.js"></script>
<script type="text/javascript"> riot.mount('*'); </script>
<script type="text/javascript" src="bower_components/lodash/lodash.min.js"></script>
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="bower_components/toastr/toastr.min.js"></script>
<script type="text/javascript" src="js/init.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/util.js"></script>
<script type="text/javascript" src="js/hello.js"></script>
</body>
hello.js 是生成的js,代码如下:
riot.tag('hello', '<div> asdasd </div>', function(opts) {
});
这是它的 HTML:
<hello>
<div>
asdasd
</div>
<script>
</script>
</hello>