style: 优化剧本生成器移动端布局(方案 A)
主要变更: - 参数区域改为并排两列 grid 布局,匹配原型图 - 全面调小字体尺寸(input: 22rpx→18rpx, label: 16rpx→17rpx) - 优化间距(主容器 padding: 32rpx→24rpx, NPC 容器:24rpx→16rpx) - 添加超小屏幕(≤320px)适配媒体查询 - 圆角调整接近原型图(主容器:56rpx) - 输入框高度降低(72rpx→64rpx),视觉更紧凑 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
<view class="section-card glass-card-main">
|
||||
<view class="input-group">
|
||||
<text class="label">剧本主题</text>
|
||||
<text class="label">1. 剧本主题</text>
|
||||
<input
|
||||
class="glass-input theme-input"
|
||||
placeholder="如:巅峰重现、治愈之旅、赛博觉醒..."
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<view class="input-group">
|
||||
<view class="npc-header">
|
||||
<text class="label">关键配角/新的人设</text>
|
||||
<text class="label">2. 关键配角/新的人设</text>
|
||||
<button class="add-btn" @click="addNpc">+ 添加</button>
|
||||
</view>
|
||||
|
||||
@@ -80,35 +80,35 @@
|
||||
</view>
|
||||
|
||||
<view class="params-section">
|
||||
<view class="param-row">
|
||||
<text class="param-label">叙事风格</text>
|
||||
<view class="param-options">
|
||||
<text
|
||||
v-for="style in scriptStyles"
|
||||
:key="style"
|
||||
class="param-option"
|
||||
:class="{ active: scriptConfig.style === style }"
|
||||
@click="scriptConfig.style = style"
|
||||
>
|
||||
{{ style }}
|
||||
</text>
|
||||
<text class="param-section-label">3. 核心参数</text>
|
||||
<view class="params-container">
|
||||
<view class="param-group">
|
||||
<text class="param-sublabel">叙事风格</text>
|
||||
<view class="param-options">
|
||||
<text
|
||||
v-for="style in scriptStyles"
|
||||
:key="style"
|
||||
class="param-option"
|
||||
:class="{ active: scriptConfig.style === style }"
|
||||
@click="scriptConfig.style = style"
|
||||
>
|
||||
{{ style }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="params-section">
|
||||
<view class="param-row">
|
||||
<text class="param-label">故事篇幅</text>
|
||||
<view class="param-options">
|
||||
<text
|
||||
v-for="length in scriptLengths"
|
||||
:key="length"
|
||||
class="param-option"
|
||||
:class="{ active: scriptConfig.length === length }"
|
||||
@click="scriptConfig.length = length"
|
||||
>
|
||||
{{ length }}
|
||||
</text>
|
||||
<view class="param-group">
|
||||
<text class="param-sublabel">故事篇幅</text>
|
||||
<view class="param-options">
|
||||
<text
|
||||
v-for="length in scriptLengths"
|
||||
:key="length"
|
||||
class="param-option"
|
||||
:class="{ active: scriptConfig.length === length }"
|
||||
@click="scriptConfig.length = length"
|
||||
>
|
||||
{{ length }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -275,7 +275,7 @@ onMounted(async () => {
|
||||
.script-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24rpx;
|
||||
gap: 20rpx;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
@@ -287,24 +287,24 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
.section-card {
|
||||
padding: 24rpx;
|
||||
border-radius: 32rpx;
|
||||
padding: 20rpx;
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
|
||||
.glass-card-main {
|
||||
padding: 32rpx;
|
||||
border-radius: 48rpx;
|
||||
padding: 24rpx;
|
||||
border-radius: 56rpx;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 18rpx;
|
||||
font-size: 17rpx;
|
||||
color: rgba(192, 132, 252, 0.6);
|
||||
font-weight: 600;
|
||||
letter-spacing: 3rpx;
|
||||
@@ -312,7 +312,7 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
.section-hint {
|
||||
font-size: 14rpx;
|
||||
font-size: 13rpx;
|
||||
color: rgba(255, 255, 255, 0.35);
|
||||
font-style: italic;
|
||||
}
|
||||
@@ -320,18 +320,18 @@ onMounted(async () => {
|
||||
.profile-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 12rpx;
|
||||
gap: 10rpx;
|
||||
}
|
||||
|
||||
.glass-input, .glass-picker {
|
||||
width: 100%;
|
||||
height: 72rpx;
|
||||
height: 64rpx;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 24rpx;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 0 16rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 22rpx;
|
||||
font-size: 18rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -340,136 +340,154 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
.theme-input {
|
||||
height: 80rpx;
|
||||
font-size: 24rpx;
|
||||
height: 72rpx;
|
||||
font-size: 19rpx;
|
||||
}
|
||||
|
||||
.picker-value {
|
||||
line-height: 72rpx;
|
||||
line-height: 64rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.input-group {
|
||||
margin-bottom: 28rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.label {
|
||||
display: block;
|
||||
font-size: 16rpx;
|
||||
color: rgba(255, 255, 255, 0.35);
|
||||
font-size: 17rpx;
|
||||
color: rgba(192, 132, 252, 0.6);
|
||||
font-weight: 600;
|
||||
letter-spacing: 3rpx;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 12rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.npc-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
font-size: 18rpx;
|
||||
font-size: 16rpx;
|
||||
color: #C084FC;
|
||||
border: 1px solid rgba(192, 132, 252, 0.3);
|
||||
padding: 6rpx 12rpx;
|
||||
border-radius: 12rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
border-radius: 10rpx;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.npc-container {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 32rpx;
|
||||
padding: 24rpx;
|
||||
margin-bottom: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
padding: 16rpx;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.npc-form {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
gap: 10rpx;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.npc-input, .npc-picker {
|
||||
height: 64rpx;
|
||||
padding: 0 16rpx;
|
||||
font-size: 20rpx;
|
||||
height: 60rpx;
|
||||
padding: 0 14rpx;
|
||||
font-size: 17rpx;
|
||||
}
|
||||
|
||||
.npc-picker .picker-value {
|
||||
line-height: 64rpx;
|
||||
font-size: 20rpx;
|
||||
line-height: 60rpx;
|
||||
font-size: 17rpx;
|
||||
}
|
||||
|
||||
.glass-textarea {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
height: 88rpx;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 24rpx;
|
||||
padding: 16rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 14rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 20rpx;
|
||||
font-size: 17rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.npc-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12rpx;
|
||||
gap: 10rpx;
|
||||
}
|
||||
|
||||
.npc-tag {
|
||||
background: rgba(168, 85, 247, 0.1);
|
||||
border: 1px solid rgba(168, 85, 247, 0.3);
|
||||
border-radius: 24rpx;
|
||||
padding: 8rpx 20rpx;
|
||||
font-size: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 6rpx 16rpx;
|
||||
font-size: 18rpx;
|
||||
color: rgba(243, 232, 255, 0.8);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
gap: 6rpx;
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
font-size: 24rpx;
|
||||
padding: 0 4rpx;
|
||||
font-size: 20rpx;
|
||||
padding: 0 2rpx;
|
||||
}
|
||||
|
||||
.params-section {
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.param-row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
.param-section-label {
|
||||
display: block;
|
||||
font-size: 17rpx;
|
||||
color: rgba(192, 132, 252, 0.6);
|
||||
font-weight: 600;
|
||||
letter-spacing: 3rpx;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.param-label {
|
||||
font-size: 16rpx;
|
||||
color: rgba(255, 255, 255, 0.35);
|
||||
.params-container {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.param-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.param-sublabel {
|
||||
font-size: 15rpx;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
|
||||
.param-options {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8rpx;
|
||||
gap: 6rpx;
|
||||
}
|
||||
|
||||
.param-option {
|
||||
padding: 8rpx 16rpx;
|
||||
padding: 6rpx 12rpx;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 20rpx;
|
||||
font-size: 18rpx;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
border-radius: 18rpx;
|
||||
font-size: 17rpx;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.param-option.active {
|
||||
@@ -480,21 +498,22 @@ onMounted(async () => {
|
||||
|
||||
.generate-btn {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
border-radius: 32rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 28rpx;
|
||||
box-shadow: 0 8rpx 32rpx rgba(168, 85, 247, 0.3);
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.scripts-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.script-card {
|
||||
padding: 24rpx;
|
||||
border-left: 4rpx solid transparent;
|
||||
border-radius: 32rpx;
|
||||
padding: 20rpx;
|
||||
border-left: 3rpx solid transparent;
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
|
||||
.script-card.selected {
|
||||
@@ -505,30 +524,30 @@ onMounted(async () => {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.script-title {
|
||||
font-size: 28rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.script-persona {
|
||||
font-size: 16rpx;
|
||||
font-size: 15rpx;
|
||||
color: rgba(168, 85, 247, 0.6);
|
||||
background: rgba(168, 85, 247, 0.1);
|
||||
padding: 6rpx 12rpx;
|
||||
border-radius: 12rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
border-radius: 10rpx;
|
||||
border: 1px solid rgba(168, 85, 247, 0.2);
|
||||
}
|
||||
|
||||
.script-summary {
|
||||
display: block;
|
||||
font-size: 22rpx;
|
||||
font-size: 20rpx;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
line-height: 1.6;
|
||||
margin-bottom: 16rpx;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.script-footer {
|
||||
@@ -538,12 +557,12 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
.script-style {
|
||||
font-size: 18rpx;
|
||||
font-size: 16rpx;
|
||||
color: #C084FC;
|
||||
}
|
||||
|
||||
.select-btn {
|
||||
font-size: 20rpx;
|
||||
font-size: 18rpx;
|
||||
color: #C084FC;
|
||||
font-weight: 600;
|
||||
background: transparent;
|
||||
@@ -552,37 +571,37 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding: 64rpx 40rpx;
|
||||
padding: 56rpx 36rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 20rpx;
|
||||
gap: 16rpx;
|
||||
opacity: 0.5;
|
||||
border-radius: 48rpx;
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
font-size: 56rpx;
|
||||
font-size: 48rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 22rpx;
|
||||
font-size: 20rpx;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.generating-state {
|
||||
padding: 64rpx 40rpx;
|
||||
padding: 56rpx 36rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 24rpx;
|
||||
gap: 20rpx;
|
||||
border-radius: 48rpx;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
border: 3rpx solid #A855F7;
|
||||
border-top-color: transparent;
|
||||
border-radius: 50%;
|
||||
@@ -595,9 +614,24 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
.generating-text {
|
||||
font-size: 24rpx;
|
||||
font-size: 20rpx;
|
||||
color: rgba(192, 132, 252, 0.6);
|
||||
font-style: italic;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
|
||||
/* 超小屏幕适配 */
|
||||
@media (max-width: 320px) {
|
||||
.params-container {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.npc-form {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
.profile-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user