mirror of
https://github.com/siyuan-note/plugin-sample-vite-svelte.git
synced 2025-09-17 09:46:11 +00:00
🚚 mv:将libs目录下的组件移至components子目录
为了更好地组织项目结构,将libs目录下的组件文件移动到新的libs/components子目录中。 同时,更新了setting-example.svelte组件中SettingPanel的导入路径,以反映新的文件位置。
This commit is contained in:
parent
059744903d
commit
6361001b8a
5 changed files with 1 additions and 1 deletions
|
@ -1,52 +0,0 @@
|
|||
<!--
|
||||
Copyright (c) 2023 by frostime All Rights Reserved.
|
||||
Author : frostime
|
||||
Date : 2023-07-01 19:23:50
|
||||
FilePath : /src/libs/setting-panel.svelte
|
||||
LastEditTime : 2024-06-08 18:25:34
|
||||
Description :
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import ItemWrap from "./item-wrap.svelte";
|
||||
import InputItem from "./item-input.svelte";
|
||||
|
||||
export let group: string;
|
||||
export let settingItems: ISettingItem[];
|
||||
export let display: boolean = true;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
function onClick( {detail}) {
|
||||
dispatch("click", { key: detail.key });
|
||||
}
|
||||
function onChanged( {detail}) {
|
||||
dispatch("changed", {group: group, ...detail});
|
||||
}
|
||||
|
||||
$: fn__none = display ? "" : "fn__none";
|
||||
|
||||
</script>
|
||||
|
||||
<div class="config__tab-container {fn__none}" data-name={group}>
|
||||
<slot />
|
||||
{#each settingItems as item (item.key)}
|
||||
<ItemWrap
|
||||
title={item.title}
|
||||
description={item.description}
|
||||
direction={item?.direction}
|
||||
>
|
||||
<InputItem
|
||||
type={item.type}
|
||||
key={item.key}
|
||||
bind:value={item.value}
|
||||
placeholder={item?.placeholder}
|
||||
options={item?.options}
|
||||
slider={item?.slider}
|
||||
button={item?.button}
|
||||
on:click={onClick}
|
||||
on:changed={onChanged}
|
||||
/>
|
||||
</ItemWrap>
|
||||
{/each}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue