feat:测试页位置迁移,适配 tabbar
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
"pages/index/index",
|
"pages/index/index",
|
||||||
"pages/shape/index",
|
"pages/shape/index",
|
||||||
"pages/debug/debug",
|
"pages/debug/debug",
|
||||||
"pages/shapePrint/index"
|
"demoPages/shapePrint/index"
|
||||||
],
|
],
|
||||||
"window": {},
|
"window": {},
|
||||||
"style": "v2",
|
"style": "v2",
|
||||||
|
|||||||
@@ -1,92 +1,92 @@
|
|||||||
.word-picker {
|
.word-picker-content {
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.word-picker-title {
|
.word-picker-title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #141414;
|
color: #141414;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-class {
|
.nav-class {
|
||||||
// background-color: red;
|
// background-color: red;
|
||||||
// width: 890rpx;
|
// width: 890rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-class {
|
.tab-class {
|
||||||
// width: 220rpx;
|
// width: 220rpx;
|
||||||
// flex-basis: auto !important;
|
// flex-basis: auto !important;
|
||||||
// display: inline-block;
|
// display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-active-class {
|
.tab-active-class {
|
||||||
color: #93d333;
|
color: #93d333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap-class {
|
.wrap-class {
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
// background-color: blue;
|
// background-color: blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.word-list-wrapper {
|
.word-list-wrapper {
|
||||||
padding: 28rpx 0;
|
padding: 28rpx 0;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
height: 500rpx;
|
height: 500rpx;
|
||||||
|
|
||||||
.word-list {
|
.word-list {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(6, 72rpx);
|
grid-template-columns: repeat(6, 72rpx);
|
||||||
grid-template-rows: repeat(1, 72rpx);
|
grid-template-rows: repeat(1, 72rpx);
|
||||||
gap: 40rpx;
|
gap: 40rpx;
|
||||||
|
justify-content: center;
|
||||||
|
// box-shadow: 0 0 -10rpx rgba(0, 0, 0, 0.2);
|
||||||
|
// align-items: flex-start;
|
||||||
|
|
||||||
|
.word-item {
|
||||||
|
width: 72rpx;
|
||||||
|
height: 72rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
background: rgba(240, 240, 240, 1);
|
||||||
|
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
// box-shadow: 0 0 -10rpx rgba(0, 0, 0, 0.2);
|
font-size: 28rpx;
|
||||||
// align-items: flex-start;
|
color: #141414;
|
||||||
|
|
||||||
.word-item {
|
&.selected {
|
||||||
width: 72rpx;
|
background: rgb(147, 211, 51);
|
||||||
height: 72rpx;
|
color: #ffffff;
|
||||||
border-radius: 16rpx;
|
box-shadow: 0px 2px 4px rgba(147, 211, 51, 0.15);
|
||||||
background: rgba(240, 240, 240, 1);
|
|
||||||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #141414;
|
|
||||||
|
|
||||||
&.selected {
|
|
||||||
background: rgb(147, 211, 51);
|
|
||||||
color: #ffffff;
|
|
||||||
box-shadow: 0px 2px 4px rgba(147, 211, 51, 0.15);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.word-item-empty {
|
|
||||||
height: 28rpx;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.word-item-empty {
|
||||||
.selected-words {
|
height: 28rpx;
|
||||||
padding: 28rpx;
|
width: 100%;
|
||||||
font-size: 28rpx;
|
|
||||||
color: #141414;
|
|
||||||
|
|
||||||
.selected-words-text {
|
|
||||||
font-weight: bold;
|
|
||||||
color: #93d333;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.btn-area {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
.selected-words {
|
||||||
margin-bottom: 96rpx;
|
padding: 28rpx;
|
||||||
padding: 0 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
color: #141414;
|
||||||
|
|
||||||
|
.selected-words-text {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #93d333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-area {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
// margin-bottom: 96rpx;
|
||||||
|
padding: 0 28rpx;
|
||||||
}
|
}
|
||||||
@@ -6,66 +6,69 @@
|
|||||||
round
|
round
|
||||||
closeable="{{true}}"
|
closeable="{{true}}"
|
||||||
close-on-click-overlay="{{true}}"
|
close-on-click-overlay="{{true}}"
|
||||||
safe-area-inset-bottom="{{true}}"
|
safe-area-inset-bottom="{{false}}"
|
||||||
position="bottom"
|
position="bottom"
|
||||||
custom-style="height: 70%"
|
custom-style="height:75%"
|
||||||
custom-class="word-picker">
|
custom-class="word-picker">
|
||||||
<view class="word-picker-title">请选择文字</view>
|
<view class="word-picker-content">
|
||||||
<van-tabs
|
<view class="word-picker-title">请选择文字</view>
|
||||||
wx:if="{{show}}"
|
<van-tabs
|
||||||
id="tabs"
|
wx:if="{{show}}"
|
||||||
animated
|
id="tabs"
|
||||||
color="#93d333"
|
animated
|
||||||
ellipsis="{{false}}"
|
color="#93d333"
|
||||||
line-width="90rpx"
|
ellipsis="{{false}}"
|
||||||
nav-class="nav-class"
|
line-width="90rpx"
|
||||||
tab-class="tab-class"
|
nav-class="nav-class"
|
||||||
wrap-class="wrap-class"
|
tab-class="tab-class"
|
||||||
tab-active-class="tab-active-class"
|
wrap-class="wrap-class"
|
||||||
swipeable="{{true}}"
|
tab-active-class="tab-active-class"
|
||||||
active="{{currentTab}}"
|
swipeable="{{true}}"
|
||||||
bind:change="onTabChange">
|
active="{{currentTab}}"
|
||||||
<van-tab
|
bind:change="onTabChange">
|
||||||
wx:for="{{wordList}}"
|
<van-tab
|
||||||
wx:for-index="categoryIndex"
|
wx:for="{{wordList}}"
|
||||||
wx:key="categoryIndex"
|
wx:for-index="categoryIndex"
|
||||||
title="{{wordList[categoryIndex].categoryName}}">
|
wx:key="categoryIndex"
|
||||||
<view class="word-list-wrapper">
|
title="{{wordList[categoryIndex].categoryName}}">
|
||||||
<view class="word-list">
|
<view class="word-list-wrapper">
|
||||||
<view
|
<view class="word-list">
|
||||||
class="word-item {{wxs.isSelected(selectedWords, item) ? 'selected' : ''}}"
|
<view
|
||||||
wx:for="{{wordList[categoryIndex].words}}"
|
class="word-item {{wxs.isSelected(selectedWords, item) ? 'selected' : ''}}"
|
||||||
wx:key="index"
|
wx:for="{{wordList[categoryIndex].words}}"
|
||||||
data-word="{{item}}"
|
wx:key="index"
|
||||||
bind:tap="onWordClick">
|
data-word="{{item}}"
|
||||||
<text class="word-item-text">{{item}}</text>
|
bind:tap="onWordClick">
|
||||||
<!-- <text class="word-item-icon icon-success"></text> -->
|
<text class="word-item-text">{{item}}</text>
|
||||||
|
<!-- <text class="word-item-icon icon-success"></text> -->
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="word-item-empty"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="word-item-empty"></view>
|
</van-tab>
|
||||||
</view>
|
</van-tabs>
|
||||||
</van-tab>
|
<view class="selected-words">
|
||||||
</van-tabs>
|
已选文字:
|
||||||
<view class="selected-words">
|
<text
|
||||||
已选文字:
|
class="selected-word-text"
|
||||||
<text
|
wx:for="{{selectedWords}}"
|
||||||
class="selected-word-text"
|
wx:key="index"
|
||||||
wx:for="{{selectedWords}}"
|
>{{item}}{{index !== selectedWords.length - 1 ? '、' :
|
||||||
wx:key="index"
|
''}}</text
|
||||||
>{{item}}{{index !== selectedWords.length - 1 ? '、' : ''}}</text
|
>
|
||||||
>
|
</view>
|
||||||
</view>
|
<view class="btn-area">
|
||||||
<view class="btn-area">
|
<toy-button type="primary" bind:click="onChange" width="400rpx">
|
||||||
<toy-button type="primary" bind:click="onChange" width="400rpx">
|
(已选{{selectedWords.length}}个) 确定
|
||||||
(已选{{selectedWords.length}}个) 确定
|
</toy-button>
|
||||||
</toy-button>
|
<toy-button
|
||||||
<toy-button
|
type="white"
|
||||||
type="white"
|
bind:click="onClear"
|
||||||
bind:click="onClear"
|
width="210rpx"
|
||||||
width="210rpx"
|
icon="clear"
|
||||||
icon="clear"
|
icon-class-prefix="toy-icon">
|
||||||
icon-class-prefix="toy-icon">
|
清空
|
||||||
清空
|
</toy-button>
|
||||||
</toy-button>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
|
|||||||
@@ -79,6 +79,6 @@
|
|||||||
clickable
|
clickable
|
||||||
data-name="shapePrint"
|
data-name="shapePrint"
|
||||||
is-link
|
is-link
|
||||||
url="/pages/shapePrint/index" />
|
url="/demoPages/shapePrint/index" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"name": "测试图形绘制",
|
"name": "测试图形绘制",
|
||||||
"pathName": "pages/shapePrint/index",
|
"pathName": "demoPages/shapePrint/index",
|
||||||
"query": "",
|
"query": "",
|
||||||
"scene": null,
|
"scene": null,
|
||||||
"launchMode": "default"
|
"launchMode": "default"
|
||||||
|
|||||||
Reference in New Issue
Block a user