@yqg/permission 1.1.3-beta.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/apply-modal-COwJCSGK.js +8742 -0
- package/dist/{checkbox-item-CbU84h2h.js → checkbox-item-DyKSHMQJ.js} +1979 -1665
- package/dist/{index-CwpGTkMT.js → index-DKDl-l25.js} +2101 -2129
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +73 -85
- package/dist/{yqg-permission-5wZs7Zr5.js → yqg-permission-DfFns5kK.js} +6587 -8550
- package/package.json +7 -8
- package/src/App.vue +21 -16
- package/src/assets/apply.png +0 -0
- package/src/assets/applyicon.png +0 -0
- package/src/axios/index.ts +1 -1
- package/src/components/apply-modal.vue +25 -37
- package/src/components/checkbox-item.vue +49 -29
- package/src/components/success-modal.vue +7 -7
- package/src/components/yqg-permission.vue +99 -48
- package/src/hooks/useDragable.ts +136 -0
- package/src/i18n/en-US.ts +22 -17
- package/src/i18n/zh-CH.ts +7 -5
- package/src/typings/index.d.ts +11 -5
- package/src/vite-env.d.ts +1 -1
- package/vite.config.ts +1 -1
- package/dist/apply-modal-C5gl_EGn.js +0 -6844
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ step2: 像原生标签一样进行使用
|
|
|
66
66
|
:permissions="['permissionCode1, permissionCode2']"
|
|
67
67
|
:color="'red'"
|
|
68
68
|
:locale="'zh-CN'"
|
|
69
|
-
@
|
|
69
|
+
@onSuccess="() => {console.log('请求成功')}"
|
|
70
70
|
>
|
|
71
71
|
</yqg-permission>
|
|
72
72
|
|
|
@@ -86,12 +86,13 @@ step2: 像原生标签一样进行使用
|
|
|
86
86
|
| `locale` | 否 | 当前语言类型(同i18n) | string | zn-CH |
|
|
87
87
|
| `success` | 否 | 申请成功时回调函数(vue)| Function | ()=> {} |
|
|
88
88
|
| `type` | 否 | 组件类型 | string | default |
|
|
89
|
+
| `top` | 否 | 当组件type=“dragElement”时生效| string | 100px |
|
|
89
90
|
|
|
90
91
|
|
|
91
92
|
### type 参数说明
|
|
92
93
|
|
|
93
94
|
type = "default": 默认展示图+按钮组件,点击可弹出弹窗
|
|
94
|
-
type = "
|
|
95
|
+
type = "dragElement": 展示‘申请权限’文案,点击可弹出弹窗
|
|
95
96
|
type = "custom": 支持自定义组件,以slot的方式添加自定义组件,点击自定义组件可弹出弹窗,例如:
|
|
96
97
|
```js
|
|
97
98
|
<yqg-permission
|
|
@@ -101,7 +102,7 @@ type = "custom": 支持自定义组件,以slot的方式添加自定义组件
|
|
|
101
102
|
:color="'red'"
|
|
102
103
|
:locale="'zh-CN'"
|
|
103
104
|
type="custom"
|
|
104
|
-
@
|
|
105
|
+
@onSuccess="() => {console.log('请求成功')}"
|
|
105
106
|
>
|
|
106
107
|
<div>自定义按钮</div>
|
|
107
108
|
</yqg-permission>
|