Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2026-06-02 15:02:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
adf1badaeb90aa877ce7ea3cd5ca3ddfb895bd8e
adf1bada
1 parent
a227acbd
feat(index): 新增页眉显示控制并重构模板结构
新增page_header.disabled配置项以控制页眉区域显示,重构模板结构优化代码可读性与维护性
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
src/views/index.vue
src/views/index.vue
View file @
adf1bad
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-0
5-25 18:13:47
* @LastEditTime: 2026-0
6-02 14:59:03
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -9,6 +9,7 @@
<van-notice-bar v-if="formSetting.sjsj_is_count_down" left-icon="volume-o" :text="notice_text" scrollable
mode="closeable" />
<div v-if="!show_loading" class="table-box">
<template v-if="PHeader.show_desc">
<template v-if="PHeader.visible && (page_type === 'add' || model === 'preview')">
<van-image v-if="PHeader.type === 'image' && PHeader.cover" width="100%" :src="PHeader.cover + '?imageView2/0/w/2000'" fit="cover" />
<template v-if="PHeader.type === 'carousel'">
...
...
@@ -20,13 +21,14 @@
<div v-if="PHeader.type === 'text'" class="PHeader-Text" v-html="PHeader.banner" />
</template>
<div v-if="PHeader.label" class="table-title" v-html="PHeader.label" />
<div v-if="PHeader.description" class="table-desc" v-html="PHeader.description" />
</template>
<!-- TAG:总分支持0分显示,避免因真假值判断被隐藏 -->
<div
v-if="PHeader.x_total_score !== undefined && PHeader.x_total_score !== null && PHeader.x_total_score !== ''"
style="font-weight: bold; color: red; text-align: center; font-size: 0.9rem;"
>总分: {{ PHeader.x_total_score }}</div>
<div v-if="PHeader.flow_node_name" style="text-align: center;">({{ PHeader.flow_node_name }})</div>
<div v-if="PHeader.description" class="table-desc" v-html="PHeader.description" />
<van-config-provider :theme-vars="themeVars">
<van-form ref="myForm" @submit="onSubmit" @failed="onFailed" :scroll-to-error="true">
<van-cell-group :border="false">
...
...
@@ -467,6 +469,7 @@ onMounted(async () => {
* @param banner_url 页眉图片地址
* @param description 描述内容
* @param invisible 页眉展示
* @param disabled 描述内容是否显示
*/
if (page_header) {
PHeader.value = {
...
...
@@ -476,6 +479,7 @@ onMounted(async () => {
cover: page_header.banner_url,
banner: page_header.banner,
visible: !page_header.invisible,
show_desc: !page_header.disabled,
flow_node_name: formSetting.value.flow_node_name ? formSetting.value.flow_node_name : '', // 节点名称
};
}
...
...
Please
register
or
login
to post a comment