feat: 添加 nCode 组件及相关 API,支持创建、查询、更新和删除操作

This commit is contained in:
2026-03-03 14:17:06 +08:00
parent e8598e418d
commit cfb6a1cf11
19 changed files with 755 additions and 5 deletions

19
test/get-list.ts Normal file
View File

@@ -0,0 +1,19 @@
import { client, api } from '../src/convex.ts'
// client.query(api.nCode.getList, {}).then((res) => {
// console.log('getList', res)
// })
const createNCode = async () => {
const res = await client.mutation(api.nCode.create, {
code: Math.random().toString(36).substring(2, 8),
type: "link",
data: {},
title: "测试码",
description: "这是一个测试码",
userId: "test-user-id",
})
console.log('createNCode', res)
}
createNCode()