| 12345678910111213141516171819202122232425262728293031 |
- <template>
- <view class="">
- <button @click="change">修改</button>
- <view class="margin-left-50" v-for="(item,index) in list" :key="index">
- <text>{{item.name}}</text>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: '',
- data() {
- return {
- list:[{
- id:1,
- name:'a'
- }]
- };
- },
- methods:{
- change(){
- this.list[0].name='b'
- }
- }
- };
- </script>
- <style lang="scss" scoped>
-
- </style>
|