You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started/index.md
+67-69Lines changed: 67 additions & 69 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: First Steps with JavaScript
2
+
title: First Steps (Using JavaScript)
3
3
page_title: Kendo UI for Vue Components Introduction - Kendo UI for Vue Docs & Demos
4
4
description: "Get started with the Kendo UI for Vue Native Components using Vite and Composition API."
5
5
slug: getting_started_javascript_composition_api
@@ -8,95 +8,93 @@ heading: Get Started
8
8
position: 0
9
9
---
10
10
11
-
# Get Started with Kendo UI for Vue Native Components with JavaScript and Composition API
11
+
# Get Started with Kendo UI for Vue
12
12
13
-
In this article you’ll learn how to use Kendo UI for Vue components by building a small app that includes a Grid, a DropDownList, a Window and a design theme.
13
+
This tutorial will help you develop a simple app that includes a few native Vue components: *[Grid]*, *[Component2]*, and *[Component3]*. To achieve this, you will build a project using [Vite](https://vitejs.dev/) and the [Vue Composition API](https://vuejs.org/guide/introduction.html#composition-api) paired with JavaScript.
14
14
15
-
The current example uses the recommended by Vue [Vite build tool](https://vitejs.dev/) + [Vue Composition API](https://vuejs.org/guide/introduction.html#composition-api). If you need Getting started information that uses `Vue Options API`, you can check [this link](slug:getting_started_javascript_options_api).
15
+
>Curious about TypeScript or the Options API? This tutorial comes in several additional variants:
16
+
>*[Kendo UI for Vue with TypeScript and the Composition API](slug:getting_started_typescript_composition_api)
17
+
>*[Kendo UI for Vue with TypeScript and the Options API](slug:getting_started_typescript_options_api)
18
+
>*[Kendo UI for Vue with JavaScript and the Options API](slug:getting_started_javascript_options_api)
16
19
17
-
## 1. Set up the Vue project
18
-
* The recommended way to start with Vue is to scaffold a project using [Vite](https://vuejs.org/guide/scaling-up/tooling.html#vite). To create a new Vite project use one of the following commands for NPM or Yarn.
20
+
## Create the Vue Project
19
21
20
-
Create project commands:
22
+
The recommended way to scaffold your Vue project is using [Vite](https://vuejs.org/guide/scaling-up/tooling.html#vite).
21
23
22
-
```sh
23
-
npm create vite@latest
24
-
```
25
-
or
26
-
```sh
27
-
yarn create vite
28
-
```
24
+
> You can use both NPM and Yarn to create the project and import the Kendo UI for Vue components. However, for the purposes of this tutorial, we demonstrate only NPM.
29
25
30
-
When one of the above commands is executed, the interface will ask you to apply additional configurations to your project:
31
-
1. Set the project name:
32
-
Here we can define the name of our new project. For the needs of the current article, set the name of the application as `my-app`
When you are ready with the above steps, to run the newly created project do the following commands:
41
-
```
42
-
cd my-app
43
-
npm install
44
-
npm run dev
45
-
```
39
+
1. Select the Vue framework by using the arrow keys.
46
40
47
-
## 2. Prepare the Generated Project
41
+
```sh
42
+
? Select a framework: » - Use arrow-keys. Return to submit.
43
+
Vanilla
44
+
> Vue
45
+
React
46
+
...
47
+
```
48
48
49
-
> By default, the Vite scaffolding generates a template for Vue project that uses the [Composition API](https://vuejs.org/guide/introduction.html#composition-api) available in the framework. If you use the [Vue Options API](https://vuejs.org/guide/introduction.html#options-api),a getting started article with it can be found on [this link](slug:getting_started_javascript_options_api).
49
+
1. Select the JavaScript framework variant
50
50
51
-
Before you start playing with Kendo UI for Vue, let’s clean up the sample app a bit. Here is a list of suggested edits:
52
-
* In the `src/components` folder, delete the `HelloWorld.vue` file
53
-
* In the src/App.vue file:
54
-
* Remove the import of the HelloWorld component
51
+
```sh
52
+
? Select a variant: » - Use arrow-keys. Return to submit.
53
+
TypeScript
54
+
> JavaScript
55
+
...
56
+
```
57
+
1. Run the newly created project by executing the following commands:
55
58
56
-
```js
57
-
import HelloWorld from './components/HelloWorld.vue'
58
-
```
59
-
* Remove the following code from the template definition:
Before you start playing with Kendo UI for Vue, clean up the sample app created by Vite:
68
+
69
+
1. In the `src/components` folder, delete the `HelloWorld.vue` file.
70
+
1. Replace the content of the `src/App.vue` with the following:
71
+
72
+
```html
73
+
<script setup>
74
+
</script>
75
+
76
+
<template>
77
+
</template>
78
+
79
+
<style scoped>
80
+
</style>
81
+
```
82
+
83
+
Now that the project is blank, you can start developing the sample application.
84
+
85
+
## Add Application Data
87
86
88
-
Now, when we are ready with the blank Vue project, we can continue the development of our sample application.
87
+
Components like the Grid need some data that the can display, so, in this step, you will add two files with sample data:
89
88
90
-
## 3. Add Application Data
89
+
1. In the `src` folder, create a new folder called `appdata`.
91
90
92
-
Add dummy data needed by the components. Create folder `appdata` in the `src` folder. Add the following files to the `appdata` folder.
91
+
1. Create a new `src/appdata/categories.json` file. Copy the content of [this GitHub file](https://github.com/telerik/kendo-vue/tree/master/getting-started-javascript-composition-api/src/appdata/categories.json) and paste it into the `categories.json` file.
93
92
94
-
* Add a `src/appdata/categories.json` file and copy the content from [this GitHub file](https://github.com/telerik/kendo-vue/tree/master/getting-started-javascript-composition-api/src/appdata/categories.json).
95
-
* Add a `src/appdata/products.json` file and copy the content from [this GitHub file](https://github.com/telerik/kendo-vue/tree/master/getting-started-javascript-composition-api/src/appdata/products.json).
93
+
1. Create a new `src/appdata/products.json` file. Copy the content of [this GitHub file](https://github.com/telerik/kendo-vue/tree/master/getting-started-javascript-composition-api/src/appdata/products.json) and paste it into the `products.json` file.
96
94
97
95
## 4. Import Kendo UI for Vue components
98
96
99
-
Kendo UI for Vue is distributed as multiple NPM packages, scoped to `@progress`. For example, the name of the `Grid` package is `@progress/kendo-vue-grid`.
97
+
Kendo UI for Vue is distributed as multiple NPM packages, scoped to `@progress`. For example, the name of the Grid package is `@progress/kendo-vue-grid`.
100
98
101
99
Kendo UI for Vue is a rich suite of many modular components. For our dashboard example, we’ll use three of these components: The Grid, the DropDownList and the Window.
0 commit comments