上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: 描述: 接口返回数据字符串,使用插值语法 {{ text }} 渲染到页面时,内容的换行未生效。 解决: 使用 white-space: pre-line; <template> <div style="white-space: pre-line;">{{ text }}</div> </templ 阅读全文
posted @ 2024-01-19 17:37 Li_pk 阅读(40) 评论(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 阅读(45) 评论(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 阅读(34) 评论(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 阅读(201) 评论(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 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1. 需求效果图: 2. 接口数据格式: 点击查看代码 const list = [ { contractNo: "CAI-20220801001", contractItem: "用户质量指数", count: 15234, customerItems: [ { contractNo: null, 阅读全文
posted @ 2024-01-05 17:54 Li_pk 阅读(782) 评论(0) 推荐(0) 编辑
摘要: 1. 使用fetch请求stream流接口: 封装fetch工具方法 fetchRequest.js const fetchStream = async (url, options) => { const response = await fetch(url, options); if (respo 阅读全文
posted @ 2023-12-29 18:31 Li_pk 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 一、配置版本号 配置app.json { "expo": { "name": "YourAppName", "slug": "your-app-name", "version": "1.0.0", "android": { "versionCode": 1 }, "ios": { "buildNum 阅读全文
posted @ 2023-12-27 09:17 Li_pk 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 问题描述: 在配置路由文件时,开始时component不小心写成下面的格式 打开页面控制台报错如下 解决方案: 引入组件的箭头函数忘记写返回。。 或者写成一行 相当低级的错误。 阅读全文
posted @ 2023-12-21 16:57 Li_pk 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 一、背景: 项目中有长按按钮开始录音功能,需要在长按开始时添加一次震动反馈以提高用户体验。由于项目使用expo开发,a56爆大奖在线娱乐找到了 Expo Haptics 库。 二、使用过程: 1. 安装: npx expo install expo-haptics 2. 引入并使用: import * as Hap 阅读全文
posted @ 2023-12-19 10:26 Li_pk 阅读(48) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页