01 2024 档案

摘要:ScrollView 高度占满页面的剩余高度,开始设置 flex: 1 发现高度占满了,但是滚动失效了。 经过测试修改: <ScrollView contentContainerStyle={{ flexGrow: 1 }}></ScrollView> 阅读全文
posted @ 2024-01-30 09:51 Li_pk 阅读(99) 评论(0) 推荐(0) 编辑
摘要:记录今天遇到的奇怪的问题,在vscode中使用Prettier格式化代码时,控制台报错: ["ERROR" - 9:30:18 AM] Error resolving prettier configuration for c:\My\Test\learning\src\utils\index.js 阅读全文
posted @ 2024-01-26 10:50 Li_pk 阅读(1207) 评论(3) 推荐(3) 编辑
摘要:描述: 接口返回数据字符串,使用插值语法 {{ text }} 渲染到页面时,内容的换行未生效。 解决: 使用 white-space: pre-line; <template> <div style="white-space: pre-line;">{{ text }}</div> </templ 阅读全文
posted @ 2024-01-19 17:37 Li_pk 阅读(90) 评论(0) 推荐(0) 编辑
摘要:1. 安装 npx expo install expo-clipboard 2. 使用 import * as React from 'react'; import { View, Text, Button, StyleSheet } from 'react-native'; import * as 阅读全文
posted @ 2024-01-18 09:16 Li_pk 阅读(92) 评论(0) 推荐(0) 编辑
摘要:1. 最终效果: 2. 实现代码: import React, { useState } from 'react'; import { FlatList, SafeAreaView, StatusBar, StyleSheet, Text, TouchableOpacity, } from 'rea 阅读全文
posted @ 2024-01-15 11:34 Li_pk 阅读(97) 评论(0) 推荐(0) 编辑
摘要:安装使用: 安装: npm install qs 引入使用: // 引入封装的 request.js import request from "@/utils/request"; import qs from "qs"; export function getXXX(params) { return 阅读全文
posted @ 2024-01-12 18:08 Li_pk 阅读(545) 评论(0) 推荐(0) 编辑
摘要:1. 效果: 2. 实现: import React from 'react'; import { View, Text, StyleSheet } from 'react-native'; const ShadowExample = () => { return ( <View style={st 阅读全文
posted @ 2024-01-08 17:56 Li_pk 阅读(524) 评论(0) 推荐(0) 编辑
摘要:1. 需求效果图: 2. 接口数据格式: 点击查看代码 const list = [ { contractNo: "CAI-20220801001", contractItem: "用户质量指数", count: 15234, customerItems: [ { contractNo: null, 阅读全文
posted @ 2024-01-05 17:54 Li_pk 阅读(2537) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示