134 lines
5.4 KiB
Plaintext
134 lines
5.4 KiB
Plaintext
<nav-bar title="自定义练字贴" />
|
|
|
|
<view class="cb-page">
|
|
<view class="cb-main">
|
|
<preview-card
|
|
id="previewCard"
|
|
showRefresh="{{true}}"
|
|
showFavorite="{{true}}"
|
|
favorited="{{isPreviewFavorite}}"
|
|
bind:canvas-ready="onCanvasReady"
|
|
bind:refresh="onPreviewRefresh"
|
|
bind:favorite="onPreviewFavorite" />
|
|
|
|
<view class="cb-section">
|
|
<text class="cb-section-title">内容设置</text>
|
|
<view class="cb-content-panel">
|
|
<view class="cb-field">
|
|
<view class="cb-field-header">
|
|
<text class="cb-field-label">自定义文字</text>
|
|
<text class="cb-field-hint">最多输入11个字</text>
|
|
</view>
|
|
<view class="cb-input-wrapper">
|
|
<input
|
|
class="cb-text-input"
|
|
type="text"
|
|
maxlength="20"
|
|
placeholder="输入想要练习的汉字"
|
|
value="{{inputValue}}"
|
|
bindinput="onInputChange"
|
|
bindconfirm="onInputConfirm" />
|
|
<view
|
|
wx:if="{{inputValue.length > 0}}"
|
|
class="cb-input-clear"
|
|
bindtap="onClearInput">
|
|
<toy-icon
|
|
name="close-bold"
|
|
size="36rpx"
|
|
color="#605b50" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="cb-field">
|
|
<view class="cb-field-header">
|
|
<text class="cb-field-label">已选文字</text>
|
|
<text class="cb-field-hint">点击文字可删除</text>
|
|
</view>
|
|
<scroll-view scroll-x class="cb-word-scroll">
|
|
<view class="cb-word-list">
|
|
<view
|
|
wx:for="{{words}}"
|
|
wx:key="index"
|
|
class="cb-word-chip">
|
|
<text class="cb-word-chip__text">{{item}}</text>
|
|
<view
|
|
class="cb-word-chip__delete-hit"
|
|
data-index="{{index}}"
|
|
catchtap="deleteWordChip">
|
|
<toy-icon
|
|
name="close-bold"
|
|
size="24rpx"
|
|
color="rgba(96,91,80,0.5)" />
|
|
</view>
|
|
</view>
|
|
<view class="cb-word-add">
|
|
<view
|
|
class="cb-word-add-btn"
|
|
bindtap="openSelectWordPopup">
|
|
<toy-icon
|
|
name="plus"
|
|
size="36rpx"
|
|
color="rgba(96,91,80,0.4)" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
|
|
<scroll-view scroll-x class="cb-category-scroll">
|
|
<view class="cb-category-list">
|
|
<view
|
|
wx:for="{{categoryTags}}"
|
|
wx:key="categoryId"
|
|
class="cb-category-tag"
|
|
data-category-id="{{item.categoryId}}"
|
|
bindtap="onCategoryTap">
|
|
<text class="cb-category-tag-icon"
|
|
>{{item.icon}}</text
|
|
>
|
|
<text class="cb-category-tag-text"
|
|
>{{item.categoryName}}</text
|
|
>
|
|
</view>
|
|
<view
|
|
class="cb-category-tag cb-category-tag--more"
|
|
bindtap="openSelectWordPopup">
|
|
<text class="cb-category-tag-icon">···</text>
|
|
<text class="cb-category-tag-text">更多分类</text>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<preview-footer-actions
|
|
disabled="{{!hasContent}}"
|
|
bind:primary="exportToPrint"
|
|
bind:secondary="onShare" />
|
|
|
|
<debug-publish-tools
|
|
wx:if="{{isDevEnv && hasContent}}"
|
|
id="debugPublishTools"
|
|
visible="{{debugPublishVisible}}"
|
|
loading="{{debugPublishLoading}}"
|
|
meta="{{debugPublishMeta}}"
|
|
bind:open="onOpenDebugPublish"
|
|
bind:close="onCloseDebugPublish"
|
|
bind:confirm="onConfirmDebugPublish" />
|
|
|
|
<word-picker
|
|
show="{{showSelectWordPopup}}"
|
|
selectedWords="{{selectedWords}}"
|
|
currentTab="{{pickerCurrentTab}}"
|
|
max="11"
|
|
bind:onClose="closeSelectWordPopup"
|
|
bind:onChange="onChangeWord" />
|
|
|
|
<share-guide-popup
|
|
show="{{showShareDialog}}"
|
|
bind:onClose="onCloseShareDialog"
|
|
bind:onShareSuccess="onShareSuccess" />
|