1.0.94 • Published 8 months ago
@szlx/privacy v1.0.94
uniapp 小程序隐私协议逻辑包
安装
yarn add @szlx/privacy
使用
import Privacy from "@szlx/privacy";
import PrivacyMixin from "@szlx/privacy/component";
import EasyPopup from "@szlx/easy-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.getUserInfo(0);
},
};