vue实现多步骤ai生成剧本分镜头视频短片表单代码

代码语言:html

所属分类:表单美化

代码描述:vue实现多步骤ai生成剧本分镜头视频短片表单代码,第一步主题输入,生成剧本,然后生成分镜头,最后合并视频。

代码标签: vue 多步骤 ai 生成 剧本 分镜头 视频 短片 表单 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>AI 短片生成器</title>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue@2.6.1-dev.js"></script>
  <style>
    body {
      font-family: Arial, sans-serif;
      margin: 20px;
    }
    .step {
      display: none;
    }
    .step.active {
      display: block;
    }
    textarea, input {
      width: 100%;
      padding: 10px;
      margin: 10px 0;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
    button {
      padding: 10px 20px;
      margin: 10px 5px;
      border: none;
      border-radius: 4px;
      background-color: #007bff;
      color: white;
      cursor: pointer;
    }
    button:disabled {
      background-color: #ccc;
      cursor: not-allowed;
    }
    .video-preview {
      margin: 20px 0;
    }
    .video-preview video {
      width: 100%;
      max-width: 400px;
      height: auto;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
    .shot-item {
      display: flex;
      align-items: center;
      margin: 10px 0;
    }
    .shot-item input {
      flex: 1;
      margin-right: 10px;
    }
    .shot-item button {
      background-color: #ff4d4d;
    }
  </style>
</head>
<body>
  <div id="app">
    <!-- 步骤 1:输入主题 -->
    <div class="step" :class="{ active: step === 1 }">
      <h2>第一步:输入主题</h2>
      <input v-model="topic" placeholder="请输入视频主题" />
      <button @click="nextStep" :disabled="!topic">下一步</button>
    </div>

    <!-- 步骤 2:生成剧本 -->
    <div class="step" :class="{ active: step === 2 }">
      <h2>第二步:生成剧本</h2>
      <button @click="generateStory" :disabled="loadingStory">生成剧本</button>
      <textarea v-model="story" rows="10" placeholder="生成的剧本将显示在这里"></textarea>
      <button @click="prevStep">上一步</button>
      <button @click="nextStep" :disabled="!story">下一步</button>
    </div>

    <!-- 步骤 3:生成分镜头脚本 -->
    <div class="step" :class="{ active: step === 3 }">
      <h2>第三步:生成分镜头脚本</h2>
      <button @click="generateShots" :disabled="loadingShots">生成分镜头脚本</button>
      <div v-for="(shot, index) in shots" :key="index" class="shot-item">
        <input v-model="shot.prompt" .........完整代码请登录后点击上方下载按钮下载查看

网友评论0