Skip to content

Commit

Permalink
docs: update plugin api
Browse files Browse the repository at this point in the history
  • Loading branch information
FliPPeDround committed Jan 23, 2025
1 parent b2f8062 commit c4a24e8
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docs/plugins/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,48 @@ addCustomTab({
},
category: 'advanced',
})


const SFC = /* vue */ `
<script setup lang="ts">
import { ref } from 'vue'
const count = ref(0)
</script>
<template>
<div class="h-full w-full flex flex-col items-center justify-center">
<div>
count is {{ count }}
</div>
<button class="btn" @click="count++">
increment
</button>
</div>
</template>
<style scoped>
.btn {
background-color: #4c51bf;
color: #fff;
padding: 0.5rem 1rem;
border-radius: 0.25rem;
border: none;
cursor: pointer;
}
</style>
`

addCustomTab({
name: 'plugin_count',
title: 'Plugin Count',
icon: 'baseline-exposure-plus-1',
view: {
type: 'sfc',
sfc: SFC,
},
category: 'app',
})
```

## `addCustomCommand`
Expand Down

0 comments on commit c4a24e8

Please sign in to comment.