修改完成

This commit is contained in:
2026-07-21 07:53:03 +08:00
parent 01d246c47b
commit ff60119277
172 changed files with 7982 additions and 2999 deletions
+71 -95
View File
@@ -19,12 +19,6 @@
'poem-state--no-permission': poemState === 'no-permission',
}"
>
<image
class="poem-panel__skin"
src="/static/assets/modules/genealogy/transparent/g01-empty-panel-frame.png"
mode="scaleToFill"
/>
<AppLoading
v-if="poemState === 'loading'"
text="正在整理字辈诗"
@@ -43,10 +37,6 @@
class="poem-row"
:class="{ 'poem-row--current': item.current }"
>
<image
src="/static/assets/modules/genealogy/transparent/g-form-field-frame.png"
mode="scaleToFill"
/>
<text class="poem-row__number"> {{ item.generationNo }} </text>
<text class="poem-row__character">{{ item.character }}</text>
<text class="poem-row__status">{{
@@ -69,14 +59,11 @@
>按照接口支持的连续文本录入每个汉字对应一代保存前可预览新字序</text
>
<view class="poem-field">
<image
src="/static/assets/modules/genealogy/transparent/g-form-field-frame.png"
mode="scaleToFill"
/>
<text>字辈内容</text>
<textarea
v-model="poemDraft"
maxlength="24"
auto-height
maxlength="50"
placeholder="例如:启宗敦本继世传芳"
placeholder-class="poem-placeholder"
@input="poemError = ''"
@@ -158,10 +145,6 @@
</view>
</view>
<view v-if="feedbackVisible" class="poem-feedback">
<image
src="/static/assets/foundation/transparent/a01-scroll-secondary-v3.png"
mode="aspectFit"
/>
<text>字辈预览已更新</text>
</view>
</view>
@@ -181,6 +164,8 @@ const feedbackVisible = ref(false);
let feedbackTimer = null;
const poemDraft = ref("启宗敦本继世传芳");
const stopMissingOldGeneration = ref(true);
const startGeneration = ref(12);
const currentGeneration = ref(14);
const poemRows = ref([
{ generationNo: 12, character: "启", current: false },
{ generationNo: 13, character: "宗", current: false },
@@ -193,6 +178,11 @@ const previewCharacters = computed(() =>
onLoad((query) => {
genealogyId.value = query.genealogyId || "";
startGeneration.value = Math.max(1, Number(query.startGeneration) || 12);
currentGeneration.value = Math.max(
startGeneration.value,
Number(query.currentGeneration) || 14,
);
poemState.value =
query.state === "loading"
? "loading"
@@ -223,13 +213,20 @@ const savePoems = () => {
poemError.value = "字辈保存失败,请稍后重试";
return;
}
poemRows.value = characters
.slice(0, 4)
.map((character, index) => ({
generationNo: 12 + index,
const preservedRows = stopMissingOldGeneration.value
? []
: poemRows.value.filter(
(item) => item.generationNo < startGeneration.value,
);
const nextRows = characters.map((character, index) => {
const generationNo = startGeneration.value + index;
return {
generationNo,
character,
current: index === 2,
}));
current: generationNo === currentGeneration.value,
};
});
poemRows.value = [...preservedRows, ...nextRows];
poemState.value = "list";
feedbackVisible.value = true;
feedbackTimer = setTimeout(() => {
@@ -241,33 +238,31 @@ const savePoems = () => {
<style scoped lang="scss">
.poem-page {
position: relative;
display: flex;
min-height: 100vh;
overflow-x: hidden;
flex-direction: column;
background: $paper;
}
.poem-page__header {
position: relative;
z-index: 3;
}
.poem-panel {
position: relative;
z-index: 2;
width: calc(100% - 32rpx);
height: min(650px, calc((100vw - 16px) * 1.5));
min-height: min(650px, calc((100vw - 16px) * 1.5));
margin: 18rpx auto 0;
padding: 76rpx 8%;
box-sizing: border-box;
background: url("/static/assets/modules/genealogy/transparent/g01-empty-panel-frame.png")
center / 100% 100% no-repeat;
}
.poem-panel__skin {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
.poem-panel > .app-loading {
grid-area: 1 / 1 / -1 / -1;
}
.poem-list,
.poem-editor,
.poem-state-card {
position: absolute;
inset: 7.5% 8%;
min-width: 0;
}
.poem-list__eyebrow {
display: block;
@@ -294,39 +289,33 @@ const savePoems = () => {
margin-top: 18rpx;
}
.poem-row {
position: relative;
height: 72rpx;
display: grid;
min-height: 72rpx;
margin-top: 10rpx;
}
.poem-row image {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
grid-template-columns: 48% auto 1fr auto;
align-items: center;
background: url("/static/assets/modules/genealogy/transparent/g-form-field-frame.png")
center / 100% 100% no-repeat;
}
.poem-row__number {
position: absolute;
top: 24rpx;
left: 24rpx;
z-index: 1;
grid-column: 1;
margin-left: 24rpx;
color: $ink-muted;
font-size: 23rpx;
}
.poem-row__character {
position: absolute;
top: 14rpx;
left: 48%;
z-index: 1;
grid-column: 2;
color: $ink;
font-family: "STKaiti", "KaiTi", serif;
font-size: 32rpx;
font-weight: 700;
}
.poem-row__status {
position: absolute;
top: 25rpx;
right: 22rpx;
z-index: 1;
grid-column: 4;
margin-right: 22rpx;
color: $ink-muted;
font-size: 22rpx;
}
@@ -335,21 +324,20 @@ const savePoems = () => {
color: $brand-red;
}
.poem-action {
position: relative;
display: grid;
width: 100%;
height: 76rpx;
min-height: 76rpx;
margin-top: 20rpx;
}
.poem-action image {
position: absolute;
inset: 0;
grid-area: 1 / 1;
width: 100%;
height: 100%;
}
.poem-action text {
position: relative;
z-index: 1;
display: flex;
grid-area: 1 / 1;
align-items: center;
justify-content: center;
height: 100%;
@@ -359,34 +347,30 @@ const savePoems = () => {
letter-spacing: 2rpx;
}
.poem-field {
position: relative;
height: 118rpx;
display: grid;
min-height: 118rpx;
margin-top: 22rpx;
}
.poem-field image {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
background: url("/static/assets/modules/genealogy/transparent/g-form-field-frame.png")
center / 100% 100% no-repeat;
}
.poem-field > text {
position: absolute;
top: 47rpx;
left: 24rpx;
z-index: 1;
grid-area: 1 / 1;
align-self: center;
margin-left: 24rpx;
color: $ink;
font-size: 22rpx;
font-weight: 700;
}
.poem-field textarea {
position: absolute;
top: 0;
right: 20rpx;
bottom: 0;
left: 164rpx;
z-index: 1;
grid-area: 1 / 1;
box-sizing: border-box;
height: 118rpx;
width: auto;
min-width: 0;
min-height: 118rpx;
margin-right: 20rpx;
margin-left: 164rpx;
padding-top: 34rpx;
color: $ink;
font-size: 22rpx;
@@ -415,20 +399,19 @@ const savePoems = () => {
font-weight: 700;
}
.poem-policy__option {
position: relative;
display: grid;
width: 248rpx;
height: 62rpx;
min-height: 62rpx;
}
.poem-policy__option image {
position: absolute;
inset: 0;
grid-area: 1 / 1;
width: 100%;
height: 100%;
}
.poem-policy__option text {
position: relative;
z-index: 1;
display: flex;
grid-area: 1 / 1;
align-items: center;
justify-content: center;
height: 100%;
@@ -459,9 +442,13 @@ const savePoems = () => {
color: $ink;
}
.poem-state-card {
top: 29%;
text-align: center;
}
.poem-state--empty,
.poem-state--error,
.poem-state--no-permission {
padding: 180rpx 4% 70rpx;
}
.poem-state-card .poem-list__eyebrow {
text-align: center;
}
@@ -485,15 +472,10 @@ const savePoems = () => {
justify-content: center;
padding: 0 34rpx;
transform: translateX(-50%);
}
.poem-feedback image {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
background: url("/static/assets/foundation/transparent/a01-scroll-secondary-v3.png")
center / contain no-repeat;
}
.poem-feedback text {
position: relative;
z-index: 1;
color: $ink;
font-size: 22rpx;
@@ -502,11 +484,5 @@ const savePoems = () => {
.poem-panel {
width: calc(100% - 48rpx);
}
.poem-list,
.poem-editor,
.poem-state-card {
right: 9%;
left: 9%;
}
}
</style>