🎨 misc
This commit is contained in:
parent
b739c5ad54
commit
4c004d73b5
1 changed files with 27 additions and 16 deletions
|
@ -2,10 +2,10 @@
|
||||||
import { showMessage } from "siyuan";
|
import { showMessage } from "siyuan";
|
||||||
import SettingPanel from "./libs/components/setting-panel.svelte";
|
import SettingPanel from "./libs/components/setting-panel.svelte";
|
||||||
|
|
||||||
let groups: string[] = ["🌈 Default"];
|
let groups: string[] = ["🌈 Group 1", "✨ Group 2"];
|
||||||
let focusGroup = groups[0];
|
let focusGroup = groups[0];
|
||||||
|
|
||||||
const SettingItems: ISettingItem[] = [
|
const group1Items: ISettingItem[] = [
|
||||||
{
|
{
|
||||||
type: 'checkbox',
|
type: 'checkbox',
|
||||||
title: 'checkbox',
|
title: 'checkbox',
|
||||||
|
@ -41,19 +41,10 @@
|
||||||
y: 'y',
|
y: 'y',
|
||||||
z: 'z'
|
z: 'z'
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'slider',
|
|
||||||
title: 'slider',
|
|
||||||
description: 'slider',
|
|
||||||
key: 'd',
|
|
||||||
value: 50,
|
|
||||||
slider: {
|
|
||||||
min: 0,
|
|
||||||
max: 100,
|
|
||||||
step: 1
|
|
||||||
}
|
}
|
||||||
},
|
];
|
||||||
|
|
||||||
|
const group2Items: ISettingItem[] = [
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: 'button',
|
title: 'button',
|
||||||
|
@ -66,6 +57,18 @@
|
||||||
showMessage('Hello, world!');
|
showMessage('Hello, world!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'slider',
|
||||||
|
title: 'slider',
|
||||||
|
description: 'slider',
|
||||||
|
key: 'd',
|
||||||
|
value: 50,
|
||||||
|
slider: {
|
||||||
|
min: 0,
|
||||||
|
max: 100,
|
||||||
|
step: 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -105,7 +108,7 @@
|
||||||
<div class="config__tab-wrap">
|
<div class="config__tab-wrap">
|
||||||
<SettingPanel
|
<SettingPanel
|
||||||
group={groups[0]}
|
group={groups[0]}
|
||||||
settingItems={SettingItems}
|
settingItems={group1Items}
|
||||||
display={focusGroup === groups[0]}
|
display={focusGroup === groups[0]}
|
||||||
on:changed={onChanged}
|
on:changed={onChanged}
|
||||||
on:click={({ detail }) => { console.debug("Click:", detail.key); }}
|
on:click={({ detail }) => { console.debug("Click:", detail.key); }}
|
||||||
|
@ -114,6 +117,14 @@
|
||||||
💡 This is our default settings.
|
💡 This is our default settings.
|
||||||
</div>
|
</div>
|
||||||
</SettingPanel>
|
</SettingPanel>
|
||||||
|
<SettingPanel
|
||||||
|
group={groups[1]}
|
||||||
|
settingItems={group2Items}
|
||||||
|
display={focusGroup === groups[1]}
|
||||||
|
on:changed={onChanged}
|
||||||
|
on:click={({ detail }) => { console.debug("Click:", detail.key); }}
|
||||||
|
>
|
||||||
|
</SettingPanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue