Java初学小程序编写MBTI项目mini版

编写MBTI小程序第一版

原文链接,前端初学者,小程序初学者,欢迎在我的博客里进行评论

1. 初始化项目 使用taro + ts

初始化项目后,安装依赖在这里插入代码片

npm install

正常启动项目,全局入口app.ts处引入taro ui 组件

import 'taro-ui/dist/style/index.scss'

2. 编写初始化页面代码

import { View, Image } from "@tarojs/components";
import "taro-ui/dist/style/components/button.scss"; // 按需引入
import { AtButton } from "taro-ui";
import homeBg from "../../ImglistDir/homeBg.png";

import "./index.scss";
import GlobalFooter from "../../components/GlobalFooter";

export default () => {
 return (
   <View className="homePage">
     <View className="oneTitle">MBTI 性格测试</View>
     <View className="twoTitle">
       只需 2 分钟,就能非常准确的描述出你是谁,以及你的性格特点
     </View>
     <AtButton className="txtBtn" type="primary" circle>
       开始测试
     </AtButton>
     <Image className="homeBg" src={homeBg} />
     <GlobalFooter />
   </View>
 );
};

3. 编写相关样式

.homePage {
  background-color: #A2C7D7;

  .oneTitle {
    text-align: center;
    color: red;
    font-size: 6vw;
    margin-top: 10px;
  }

  .twoTitle {
    color: darkgoldenrod;
    font-size: 4vw;
    padding-top: 5px;
  }

  .txtBtn {
    width: 60vw;
  }
}

4. 导入微信开发者工具, 选择测试号

外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传

5. 编译后就能出现结果了

最终结果

  • 5
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

San Jin

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值