跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[分享创造] 前端核弹:初试用 v0.dev 聊天做 UI

发表于

听说以前 <v0.dev> 改版了,加强了 ai 聊天的能力,昨天试着做了个 todo list 玩了一下,完成度相当高啊,而且可以定制化,比如我做的这个,就是用聊天的方式,让 ai 给我生成一个 ui 组件,然后我再稍微调整一下,就可以用了,下一步准备用 cursor 开发 api 和 oauth 。

先看看效果

https://cf-next-todo.pages.dev/

部署在 cloudflare ,目前不登录可以使用,数据保存在 localStorage

代码 Github Repo

使用

  • 创建项目
npm create cloudflare@latest -- cf-next-todo --framework=next
  • 安装<v0.dev>聊天做好的 ui 组件:

可能有多个组件,所以可能执行需要多次: 比如我的是 todo-listregist-formlogin-form


npx shadcn@latest add "https://v0.dev/chat/b/组件 1token"
npx shadcn@latest add "https://v0.dev/chat/b/组件 2token"
npx shadcn@latest add "https://v0.dev/chat/b/组件 3token"
  • 修改 src/app/page.js
import { TodoList } from '@/components/todo-list'

export default function Home() {
  return (
    <main className="container mx-auto px-4">
      <TodoList />
    </main>
  )
}
  • 部署到 cloudflare
npm run deploy

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.