Skip to content

Commit

Permalink
Add a Vue 3 example to the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Tsukanov committed Aug 15, 2023
1 parent a2d32c3 commit 6f898f7
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/design-survey-create-a-simple-survey.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class AppComponent implements OnInit {
</details>

<details>
<summary>Vue</summary>
<summary>Vue 2</summary>

```js
<template>
Expand Down Expand Up @@ -242,6 +242,29 @@ export default {
```
</details>

<details>
<summary>Vue 3</summary>

```html
<script setup lang="ts">
import { Model } from 'survey-core';
const surveyJson = {
// ...
};
const survey = new Model(surveyJson);
</script>

<template>
<!-- Render the survey inside the page -->
<SurveyComponent :model="survey" />

<!-- Render the survey in a pop-up window -->
<PopupSurveyComponent :model="survey" :isExpanded="true" />
</template>
```
</details>

<details>
<summary>React</summary>

Expand Down

0 comments on commit 6f898f7

Please sign in to comment.