diff --git a/docs/getting-started/get-started-nuxt-3.md b/docs/getting-started/get-started-nuxt-3.md index b93cefbb..9d2d3e87 100644 --- a/docs/getting-started/get-started-nuxt-3.md +++ b/docs/getting-started/get-started-nuxt-3.md @@ -10,8 +10,6 @@ position: 100 # Get Started with Kendo UI for Vue -> Prefer video tutorials? How about a free Telerik UI onboarding course? Check out the [Kendo UI for Vue with TypeScript](https://learn.telerik.com/learn/course/internal/view/elearning/45/kendo-ui-for-vue-with-typescript) training in [Telerik Virtual Classroom](https://learn.telerik.com/learn). - This tutorial will help you develop a simple app that includes a native Vue Data Grid component. 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 [Nuxt 3](https://nuxt.com/docs/getting-started/introduction) @@ -20,36 +18,37 @@ This tutorial will help you develop a simple app that includes a native Vue Data >* [Kendo UI for Vue with JavaScript and the Options API](slug:getting_started_javascript_options_api) >* [Kendo UI for Vue with TypeScript and the Options API](slug:getting_started_typescript_options_api) -> Historically, all Kendo UI for Vue Native components have supported both **Vue 2** and **Vue 3**. However, Kendo UI for Vue versions released after **November 2024** will no longer support Vue 2. For more information, see [Vue 2 End of Life](https://www.telerik.com/kendo-vue-ui/components/vue2-deprecation/). - ## Create the Vue Project 1. Create a Nuxt project named `my-app`: -```sh -npx nuxi init my-app -``` + ```sh + npx nuxi init my-app + ``` + +1. Select the NPM package manager. + + > You can use both NPM and Yarn to create the project and import the Kendo UI for Vue components. This tutorial demonstrates only the NPM approach. 1. Run the newly created project by executing the following commands: -``` -cd my-app -npm install -npm run dev -``` + ``` + cd my-app + npm install + npm run dev + ``` ## Clean Up the Generated Project -Before you start playing with Kendo UI for Vue, clean up the sample app created by Nuxt: +Before you start playing with Kendo UI for Vue, clean up the Nuxt sample app: -1. Delete the `` line inside the `app.vue` file +1. Replace the `` line inside the `app.vue` file with ``. +1. Delete everything in the `nuxt.config.ts` file. ## Add Application Data Add dummy data needed by the components. Create folder `appdata` in the `src` folder. Add the following files to the `appdata` folder. -1. Create a new `appdata/categories.ts` file. Copy the content of [this GitHub file](https://github.com/telerik/kendo-vue/tree/master/getting-started-nuxt3/appdata/categories.ts) and paste it into the `categories.ts` file. - 1. Create a new `appdata/products.ts` file. Copy the content of [this GitHub file](https://github.com/telerik/kendo-vue/tree/master/getting-started-nuxt3/appdata/products.ts) and paste it into the `products.ts` file. ## Install the Data Grid Component @@ -59,11 +58,6 @@ Kendo UI for Vue is distributed as multiple NPM packages, scoped to `@progress`. ```sh npm install --save @progress/kendo-vue-grid @progress/kendo-data-query @progress/kendo-licensing @progress/kendo-vue-animation @progress/kendo-vue-data-tools @progress/kendo-vue-dateinputs @progress/kendo-vue-dropdowns @progress/kendo-vue-inputs @progress/kendo-vue-indicators @progress/kendo-vue-intl @progress/kendo-vue-popup ``` - ## Import the CSS Styles @@ -74,94 +68,218 @@ Kendo UI for Vue includes [four artfully designed themes](slug:themesandstyles) ```sh npm install --save @progress/kendo-theme-default ``` - 1. In the `nuxt.config.ts` file, import the CSS files provided by the installed theme package: - ```js - import '@progress/kendo-theme-default/dist/all.css'; + ```ts + export default defineNuxtConfig({ + css: [ + '@progress/kendo-theme-default/dist/all.css', + ], + }) ``` +>To add any custom styles to your app, insert a `` tag in the `src/App.vue` file and place your styles there. ## Add a Vue Data Grid Component - 1. Now that you've installed all required packages, you are ready to add the Kendo UI for Vue Data Grid to the application. -```sh -npx nuxi add page KendoGrid -``` - -1. In the `pages/KendoGrid.vue` file, add a ` + ``` 1. Add a ` ``` +That's it. You now have a Data Grid configured for paging and sorting. -## Get the Complete Source Code +> Historically, all Kendo UI for Vue native components have supported both **Vue 2** and **Vue 3**. However, Kendo UI for Vue versions released after **November 2024** will no longer support Vue 2. For more information, see [Vue 2 End of Life](https://www.telerik.com/kendo-vue-ui/components/vue2-deprecation/). +## Get the Complete Source Code + Your Kendo UI for Vue Getting Started application is complete! You can download and run the complete sample application from the [kendo-vue GitHub repository](https://github.com/telerik/kendo-vue/tree/master/getting-started-javascript-options-api). Alternatively, run, fork and [experiment with the application directly in StackBlitz](https://stackblitz.com/edit/vue3-vite-starter-75eowq?file=src%2FApp.vue). - - + ## Next Steps - + * [Activate Your Kendo UI for Vue License](slug:my_license_vue) * [Create Projects Faster with the Kendo UI for Vue VS Code Extension](slug:getting_started_vscode) * [Take a Free Entry-Level Kendo UI for Vue (with TypeScript) Course](https://learn.telerik.com/learn/course/internal/view/elearning/45/kendo-ui-for-vue-with-typescript) \ No newline at end of file diff --git a/docs/getting-started/typescript-composition-api.md b/docs/getting-started/typescript-composition-api.md index 49f99030..98c4f58b 100644 --- a/docs/getting-started/typescript-composition-api.md +++ b/docs/getting-started/typescript-composition-api.md @@ -10,8 +10,6 @@ position: 20 # Get Started with Kendo UI for Vue -> Prefer video tutorials? How about a free Telerik UI onboarding course? Check out the [Kendo UI for Vue with TypeScript](https://learn.telerik.com/learn/course/internal/view/elearning/45/kendo-ui-for-vue-with-typescript) training in [Telerik Virtual Classroom](https://learn.telerik.com/learn). - This tutorial will help you develop a simple app that includes a native Vue Data Grid component. 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 TypeScript. @@ -20,9 +18,6 @@ This tutorial will help you develop a simple app that includes a native Vue Data >* [Kendo UI for Vue with JavaScript and the Options API](slug:getting_started_javascript_options_api) >* [Kendo UI for Vue with the Composition API and Nuxt 3](slug:getting_started_nuxt_3) -> Historically, all Kendo UI for Vue Native components have supported both **Vue 2** and **Vue 3**. However, Kendo UI for Vue versions released after **November 2024** will no longer support Vue 2. For more information, see [Vue 2 End of Life](https://www.telerik.com/kendo-vue-ui/components/vue2-deprecation/). - - ## Create the Vue Project The recommended way to scaffold your Vue project is using [Vite](https://vuejs.org/guide/scaling-up/tooling.html#vite). @@ -34,12 +29,7 @@ The recommended way to scaffold your Vue project is using [Vite](https://vuejs.o ```sh npm create vite@latest ``` - - + 1. Enter the project name, for example, `my-app`. 1. Select the Vue framework by using the arrow keys. @@ -83,10 +73,9 @@ Now that the project is clean, you can start developing the sample application. Components like the Grid need some data that they can display, so, in this step, you will add a file with sample data: -1. Create a new `src/appdata/products.ts` file. Copy the content of [this GitHub file](https://github.com/telerik/kendo-vue/tree/master/getting-started-typescript-composition-api/src/appdata/categories.ts) and paste it into the `products.ts` file. - -1. Create a new `src/appdata/categories.ts` file. Copy the content of [this GitHub file](https://github.com/telerik/kendo-vue/tree/master/getting-started-typescript-composition-api/src/appdata/categories.ts) and paste it into the `products.ts` file. - +1. In the `src` folder, create a new folder called `appdata`. +2. In the `appdata` folder, create a new file called `products.ts`. +3. Copy the content of [this GitHub file](https://github.com/telerik/kendo-vue/blob/master/getting-started-typescript-composition-api/src/appdata/products.ts) and paste it into the `products.ts` file. ## Install the Data Grid Component @@ -95,11 +84,7 @@ Kendo UI for Vue is distributed as multiple NPM packages, scoped to `@progress`. ```sh npm install --save @progress/kendo-vue-grid @progress/kendo-data-query @progress/kendo-licensing @progress/kendo-vue-animation @progress/kendo-vue-data-tools @progress/kendo-vue-dateinputs @progress/kendo-vue-dropdowns @progress/kendo-vue-inputs @progress/kendo-vue-indicators @progress/kendo-vue-intl @progress/kendo-vue-popup ``` - + ## Import the CSS Styles @@ -110,140 +95,250 @@ Kendo UI for Vue includes [four artfully designed themes](slug:themesandstyles) ```sh npm install --save @progress/kendo-theme-default ``` - -1. In the `src/App.vue` file, import the CSS files provided by the installed theme package: + +1. In the `src/App.vue` file, add a ` ``` -You can add any additional custom styles in the `` tag of the `src/App.vue` file. - - +To add any custom styles to your app, insert a `` tag in the `src/App.vue` file and place your styles there. ## Add a Vue Data Grid Component Now that you've installed all required packages, you are ready to add the Kendo UI for Vue Data Grid to the application: -1. In the `src/App.vue` file, add a ` + import { defineComponent } from 'vue'; + import { productsData } from './appdata/products'; + import { Grid, GridColumnProps } from '@progress/kendo-vue-grid'; ``` 1. Add a `