随笔分类 -  前端学习 / 遇到的问题及解决方案√

摘要:参考链接 在pubspec.yaml中添加font的时候出现这个问题 发现是因为我放的文件夹不对,需要放在根目录下(但是我不知道为什么android studio里没有显示一些文件夹) 本来放在这里 一直不对 后来在文件夹找了一下放到lib里 新建了assets文件夹 可以使用google_font 阅读全文
posted @ 2024-07-14 00:25 ayubene 阅读(64) 评论(0) 推荐(0) 编辑
摘要:想在pubspec.yaml 文件中添加字体:报错了 fonts: - family: MiaoZi fonts: - asset: assets/fonts/MiaoZi-YunYingTi-2.ttf weight: 500 看了这篇文章解决了 我原来是加在 dependencies: flut 阅读全文
posted @ 2024-07-13 23:48 ayubene 阅读(16) 评论(0) 推荐(0) 编辑
摘要:参考来自 这段话解决了问题 Unfortunately not all widgets has a const constructor, Container and Column are two examples of that. You won't be able to construct tho 阅读全文
posted @ 2024-07-13 23:11 ayubene 阅读(80) 评论(0) 推荐(0) 编辑
摘要:参考文章1 参考文章2 是在自己本地(http://localhost:5171/)、调后端本地的接口(http://193.0.1.2:20011/ 随便编的,但应该类似) 最开始是这样写的: // 这个是get的封装 export function get(url, data) { return 阅读全文
posted @ 2024-07-11 13:27 ayubene 阅读(595) 评论(0) 推荐(0) 编辑
摘要:给设置宽高的Container包一个父组件(如Center)即可 参考文章-写了为什么会这样 原代码 class TapboxA extends StatefulWidget { TapboxA({Key? key}) : super(key: key); @override _TapboxASta 阅读全文
posted @ 2024-07-07 16:39 ayubene 阅读(40) 评论(0) 推荐(0) 编辑
摘要:在使用cupertino的时候出现了这个问题,不过使用其他组件库也是类似的 原代码: import 'package:flutter/cupertino.dart'; void main() => runApp(const CupertinoTestRoute()); class Cupertino 阅读全文
posted @ 2024-07-07 11:48 ayubene 阅读(62) 评论(0) 推荐(0) 编辑
摘要:原代码 class ContextRoute extends StatelessWidget { const ContextRoute(); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( 阅读全文
posted @ 2024-07-06 15:20 ayubene 阅读(56) 评论(0) 推荐(0) 编辑
摘要:原来的代码 class ContextRoute extends StatelessWidget { const ContextRoute(); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBa 阅读全文
posted @ 2024-07-06 15:01 ayubene 阅读(8) 评论(0) 推荐(0) 编辑
摘要:非一般情况,不具有参考价值 父组件是一个按钮,点击后会显示子组件弹窗 父组件是这样写的 <OrderDetailDialog v-model="state.orderDetailsVisible" :currentClickItemId="state.currentClickItemId" :ord 阅读全文
posted @ 2024-06-24 16:25 ayubene 阅读(98) 评论(0) 推荐(0) 编辑
摘要:查询了很多帖子,基本上这个报错的原因是 element plus 的el-table报错,v-model传值错误: 传了空值 传了非数组 我是查了很久很久才查到是哪个el-table出了问题 因为是父组件嵌套子组件,子组件先不显示,最后发现是子组件里的el-table,我传了对象,所以报错了 另外也 阅读全文
posted @ 2024-06-24 11:35 ayubene 阅读(670) 评论(0) 推荐(0) 编辑
摘要:参考链接 使用管理员身份打开VScode 终端运行 set-ExecutionPolicy RemoteSigned nodemon可以使用了 阅读全文
posted @ 2024-06-03 22:16 ayubene 阅读(26) 评论(0) 推荐(0) 编辑
摘要:结论:我写的tableData没加reactive 顺便放上尝试过的几个方法: 增加key属性 也是增加key 安装版本更低的element-plus 其他方法 <template> <el-table :data="tableData" @change="console.log('changed' 阅读全文
posted @ 2024-05-21 21:53 ayubene 阅读(1573) 评论(0) 推荐(0) 编辑
摘要:vue2项目启动后,local可以访问,但是network不能访问 防火墙等等都检查了 查到原因如下:本来写的是这样,实际上端口号需要保持一致 devServer: { disableHostCheck: true, open: true, host: '0.0.0.0', port: 8002, 阅读全文
posted @ 2024-04-15 15:15 ayubene 阅读(323) 评论(0) 推荐(0) 编辑
摘要:看了一下午 最后使用这篇博客的方法解决了 阅读全文
posted @ 2024-04-12 17:14 ayubene 阅读(15) 评论(0) 推荐(0) 编辑
摘要:在vscode项目打开终端 git config user.name name git config user.email email@email.com 本来试了几次没成功,因为搜的文章里都是 // 配置邮箱 git config --global user.email "you@example. 阅读全文
posted @ 2024-03-27 23:03 ayubene 阅读(163) 评论(0) 推荐(0) 编辑
摘要:这个我查了半天十分奇怪的报错 是因为我没有在main.tsmain.ts引入并使用路由器 // 引入createApp创建应用 import { createApp } from "vue"; // 引入APP根组件 import App from './App.vue' // 引入pinia im 阅读全文
posted @ 2024-03-27 22:43 ayubene 阅读(35) 评论(0) 推荐(0) 编辑
摘要:npm init vite 填写项目名称即可 阅读全文
posted @ 2024-03-27 16:38 ayubene 阅读(11) 评论(0) 推荐(0) 编辑
摘要:代码 function changePage(news) { router.push({ name:'detail', // path:'news/detail', query:{ id:news.id, title:news.title, content:news.content, } }) } 阅读全文
posted @ 2024-03-23 23:24 ayubene 阅读(16) 评论(0) 推荐(0) 编辑
摘要:安装vue-router npm i vue-router@next -S 阅读全文
posted @ 2024-03-23 11:30 ayubene 阅读(712) 评论(0) 推荐(0) 编辑
摘要:创建了一个vue2的项目,在运行npm run serve的时候报错,检查了拼写也完全没有问题 最后找到的解决方案 将原来的 <script> import { Person } from './components/Person.vue' export default { name: 'App', 阅读全文
posted @ 2024-03-19 21:27 ayubene 阅读(964) 评论(0) 推荐(0) 编辑

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