金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.4 KiB

  1. <template>
  2. <!--用户拒绝授权弹出-->
  3. <view class="alert-box" v-if="is_refused">
  4. <view class="paney">
  5. <view class="paney-body">
  6. 重新授权保存图片至相册
  7. </view>
  8. <view class="paney-foot">
  9. <button @tap="changeSave" class="mx-1px-right">取消</button>
  10. <button open-type="openSetting" @tap="changeSave">确定</button>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {};
  19. },
  20. components: {},
  21. props: {
  22. is_refused: {
  23. type: Boolean,
  24. value: false //相当于 vue watch,当is_refused改变时,所执行的方法
  25. }
  26. },
  27. methods: {
  28. changeSave() {
  29. this.$emit('close');
  30. },
  31. setData: function (obj) {
  32. let that = this;
  33. let keys = [];
  34. let val, data;
  35. Object.keys(obj).forEach(function (key) {
  36. keys = key.split('.');
  37. val = obj[key];
  38. data = that.$data;
  39. keys.forEach(function (key2, index) {
  40. if (index + 1 == keys.length) {
  41. that.$set(data, key2, val);
  42. } else {
  43. if (!data[key2]) {
  44. that.$set(data, key2, {});
  45. }
  46. }
  47. data = data[key2];
  48. });
  49. });
  50. }
  51. },
  52. computed: {},
  53. watch: {}
  54. };
  55. </script>
  56. <style rel="stylesheet/less" lang="less">
  57. @import "alert";
  58. </style>