Skip to content

Commit b1c2baf

Browse files
updating docs
1 parent 0c3c34b commit b1c2baf

File tree

4 files changed

+7
-53
lines changed

4 files changed

+7
-53
lines changed

src/documentation/components/examples/ConditionalPageExample.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function submitForm() {
198198
defineExpose({
199199
exampleCode: {
200200
desc: 'The <code class="ic">when</code> prop in both Page and Field components enables dynamic visibility based on specific conditions. For Page, the <code class="ic">when</code> prop controls page visibility by evaluating a condition, displaying the page only when the condition is met. Similarly, for Field, the <code class="ic">when</code> prop manages field visibility, showing the field only when its condition is satisfied.',
201-
name: 'Conditional Fields',
201+
name: 'Conditional When',
202202
script: scriptCode,
203203
template: templateCode,
204204
},

src/documentation/components/examples/TemplateExample.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ const formSettings = ref({
5656
// autoPageDelay: 2000,
5757
// bgColor: 'secondary',
5858
// border: 'lg',
59-
// canReview: false,
6059
// color: 'yellow',
6160
// density: 'default' as const,
6261
// disabled: true,

src/documentation/sections/PropsSection.vue

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,11 @@
5858
</p>
5959
</v-col>
6060

61-
<v-col cols="12">
62-
<VCodeBlock
63-
:code="pagesObject"
64-
:highlightjs="codeBlockSettings.plugin === 'highlightjs'"
65-
label="Example Page Object"
66-
lang="javascript"
67-
:prismjs="codeBlockSettings.plugin === 'prismjs'"
68-
:theme="codeBlockSettings.theme"
69-
/>
70-
</v-col>
71-
7261
<v-col cols="12">
7362
<VCodeBlock
7463
:code="pageTypings"
7564
:highlightjs="codeBlockSettings.plugin === 'highlightjs'"
76-
label="Page typings"
65+
label="Page Interface"
7766
lang="typescript"
7867
:prismjs="codeBlockSettings.plugin === 'prismjs'"
7968
:theme="codeBlockSettings.theme"
@@ -103,17 +92,6 @@
10392
</p>
10493
</v-col>
10594

106-
<v-col cols="12">
107-
<VCodeBlock
108-
:code="fieldObject"
109-
:highlightjs="codeBlockSettings.plugin === 'highlightjs'"
110-
label="Example Field Object"
111-
lang="javascript"
112-
:prismjs="codeBlockSettings.plugin === 'prismjs'"
113-
:theme="codeBlockSettings.theme"
114-
/>
115-
</v-col>
116-
11795
<v-col
11896
id="props-field-interface"
11997
cols="12"
@@ -173,20 +151,6 @@ const classes = inject<Docs.GlobalClasses>('classes')!;
173151
const store = useCoreStore();
174152
const propsStore = usePropsStore();
175153
176-
const pagesObject = `const pages = [
177-
{
178-
title: 'Page 1'
179-
text: 'This is the page one text',
180-
fields: [
181-
// ...field objects
182-
],
183-
autoPage: true,
184-
editable: true,
185-
error: false,
186-
}
187-
]
188-
`;
189-
190154
const pageTypings = `interface Page {
191155
autoPage?: boolean;
192156
editable?: VStepperItem['editable'];
@@ -195,22 +159,13 @@ const pageTypings = `interface Page {
195159
isReview?: boolean;
196160
text?: string;
197161
title?: string;
198-
}`;
199-
200-
const fieldObject = `{
201-
color: 'primary',
202-
label: 'First Name',
203-
name: 'firstName',
204-
text: 'Enter your first name only',
205-
type: 'text',
206-
validateOn: 'blur',
207-
variant: 'outlined',
162+
visible?: boolean; // Internal use only
163+
when?: (value: any) => boolean;
208164
}`;
209165
210166
const fieldTypings = `interface Field {
211167
autoPage?: Props['autoPage'];
212168
autoPageDelay?: Props['autoPageDelay'];
213-
canReview?: Props['canReview'];
214169
class?: string;
215170
color?: Props['color'];
216171
columns?: Props['fieldColumns'];

src/stores/menu.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ export const useMenuStore = defineStore('menu', () => {
143143
title: 'Validation',
144144
},
145145
{
146-
href: '#examples-conditional-fields',
146+
href: '#examples-conditional-when',
147147
icon: 'mdi:mdi-code-json',
148-
key: 'examples-conditional-fields',
149-
title: 'Conditional Fields',
148+
key: 'examples-conditional-when',
149+
title: 'Conditional When',
150150
},
151151
{
152152
href: '#examples-summary-page',

0 commit comments

Comments
 (0)