@vue-puzzle-vcode/core 2.0.1 → 2.0.2
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 +22 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# @vue-puzzle-vcode/core
|
|
2
|
+
|
|
3
|
+
vue-puzzle-vcode 的 headless 核心:滑动拼图验证码的状态机与组合式函数(composables),同时兼容 Vue 2.7 与 Vue 3(基于 vue-demi)。
|
|
4
|
+
|
|
5
|
+
> 一般不需要直接使用本包 —— 请安装组件包 [`@vue-puzzle-vcode/ui`](https://www.npmjs.com/package/@vue-puzzle-vcode/ui)。只有想完全自绘 UI、只复用校验逻辑时才需要它。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @vue-puzzle-vcode/core
|
|
11
|
+
# 需已安装 vue@^2.7 || ^3(peer dependency)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## 导出
|
|
15
|
+
|
|
16
|
+
- `useVcode(props, emits)` —— 核心状态机:画布数据、滑块偏移、成功/失败判定、重置
|
|
17
|
+
- `provideVcodeContext` / `useVcodeContext` —— 跨部件共享状态的上下文(Radix 风格组合)
|
|
18
|
+
- 全部 TypeScript 类型(props / events / context)
|
|
19
|
+
|
|
20
|
+
## 文档
|
|
21
|
+
|
|
22
|
+
完整文档与在线 Demo 见主仓库:[github.com/daguanren21/vue-puzzle-vcode](https://github.com/daguanren21/vue-puzzle-vcode#readme)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-puzzle-vcode/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Headless core for vue-puzzle-vcode: context factory, v2/v3 render compat, state machine",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"vue-demi": "0.14.10",
|
|
33
|
-
"@vue-puzzle-vcode/shared": "^2.0.
|
|
33
|
+
"@vue-puzzle-vcode/shared": "^2.0.2"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"vue": "^2.7.0 || ^3.0.0"
|