0

hello i am new among you, I want to transfer the data from the props to the "items new" data, but it didn't work no matter what I did. is there a way to run this?

  {{ itemsnew }}
</template>
<script>
export default {
  name: 'ImageList',
  props: ['items'],
  data() {
    return {
      itemsnew: this.files(),
      dragging: false,
    }
  },
  computed: {
    files() {
      return this.items
    },
  },
}
</script>
kralyolda
  • 115
  • 1
  • 8
  • Does this answer your question? [Accessing props in vue component data function](https://stackoverflow.com/questions/42722433/accessing-props-in-vue-component-data-function) – Michael T Jun 13 '22 at 11:49
  • when I push an item it doesn't work – kralyolda Jun 13 '22 at 12:01
  • So you are able to access the props from inside the data function, but cannot modify the data? If so, please edit your question accordingly so we can more easily understand your problem. – Michael T Jun 13 '22 at 14:26

0 Answers0