首页细节调整
This commit is contained in:
@@ -1,48 +1,48 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="admin-cms-article">
|
||||
<view class="content-body">
|
||||
<!-- 椤堕儴杩囨护鏍?-->
|
||||
<!-- 顶部过滤栏 -->
|
||||
<view class="filter-card border-shadow">
|
||||
<view class="filter-item">
|
||||
<text class="label-txt">鏂囩珷鍒嗙被:</text>
|
||||
<text class="label-txt">文章分类:</text>
|
||||
<view class="select-mock">
|
||||
<text class="select-val">{{ filterCategory }}</text>
|
||||
<text class="arrow-down">鈻?/text>
|
||||
<text class="arrow-down">▼</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-item">
|
||||
<text class="label-txt">鏂囩珷鎼滅储:</text>
|
||||
<input class="search-input" placeholder="璇疯緭鍏? v-model="filterKeyword" />
|
||||
<text class="label-txt">文章搜索:</text>
|
||||
<input class="search-input" placeholder="请输入" v-model="filterKeyword" />
|
||||
</view>
|
||||
<view class="btn-query" @click="handleQuery">
|
||||
<text class="query-txt">鏌ヨ</text>
|
||||
<text class="query-txt">查询</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 涓昏鍐呭鍖哄煙 -->
|
||||
<!-- 主要内容区域 -->
|
||||
<view class="table-card border-shadow">
|
||||
<view class="card-header">
|
||||
<view class="btn-primary" @click="handleAdd">
|
||||
<text class="btn-txt">娣诲姞鏂囩珷</text>
|
||||
<text class="btn-txt">添加文章</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 鏁版嵁琛ㄦ牸 -->
|
||||
<!-- 数据表格 -->
|
||||
<view class="table-header">
|
||||
<view class="th col-id"><text class="th-txt">ID</text></view>
|
||||
<view class="th col-img"><text class="th-txt">鏂囩珷鍥剧墖</text></view>
|
||||
<view class="th col-name"><text class="th-txt">鏂囩珷鍚嶇О</text></view>
|
||||
<view class="th col-link"><text class="th-txt">鍏宠仈鍟嗗搧</text></view>
|
||||
<view class="th col-v"><text class="th-txt">娴忚閲?/text></view>
|
||||
<view class="th col-time"><text class="th-txt">鏃堕棿</text></view>
|
||||
<view class="th col-op"><text class="th-txt">鎿嶄綔</text></view>
|
||||
<view class="th col-img"><text class="th-txt">文章图片</text></view>
|
||||
<view class="th col-name"><text class="th-txt">文章名称</text></view>
|
||||
<view class="th col-link"><text class="th-txt">关联商品</text></view>
|
||||
<view class="th col-v"><text class="th-txt">浏览量</text></view>
|
||||
<view class="th col-time"><text class="th-txt">时间</text></view>
|
||||
<view class="th col-op"><text class="th-txt">操作</text></view>
|
||||
</view>
|
||||
|
||||
<view class="table-body">
|
||||
<view class="table-row" v-for="item in articleList" :key="item.id">
|
||||
<view class="td col-id"><text class="td-txt">{{ item.id }}</text></view>
|
||||
<view class="td col-img">
|
||||
<view class="img-box"><text class="img-placeholder">馃柤锔?/text></view>
|
||||
<view class="img-box"><text class="img-placeholder">🖼️</text></view>
|
||||
</view>
|
||||
<view class="td col-name"><text class="td-txt">{{ item.name }}</text></view>
|
||||
<view class="td col-link"><text class="td-txt">{{ item.linkedProduct }}</text></view>
|
||||
@@ -50,14 +50,14 @@
|
||||
<view class="td col-time"><text class="td-txt">{{ item.time }}</text></view>
|
||||
<view class="td col-op">
|
||||
<view class="op-links">
|
||||
<text class="link-txt" @click="handleEdit(item)">缂栬緫</text>
|
||||
<text class="link-txt" @click="handleEdit(item)">编辑</text>
|
||||
<view class="divider"></view>
|
||||
<text class="link-txt">鍏宠仈</text>
|
||||
<text class="link-txt">关联</text>
|
||||
<view class="divider"></view>
|
||||
<text class="link-txt danger">鍒犻櫎</text>
|
||||
<text class="link-txt danger">删除</text>
|
||||
<view class="divider"></view>
|
||||
<text class="link-txt">澶嶅埗閾炬帴</text>
|
||||
<text class="arrow-small">鈻?/text>
|
||||
<text class="link-txt">复制链接</text>
|
||||
<text class="arrow-small">▼</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -65,28 +65,28 @@
|
||||
|
||||
<view class="pagination-bar">
|
||||
<view class="page-info">
|
||||
<text class="page-total">鍏?{{ articleList.length }} 鏉?/text>
|
||||
<text class="page-total">共 {{ articleList.length }} 条</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 渚ц竟寮圭獥 (Drawer) -->
|
||||
<!-- 侧边弹窗 (Drawer) -->
|
||||
<view v-if="showDrawer" :class="['drawer-mask', isClosing ? 'mask-fade-out' : '']" @click="closeDrawer">
|
||||
<view :class="['drawer-content', isClosing ? 'slide-out' : '']" @click.stop="">
|
||||
<view class="drawer-header">
|
||||
<view class="tab-item active">
|
||||
<text class="tab-txt">鏂囩珷淇℃伅</text>
|
||||
<text class="tab-txt">文章信息</text>
|
||||
<view class="tab-line"></view>
|
||||
</view>
|
||||
<text class="close-btn" @click="closeDrawer">脳</text>
|
||||
<text class="close-btn" @click="closeDrawer">×</text>
|
||||
</view>
|
||||
|
||||
<scroll-view class="drawer-body" :scroll-y="true">
|
||||
<!-- 鏂囩珷淇℃伅鍖哄潡 -->
|
||||
<!-- 文章信息区块 -->
|
||||
<view class="section-title">
|
||||
<view class="title-inner active">
|
||||
<text class="title-txt">鏂囩珷淇℃伅</text>
|
||||
<text class="title-txt">文章信息</text>
|
||||
<view class="title-line"></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -94,16 +94,16 @@
|
||||
<view class="form-grid">
|
||||
<view class="form-row">
|
||||
<view class="form-col">
|
||||
<view class="label-box"><text class="required">*</text><text class="label-txt">鏍囬:</text></view>
|
||||
<view class="label-box"><text class="required">*</text><text class="label-txt">标题:</text></view>
|
||||
<view class="input-box">
|
||||
<input class="input-base" v-model="formTitle" placeholder="璇疯緭鍏? />
|
||||
<input class="input-base" v-model="formTitle" placeholder="请输入" />
|
||||
<text class="input-count">{{ formTitle.length }}/80</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-col">
|
||||
<view class="label-box"><text class="label-txt">浣滆€?</text></view>
|
||||
<view class="label-box"><text class="label-txt">作者:</text></view>
|
||||
<view class="input-box">
|
||||
<input class="input-base" v-model="formAuthor" placeholder="璇疯緭鍏? />
|
||||
<input class="input-base" v-model="formAuthor" placeholder="请输入" />
|
||||
<text class="input-count">{{ formAuthor.length }}/10</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -111,18 +111,18 @@
|
||||
|
||||
<view class="form-row mt-20">
|
||||
<view class="form-col">
|
||||
<view class="label-box"><text class="required">*</text><text class="label-txt">鏂囩珷鍒嗙被:</text></view>
|
||||
<view class="label-box"><text class="required">*</text><text class="label-txt">文章分类:</text></view>
|
||||
<view class="input-box">
|
||||
<view class="select-mock">
|
||||
<text class="select-val">{{ formCategory || '璇烽€夋嫨' }}</text>
|
||||
<text class="arrow-down">鈻?/text>
|
||||
<text class="select-val">{{ formCategory || '请选择' }}</text>
|
||||
<text class="arrow-down">▼</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-col">
|
||||
<view class="label-box"><text class="label-txt">鏂囩珷绠€浠?</text></view>
|
||||
<view class="label-box"><text class="label-txt">文章简介:</text></view>
|
||||
<view class="input-box">
|
||||
<textarea class="textarea-base" v-model="formIntro" placeholder="璇疯緭鍏? />
|
||||
<textarea class="textarea-base" v-model="formIntro" placeholder="请输入" />
|
||||
<text class="input-count">{{ formIntro.length }}/300</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -130,77 +130,77 @@
|
||||
|
||||
<view class="form-row mt-20">
|
||||
<view class="form-col full">
|
||||
<view class="label-box"><text class="required">*</text><text class="label-txt">鍥炬枃灏侀潰:</text></view>
|
||||
<view class="label-box"><text class="required">*</text><text class="label-txt">图文封面:</text></view>
|
||||
<view class="upload-container">
|
||||
<view class="upload-btn">
|
||||
<text class="plus-icon">+</text>
|
||||
</view>
|
||||
<text class="tip-txt mt-10">寤鸿灏哄锛?00 x 312 px</text>
|
||||
<text class="tip-txt mt-10">建议尺寸:500 x 312 px</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 鏂囩珷鍐呭鍖哄潡 -->
|
||||
<!-- 文章内容区块 -->
|
||||
<view class="section-title mt-40">
|
||||
<view class="title-inner active">
|
||||
<text class="title-txt">鏂囩珷鍐呭</text>
|
||||
<text class="title-txt">文章内容</text>
|
||||
<view class="title-line"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="editor-section">
|
||||
<view class="label-box mb-10"><text class="required">*</text><text class="label-txt">鏂囩珷鍐呭:</text></view>
|
||||
<view class="label-box mb-10"><text class="required">*</text><text class="label-txt">文章内容:</text></view>
|
||||
<view class="rich-editor-mock">
|
||||
<view class="editor-toolbar">
|
||||
<text class="tool-ic">HTML</text>
|
||||
<text class="tool-ic">H</text>
|
||||
<text class="tool-ic">B</text>
|
||||
<text class="tool-ic">T鈫?/text>
|
||||
<text class="tool-ic">T↕</text>
|
||||
<text class="tool-ic">F</text>
|
||||
<text class="tool-ic">I</text>
|
||||
<text class="tool-ic">U</text>
|
||||
<text class="tool-ic">S</text>
|
||||
<text class="tool-ic-img">馃柤锔?/text>
|
||||
<text class="tool-ic-img">馃幀</text>
|
||||
<text class="tool-ic-img">🖼️</text>
|
||||
<text class="tool-ic-img">🎬</text>
|
||||
</view>
|
||||
<view class="editor-content"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 鍏朵粬璁剧疆 -->
|
||||
<!-- 其他设置 -->
|
||||
<view class="section-title mt-40">
|
||||
<view class="title-inner active">
|
||||
<text class="title-txt">鍏朵粬璁剧疆</text>
|
||||
<text class="title-txt">其他设置</text>
|
||||
<view class="title-line"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="settings-section">
|
||||
<view class="form-item">
|
||||
<view class="label-box-wide"><text class="label-txt">banner鏄剧ず:</text></view>
|
||||
<view class="label-box-wide"><text class="label-txt">banner显示:</text></view>
|
||||
<view class="radio-group">
|
||||
<view class="radio-item" @click="formBanner = true">
|
||||
<view :class="['radio-circle', formBanner ? 'checked' : '']"><view v-if="formBanner" class="radio-in"></view></view>
|
||||
<text class="radio-la">鏄剧ず</text>
|
||||
<text class="radio-la">显示</text>
|
||||
</view>
|
||||
<view class="radio-item" @click="formBanner = false">
|
||||
<view :class="['radio-circle', !formBanner ? 'checked' : '']"><view v-if="!formBanner" class="radio-in"></view></view>
|
||||
<text class="radio-la">涓嶆樉绀?/text>
|
||||
<text class="radio-la">不显示</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-item mt-20">
|
||||
<view class="label-box-wide"><text class="label-txt">鐑棬鏂囩珷:</text></view>
|
||||
<view class="label-box-wide"><text class="label-txt">热门文章:</text></view>
|
||||
<view class="radio-group">
|
||||
<view class="radio-item" @click="formHot = true">
|
||||
<view :class="['radio-circle', formHot ? 'checked' : '']"><view v-if="formHot" class="radio-in"></view></view>
|
||||
<text class="radio-la">鏄剧ず</text>
|
||||
<text class="radio-la">显示</text>
|
||||
</view>
|
||||
<view class="radio-item" @click="formHot = false">
|
||||
<view :class="['radio-circle', !formHot ? 'checked' : '']"><view v-if="!formHot" class="radio-in"></view></view>
|
||||
<text class="radio-la">涓嶆樉绀?/text>
|
||||
<text class="radio-la">不显示</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
<view class="submit-container mt-40">
|
||||
<view class="btn-submit" @click="handleConfirm">
|
||||
<text class="submit-txt">鎻愪氦</text>
|
||||
<text class="submit-txt">提交</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -220,11 +220,11 @@
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const filterCategory = ref('鍏ㄩ儴')
|
||||
const filterCategory = ref('全部')
|
||||
const filterKeyword = ref('')
|
||||
const articleList = ref([
|
||||
{ id: '240', name: '璧嬭兘娑堣垂 | 鍗风嫍浼橀€夎繄鍚戞枃鍖栨秷璐规柊鏃朵唬', linkedProduct: '', views: '3349', time: '2025-04-01 16:34' },
|
||||
{ id: '237', name: '鎶婇噸瑕佺殑鏃ュ瓙鏀惧湪妗岄潰', linkedProduct: '2024鏂版鍚归鏈?..', views: '260', time: '2025-04-01 16:32' }
|
||||
{ id: '240', name: '赋能消费 | 卷狗优选迈向文化消费新时代', linkedProduct: '', views: '3349', time: '2025-04-01 16:34' },
|
||||
{ id: '237', name: '把重要的日子放在桌面', linkedProduct: '2024新款吹风机...', views: '260', time: '2025-04-01 16:32' }
|
||||
])
|
||||
|
||||
const showDrawer = ref(false)
|
||||
@@ -249,9 +249,9 @@ const handleAdd = () => {
|
||||
|
||||
const handleEdit = (item: any) => {
|
||||
formTitle.value = item.name
|
||||
formAuthor.value = '绠$悊鍛?
|
||||
formCategory.value = '鍏ㄩ儴'
|
||||
formIntro.value = '杩欐槸涓€娈垫枃绔犵畝浠?..'
|
||||
formAuthor.value = '管理员'
|
||||
formCategory.value = '全部'
|
||||
formIntro.value = '这是一段文章简介...'
|
||||
formBanner.value = false
|
||||
formHot.value = true
|
||||
isClosing.value = false
|
||||
@@ -310,7 +310,7 @@ const handleQuery = () => { console.log('Querying...') }
|
||||
.page-total { font-size: 13px; color: #606266; margin-right: 15px; }
|
||||
.drawer-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.4); z-index: 2000; transition: opacity 0.3s; }
|
||||
.mask-fade-out { opacity: 0; }
|
||||
.drawer-content { position: absolute; top: 0; right: 0; width: 50%; height: 100%; display: flex; flex-direction: column; box-shadow: -2px 0 12px rgba(0, 0, 0, 0.2); animation: slideIn 0.3s ease; }
|
||||
.drawer-content { position: absolute; top: 0; right: 0; width: 50%; height: 100%; background-color: #fff; display: flex; flex-direction: column; box-shadow: -2px 0 12px rgba(0, 0, 0, 0.2); animation: slideIn 0.3s ease; }
|
||||
.slide-out { animation: slideOut 0.3s ease forwards; }
|
||||
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
|
||||
@keyframes slideOut { from { transform: translateX(0); } to { transform: translateX(100%); } }
|
||||
@@ -353,7 +353,7 @@ const handleQuery = () => { console.log('Querying...') }
|
||||
.editor-toolbar { height: 44px; background-color: #fafafa; border-bottom: 1px solid #dcdee2; display: flex; flex-direction: row; align-items: center; padding: 0 15px; gap: 20px; flex-wrap: wrap; }
|
||||
.tool-ic { font-size: 14px; color: #515a6e; cursor: pointer; }
|
||||
.tool-ic-img { font-size: 18px; cursor: pointer; }
|
||||
.editor-content { flex: 1; }
|
||||
.editor-content { flex: 1; background-color: #fff; }
|
||||
|
||||
.settings-section { display: flex; flex-direction: column; }
|
||||
.form-item { display: flex; flex-direction: row; align-items: center; }
|
||||
@@ -380,4 +380,3 @@ const handleQuery = () => { console.log('Querying...') }
|
||||
.mt-10 { margin-top: 10px; }
|
||||
.mb-10 { margin-bottom: 10px; }
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user