add: example for extra column

This commit is contained in:
xiangyu 2022-12-23 12:59:56 +08:00
parent 67fb288be5
commit f8a6b7a1ed
2 changed files with 7 additions and 2 deletions

View File

@ -30,7 +30,7 @@
}, },
"homepage": "https://github.com/windingwind/zotero-addon-template#readme", "homepage": "https://github.com/windingwind/zotero-addon-template#readme",
"dependencies": { "dependencies": {
"zotero-plugin-toolkit": "^0.0.1" "zotero-plugin-toolkit": "^0.0.2"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^18.7.20", "@types/node": "^18.7.20",

View File

@ -56,11 +56,16 @@ class AddonViews extends AddonModule {
label: "Addon Template: File Menuitem", label: "Addon Template: File Menuitem",
oncommand: "alert('Hello World! File Menuitem.')", oncommand: "alert('Hello World! File Menuitem.')",
}); });
// Initialize extra columns
this._Addon.toolkit.ItemTree.registerExample();
} }
public unInitViews() { public unInitViews() {
this._Addon.toolkit.Tool.log("Uninitializing UI"); this._Addon.toolkit.Tool.log("Uninitializing UI");
this._Addon.toolkit.UI.removeAddonElements(); this._Addon.toolkit.UI.removeAddonElements();
// Remove extra columns
this._Addon.toolkit.ItemTree.unregister("test");
} }
public showProgressWindow( public showProgressWindow(