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