File tree Expand file tree Collapse file tree 2 files changed +21
-22
lines changed
Expand file tree Collapse file tree 2 files changed +21
-22
lines changed Original file line number Diff line number Diff line change 66 export let app;
77
88 let time: string = " " ;
9- let ver: string ;
9+ let ver: string = " " ;
1010
1111 let divProtyle: HTMLDivElement ;
1212 let protyle: any ;
Original file line number Diff line number Diff line change @@ -85,27 +85,6 @@ export default class PluginSample extends Plugin {
8585 element : statusIconTemp . content . firstElementChild as HTMLElement ,
8686 } ) ;
8787
88- let tabDiv = document . createElement ( "div" ) ;
89- new HelloExample ( {
90- target : tabDiv ,
91- props : {
92- app : this . app ,
93- }
94- } ) ;
95- this . customTab = this . addTab ( {
96- type : TAB_TYPE ,
97- init ( ) {
98- this . element . appendChild ( tabDiv ) ;
99- console . log ( this . element ) ;
100- } ,
101- beforeDestroy ( ) {
102- console . log ( "before destroy tab:" , TAB_TYPE ) ;
103- } ,
104- destroy ( ) {
105- console . log ( "destroy tab:" , TAB_TYPE ) ;
106- }
107- } ) ;
108-
10988 this . addCommand ( {
11089 langKey : "showDialog" ,
11190 hotkey : "⇧⌘O" ,
@@ -244,6 +223,26 @@ export default class PluginSample extends Plugin {
244223 // this.loadData(STORAGE_NAME);
245224 this . settingUtils . load ( ) ;
246225 console . log ( `frontend: ${ getFrontend ( ) } ; backend: ${ getBackend ( ) } ` ) ;
226+ let tabDiv = document . createElement ( "div" ) ;
227+ new HelloExample ( {
228+ target : tabDiv ,
229+ props : {
230+ app : this . app ,
231+ }
232+ } ) ;
233+ this . customTab = this . addTab ( {
234+ type : TAB_TYPE ,
235+ init ( ) {
236+ this . element . appendChild ( tabDiv ) ;
237+ console . log ( this . element ) ;
238+ } ,
239+ beforeDestroy ( ) {
240+ console . log ( "before destroy tab:" , TAB_TYPE ) ;
241+ } ,
242+ destroy ( ) {
243+ console . log ( "destroy tab:" , TAB_TYPE ) ;
244+ }
245+ } ) ;
247246 }
248247
249248 async onunload ( ) {
You can’t perform that action at this time.
0 commit comments