您好,
如果您是指如何在模板中记录数据,可以使用 {{log data_here}},这应该会在浏览器控制台中显示。
您也可以使用 API:api.getCurrentUser()。
例如,在您的主题/组件的 HTML \u003chead\u003e 中:
<script type="text/discourse-plugin" version="0.8">
console.log(api.getCurrentUser());
</script>
您好,
如果您是指如何在模板中记录数据,可以使用 {{log data_here}},这应该会在浏览器控制台中显示。
您也可以使用 API:api.getCurrentUser()。
例如,在您的主题/组件的 HTML \u003chead\u003e 中:
<script type="text/discourse-plugin" version="0.8">
console.log(api.getCurrentUser());
</script>