当前位置:首页 > 科技  > 软件

开源了!用 AI 生成 Vue 组件,好玩又好用

来源: 责编: 时间:2024-01-15 09:21:57 269观看
导读三个月前,Vercel 推出了其 AI 代码生成工具 —— v0(v0.dev),这款工具可以快速生成前端组件代码,引起了前端圈的广泛关注。通过简单的描述,v0能够快速生成前端页面,让AI在前端开发领域的潜力更进一步展现出来,距离 AI 替代前

S6u28资讯网——每日最新资讯28at.com

三个月前,Vercel 推出了其 AI 代码生成工具 —— v0(v0.dev),这款工具可以快速生成前端组件代码,引起了前端圈的广泛关注。通过简单的描述,v0能够快速生成前端页面,让AI在前端开发领域的潜力更进一步展现出来,距离 AI 替代前端开发更近一步?在此之后,陆续出现了多个 v0 的替代品,下面就来分享两个好玩又好用的 AI 代码生成工具!S6u28资讯网——每日最新资讯28at.com

vue0

vue0 是最近刚开源的一个 AI 工具,借助 Open AI 实现。通过简单的描述,就可以快速生成一个 Vue 页面,目前支持 shadcn/vue,但很快就会支持更多的 UI 库。S6u28资讯网——每日最新资讯28at.com

S6u28资讯网——每日最新资讯28at.com

vue0 的特性如下:S6u28资讯网——每日最新资讯28at.com

  • 编写多遍步骤
  • 编写迭代步骤
  • 将组件存储在 fs 中
  • 渲染生成的代码
  • 添加用户功能
  • 屏幕截图生成组件
  • 简单元数据
  • 改进缓存

在 vue0 的网站上,有很多已经生成的页面及源码:S6u28资讯网——每日最新资讯28at.com

S6u28资讯网——每日最新资讯28at.com

比如,对于以下页面:S6u28资讯网——每日最新资讯28at.com

S6u28资讯网——每日最新资讯28at.com

生成的代码如下:S6u28资讯网——每日最新资讯28at.com

<script setup lang="ts">import { ref } from 'vue';import { Check } from 'lucide-vue-next';import { Switch } from '@/components/ui/switch';import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card';import { Button } from '@/components/ui/button';const isYearly = ref(false);</script><template>  <div class="p-10 bg-gray-100 dark:bg-black">    <div class="max-w-7xl mx-auto">      <div class="text-center mb-8">        <h2 class="text-3xl font-bold text-gray-800 dark:text-white">Pricing Plans</h2>        <p class="text-md text-gray-600 dark:text-gray-300">Choose the plan that's right for you.</p>      </div>      <div class="mb-8 text-center">        <label for="pricing-toggle" class="inline-flex items-center cursor-pointer">          <span class="mr-2 text-gray-600 dark:text-gray-400">Monthly</span>          <Switch            id="pricing-toggle"            v-model="isYearly"            aria-label="Toggle between month/year pricing"            class="mx-auto"          />          <span class="ml-2 text-gray-600 dark:text-gray-400">Yearly</span>        </label>      </div>      <div class="grid md:grid-cols-3 gap-8">        <!-- Cards will go here with isYearly logic for pricing -->        <Card class="shadow-lg">          <CardHeader>            <CardTitle class="text-xl font-semibold text-gray-800 dark:text-white">Basic</CardTitle>            <CardDescription class="text-gray-500 dark:text-gray-400">For individual use</CardDescription>          </CardHeader>          <CardContent>            <p class="text-4xl font-bold text-gray-800 dark:text-white">$0<span class="text-sm">{{ isYearly ? '/yr' : '/mo' }}</span></p>            <ul class="mt-4">              <li class="flex items-center text-gray-600 dark:text-gray-300">                <Check class="mr-2 w-4 h-4 text-green-500" /> 1 Project              </li>              <li class="flex items-center text-gray-600 dark:text-gray-300">                <Check class="mr-2 w-4 h-4 text-green-500" /> 100MB Storage              </li>            </ul>          </CardContent>          <CardFooter>            <Button variant="outline">Get Started</Button>          </CardFooter>        </Card>        <!-- Repeat for other cards -->        <Card class="shadow-lg">          <CardHeader>            <CardTitle class="text-xl font-semibold text-gray-800 dark:text-white">Pro</CardTitle>            <CardDescription class="text-gray-500 dark:text-gray-400">For professionals</CardDescription>          </CardHeader>          <CardContent>            <p class="text-4xl font-bold text-gray-800 dark:text-white">$10<span class="text-sm">{{ isYearly ? '/yr' : '/mo' }}</span></p>            <ul class="mt-4">              <li class="flex items-center text-gray-600 dark:text-gray-300">                <Check class="mr-2 w-4 h-4 text-green-500" /> 10 Projects              </li>              <li class="flex items-center text-gray-600 dark:text-gray-300">                <Check class="mr-2 w-4 h-4 text-green-500" /> 5GB Storage              </li>            </ul>          </CardContent>          <CardFooter>            <Button variant="secondary">Get Started</Button>          </CardFooter>        </Card>        <!-- Repeat for other cards -->        <Card class="shadow-lg">          <CardHeader>            <CardTitle class="text-xl font-semibold text-gray-800 dark:text-white">Enterprise</CardTitle>            <CardDescription class="text-gray-500 dark:text-gray-400">For organizations</CardDescription>          </CardHeader>          <CardContent>            <p class="text-4xl font-bold text-gray-800 dark:text-white">$99<span class="text-sm">{{ isYearly ? '/yr' : '/mo' }}</span></p>            <ul class="mt-4">              <li class="flex items-center text-gray-600 dark:text-gray-300">                <Check class="mr-2 w-4 h-4 text-green-500" /> Unlimited Projects              </li>              <li class="flex items-center text-gray-600 dark:text-gray-300">                <Check class="mr-2 w-4 h-4 text-green-500" /> 100GB Storage              </li>            </ul>          </CardContent>          <CardFooter>            <Button variant="destructive">Get Started</Button>          </CardFooter>        </Card>      </div>    </div>  </div></template>

Github:https://github.com/zernonia/vue0S6u28资讯网——每日最新资讯28at.com

openv0

openv0 是一个生成式UI组件框架,凭借AI技术,可以轻松实现UI组件的实时预览、生成与迭代。它深度整合丰富的开源组件库与图标,为生成式工作流提供一站式资源。其设计核心理念在于高度模块化与精细的生成过程管理,确保流程的灵活与高效。组件生成采用多步骤管道化流程,每一步都由独立插件执行,进一步提升了整个流程的灵活性和效率。S6u28资讯网——每日最新资讯28at.com

S6u28资讯网——每日最新资讯28at.com

openv0 目前支持的前端框架有:S6u28资讯网——每日最新资讯28at.com

  • React
  • Next.js
  • Svelte

支持的 UI 库有:S6u28资讯网——每日最新资讯28at.com

  • NextUI
  • Flowbite
  • Shadcn

Github:https://github.com/raidendotai/openv0/。S6u28资讯网——每日最新资讯28at.com

本文链接:http://www.28at.com/showinfo-26-60988-0.html开源了!用 AI 生成 Vue 组件,好玩又好用

声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。邮件:2376512515@qq.com

上一篇: API设计:从基础到优秀实践

下一篇: Python在自动化和脚本编程领域的广阔应用前景

标签:
  • 热门焦点
  • Find N3入网:最高支持16+1TB

    OPPO将于近期登场的Find N3折叠屏目前已经正式入网,型号为PHN110。本次Find N3在外观方面相比前两代有很大的变化,不再是小号的横向折叠屏,而是跟别的厂商一样采用了较为常见的
  • 官方承诺:K60至尊版将会首批升级MIUI 15

    全新的MIUI 15今天也有了消息,在官宣了K60至尊版将会搭载天玑9200+处理器和独显芯片X7的同时,Redmi给出了官方承诺,K60至尊重大更新首批升级,会首批推送MIUI 15。也就是说虽然
  • Mate60手机壳曝光 致敬自己的经典设计

    8月3日消息,今天下午博主数码闲聊站带来了华为Mate60的第三方手机壳图,可以让我们在真机发布之前看看这款华为全新旗舰的大致轮廓。从曝光的图片看,Mate 60背后摄像头面积依然
  • 2023年Q2用户偏好榜:12+256G版本成新主流

    3月份的性能榜、性价比榜和好评榜之后,就要轮到2023年的第二季度偏好榜了,上半年的新机潮已经过去,最明显的肯定就是大内存和存储的机型了,另外部分中端机也取消了屏幕塑料支架
  • 自动化在DevOps中的力量:简化软件开发和交付

    自动化在DevOps中扮演着重要角色,它提升了DevOps的效能。通过自动化工具和方法,DevOps团队可以实现以下目标:消除手动和重复性任务。简化流程。在整个软件开发生命周期中实现更
  • 使用LLM插件从命令行访问Llama 2

    最近的一个大新闻是Meta AI推出了新的开源授权的大型语言模型Llama 2。这是一项非常重要的进展:Llama 2可免费用于研究和商业用途。(几小时前,swyy发现它已从LLaMA 2更名为Lla
  • 2299元起!iQOO Pad明晚首销:性能最强天玑平板

    5月23日,iQOO如期举行了新品发布会,除了首发安卓最强旗舰处理器的iQOO Neo8系列新机外,还在发布会上推出了旗下首款平板电脑——iQOO Pad,其最大的卖点
  • 滴滴违法违规被罚80.26亿 共存在16项违法事实

    滴滴违法违规被罚80.26亿 存在16项违法事实开始于2121年7月,历经一年时间,网络安全审查办公室对“滴滴出行”网络安全审查终于有了一个暂时的结束。据“网信
  • 中关村论坛11月25日开幕,15位诺奖级大咖将发表演讲

    11月18日,记者从2022中关村论坛新闻发布会上获悉,中关村论坛将于11月25至30日在京举行。本届中关村论坛由科学技术部、国家发展改革委、工业和信息化部、国务
Top