feat: 更新名片组件

This commit is contained in:
大森 2025-11-10 16:42:35 +08:00
parent c2d41bf1be
commit 9b0223171a
4 changed files with 14 additions and 14 deletions

View File

@ -26,8 +26,8 @@ export const BizCardTpl_01 = memo(({ userInfo }: BizCardProps) => {
export const BizCardTpl02 = memo(() => { export const BizCardTpl02 = memo(() => {
return ( return (
<View className="bg-white p-3 h-30 rounded-sm shadow"> <View className="bg-amber-100 p-3 h-30 rounded-sm shadow-amber-200">
<Text>Card Title2</Text> <View className="flex"></View>
</View> </View>
); );
}); });

View File

@ -13,7 +13,6 @@ const CustomTabBar = () => {
const setParam = useSetRecoilState(tabbarParamModel); const setParam = useSetRecoilState(tabbarParamModel);
const handlerClick = throttle((index: number) => { const handlerClick = throttle((index: number) => {
if (active == index) return; if (active == index) return;
console.log(index, "触发次数");
setActive(index); setActive(index);
switch (index) { switch (index) {
case 1: case 1:

View File

@ -0,0 +1,11 @@
import { View } from "@tarojs/components";
import { PropsWithChildren } from "react";
export const CPageContainer = ({ children }:PropsWithChildren) => {
return (
<View className="bg-bg-gray">
{children}
</View>
);
};

View File

@ -1,6 +1,6 @@
import Layout from "@/components/layout/Layout"; import Layout from "@/components/layout/Layout";
import { View } from "@tarojs/components"; import { View } from "@tarojs/components";
import Taro, { useDidShow } from "@tarojs/taro"; import { useDidShow } from "@tarojs/taro";
import React from "react"; import React from "react";
import { usePageContent } from "./hooks"; import { usePageContent } from "./hooks";
@ -15,7 +15,6 @@ export default function Index() {
useDidShow(async () => { useDidShow(async () => {
await loadPageContent("测试身份编码"); await loadPageContent("测试身份编码");
Taro.switchTab({ url: "/pages/index/index" });
console.log("Page shown."); console.log("Page shown.");
}); });
@ -28,17 +27,8 @@ export default function Index() {
> >
<View className="space-y-4 p-3"> <View className="space-y-4 p-3">
<BizCardTpl02 /> <BizCardTpl02 />
<BizCardTpl02 />
</View> </View>
</Layout.Container> </Layout.Container>
{/* <Layout.Footer>
<View className="flex items-center text-title pt-3">
<View className="flex-1 text-center border-r border-gray-300 text-primary"></View>
<View className="flex-1 text-center border-r border-gray-300"></View>
<View className="flex-1 text-center border-r border-gray-300"></View>
<View className="flex-1 text-center"></View>
</View>
</Layout.Footer> */}
</Layout> </Layout>
); );
} }