vue+elementui实现ai问答生成修改预览html页面代码

代码语言:html

所属分类:布局界面

代码描述:vue+elementui实现ai问答生成修改预览html页面代码,支持多页面、pc、pad、手机端视图预览。

代码标签: vue element ui ai 问答 生成 修改 预览 html 页面 代码

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

<!DOCTYPE html>
<html lang="zh-CN">
<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>
    <!-- Element UI CDN (可选,这里为了样式美观使用,可自行替换) -->
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/element-ui.2.15.1.css">
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/element-ui.2.15.1.js"></script>
    <style>
        html, body {
            margin: 0;
            padding: 0;
            height: 100%;
            overflow: hidden;
            font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        #app {
            display: flex;
            height: 100vh;
            background-color: #f0f2f5;
        }
        .sidebar {
            width: 0;
            background-color: #fff;
            box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
            transition: width 0.3s ease;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            position: relative;
            z-index: 100; /* 确保在内容之上 */
        }
        .sidebar.expanded {
            width: 200px;
        }
        .sidebar-header {
            padding: 15px;
            font-size: 18px;
            font-weight: bold;
            border-bottom: 1px solid #eee;
            color: #333;
        }
        .page-list {
            flex-grow: 1;
            overflow-y: auto;
            padding: 10px 0;
        }
        .page-item {
            padding: 12px 15px;
            cursor: pointer;
            border-bottom: 1px solid #f0f2f5;
            color: #555;
            transition: background-color 0.2s ease;
        }
        .page-item:hover {
            background-color: #f6f8fa;
        }
        .page-item.active {
            background-color: #e6f7ff;
            color: #1890ff;
            font-weight: bold;
            border-left: 3px solid #1890ff;
        }
        .main-content {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
        .header {
            height: 60px;
            background-color: #fff;
            display: flex;
            align-items: center;
            padding: 0 20px;
            box-shadow: 0 2px 8px rgba(0, 21, 41, 0.08);
            justify-content: space-between;
            z-index: 50;
        }
        .header-left {
            display: flex;
            align-items: center;
        }
        .header-title {
            font-size: 20px;
            font-weight: bold;
            margin-left: 15px;
            color: #333;
        }
        .header-buttons .el-button {
            margin-left: 10px;
        }
        .content-area {
            flex-grow: 1;
            display: flex;
            overflow: hidden;
        }
        .ai-chat-panel {
            flex: 1; /* 占据一半宽度 */
            display: flex;
            flex-direction: column;
            background-color: #f9f9f9;
            border-right: 1px solid #eee;
        }
        .chat-tabs {
            background-color: #fff;
            padding: 10px 15px 0;
            border-bottom: 1px solid #eee;
        }
        .chat-history {
            flex-grow: 1;
            overflow-y: auto;
            padding: 15px;
            background-color: #f9f9f9;
        }
        .chat-message {
            margin-bottom: 15px;
            display: flex;
            word-break: break-word;
        }
        .chat-message.ai {
            justify-content: flex-start;
        }
        .chat-message.user {
            justify-content: flex-end;
        }
        .chat-bubble {
            max-width: 70%;
            padding: 10px 15px;
            border-radius: 10px;
            line-height: 1.5;
            font-size: 14px;
        }
        .chat-bubble.ai {
            background-color: #e6f7ff;
            color: #333;
            border-bottom-left-radius: 2px;
        }
        .chat-bubble.user {
            background-color: #1890ff;
            color: #fff;
            border-bottom-right-radius: 2px;
        }
        .chat-input {
            padding: 15px;
            background-color: #fff;
            border-top: 1px solid #eee;
            display: flex;
        }
        .preview-panel {
            flex: 1; /* 占据一半宽度 */
            display: flex;
            flex-direction: column;
            background-color: #fff;
        }
        .preview-toolbar {
            height: 60px;
            background-color: #fff;
            border-bottom: 1px solid #eee;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 15px;
        }
        .preview-frame-container {
            flex-grow: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            background-co.........完整代码请登录后点击上方下载按钮下载查看

网友评论0