Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在uni-app中使用报warn #4

Closed
arthasshi opened this issue Jun 12, 2019 · 3 comments
Closed

在uni-app中使用报warn #4

arthasshi opened this issue Jun 12, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@arthasshi
Copy link

[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "showPicker"
11:39:59.951 found in
11:39:59.951 ---> node-modules/_mpvue-citypicker@1.0.5@mpvue-citypicker/src/mpvueCityPicker

因为我只在mpvue中使用了,所以只发现这里报错

@KuangPF
Copy link
Member

KuangPF commented Jun 12, 2019

嫩否提供下具体的代码呢,我这边使用下面的的代码没有复现这个问题

<template>
  <div class="mpvue-city-picker">
    <button type="default" @click="showCityPicker">城市选择</button>
    <mpvue-city-picker ref="mpvueCityPicker" :pickerValueDefault="pickerValueDefault" :themeColor='themeColor'></mpvue-city-picker>
  </div>
</template>

<script>
import mpvueCityPicker from 'mpvue-citypicker';
export default {
  data() {
    return {
      pickerValueDefault: [0, 0, 1],
      themeColor: '#4A8AE9'
    };
  },
  components: {
    mpvueCityPicker
  },
  methods: {
    showCityPicker() {
      this.$refs.mpvueCityPicker.show();
    }
  }
};
</script>
<style>
</style>

@KuangPF KuangPF self-assigned this Jun 23, 2019
@transno
Copy link

transno commented Jun 24, 2019

@KuangPF 我直接使用了你提供的这段代码也出现了同样的错误提示

@KuangPF KuangPF added the bug Something isn't working label Jun 24, 2019
@KuangPF
Copy link
Member

KuangPF commented Jun 24, 2019

v1.0.6 已修复。

@KuangPF KuangPF closed this as completed Jun 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants