feat: make gpage tpl
This commit is contained in:
@@ -70,12 +70,7 @@
|
|||||||
<view class="section-title">
|
<view class="section-title">
|
||||||
<text>热门模板</text>
|
<text>热门模板</text>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view
|
<view class="tpl-scroll">
|
||||||
scroll-y
|
|
||||||
class="tpl-scroll"
|
|
||||||
show-scrollbar="false"
|
|
||||||
@scrolltolower="loadMoreTemplates"
|
|
||||||
>
|
|
||||||
<view class="tpl-grid">
|
<view class="tpl-grid">
|
||||||
<view
|
<view
|
||||||
v-for="(tpl, i) in templates"
|
v-for="(tpl, i) in templates"
|
||||||
@@ -97,7 +92,7 @@
|
|||||||
class="no-more"
|
class="no-more"
|
||||||
>没有更多了</view
|
>没有更多了</view
|
||||||
>
|
>
|
||||||
</scroll-view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 文字编辑 -->
|
<!-- 文字编辑 -->
|
||||||
@@ -199,7 +194,7 @@ import { ref, onMounted } from "vue";
|
|||||||
import { getBavBarHeight, getDeviceInfo } from "@/utils/system";
|
import { getBavBarHeight, getDeviceInfo } from "@/utils/system";
|
||||||
import { createCardTmp, getCardTemplateList } from "@/api/make";
|
import { createCardTmp, getCardTemplateList } from "@/api/make";
|
||||||
import { createCardShareToken } from "@/api/card";
|
import { createCardShareToken } from "@/api/card";
|
||||||
import { onShareAppMessage, onLoad } from "@dcloudio/uni-app";
|
import { onShareAppMessage, onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
|
|
||||||
const templatePage = ref(1);
|
const templatePage = ref(1);
|
||||||
@@ -237,6 +232,12 @@ onLoad((options) => {
|
|||||||
getTemplateList();
|
getTemplateList();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onReachBottom(() => {
|
||||||
|
if (activeTool.value === "template") {
|
||||||
|
loadMoreTemplates();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const createCard = async () => {
|
const createCard = async () => {
|
||||||
const res = await createCardTmp({
|
const res = await createCardTmp({
|
||||||
targetName: targetName.value,
|
targetName: targetName.value,
|
||||||
@@ -811,7 +812,6 @@ function drawRoundRect(ctx, x, y, w, h, r, color) {
|
|||||||
}
|
}
|
||||||
.tpl-scroll {
|
.tpl-scroll {
|
||||||
margin-top: 12rpx;
|
margin-top: 12rpx;
|
||||||
height: 600rpx; /* 增加高度以展示纵向列表 */
|
|
||||||
}
|
}
|
||||||
.tpl-grid {
|
.tpl-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|||||||
Reference in New Issue
Block a user