feat: 开始开发专注力系列

This commit is contained in:
R524809
2025-12-11 17:47:22 +08:00
parent 3c0e2af10d
commit 3648ccc494
61 changed files with 1348 additions and 34 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ import MathBottomButtons from '../components/math-bottom-buttons/math-bottom-but
```typescript
import AdditionDraw from '../shared/service/additionDraw';
import { createMathPage } from '../shared/common/mathPageMixin';
import MathBottomButtons from '../shared/components/math-bottom-buttons/math-bottom-buttons';
import MathBottomButtons from '../../components/math-bottom-buttons/math-bottom-buttons';
```
#### service 文件之间的导入
+2 -2
View File
@@ -6,7 +6,7 @@
"enablePullDownRefresh": false,
"usingComponents": {
"share-guide-popup": "../../components/share-guide-popup/share-guide-popup",
"math-type-selector": "../shared/components/math-type-selector/math-type-selector",
"math-bottom-buttons": "../shared/components/math-bottom-buttons/math-bottom-buttons"
"math-type-selector": "../../components/math-type-selector/math-type-selector",
"math-bottom-buttons": "../../components/math-bottom-buttons/math-bottom-buttons"
}
}
+1 -1
View File
@@ -1 +1 @@
@import '../shared/common/mathPage.less';
@import '../../base/baseDrawPage.less';
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

+1 -1
View File
@@ -7,6 +7,6 @@
"usingComponents": {
"toy-button": "../../ui/button/button",
"share-guide-popup": "../../components/share-guide-popup/share-guide-popup",
"math-bottom-buttons": "../shared/components/math-bottom-buttons/math-bottom-buttons"
"math-bottom-buttons": "../../components/math-bottom-buttons/math-bottom-buttons"
}
}
+1 -1
View File
@@ -1 +1 @@
@import '../shared/common/mathPage.less';
@import '../../base/baseDrawPage.less';
@@ -6,7 +6,7 @@
"enablePullDownRefresh": false,
"usingComponents": {
"share-guide-popup": "../../components/share-guide-popup/share-guide-popup",
"math-type-selector": "../shared/components/math-type-selector/math-type-selector",
"math-bottom-buttons": "../shared/components/math-bottom-buttons/math-bottom-buttons"
"math-type-selector": "../../components/math-type-selector/math-type-selector",
"math-bottom-buttons": "../../components/math-bottom-buttons/math-bottom-buttons"
}
}
@@ -1 +1 @@
@import '../shared/common/mathPage.less';
@import '../../base/baseDrawPage.less';
@@ -7,6 +7,6 @@
"usingComponents": {
"toy-button": "../../ui/button/button",
"share-guide-popup": "../../components/share-guide-popup/share-guide-popup",
"math-bottom-buttons": "../shared/components/math-bottom-buttons/math-bottom-buttons"
"math-bottom-buttons": "../../components/math-bottom-buttons/math-bottom-buttons"
}
}
@@ -1 +1 @@
@import '../shared/common/mathPage.less';
@import '../../base/baseDrawPage.less';
@@ -6,7 +6,7 @@
"enablePullDownRefresh": false,
"usingComponents": {
"share-guide-popup": "../../components/share-guide-popup/share-guide-popup",
"math-type-selector": "../shared/components/math-type-selector/math-type-selector",
"math-bottom-buttons": "../shared/components/math-bottom-buttons/math-bottom-buttons"
"math-type-selector": "../../components/math-type-selector/math-type-selector",
"math-bottom-buttons": "../../components/math-bottom-buttons/math-bottom-buttons"
}
}
@@ -1 +1 @@
@import '../shared/common/mathPage.less';
@import '../../base/baseDrawPage.less';
@@ -6,7 +6,7 @@
"enablePullDownRefresh": false,
"usingComponents": {
"share-guide-popup": "../../components/share-guide-popup/share-guide-popup",
"math-bottom-buttons": "../shared/components/math-bottom-buttons/math-bottom-buttons",
"math-type-selector": "../shared/components/math-type-selector/math-type-selector"
"math-bottom-buttons": "../../components/math-bottom-buttons/math-bottom-buttons",
"math-type-selector": "../../components/math-type-selector/math-type-selector"
}
}
@@ -1 +1 @@
@import '../shared/common/mathPage.less';
@import '../../base/baseDrawPage.less';
@@ -7,6 +7,6 @@
"usingComponents": {
"toy-button": "../../ui/button/button",
"share-guide-popup": "../../components/share-guide-popup/share-guide-popup",
"math-bottom-buttons": "../shared/components/math-bottom-buttons/math-bottom-buttons"
"math-bottom-buttons": "../../components/math-bottom-buttons/math-bottom-buttons"
}
}
@@ -1,4 +1,4 @@
@import '../shared/common/mathPage.less';
@import '../../base/baseDrawPage.less';
/* 数字选择区域 */
.number-selection-area {
@@ -1,104 +0,0 @@
/**
* 数学页面公共样式
*/
page {
background-color: #f6f6f6;
}
.page-container {
background-color: #f6f6f6;
padding: 0 24rpx;
box-sizing: border-box;
padding-bottom: 160rpx; // 为底部按钮预留空间
.empty {
height: 50rpx;
}
}
.wrapper {
background-color: #ffffff;
border-radius: 20rpx;
padding: 36rpx 24rpx;
box-shadow: 0 6rpx 8rpx rgba(0, 0, 0, 0.15);
margin: 30rpx 0;
display: flex;
flex-direction: column;
.wrapper-title {
font-size: 32rpx;
color: #141414;
margin-bottom: 36rpx;
font-weight: bold;
text-align: center;
}
.canvas-wrapper {
display: flex;
justify-content: center;
align-items: center;
min-height: 400rpx;
background: #f8f9fa;
border-radius: 12rpx;
border: 2rpx dashed #dee2e6;
}
.canvas-content {
max-width: 100%;
border-radius: 8rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.random-button-area {
margin-top: 40rpx;
display: flex;
align-items: center;
gap: 20rpx;
.type-selector {
flex: 1; // 占据剩余空间
height: 80rpx;
background-color: #fff;
border: 2rpx solid #e5e5e5;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 24rpx;
box-sizing: border-box;
.type-selector-text {
font-size: 28rpx;
color: #333;
}
.type-selector-arrow {
font-size: 20rpx;
color: #999;
}
}
.random-button {
flex: 2;
}
}
}
/* 底部按钮区域 */
.bottom-btn-box {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 180rpx;
display: flex;
justify-content: space-between;
background-color: #fff;
box-shadow: 0px -3.9rpx 5.2rpx rgba(0, 0, 0, 0.15);
padding: 24rpx;
padding-bottom: env(safe-area-inset-bottom);
box-sizing: border-box;
border-radius: 16rpx 16rpx 0 0;
z-index: 2;
}
@@ -1,6 +0,0 @@
{
"component": true,
"usingComponents": {
"toy-button": "../../../../ui/button/button"
}
}
@@ -1,16 +0,0 @@
.bottom-btn-box {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 180rpx;
display: flex;
justify-content: space-between;
background-color: #fff;
box-shadow: 0px -3.9rpx 5.2rpx rgba(0, 0, 0, 0.15);
padding: 24rpx;
padding-bottom: env(safe-area-inset-bottom);
box-sizing: border-box;
border-radius: 16rpx 16rpx 0 0;
z-index: 2;
}
@@ -1,18 +0,0 @@
Component({
properties: {
disabled: {
type: Boolean,
value: false,
},
},
methods: {
onShare() {
this.triggerEvent('share');
},
onExport() {
this.triggerEvent('export');
},
},
});
@@ -1,24 +0,0 @@
<view class="bottom-btn-box">
<toy-button
openType="share"
type="green"
flat="{{true}}"
bind:click="onShare"
width="220rpx"
height="80rpx"
icon="wechat"
icon-class-prefix="toy-icon">
分享
</toy-button>
<toy-button
type="primary"
flat="{{true}}"
bind:click="onExport"
width="420rpx"
height="80rpx"
disabled="{{disabled}}"
icon="download"
icon-class-prefix="toy-icon">
下载打印
</toy-button>
</view>
@@ -1,7 +0,0 @@
{
"component": true,
"usingComponents": {
"toy-button": "../../../../ui/button/button",
"van-action-sheet": "../../../../miniprogram_npm/@vant/weapp/action-sheet/index"
}
}
@@ -1,33 +0,0 @@
.random-button-area {
margin-top: 40rpx;
display: flex;
align-items: center;
gap: 20rpx;
.type-selector {
flex: 1; // 占据剩余空间
height: 80rpx;
background-color: #fff;
border: 2rpx solid #e5e5e5;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 24rpx;
box-sizing: border-box;
.type-selector-text {
font-size: 28rpx;
color: #333;
}
.type-selector-arrow {
font-size: 20rpx;
color: #999;
}
}
.random-button {
flex: 2;
}
}
@@ -1,36 +0,0 @@
Component({
properties: {
currentTypeName: {
type: String,
value: '',
},
typeActions: {
type: Array,
value: [],
},
},
data: {
showSelector: false,
},
methods: {
onShowSelector() {
this.setData({ showSelector: true });
},
onClose() {
this.setData({ showSelector: false });
},
onSelect(event: any) {
const { name, value } = event.detail;
this.setData({ showSelector: false });
this.triggerEvent('select', { name, value });
},
onRandom() {
this.triggerEvent('random');
},
},
});
@@ -1,23 +0,0 @@
<view class="random-button-area">
<view class="type-selector" bind:tap="onShowSelector">
<text class="type-selector-text">{{currentTypeName}}</text>
<text class="type-selector-arrow">▼</text>
</view>
<toy-button
class="random-button"
type="primary"
bind:click="onRandom"
width="100%"
height="80rpx"
icon="refresh"
icon-class-prefix="toy-icon">
随机生成
</toy-button>
</view>
<van-action-sheet
show="{{showSelector}}"
actions="{{typeActions}}"
bind:select="onSelect"
bind:cancel="onClose"
bind:close="onClose"
cancel-text="取消" />