component tree layout/screen agnostic
This commit is contained in:
parent
e9297ee1c7
commit
f9736ec3bc
|
@ -24,11 +24,12 @@
|
|||
const path = store.actions.components.findRoute(component)
|
||||
|
||||
// Go to correct URL
|
||||
if (layout) {
|
||||
$goto(`./layouts/:layout/${path}`)
|
||||
} else {
|
||||
$goto(`./screens/:screen/${path}`)
|
||||
}
|
||||
$goto(`./${path}`)
|
||||
// if (layout) {
|
||||
// $goto(`./layouts/:layout/${path}`)
|
||||
// } else {
|
||||
// $goto(`./screens/:screen/${path}`)
|
||||
// }
|
||||
}
|
||||
|
||||
const dragstart = component => e => {
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
store.actions.components.create(component._component, component.presetProps)
|
||||
const path = store.actions.components.findRoute($store.currentComponentInfo)
|
||||
$goto(`./:screen/${path}`)
|
||||
// $goto(`./${path}`)
|
||||
close()
|
||||
}
|
||||
</script>
|
||||
|
@ -39,9 +40,13 @@
|
|||
class="category"
|
||||
on:click={() => onCategoryChosen(category, idx)}
|
||||
class:active={idx === selectedIndex}>
|
||||
{#if category.icon}<i class={category.icon} />{/if}
|
||||
{#if category.icon}
|
||||
<i class={category.icon} />
|
||||
{/if}
|
||||
<span>{category.name}</span>
|
||||
{#if category.isCategory}<i class="ri-arrow-down-s-line arrow" />{/if}
|
||||
{#if category.isCategory}
|
||||
<i class="ri-arrow-down-s-line arrow" />
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue