1e41f4b71Sopenharmony_ci# picker-view 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci> **NOTE** 4e41f4b71Sopenharmony_ci> This component is supported since API version 4. Updates will be marked with a superscript to indicate their earliest API version. 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ciThe **\<picker-view>** component provides the view that shows an embedded scrollable selector on the screen. 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci## Child Components 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ciNot supported 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ci## Attributes 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ciIn addition to the [universal attributes](js-components-common-attributes.md), the following attributes are supported. 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci| Name | Type | Default Value | Mandatory | Description | 19e41f4b71Sopenharmony_ci| ---- | ------ | ---- | ---- | ---------------------------------------- | 20e41f4b71Sopenharmony_ci| type | string | text | No | Type of the scrollable selector, which cannot be changed dynamically. Available values are as follows:<br>- **text**: text selector.<br>- **time**: time selector.<br>- **date**: date selector.<br>- **datetime**: date and time selector.<br>- **multi-text**: multi-column text selector.| 21e41f4b71Sopenharmony_ci 22e41f4b71Sopenharmony_ci### Text Selector 23e41f4b71Sopenharmony_ci 24e41f4b71Sopenharmony_ci| Name | Type | Default Value | Mandatory | Description | 25e41f4b71Sopenharmony_ci| --------------- | ------ | ---- | ---- | ---------------------------------------- | 26e41f4b71Sopenharmony_ci| range | Array | - | No | Value range of the text selector.<br>Use the data binding mode, for example, `range = {{data}}`. Declare the corresponding variable `data: ["15", "20", "25"]` in JavaScript.| 27e41f4b71Sopenharmony_ci| selected | string | 0 | No | Default value of the text selector. The value is the index of **range**. | 28e41f4b71Sopenharmony_ci| indicatorprefix | string | - | No | Prefix field added when a value is specified for the text selector. | 29e41f4b71Sopenharmony_ci| indicatorsuffix | string | - | No | Suffix field added when a value is specified for the text selector. | 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ci### Time Selector 32e41f4b71Sopenharmony_ci 33e41f4b71Sopenharmony_ci| Name | Type | Default Value | Mandatory | Description | 34e41f4b71Sopenharmony_ci| ------------- | ------- | ----------------------------------- | ---- | ---------------------------------------- | 35e41f4b71Sopenharmony_ci| containsecond | boolean | false | No | Whether seconds are contained. | 36e41f4b71Sopenharmony_ci| selected | string | Current time | No | Default value of the time selector, in the format of HH:mm.<br>If seconds are contained, the format is HH:mm:ss.| 37e41f4b71Sopenharmony_ci| hours | number | 24<sup>1-4</sup><br>-<sup>5+</sup> | No | Time format used by the time selector. Available values are as follows:<br>- **12**: displayed in 12-hour format and distinguished by a.m. and p.m.<br>- **24**: displayed in 24-hour format.<br>Since API version 5, the default value is the most commonly-used hour format in the current locale.| 38e41f4b71Sopenharmony_ci 39e41f4b71Sopenharmony_ci### Date Selector 40e41f4b71Sopenharmony_ci 41e41f4b71Sopenharmony_ci| Name | Type | Default Value | Mandatory | Description | 42e41f4b71Sopenharmony_ci| ------------------ | ------------ | ---------- | ---- | ---------------------------------------- | 43e41f4b71Sopenharmony_ci| start | <time> | 1970-1-1 | No | Start date of the date selector, in the format of YYYY-MM-DD. | 44e41f4b71Sopenharmony_ci| end | <time> | 2100-12-31 | No | End date of the date selector, in the format of YYYY-MM-DD. | 45e41f4b71Sopenharmony_ci| selected | string | Current date | No | Default value of the date selector, in the format of YYYY-MM-DD. | 46e41f4b71Sopenharmony_ci| lunar<sup>5+</sup> | boolean | false | No | Whether the pop-up window displays the lunar calendar. | 47e41f4b71Sopenharmony_ci| lunarswitch | boolean | false | No | Whether to display the lunar calendar switch in the date selector. When this switch is displayed, the user can switch between the lunar calendar and Gregorian calendar. Turn on the switch to display the lunar calendar, and turn off the switch to hide the lunar calendar.| 48e41f4b71Sopenharmony_ci 49e41f4b71Sopenharmony_ci### Date and Time Selector 50e41f4b71Sopenharmony_ci 51e41f4b71Sopenharmony_ci| Name | Type | Default Value | Mandatory | Description | 52e41f4b71Sopenharmony_ci| ------------------ | ------- | ----------------------------------- | ---- | ---------------------------------------- | 53e41f4b71Sopenharmony_ci| selected | string | Current date and time | No | Default value of the date and time selector. The value can be in the format of MM-DD-HH-mm or YYYY-MM-DD-HH-mm. If the year is not set, the current year is used by default. The value you set is the date selected by default in the pop-up window.| 54e41f4b71Sopenharmony_ci| hours | number | 24<sup>1-4</sup><br>-<sup>5+</sup> | No | Time format used by the date and time selector. Available values are as follows:<br>- **12**: displayed in 12-hour format and distinguished by a.m. and p.m.<br>- **24**: displayed in 24-hour format.<br>Since API version 5, the default value is the most commonly-used hour format in the current locale.| 55e41f4b71Sopenharmony_ci| lunar<sup>5+</sup> | boolean | false | No | Whether the pop-up window displays the lunar calendar. | 56e41f4b71Sopenharmony_ci| lunarswitch | boolean | false | No | Whether to display the lunar calendar switch in the date and time selector. When this switch is displayed, the user can switch between the lunar calendar and Gregorian calendar. Turn on the switch to display the lunar calendar, and turn off the switch to hide the lunar calendar.| 57e41f4b71Sopenharmony_ci 58e41f4b71Sopenharmony_ci### Multi-Column Text Selector 59e41f4b71Sopenharmony_ci 60e41f4b71Sopenharmony_ci| Name | Type | Default Value | Mandatory | Description | 61e41f4b71Sopenharmony_ci| -------- | ------- | --------- | ---- | ---------------------------------------- | 62e41f4b71Sopenharmony_ci| columns | number | - | Yes | Number of columns in the multi-column text selector. | 63e41f4b71Sopenharmony_ci| range | Two-dimensional array| - | No | Items of the multi-column text selector. The value is a two-dimensional array that indicates the number of columns. Each item in the array indicates the data of each column, for example, **[["a", "b"], ["c", "d"]]**.<br>Use the data binding mode, for example, `range = {{data}}`. Declare the corresponding variable `data: ["15", "20", "25"]` in JavaScript.| 64e41f4b71Sopenharmony_ci| selected | Array | [0,0,0,…]| No | Default value of the multi-column text selector, which is an array consisting of the indexes of the selected items in each column.| 65e41f4b71Sopenharmony_ci 66e41f4b71Sopenharmony_ci 67e41f4b71Sopenharmony_ci## Styles 68e41f4b71Sopenharmony_ci 69e41f4b71Sopenharmony_ciIn addition to the [universal styles](js-components-common-styles.md), the following styles are supported. 70e41f4b71Sopenharmony_ci 71e41f4b71Sopenharmony_ci| Name | Type | Default Value | Mandatory | Description | 72e41f4b71Sopenharmony_ci| -------------------------------- | -------------- | ---------- | ---- | ---------------------------------------- | 73e41f4b71Sopenharmony_ci| color | <color> | \#ffffff | No | Font color of a candidate item. | 74e41f4b71Sopenharmony_ci| font-size | <length> | 16px | No | Font size of a candidate item. The value is of the length type, in pixels. | 75e41f4b71Sopenharmony_ci| selected-color | <color> | #ff0a69f7 | No | Font color of the selected item. | 76e41f4b71Sopenharmony_ci| selected-font-size | <length> | 20px | No | Font size of the selected item. The value is of the length type, in pixels. | 77e41f4b71Sopenharmony_ci| disappear-color<sup>5+</sup> | <color> | \#ffffff | No | Font color of the items that gradually disappear. Disappearing items are the top option and bottom option of a column containing five options in total. | 78e41f4b71Sopenharmony_ci| disappear-font-size<sup>5+</sup> | <length> | 14px | No | Font size of the items that gradually disappear. Disappearing items are the top option and bottom option of a column containing five options in total. | 79e41f4b71Sopenharmony_ci| font-family | string | sans-serif | No | Font family of the selector, in which fonts are separated by commas (,). Each font is set using a font name or font family name. The first font in the family or the specified [custom font](js-components-common-customizing-font.md) is used for the text.| 80e41f4b71Sopenharmony_ci 81e41f4b71Sopenharmony_ci 82e41f4b71Sopenharmony_ci## Events 83e41f4b71Sopenharmony_ci 84e41f4b71Sopenharmony_ciThe following events are supported. 85e41f4b71Sopenharmony_ci 86e41f4b71Sopenharmony_ci### Text Selector 87e41f4b71Sopenharmony_ci 88e41f4b71Sopenharmony_ci| Name | Parameter | Description | 89e41f4b71Sopenharmony_ci| ------ | ---------------------------------------- | --------------- | 90e41f4b71Sopenharmony_ci| change | { newValue: newValue, newSelected: newSelected } | Triggered when a value is specified for the text selector.| 91e41f4b71Sopenharmony_ci 92e41f4b71Sopenharmony_ci### Time Selector 93e41f4b71Sopenharmony_ci 94e41f4b71Sopenharmony_ci| Name | Parameter | Description | 95e41f4b71Sopenharmony_ci| ------ | ---------------------------------------- | ------------------------------- | 96e41f4b71Sopenharmony_ci| change | { hour: hour, minute: minute, [second:second]} | Triggered when a value is specified for the time selector.<br>If seconds are contained, the value contains hour, minute, and second.| 97e41f4b71Sopenharmony_ci 98e41f4b71Sopenharmony_ci### Date Selector 99e41f4b71Sopenharmony_ci 100e41f4b71Sopenharmony_ci| Name | Parameter | Description | 101e41f4b71Sopenharmony_ci| ------ | ---------------------------------------- | --------------- | 102e41f4b71Sopenharmony_ci| change | { year:year, month:month, day:day } | Triggered when a value is specified for the date selector.| 103e41f4b71Sopenharmony_ci 104e41f4b71Sopenharmony_ci### Date and Time Selector 105e41f4b71Sopenharmony_ci 106e41f4b71Sopenharmony_ci| Name | Parameter | Description | 107e41f4b71Sopenharmony_ci| ------ | ---------------------------------------- | ----------------- | 108e41f4b71Sopenharmony_ci| change | { year:year, month:month, day:day, hour:hour, minute:minute } | Triggered when a value is specified for the date and time selector.| 109e41f4b71Sopenharmony_ci 110e41f4b71Sopenharmony_ci### Multi-Column Text Selector 111e41f4b71Sopenharmony_ci 112e41f4b71Sopenharmony_ci| Name | Parameter | Description | 113e41f4b71Sopenharmony_ci| ------------ | ---------------------------------------- | ---------------------------------------- | 114e41f4b71Sopenharmony_ci| columnchange | { column:column, newValue:newValue, newSelected:newSelected } | Triggered when the value of a column in the multi-column selector changes. <br>**column**: column whose value has changed. <br>**newValue**: selected value. <br>**newSelected**: index of the selected value.| 115e41f4b71Sopenharmony_ci 116e41f4b71Sopenharmony_ci 117e41f4b71Sopenharmony_ci## Methods 118e41f4b71Sopenharmony_ci 119e41f4b71Sopenharmony_ciNot supported 120e41f4b71Sopenharmony_ci 121e41f4b71Sopenharmony_ci 122e41f4b71Sopenharmony_ci## Example 123e41f4b71Sopenharmony_ci### Text Selector 124e41f4b71Sopenharmony_ci 125e41f4b71Sopenharmony_ci```html 126e41f4b71Sopenharmony_ci<!-- xxx.hml --> 127e41f4b71Sopenharmony_ci<div class="container"> 128e41f4b71Sopenharmony_ci <text class="title"> 129e41f4b71Sopenharmony_ci Selected value: {{value}} Selected index: {{index}} 130e41f4b71Sopenharmony_ci </text> 131e41f4b71Sopenharmony_ci <picker-view class="text-picker" type="text" range="{{options}}" selected="0" indicatorprefix="prefix" indicatorsuffix="suffix" @change="handleChange"></picker-view> 132e41f4b71Sopenharmony_ci</div> 133e41f4b71Sopenharmony_ci``` 134e41f4b71Sopenharmony_ci 135e41f4b71Sopenharmony_ci```css 136e41f4b71Sopenharmony_ci/* xxx.css */ 137e41f4b71Sopenharmony_ci.container { 138e41f4b71Sopenharmony_ci flex-direction: column; 139e41f4b71Sopenharmony_ci justify-content: center; 140e41f4b71Sopenharmony_ci align-items: center; 141e41f4b71Sopenharmony_ci width: 100%; 142e41f4b71Sopenharmony_ci height: 50%; 143e41f4b71Sopenharmony_ci} 144e41f4b71Sopenharmony_ci.title { 145e41f4b71Sopenharmony_ci font-size: 30px; 146e41f4b71Sopenharmony_ci text-align: center; 147e41f4b71Sopenharmony_ci margin-top: 50%; 148e41f4b71Sopenharmony_ci} 149e41f4b71Sopenharmony_ci``` 150e41f4b71Sopenharmony_ci 151e41f4b71Sopenharmony_ci```js 152e41f4b71Sopenharmony_ci/* xxx.js */ 153e41f4b71Sopenharmony_ciexport default { 154e41f4b71Sopenharmony_ci data: { 155e41f4b71Sopenharmony_ci options: ['Option 1','Option 2','Option 3'], 156e41f4b71Sopenharmony_ci value: "Option 1", 157e41f4b71Sopenharmony_ci index: 0 158e41f4b71Sopenharmony_ci }, 159e41f4b71Sopenharmony_ci handleChange(data) { 160e41f4b71Sopenharmony_ci this.value = data.newValue; 161e41f4b71Sopenharmony_ci this.index = data.newSelected; 162e41f4b71Sopenharmony_ci }, 163e41f4b71Sopenharmony_ci} 164e41f4b71Sopenharmony_ci``` 165e41f4b71Sopenharmony_ci 166e41f4b71Sopenharmony_ci 167e41f4b71Sopenharmony_ci### Time Selector 168e41f4b71Sopenharmony_ci 169e41f4b71Sopenharmony_ci```html 170e41f4b71Sopenharmony_ci<!-- xxx.hml --> 171e41f4b71Sopenharmony_ci<div class="container"> 172e41f4b71Sopenharmony_ci <text class="title"> 173e41f4b71Sopenharmony_ci Selected: {{time}} 174e41f4b71Sopenharmony_ci </text> 175e41f4b71Sopenharmony_ci <picker-view class="time-picker" type="time" selected="{{defaultTime}}" @change="handleChange"></picker-view> 176e41f4b71Sopenharmony_ci</div> 177e41f4b71Sopenharmony_ci``` 178e41f4b71Sopenharmony_ci 179e41f4b71Sopenharmony_ci```css 180e41f4b71Sopenharmony_ci/* xxx.css */ 181e41f4b71Sopenharmony_ci.container { 182e41f4b71Sopenharmony_ci flex-direction: column; 183e41f4b71Sopenharmony_ci justify-content: center; 184e41f4b71Sopenharmony_ci align-items: center; 185e41f4b71Sopenharmony_ci width: 100%; 186e41f4b71Sopenharmony_ci height: 50%; 187e41f4b71Sopenharmony_ci} 188e41f4b71Sopenharmony_ci.title { 189e41f4b71Sopenharmony_ci font-size: 31px; 190e41f4b71Sopenharmony_ci text-align: center; 191e41f4b71Sopenharmony_ci margin-top: 50%; 192e41f4b71Sopenharmony_ci} 193e41f4b71Sopenharmony_ci``` 194e41f4b71Sopenharmony_ci 195e41f4b71Sopenharmony_ci```js 196e41f4b71Sopenharmony_ci/* xxx.js */ 197e41f4b71Sopenharmony_ciexport default { 198e41f4b71Sopenharmony_ci data: { 199e41f4b71Sopenharmony_ci defaultTime: "", 200e41f4b71Sopenharmony_ci time: "", 201e41f4b71Sopenharmony_ci }, 202e41f4b71Sopenharmony_ci onInit() { 203e41f4b71Sopenharmony_ci this.defaultTime = this.now(); 204e41f4b71Sopenharmony_ci }, 205e41f4b71Sopenharmony_ci handleChange(data) { 206e41f4b71Sopenharmony_ci this.time = this.concat(data.hour, data.minute); 207e41f4b71Sopenharmony_ci }, 208e41f4b71Sopenharmony_ci now() { 209e41f4b71Sopenharmony_ci const date = new Date(); 210e41f4b71Sopenharmony_ci const hours = date.getHours(); 211e41f4b71Sopenharmony_ci const minutes = date.getMinutes(); 212e41f4b71Sopenharmony_ci return this.concat(hours, minutes); 213e41f4b71Sopenharmony_ci }, 214e41f4b71Sopenharmony_ci fill(value) { 215e41f4b71Sopenharmony_ci return (value > 9 ? "" : "0") + value; 216e41f4b71Sopenharmony_ci }, 217e41f4b71Sopenharmony_ci concat(hours, minutes) { 218e41f4b71Sopenharmony_ci return `${this.fill(hours)}:${this.fill(minutes)}`; 219e41f4b71Sopenharmony_ci }, 220e41f4b71Sopenharmony_ci} 221e41f4b71Sopenharmony_ci``` 222e41f4b71Sopenharmony_ci 223e41f4b71Sopenharmony_ci 224e41f4b71Sopenharmony_ci 225e41f4b71Sopenharmony_ci### Date Selector 226e41f4b71Sopenharmony_ci 227e41f4b71Sopenharmony_ci```html 228e41f4b71Sopenharmony_ci<!-- xxx.hml --> 229e41f4b71Sopenharmony_ci<div class="container"> 230e41f4b71Sopenharmony_ci <text class="title"> 231e41f4b71Sopenharmony_ci Selected: {{date}} 232e41f4b71Sopenharmony_ci </text> 233e41f4b71Sopenharmony_ci <picker-view class="time-picker" type="date" selected="{{defaultTime}}" @change="handleChange" lunarswitch="true"></picker-view> 234e41f4b71Sopenharmony_ci</div> 235e41f4b71Sopenharmony_ci``` 236e41f4b71Sopenharmony_ci 237e41f4b71Sopenharmony_ci```css 238e41f4b71Sopenharmony_ci/* xxx.css */ 239e41f4b71Sopenharmony_ci.container { 240e41f4b71Sopenharmony_ci flex-direction: column; 241e41f4b71Sopenharmony_ci justify-content: center; 242e41f4b71Sopenharmony_ci align-items: center; 243e41f4b71Sopenharmony_ci width: 100%; 244e41f4b71Sopenharmony_ci height: 50%; 245e41f4b71Sopenharmony_ci} 246e41f4b71Sopenharmony_ci.title { 247e41f4b71Sopenharmony_ci font-size: 31px; 248e41f4b71Sopenharmony_ci text-align: center; 249e41f4b71Sopenharmony_ci margin-top: 50%; 250e41f4b71Sopenharmony_ci} 251e41f4b71Sopenharmony_ci``` 252e41f4b71Sopenharmony_ci 253e41f4b71Sopenharmony_ci```js 254e41f4b71Sopenharmony_ci/* xxx.js */ 255e41f4b71Sopenharmony_ciexport default { 256e41f4b71Sopenharmony_ci data: { 257e41f4b71Sopenharmony_ci date: "", 258e41f4b71Sopenharmony_ci }, 259e41f4b71Sopenharmony_ci handleChange(data) { 260e41f4b71Sopenharmony_ci this.date = data.year + "/" + data.month + "/" + data.day + ""; 261e41f4b71Sopenharmony_ci }, 262e41f4b71Sopenharmony_ci} 263e41f4b71Sopenharmony_ci``` 264e41f4b71Sopenharmony_ci 265e41f4b71Sopenharmony_ci 266e41f4b71Sopenharmony_ci### Date and Time Selector 267e41f4b71Sopenharmony_ci 268e41f4b71Sopenharmony_ci```html 269e41f4b71Sopenharmony_ci<!-- xxx.hml --> 270e41f4b71Sopenharmony_ci<div class="container"> 271e41f4b71Sopenharmony_ci <text class="title"> 272e41f4b71Sopenharmony_ci Selected: {{datetime}} 273e41f4b71Sopenharmony_ci </text> 274e41f4b71Sopenharmony_ci <picker-view class="date-picker" type="datetime" hours="24" lunarswitch="true" @change="handleChange"></picker-view> 275e41f4b71Sopenharmony_ci</div> 276e41f4b71Sopenharmony_ci``` 277e41f4b71Sopenharmony_ci 278e41f4b71Sopenharmony_ci```css 279e41f4b71Sopenharmony_ci/* xxx.css */ 280e41f4b71Sopenharmony_ci.container { 281e41f4b71Sopenharmony_ci flex-direction: column; 282e41f4b71Sopenharmony_ci justify-content: center; 283e41f4b71Sopenharmony_ci align-items: center; 284e41f4b71Sopenharmony_ci width: 100%; 285e41f4b71Sopenharmony_ci height: 50%; 286e41f4b71Sopenharmony_ci} 287e41f4b71Sopenharmony_ci.title { 288e41f4b71Sopenharmony_ci font-size: 31px; 289e41f4b71Sopenharmony_ci text-align: center; 290e41f4b71Sopenharmony_ci margin-top: 50%; 291e41f4b71Sopenharmony_ci} 292e41f4b71Sopenharmony_ci``` 293e41f4b71Sopenharmony_ci 294e41f4b71Sopenharmony_ci```js 295e41f4b71Sopenharmony_ci/* xxx.js */ 296e41f4b71Sopenharmony_ciexport default { 297e41f4b71Sopenharmony_ci data: { 298e41f4b71Sopenharmony_ci datetime: "", 299e41f4b71Sopenharmony_ci }, 300e41f4b71Sopenharmony_ci handleChange(data) { 301e41f4b71Sopenharmony_ci this.datetime = data.year + "/" + data.month + "/" + data.day + "" + data.hour + ":" + data.minute + ""; 302e41f4b71Sopenharmony_ci }, 303e41f4b71Sopenharmony_ci} 304e41f4b71Sopenharmony_ci``` 305e41f4b71Sopenharmony_ci 306e41f4b71Sopenharmony_ci 307e41f4b71Sopenharmony_ci### Multi-Column Text Selector 308e41f4b71Sopenharmony_ci 309e41f4b71Sopenharmony_ci```html 310e41f4b71Sopenharmony_ci<!-- xxx.hml --> 311e41f4b71Sopenharmony_ci<div class="container"> 312e41f4b71Sopenharmony_ci <text class="title"> 313e41f4b71Sopenharmony_ci Selected: {{ value }} 314e41f4b71Sopenharmony_ci </text> 315e41f4b71Sopenharmony_ci <picker-view class="multitype-picker" type="multi-text" columns="3" range="{{ multitext }}" @columnchange="handleChange"></picker-view> 316e41f4b71Sopenharmony_ci</div> 317e41f4b71Sopenharmony_ci``` 318e41f4b71Sopenharmony_ci 319e41f4b71Sopenharmony_ci```css 320e41f4b71Sopenharmony_ci/* xxx.css */ 321e41f4b71Sopenharmony_ci.container { 322e41f4b71Sopenharmony_ci flex-direction: column; 323e41f4b71Sopenharmony_ci justify-content: center; 324e41f4b71Sopenharmony_ci align-items: center; 325e41f4b71Sopenharmony_ci width: 100%; 326e41f4b71Sopenharmony_ci height: 50%; 327e41f4b71Sopenharmony_ci} 328e41f4b71Sopenharmony_ci.title { 329e41f4b71Sopenharmony_ci font-size: 31px; 330e41f4b71Sopenharmony_ci text-align: center; 331e41f4b71Sopenharmony_ci margin-top: 50%; 332e41f4b71Sopenharmony_ci} 333e41f4b71Sopenharmony_ci``` 334e41f4b71Sopenharmony_ci 335e41f4b71Sopenharmony_ci```js 336e41f4b71Sopenharmony_ci/* xxx.js */ 337e41f4b71Sopenharmony_ciexport default { 338e41f4b71Sopenharmony_ci data: { 339e41f4b71Sopenharmony_ci multitext: [ 340e41f4b71Sopenharmony_ci [1, 2, 3], 341e41f4b71Sopenharmony_ci [4, 5, 6], 342e41f4b71Sopenharmony_ci [7, 8, 9], 343e41f4b71Sopenharmony_ci ], 344e41f4b71Sopenharmony_ci value: "" 345e41f4b71Sopenharmony_ci }, 346e41f4b71Sopenharmony_ci handleChange(data) { 347e41f4b71Sopenharmony_ci this.value = "Column: " + data.column + "," + "Value: " + data.newValue + ", Index:" + data.newSelected; 348e41f4b71Sopenharmony_ci }, 349e41f4b71Sopenharmony_ci} 350e41f4b71Sopenharmony_ci``` 351e41f4b71Sopenharmony_ci 352