0.0.8 • Published 4 months ago
@iamgx/privacy v0.0.8
uniapp 小程序隐私协议逻辑包
安装
yarn add @iamgx/privacy
使用
import Privacy from "@iamgx/privacy/component";
import PrivacyMixin from "@iamgx/privacy";
import EasyPopup from "@iamgx/uni-popup";
// html
<easy-popup ref="popup">
<template v-slot:children="{ component }">
<privacy v-if="component === 'Privacy'" />
</template>
</easy-popup>;
// js
// 使用async/await 或者 then
export default {
mixins: [PrivacyMixin],
async onLoad() {
await this.checkPrivacy();
uni.getLocation({});
},
};