我有最基本的自定义标签,但它没有安装。另外,如果我使用riot.mount('*')
,我会在 riot.min.js 中收到此错误
Uncaught SyntaxError:
Failed to execute 'querySelectorAll' on 'Document': The provided selector is empty.
编译标签
riot.tag('test', '<div>Hello world!</div>', function(opts) {
});
索引文件:
<!doctype html>
<html>
<head></head>
<body>
<test></test>
<script src="https://cdn.jsdelivr.net/riot/2.2/riot.min.js"></script>
<script src="tags/test.js" type="riot/tag"></script>
<script>riot.mount('test')</script>
<!-- <script>riot.mount('*')</script> throws error -->
</body>
</html>