File tree Expand file tree Collapse file tree 1 file changed +27
-16
lines changed
Expand file tree Collapse file tree 1 file changed +27
-16
lines changed Original file line number Diff line number Diff line change 22 import { showMessage } from " siyuan" ;
33 import SettingPanel from " ./libs/components/setting-panel.svelte" ;
44
5- let groups: string [] = [" 🌈 Default " ];
5+ let groups: string [] = [" 🌈 Group 1 " , " ✨ Group 2 " ];
66 let focusGroup = groups [0 ];
77
8- const SettingItems : ISettingItem [] = [
8+ const group1Items : ISettingItem [] = [
99 {
1010 type: ' checkbox' ,
1111 title: ' checkbox' ,
4141 y: ' y' ,
4242 z: ' z'
4343 }
44- },
45- {
46- type: ' slider' ,
47- title: ' slider' ,
48- description: ' slider' ,
49- key: ' d' ,
50- value: 50 ,
51- slider: {
52- min: 0 ,
53- max: 100 ,
54- step: 1
55- }
56- },
44+ }
45+ ];
46+
47+ const group2Items: ISettingItem [] = [
5748 {
5849 type: ' button' ,
5950 title: ' button' ,
6657 showMessage (' Hello, world!' );
6758 }
6859 }
60+ },
61+ {
62+ type: ' slider' ,
63+ title: ' slider' ,
64+ description: ' slider' ,
65+ key: ' d' ,
66+ value: 50 ,
67+ slider: {
68+ min: 0 ,
69+ max: 100 ,
70+ step: 1
71+ }
6972 }
7073 ];
7174
105108 <div class =" config__tab-wrap" >
106109 <SettingPanel
107110 group ={groups [0 ]}
108- settingItems ={SettingItems }
111+ settingItems ={group1Items }
109112 display ={focusGroup === groups [0 ]}
110113 on:changed ={onChanged }
111114 on:click ={({ detail }) => { console .debug (" Click:" , detail .key ); }}
114117 💡 This is our default settings.
115118 </div >
116119 </SettingPanel >
120+ <SettingPanel
121+ group ={groups [1 ]}
122+ settingItems ={group2Items }
123+ display ={focusGroup === groups [1 ]}
124+ on:changed ={onChanged }
125+ on:click ={({ detail }) => { console .debug (" Click:" , detail .key ); }}
126+ >
127+ </SettingPanel >
117128 </div >
118129</div >
119130
You can’t perform that action at this time.
0 commit comments