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
+31-51Lines changed: 31 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ Now that the project is clean, you can start developing the sample application.
74
74
75
75
## Add Application Data
76
76
77
-
Components like the Grid need some data that the can display, so, in this step, you will add a file with sample data:
77
+
Components like the Grid need some data that they can display, so, in this step, you will add a file with sample data:
78
78
79
79
1. In the `src` folder, create a new folder called `appdata` where you will place the JSON file with the data.
80
80
@@ -143,31 +143,34 @@ Now that you've installed all required packages, you are ready to add the Kendo
143
143
</template>
144
144
```
145
145
146
-
1. Define the Grid in the `<script>` block. Add user-friendly [column titles](slug:api_grid_gridcolumnprops#toc-title) by using the `title` property:
146
+
1. Define the Grid in the `<script setup>` configuration. Add user-friendly [column titles](slug:api_grid_gridcolumnprops#toc-title) by using the `title` property:
147
147
148
148
```js
149
-
export default defineComponent({
150
-
components: {
151
-
'grid': Grid,
152
-
},
153
-
setup() {
154
-
const products = productsData;
155
-
const columns = [
156
-
{ field: 'ProductName', title: 'Product Name' },
157
-
{ field: 'UnitPrice', title: 'Price' },
158
-
{ field: 'UnitsInStock', title: 'Units in Stock' },
159
-
{ field: 'Discontinued' }
160
-
];
161
-
}
162
-
return {
163
-
products, columns,
149
+
<script setup>
150
+
import { ref, onMounted } from 'vue'
151
+
152
+
// reactive state
153
+
const count = ref(0)
154
+
155
+
// functions that mutate state and trigger updates
156
+
function increment() {
157
+
count.value++
164
158
}
159
+
160
+
// lifecycle hooks
161
+
onMounted(() => {
162
+
console.log(`The initial count is ${count.value}.`)
165
163
})
164
+
</script>
165
+
166
+
<template>
167
+
<button @click="increment">Count is: {{ count }}</button>
168
+
</template>
166
169
```
167
170
168
171
These steps let you render a very basic Grid by running `npm run dev` and navigating to the local URL displayed in the terminal.
169
172
170
-
> Notice the `No valid license found` message and the watermark in the Grid. They are information and encourage you to activate your trial or commercial license and to [add a license file to your application](slug:my_license_vue). Once you add a valid license file, the license message and the watermark will disappear.
173
+
> Notice the `No valid license found` message and the watermark in the Grid. They are informational and encourage you to activate your trial or commercial license and to [add a license file to your application](slug:my_license_vue). Once you complete these licensing steps, the license message and the watermark will disappear.
171
174
172
175
## Configure the Vue Data Grid
173
176
@@ -193,40 +196,17 @@ Now that you have a running Grid, you are ready to use some of its basic feature
193
196
* Set the initial [`skip`](slug:api_grid_gridprops#toc-skip) for the paging.
194
197
* Set the initial [sorting](slug:api_grid_gridprops#toc-sort) by Product name.
195
198
196
-
```js
197
-
<script>
198
-
import { ref, defineComponent } from 'vue';
199
-
import productsData from './appdata/products.json';
0 commit comments