1.0.0 • Published 2 years ago

uwell-dd-auth v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

uwell-dd-auth

Vue3.0 钉钉授权组件,支持 vite、webpack 构建的 vue 项目

安装

  • npm

    npm install uwell-dd-auth
  • Yarn

    yarn add uwell-dd-auth
  • pnpm

    pnpm install uwell-dd-auth

组件参数说明

参数说明类型是否必填
url发起请求授权的 urlString
corpId企业 idString
openPath跳转到外部的 pathString
userId开发时所用的 idString
isOutSide是否跳转外部浏览器访问应用Boolean
isPcOnly是否只允许 pc 端访问Boolean
isMbOnly是否只允许移动端访问Boolean

组件使用示例

<template>
  <div class="wrap">
    <vue-dd-auth corpId="xxx" url="xxx" @change="handleChange"> </vue-dd-auth>
  </div>
</template>
<script setup>
  import { VueDdAuth, setCookie } from "uwell-dd-auth";
  const handleChange = (val) => {
    // 回调, 在此处写你需要的逻辑即可
    console.log(val);
    // 如果想用cookie存储相关信息可直接引入组件内部cookie方法, 如下使用
    setCookie(xx, xx, xx);
  };
</script>
<style scoped>
  .wrap {
    width: 100%;
    height: 100%;
  }
</style>
  • 内置 cookie 方法使用
<script setup>
  import { setCookie, getCookie, delCookie } from "uwell-dd-auth";
  setCookie("name", "value", 1); // 名称、内容、有效时间
  getCookie("name");
  delCookie("name");
</script>
1.0.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago