Skip to content

Commit 4e3db0b

Browse files
committed
Chore(docs): regroup docs
1 parent a5fcfd8 commit 4e3db0b

File tree

6 files changed

+33
-67
lines changed

6 files changed

+33
-67
lines changed

docs/.vuepress/config.js

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,11 @@ export default defineUserConfig({
2424
// }),
2525
],
2626
theme: defaultTheme({
27-
docsDir: '/docs/content',
2827
sidebar: [
29-
{
30-
text: 'Getting started',
31-
collapsible: false,
32-
link: '/',
33-
children: [
34-
'/README.md'
35-
]
36-
},
37-
'/content/features/README.md',
38-
{
39-
text: 'Advanced',
40-
collapsible: false,
41-
link: '/content/customization/README.md',
42-
children: [
43-
'/content/customization/README.md'
44-
]
45-
}
28+
'/index.md',
29+
'/features.md',
30+
'/digging-deeper.md',
31+
'/example-use-cases.md',
4632
]
4733
}),
4834
})

docs/content/customization/README.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/digging-deeper.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Digging deeper
2+
3+
## Options
4+
### Custom Class
5+
### loader
6+
7+
## Custom component
8+

docs/example-use-cases.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Example use cases
2+
Below are some practical example use cases that you may find useful.
3+
4+
## Quick alert after an event occurs
5+
6+
7+
## Confirming CRUD operations
8+
9+
10+
## Confirming link clicks
11+
12+
13+
## Confirming form reset/submit

docs/content/features/README.md renamed to docs/features.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
An alert dialog can be triggered using the `$dialog.alert()` method. This method returns a promise which resolves when the dialog is dismissed.
55

66
<UIExamplesWrapper><FeaturesExampleAlert /></UIExamplesWrapper>
7-
@[code](../../components/examples/FeaturesExampleAlert.vue)
7+
@[code](components/examples/FeaturesExampleAlert.vue)
88

99

1010

@@ -15,29 +15,29 @@ In this section we shall explore how to create a basic confirm dialog as well as
1515

1616
### Basic confirm dialog
1717
<UIExamplesWrapper><FeaturesExampleConfirm /></UIExamplesWrapper>
18-
@[code](../../components/examples/FeaturesExampleConfirm.vue)
18+
@[code](components/examples/FeaturesExampleConfirm.vue)
1919

2020

2121
### Soft confirm dialog
2222
<UIExamplesWrapper><FeaturesExampleConfirmSoft /></UIExamplesWrapper>
23-
@[code](../../components/examples/FeaturesExampleConfirmSoft.vue)
23+
@[code](components/examples/FeaturesExampleConfirmSoft.vue)
2424

2525

2626
### Hard confirm dialog
2727
<UIExamplesWrapper><FeaturesExampleConfirmHard /></UIExamplesWrapper>
28-
@[code](../../components/examples/FeaturesExampleConfirmHard.vue)
28+
@[code](components/examples/FeaturesExampleConfirmHard.vue)
2929

3030

3131
## Prompt
3232
The `$dialog.prompt()` method creates a prompt dialog. Use the prompt dialog to ask user directly for input.
3333

3434
<UIExamplesWrapper><FeaturesExamplePrompt /></UIExamplesWrapper>
35-
@[code](../../components/examples/FeaturesExamplePrompt.vue)
35+
@[code](components/examples/FeaturesExamplePrompt.vue)
3636

3737

3838

3939
## Confirm directive
4040
Add the `v-confirm` directive to any element to instantly cause it to trigger a confirm dialog. This dialog upon confirmation will trigger the default action or the provided callback when available.
4141

4242
<UIExamplesWrapper><FeaturesExampleDirective /></UIExamplesWrapper>
43-
@[code](../../components/examples/FeaturesExampleDirective.vue)
43+
@[code](components/examples/FeaturesExampleDirective.vue)

docs/content/README.md renamed to docs/index.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ export default {
9696
</template>
9797
<script setup>
9898
import {inject} from "vue";
99-
const dialog = inject('$dialog')
100-
const openDialog = () => dialog.alert('Hello world!')
99+
const $dialog = inject('$dialog')
100+
const openDialog = () => $dialog.alert('Hello world!')
101101
return { openDialog }
102102
</script>
103103
```
@@ -108,24 +108,3 @@ export default {
108108
<button v-confirm="'Hello world!'">Open dialog</button>
109109
</template>
110110
```
111-
112-
## Example use cases
113-
Below are some practical example use cases that you may find useful.
114-
115-
### Quick alert after an event occurs
116-
117-
118-
### Confirming CRUD operations
119-
120-
121-
### Confirming link clicks
122-
123-
124-
### Confirming form submission
125-
126-
One plus one equals: {{ 1 + 1 }}
127-
128-
<span v-for="i in 3"> span: {{ i }} </span>
129-
130-
<button class="dg-btn" v-confirm="'Please confirm!'">Click Directive</button>
131-

0 commit comments

Comments
 (0)