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
64 lines
1.4 KiB
<template>
|
|
<!--用户拒绝授权弹出-->
|
|
<view class="alert-box" v-if="is_refused">
|
|
<view class="paney">
|
|
<view class="paney-body">
|
|
重新授权,保存图片至相册
|
|
</view>
|
|
<view class="paney-foot">
|
|
<button @tap="changeSave" class="mx-1px-right">取消</button>
|
|
<button open-type="openSetting" @tap="changeSave">确定</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
|
|
export default {
|
|
data() {
|
|
return {};
|
|
},
|
|
|
|
components: {},
|
|
props: {
|
|
is_refused: {
|
|
type: Boolean,
|
|
value: false //相当于 vue watch,当is_refused改变时,所执行的方法
|
|
|
|
}
|
|
},
|
|
methods: {
|
|
|
|
changeSave() {
|
|
this.$emit('close');
|
|
},
|
|
setData: function (obj) {
|
|
let that = this;
|
|
let keys = [];
|
|
let val, data;
|
|
Object.keys(obj).forEach(function (key) {
|
|
keys = key.split('.');
|
|
val = obj[key];
|
|
data = that.$data;
|
|
keys.forEach(function (key2, index) {
|
|
if (index + 1 == keys.length) {
|
|
that.$set(data, key2, val);
|
|
} else {
|
|
if (!data[key2]) {
|
|
that.$set(data, key2, {});
|
|
}
|
|
}
|
|
|
|
data = data[key2];
|
|
});
|
|
});
|
|
}
|
|
},
|
|
computed: {},
|
|
watch: {}
|
|
};
|
|
</script>
|
|
|
|
<style rel="stylesheet/less" lang="less">
|
|
@import "alert";
|
|
</style>
|