feat: worksheet发布功能开发
This commit is contained in:
@@ -0,0 +1,183 @@
|
||||
<view class="debug-publish-tools">
|
||||
<view
|
||||
class="debug-publish-tools__fab"
|
||||
hover-class="debug-publish-tools__fab--hover"
|
||||
hover-start-time="0"
|
||||
hover-stay-time="70"
|
||||
catchtap="onOpen">
|
||||
<text class="debug-publish-tools__fab-icon">📤</text>
|
||||
<text class="debug-publish-tools__fab-text">发布到云端</text>
|
||||
</view>
|
||||
|
||||
<van-popup
|
||||
show="{{visible}}"
|
||||
position="center"
|
||||
round
|
||||
closeable="{{!loading}}"
|
||||
close-on-click-overlay="{{!loading}}"
|
||||
bind:close="onClose"
|
||||
custom-class="debug-publish-tools__popup">
|
||||
<view class="debug-publish-tools__content">
|
||||
<text class="debug-publish-tools__title">Debug 发布</text>
|
||||
|
||||
<view wx:if="{{meta}}" class="debug-publish-tools__section">
|
||||
<text class="debug-publish-tools__section-title">基础信息</text>
|
||||
<view class="debug-publish-tools__meta-grid">
|
||||
<view class="debug-publish-tools__meta-item">
|
||||
<text class="debug-publish-tools__meta-label">ID</text>
|
||||
<text class="debug-publish-tools__meta-value">{{meta.id}}</text>
|
||||
</view>
|
||||
<view class="debug-publish-tools__meta-item">
|
||||
<text class="debug-publish-tools__meta-label">分类</text>
|
||||
<text class="debug-publish-tools__meta-value">{{meta.category}}</text>
|
||||
</view>
|
||||
<view class="debug-publish-tools__meta-item">
|
||||
<text class="debug-publish-tools__meta-label">年龄</text>
|
||||
<text class="debug-publish-tools__meta-value">
|
||||
{{meta.ageMin}}-{{meta.ageMax}} 岁
|
||||
</text>
|
||||
</view>
|
||||
<view class="debug-publish-tools__meta-item">
|
||||
<text class="debug-publish-tools__meta-label">难度</text>
|
||||
<text class="debug-publish-tools__meta-value">{{meta.difficulty}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="debug-publish-tools__path-box">
|
||||
<text class="debug-publish-tools__meta-label">路径</text>
|
||||
<text class="debug-publish-tools__path">{{meta.path}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="debug-publish-tools__section">
|
||||
<text class="debug-publish-tools__section-title">资料信息</text>
|
||||
<view class="debug-publish-tools__field">
|
||||
<text class="debug-publish-tools__field-label">标题</text>
|
||||
<input
|
||||
class="debug-publish-tools__input"
|
||||
value="{{formTitle}}"
|
||||
maxlength="20"
|
||||
bindinput="onTitleInput" />
|
||||
</view>
|
||||
<view class="debug-publish-tools__field">
|
||||
<text class="debug-publish-tools__field-label">副标题</text>
|
||||
<input
|
||||
class="debug-publish-tools__input"
|
||||
value="{{formSubtitle}}"
|
||||
maxlength="40"
|
||||
bindinput="onSubtitleInput" />
|
||||
</view>
|
||||
<view class="debug-publish-tools__field">
|
||||
<text class="debug-publish-tools__field-label">标签</text>
|
||||
<input
|
||||
class="debug-publish-tools__input"
|
||||
value="{{formTags}}"
|
||||
placeholder="多个标签用逗号分隔"
|
||||
maxlength="80"
|
||||
bindinput="onTagsInput" />
|
||||
</view>
|
||||
<view class="debug-publish-tools__field">
|
||||
<text class="debug-publish-tools__field-label">状态</text>
|
||||
<view class="debug-publish-tools__chip-row">
|
||||
<view
|
||||
class="debug-publish-tools__chip {{formStatus === 'draft' ? 'debug-publish-tools__chip--active' : ''}}"
|
||||
data-value="draft"
|
||||
bindtap="onSelectStatus">
|
||||
draft
|
||||
</view>
|
||||
<view
|
||||
class="debug-publish-tools__chip {{formStatus === 'active' ? 'debug-publish-tools__chip--active' : ''}}"
|
||||
data-value="active"
|
||||
bindtap="onSelectStatus">
|
||||
active
|
||||
</view>
|
||||
<view
|
||||
class="debug-publish-tools__chip {{formStatus === 'hidden' ? 'debug-publish-tools__chip--active' : ''}}"
|
||||
data-value="hidden"
|
||||
bindtap="onSelectStatus">
|
||||
hidden
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="debug-publish-tools__section">
|
||||
<text class="debug-publish-tools__section-title">图片处理</text>
|
||||
<view class="debug-publish-tools__field">
|
||||
<text class="debug-publish-tools__field-label">裁剪模式</text>
|
||||
<view class="debug-publish-tools__chip-row debug-publish-tools__chip-row--wrap">
|
||||
<view
|
||||
class="debug-publish-tools__chip {{formCropMode === 'header-footer' ? 'debug-publish-tools__chip--active' : ''}}"
|
||||
data-value="header-footer"
|
||||
bindtap="onSelectCropMode">
|
||||
裁剪头尾
|
||||
</view>
|
||||
<view
|
||||
class="debug-publish-tools__chip {{formCropMode === 'header-only' ? 'debug-publish-tools__chip--active' : ''}}"
|
||||
data-value="header-only"
|
||||
bindtap="onSelectCropMode">
|
||||
仅裁头部
|
||||
</view>
|
||||
<view
|
||||
class="debug-publish-tools__chip {{formCropMode === 'none' ? 'debug-publish-tools__chip--active' : ''}}"
|
||||
data-value="none"
|
||||
bindtap="onSelectCropMode">
|
||||
不裁剪
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="debug-publish-tools__field">
|
||||
<text class="debug-publish-tools__field-label">
|
||||
压缩质量 {{formQuality}}
|
||||
</text>
|
||||
<slider
|
||||
min="40"
|
||||
max="95"
|
||||
step="5"
|
||||
value="{{formQuality}}"
|
||||
activeColor="#f7ce00"
|
||||
backgroundColor="#ece4d2"
|
||||
bindchange="onQualityChange" />
|
||||
</view>
|
||||
<view class="debug-publish-tools__field">
|
||||
<text class="debug-publish-tools__field-label">
|
||||
输出宽度 {{formWidth}}px
|
||||
</text>
|
||||
<slider
|
||||
min="400"
|
||||
max="1000"
|
||||
step="20"
|
||||
value="{{formWidth}}"
|
||||
activeColor="#f7ce00"
|
||||
backgroundColor="#ece4d2"
|
||||
bindchange="onWidthChange" />
|
||||
</view>
|
||||
<text class="debug-publish-tools__hint">
|
||||
默认按文档规则裁掉页眉和页脚,并尽量压缩到 {{maxSizeKB}}KB 内。
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="debug-publish-tools__actions">
|
||||
<button
|
||||
class="debug-publish-tools__btn debug-publish-tools__btn--ghost"
|
||||
disabled="{{loading}}"
|
||||
bindtap="onClose">
|
||||
取消
|
||||
</button>
|
||||
<button
|
||||
class="debug-publish-tools__btn debug-publish-tools__btn--primary"
|
||||
loading="{{loading}}"
|
||||
disabled="{{loading}}"
|
||||
bindtap="onConfirm">
|
||||
确认发布
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
|
||||
<view class="debug-publish-tools__processor">
|
||||
<canvas
|
||||
id="processorCanvas"
|
||||
type="2d"
|
||||
class="debug-publish-tools__processor-canvas" />
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user