系统托盘-最小示例
官方文档:
- Add a systray item
- Example: Systray item
- Example: Adding some information to the “session info”
- Example: Reading the session information
- 编写Component
/** @odoo-module **/
import { Component } from "@odoo/owl";
import { registry } from "@web/core/registry";
export class NewSystray extends Component{
setup(){
}
}
NewSystray.template = 'NewSystray';
const systrayItem = {
Component: NewSystray,
}
registry.category("systray").add("new_systray", systrayItem, {sequence: 10});
- 编写模版
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="NewSystray" owl="1">
<span>New Systray</span>
</t>
</templates>