kydc/vocab-manage/vocab-manage.wxml

56 lines
2.3 KiB
Plaintext
Raw Normal View History

2026-04-18 17:16:49 +08:00
<view class="page">
<scroll-view scroll-y class="content">
<view class="header">
<text class="title">词库管理</text>
2026-04-19 11:56:49 +08:00
<text class="subtitle">管理并策划你的个人词汇集合。</text>
</view>
2026-04-19 16:39:02 +08:00
<!-- <view class="toolbar">
2026-04-19 11:56:49 +08:00
<button class="primary-btn" bindtap="goAdd">新增</button>
<button class="secondary-btn" bindtap="goBatch">批量上传</button>
<button class="secondary-btn" bindtap="goProgress">进度</button>
<button class="secondary-btn" bindtap="goSettings">设置</button>
2026-04-19 16:39:02 +08:00
</view> -->
2026-04-18 17:16:49 +08:00
<view class="search-row">
<view class="search-box">
<text class="search-icon">🔎</text>
<text class="search-placeholder">搜索单词、短语或标签...</text>
</view>
</view>
2026-04-19 11:56:49 +08:00
<view wx:if="{{loading}}" class="empty-state">
<text class="empty-title">加载中...</text>
<text class="empty-subtitle">正在同步词库数据</text>
</view>
2026-04-18 17:16:49 +08:00
2026-04-19 11:56:49 +08:00
<view wx:elif="{{error}}" class="error-banner">
<text class="error-text">{{error}}</text>
</view>
2026-04-18 17:16:49 +08:00
2026-04-19 11:56:49 +08:00
<view wx:elif="{{!list.length}}" class="empty-state">
<text class="empty-title">暂无词条</text>
<text class="empty-subtitle">点击“新增”或“批量上传”开始构建词库</text>
</view>
2026-04-18 17:16:49 +08:00
2026-04-19 11:56:49 +08:00
<view wx:else class="card-grid">
<block wx:for="{{list}}" wx:key="id">
2026-04-23 11:34:54 +08:00
<view class="word-card {{item.entry_type === 'sentence' ? 'pink' : 'cyan'}}" data-id="{{item.id}}" bindtap="goDetail">
2026-04-19 11:56:49 +08:00
<view class="card-top">
<view>
<text class="word-title">{{item.en_text}}</text>
2026-04-23 11:34:54 +08:00
<text class="phonetic">{{item.entry_type === 'sentence' ? '句子' : '单词'}}</text>
2026-04-19 11:56:49 +08:00
</view>
<view class="status-dot done">{{item.status}}</view>
2026-04-18 17:16:49 +08:00
</view>
2026-04-23 11:34:54 +08:00
<text class="meaning">{{item.entry_type === 'sentence' ? item.zh_text : item.zh_text}}</text>
<text class="example" wx:if="{{item.entry_type === 'word' && item.example_text}}">例句:{{item.example_text}}</text>
<text class="example" wx:elif="{{item.entry_type === 'sentence' && item.example_text}}">说明:{{item.example_text}}</text>
2026-04-18 17:16:49 +08:00
</view>
2026-04-19 11:56:49 +08:00
</block>
2026-04-18 17:16:49 +08:00
</view>
</scroll-view>
2026-04-19 11:56:49 +08:00
<view class="fab" bindtap="goAdd"></view>
2026-04-18 17:16:49 +08:00
</view>