flutter开发实战-下拉刷新继续下拉路由进入活动页面实现

news2025/1/7 22:14:31

flutter开发实战-下拉刷新继续下拉路由进入活动页面实现

很多应用都有首页通过下拉刷新,继续下拉进入新的活动会场进入方式。在Flutter中,也可以通过pull_to_refresh来实现控制刷新页,继续下拉进入新的活动会场页面

一、引入pull_to_refresh

在工程的pubspec.yaml中引入插件

  pull_to_refresh: ^2.0.0
    

在pull_to_refresh中有enableTwoLevel、enablePullDown、enablePullUp属性。
onRefresh:当调用下拉刷新的回调onRefresh,当拉取数据完成后可以调用_refreshController1.refreshCompleted()。
onLoading:当调用上拉加载数据的时候的回调onLoading,获取数据完成后调用_refreshController1.loadComplete();
header:下拉刷新显示的headerWidget
footer:上拉加载显示的footerWidget

插件example示例如下

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'
    hide RefreshIndicator, RefreshIndicatorState;
import 'package:flutter/widgets.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

/*
   there two example implements two level,
   the first is common,when twoRefreshing,header will follow the list to scrollDown,when closing,still follow
   list move up,
   the second example use Navigator and keep offset when twoLevel trigger,
   header can use ClassicalHeader to implments twoLevel,it provide outerBuilder(1.4.7)
   important point:
   1. open enableTwiceRefresh bool ,default is false
   2. _refreshController.twiceRefreshComplete() can closing the two level
*/
class TwoLevelExample extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _TwoLevelExampleState();
  }
}

class _TwoLevelExampleState extends State<TwoLevelExample> {
  RefreshController _refreshController1 = RefreshController();
  RefreshController _refreshController2 = RefreshController();
  int _tabIndex = 0;

  @override
  void initState() {
    // TODO: implement initState
    _refreshController1.headerMode?.addListener(() {
      setState(() {});
    });
    WidgetsBinding.instance.addPostFrameCallback((_) {
      _refreshController1.position?.jumpTo(0);
      setState(() {});
    });
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return RefreshConfiguration.copyAncestor(
      context: context,
      enableScrollWhenTwoLevel: true,
      maxOverScrollExtent: 120,
      child: Scaffold(
        bottomNavigationBar: !_refreshController1.isTwoLevel
            ? BottomNavigationBar(
          currentIndex: _tabIndex,
          onTap: (index) {
            _tabIndex = index;
            if (mounted) setState(() {});
          },
          items: [
            BottomNavigationBarItem(
                icon: Icon(Icons.add), label: "二级刷新例子1"),
            BottomNavigationBarItem(
                icon: Icon(Icons.border_clear), label: "二级刷新例子2")
          ],
        )
            : null,
        body: Stack(
          children: <Widget>[
            Offstage(
              offstage: _tabIndex != 0,
              child: LayoutBuilder(
                builder: (_, c) {
                  return SmartRefresher(
                    header: TwoLevelHeader(
                      textStyle: TextStyle(color: Colors.white),
                      displayAlignment: TwoLevelDisplayAlignment.fromTop,
                      decoration: BoxDecoration(
                        image: DecorationImage(
                            image: AssetImage("images/secondfloor.jpg"),
                            fit: BoxFit.cover,
                            // 很重要的属性,这会影响你打开二楼和关闭二楼的动画效果
                            alignment: Alignment.topCenter),
                      ),
                      twoLevelWidget: TwoLevelWidget(),
                    ),
                    child: CustomScrollView(
                      physics: ClampingScrollPhysics(),
                      slivers: <Widget>[
                        SliverToBoxAdapter(
                          child: Container(
                            child: Scaffold(
                              appBar: AppBar(),
                              body: Column(
                                children: <Widget>[
                                  TextButton(
                                    onPressed: () {
                                      Navigator.of(context).pop();
                                    },
                                    child: Text("点击这里返回上一页!"),
                                  ),
                                  TextButton(
                                    onPressed: () {
                                      _refreshController1.requestTwoLevel();
                                    },
                                    child: Text("点击这里打开二楼!"),
                                  )
                                ],
                              ),
                            ),
                            height: 500.0,
                          ),
                        )
                      ],
                    ),
                    controller: _refreshController1,
                    enableTwoLevel: true,
                    enablePullDown: true,
                    enablePullUp: true,
                    onLoading: () async {
                      await Future.delayed(Duration(milliseconds: 2000));
                      _refreshController1.loadComplete();
                    },
                    onRefresh: () async {
                      await Future.delayed(Duration(milliseconds: 2000));
                      _refreshController1.refreshCompleted();
                    },
                    onTwoLevel: (bool isOpen) {
                      print("twoLevel opening:" + isOpen.toString());
                    },
                  );
                },
              ),
            ),
            Offstage(
              offstage: _tabIndex != 1,
              child: SmartRefresher(
                header: ClassicHeader(),
                child: CustomScrollView(
                  physics: ClampingScrollPhysics(),
                  slivers: <Widget>[
                    SliverToBoxAdapter(
                      child: Container(
                        child: TextButton(
                          onPressed: () {
                            Navigator.of(context).pop();
                          },
                          child: Text("点击这里返回上一页!"),
                        ),
                        color: Colors.red,
                        height: 680.0,
                      ),
                    )
                  ],
                ),
                controller: _refreshController2,
                enableTwoLevel: true,
                onRefresh: () async {
                  await Future.delayed(Duration(milliseconds: 2000));
                  _refreshController2.refreshCompleted();
                },
                onTwoLevel: (bool isOpen) {
                  if (isOpen) {
                    print("Asd");
                    _refreshController2.position?.hold(() {});
                    Navigator.of(context)
                        .push(MaterialPageRoute(
                        builder: (c) => Scaffold(
                          appBar: AppBar(),
                          body: Text("二楼刷新"),
                        )))
                        .whenComplete(() {
                      _refreshController2.twoLevelComplete(
                          duration: Duration(microseconds: 1));
                    });
                  }
                },
              ),
            )
          ],
        ),
      ),
    );
  }
}

class TwoLevelWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      decoration: BoxDecoration(
        image: DecorationImage(
            image: AssetImage("images/secondfloor.jpg"),
            // 很重要的属性,这会影响你打开二楼和关闭二楼的动画效果,关联到TwoLevelHeader,如果背景一致的情况,请设置相同
            alignment: Alignment.topCenter,
            fit: BoxFit.cover),
      ),
      child: Stack(
        children: <Widget>[
          Center(
            child: Wrap(
              children: <Widget>[
                TextButton(
                  onPressed: () {},
                  child: Text("登陆"),
                ),
              ],
            ),
          ),
          Container(
            height: 60.0,
            child: GestureDetector(
              child: Icon(
                Icons.arrow_back_ios,
                color: Colors.white,
              ),
              onTap: () {
                SmartRefresher.of(context)?.controller.twoLevelComplete();
              },
            ),
            alignment: Alignment.bottomLeft,
          ),
        ],
      ),
    );
  }
}
    

如果在下拉进入活动页面需要路由跳转,可以在onTwoLevel回调中调用路由跳转

if (isOpen) {
                    print("Asd");
                    _refreshController2.position?.hold(() {});
                    Navigator.of(context)
                        .push(MaterialPageRoute(
                        builder: (c) => Scaffold(
                          appBar: AppBar(),
                          body: Text("二楼刷新"),
                        )))
                        .whenComplete(() {
                      _refreshController2.twoLevelComplete(
                          duration: Duration(microseconds: 1));
                    });
                  }
    

二、下拉进入活动页面实现路由跳转

下拉一定距离后,通过路由跳转进入相应的活动页面,这里是onTwoLevel回调中push到指定页面

onTwoLevel: (bool isOpen) async {
                  print("aaa twoLevel opening:" + isOpen.toString());
                  if (isOpen) {
                    Navigator.of(context)
                        .push(MaterialPageRoute(builder: (BuildContext context) {
                      return TopFloorPage();
                    })).then((value){
                      print("onTwoLevel push then");
                    }).whenComplete(() {
                      print("onTwoLevel push whenComplete");
                      refreshController.twoLevelComplete(
                          duration: Duration(microseconds: 1));
                    });
                  } else {
                    refreshController.position?.jumpTo(0);
                  }
                },
    

下拉进入活动页面实现路由跳转完整代码如下

second_floor_page.dart

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_app_demolab/display/pull_refresh_helper.dart';
import 'package:flutter_app_demolab/display/top_floor_page.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

class SlideTopRouteBuilder extends PageRouteBuilder {
  final Widget page;

  SlideTopRouteBuilder(this.page)
      : super(
            pageBuilder: (context, animation, secondaryAnimation) => page,
            transitionDuration: Duration(milliseconds: 800),
            transitionsBuilder:
                (context, animation, secondaryAnimation, child) =>
                    SlideTransition(
                      position: Tween<Offset>(
                              begin: Offset(0.0, -1.0), end: Offset(0.0, 0.0))
                          .animate(CurvedAnimation(
                              parent: animation, curve: Curves.fastOutSlowIn)),
                      child: child,
                    ));
}

class SecondFloorPage extends StatefulWidget {
  const SecondFloorPage({super.key});

  @override
  State<SecondFloorPage> createState() => _SecondFloorPageState();
}

class _SecondFloorPageState extends State<SecondFloorPage> {
  final RefreshController _refreshController =
      RefreshController(initialRefresh: false);

  RefreshController get refreshController => _refreshController;

  final ScrollController _scrollController = ScrollController();

  double _height = 200;

  bool _showTopBtn = false;

  ScrollController get scrollController => _scrollController;

  bool get showTopBtn => _showTopBtn;

  scrollToTop() {
    _scrollController.animateTo(0,
        duration: Duration(milliseconds: 300), curve: Curves.easeOutCubic);
  }

  @override
  void initState() {
    // TODO: implement initState
    super.initState();

    // _scrollController.addListener(() {
    //   if (_scrollController.offset > _height && !_showTopBtn) {
    //     _showTopBtn = true;
    //     setState(() {});
    //   } else if (_scrollController.offset < _height && _showTopBtn) {
    //     _showTopBtn = false;
    //     setState(() {});
    //   }
    // });
  }

  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('SecondFloor'),
      ),
      body: MediaQuery.removePadding(
        context: context,
        removeTop: false,
        child: Builder(
          builder: (_) {
            return RefreshConfiguration.copyAncestor(
              context: context,
              twiceTriggerDistance: kHomeRefreshHeight - 15,
              maxOverScrollExtent: kHomeRefreshHeight,
              headerTriggerDistance:
                  80 + MediaQuery.of(context).padding.top / 3,
              child: SmartRefresher(
                controller: _refreshController,
                header: HomeRefreshHeader(),
                enableTwoLevel: true,
                onTwoLevel: (bool isOpen) async {
                  print("aaa twoLevel opening:" + isOpen.toString());
                  if (isOpen) {
                    Navigator.of(context)
                        .push(MaterialPageRoute(builder: (BuildContext context) {
                      return TopFloorPage();
                    })).then((value){
                      print("onTwoLevel push then");
                    }).whenComplete(() {
                      print("onTwoLevel push whenComplete");
                      refreshController.twoLevelComplete(
                          duration: Duration(microseconds: 1));
                    });
                  } else {
                    refreshController.position?.jumpTo(0);
                  }
                },
                footer: RefresherFooter(),
                enablePullDown: true,
                onRefresh: () async {
                  await Future.delayed(Duration(milliseconds: 300));
                  refreshController.refreshCompleted();
                },
                onLoading: () async {
                  await Future.delayed(Duration(milliseconds: 300));
                  refreshController.loadComplete();
                },
                enablePullUp: true,
                child: ListView.builder(
                  controller: _scrollController,
                  itemBuilder: (context, index) {
                    return Card(
                      child: Container(
                        alignment: Alignment.center,
                        height: 80,
                        child: Text('${index + 1}'),
                      ),
                    );
                  },
                  itemCount: 80,
                ),
              ),
            );
          },
        ),
      ),
    );
  }
}

    

top_floor_page.dart

import 'package:flutter/material.dart';

class TopFloorPage extends StatefulWidget {
  const TopFloorPage({super.key});

  @override
  State<TopFloorPage> createState() => _TopFloorPageState();
}

class _TopFloorPageState extends State<TopFloorPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('二楼页面'),
      ),
      body: Center(
        child: Text('二楼页面详情'),
      ),
    );
  }
}
    

pull_refresh_helper.dart

import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_app_demolab/display/top_floor_page.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

const double kHomeRefreshHeight = 180.0;


class HomeSecondFloorOuter extends StatelessWidget {
  final Widget child;

  HomeSecondFloorOuter(this.child, {super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      height: kHomeRefreshHeight + MediaQuery.of(context).padding.top + 20,
      width: MediaQuery.of(context).size.width,
      child: Stack(
        children: <Widget>[
          CachedNetworkImage(
            imageUrl: "https://c-ssl.dtstatic.com/uploads/blog/202404/28/LySGQjOntqjzaBW.thumb.1000_0.jpeg",
            fit: BoxFit.cover,
            height: kHomeRefreshHeight + MediaQuery.of(context).padding.top + 20,
            width: MediaQuery.of(context).size.width,
          ),
          Align(
            alignment: Alignment.bottomCenter,
            child: Text('跌跌撞撞中,依旧热爱这个世界.',
                style: TextStyle(
                  color: Colors.white,
                  fontSize: 22,
                  fontWeight: FontWeight.bold,
                )),
          ),
          Align(alignment: Alignment(0, 0.85), child: child),
        ],
      ),
      alignment: Alignment.bottomCenter,
    );
  }
}

/// 由于app不管明暗模式,都是有底色
/// 所以将indicator颜色为亮色
class ActivityIndicator extends StatelessWidget {
  final double? radius;
  final Brightness? brightness;

  ActivityIndicator({this.radius, this.brightness});

  @override
  Widget build(BuildContext context) {
    return Theme(
        data: ThemeData(
          cupertinoOverrideTheme: CupertinoThemeData(brightness: brightness),
        ),
        child: CupertinoActivityIndicator(radius: radius ?? 10));
  }
}

/// 首页列表的header
class HomeRefreshHeader extends StatelessWidget {
  const HomeRefreshHeader({super.key});

  @override
  Widget build(BuildContext context) {
    var strings = RefreshLocalizations.of(context)?.currentLocalization ??
        EnRefreshString();
    return ClassicHeader(
      canTwoLevelText: "松开进入二楼",
      textStyle: TextStyle(color: Colors.white),
      outerBuilder: (child) => HomeSecondFloorOuter(child),
      twoLevelView: Container(),
      height: 70 + MediaQuery.of(context).padding.top / 3,
      refreshingIcon: ActivityIndicator(brightness: Brightness.dark),
      releaseText: strings.canRefreshText,
    );
  }
}

/// 通用的footer
///
/// 由于国际化需要context的原因,所以无法在[RefreshConfiguration]配置
class RefresherFooter extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ClassicFooter(
//      failedText: S.of(context).loadMoreFailed,
//      idleText: S.of(context).loadMoreIdle,
//      loadingText: S.of(context).loadMoreLoading,
//      noDataText: S.of(context).loadMoreNoData,
    );
  }
}

    

最后需要在MaterialApp中配置RefreshConfiguration

  class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return RefreshConfiguration(
      hideFooterWhenNotFull: true, //列表数据不满一页,不触发加载更多
      child: MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          // This is the theme of your application.
          //
          // Try running your application with "flutter run". You'll see the
          // application has a blue toolbar. Then, without quitting the app, try
          // changing the primarySwatch below to Colors.green and then invoke
          // "hot reload" (press "r" in the console where you ran "flutter run",
          // or simply save your changes to "hot reload" in a Flutter IDE).
          // Notice that the counter didn't reset back to zero; the application
          // is not restarted.
          primarySwatch: Colors.blue,
        ),
        home: const MyHomePage(title: 'Flutter Demo Home Page'),
      ),
    );
  }
}
    

效果图如下

在这里插入图片描述

三、小结

flutter开发实战-下拉刷新继续下拉路由进入活动页面实现

学习记录,每天不停进步。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1718253.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

[Redis]List类型

列表类型来存储多个有序的字符串&#xff0c;a、b、c、d、e 五个元素从左到右组成了一个有序的列表&#xff0c;列表中的每个字符串称为元素&#xff0c;一个列表最多可以存储个元素。在 Redis 中&#xff0c;可以对列表两端插入&#xff08;push&#xff09;和弹出&#xff08…

涂装线体智能化管理:RFID技术的典范案例

涂装线体智能化管理&#xff1a;RFID技术的典范案例 汽车涂装是汽车制造过程中极为关键的一环&#xff0c;涉及多道工序&#xff0c;如预处理、电泳、中涂、面漆等&#xff0c;每一步都需要精确控制以确保车身表面的质量和美观。传统方式下&#xff0c;车辆在不同工位间的流转依…

(CPU/GPU)粒子继承贴图颜色发射

GetRandomInfo节点(复制贴进scratch pad Scripts) Begin Object Class/Script/NiagaraEditor.NiagaraClipboardContent Name"NiagaraClipboardContent_22" ExportPath/Script/NiagaraEditor.NiagaraClipboardContent"/Engine/Transient.NiagaraClipboardConten…

微信小程序毕业设计-停车共享系统项目开发实战(附源码+论文)

大家好&#xff01;我是程序猿老A&#xff0c;感谢您阅读本文&#xff0c;欢迎一键三连哦。 &#x1f49e;当前专栏&#xff1a;微信小程序毕业设计 精彩专栏推荐&#x1f447;&#x1f3fb;&#x1f447;&#x1f3fb;&#x1f447;&#x1f3fb; &#x1f380; Python毕业设计…

基于Docker搭建属于你的CC++集成编译环境

常常&#xff0c;我会幻想着拥有一个随时可以携带、随时可以使用的开发环境&#xff0c;那该是多么美好的事情。 在工作中&#xff0c;编译环境的复杂性常常让我头疼不已。稍有不慎&#xff0c;删除了一些关键文件&#xff0c;整个编译链就会瞬间崩溃。更糟糕的是&#xff0c;…

GUI 01:GUI 编程概述,AWT 相关知识,Frame 窗口,Panel 面板,及监听事件的应用

一、前言 记录时间 [2024-05-30] 疑问导航 GUI 是什么&#xff1f;GUI 如何使用&#xff1f;GUI 有哪些应用&#xff1f; 学习目的 写一些自己心中的小工具&#xff1b;Swing 界面的维护&#xff1b;了解 MVC 架构&#xff0c;以及监听事件。 本文对图形用户界面&#xff08…

禁用USB端口的办法,哪一种禁用USB端口的方法好

禁用USB端口的办法&#xff0c;哪一种禁用USB端口的方法好 禁用USB端口是保护公司数据安全的一种常见做法&#xff0c;旨在防止未经授权的数据传输和潜在的恶意软件传播。以下是几种常见的禁用USB端口方法及其效果评价。 1、硬件方法&#xff1a; BIOS设置&#xff1a;通过BIO…

ICH指导原则数据库

ICH人用药品技术要求国际协调理事会&#xff0c;英文全称为"The International Council for Harmonisation of Technical Requirements for Pharmaceuticals for Human Use"。 ① ICH简介 于1990年由欧、美、日三方政府监管发起的一个国际非盈利组织&#xff0c;依…

L1527射频编码芯片 百万组通用编码器,可替代EV1527

L1527 是CMOS 结构的预烧内码&#xff08;遥控中的地址码&#xff09;通用编码器&#xff0c;内有 20 位可预烧写 100 万组内码组合&#xff0c;使得重码率很低&#xff0c;具有更高安全性。芯片内集成误操作禁止功能&#xff0c;在按键输入有效且状态不变时&#xff0c;芯片连…

kaggle竞赛系列基于图像对水稻分类代码案例

目录 依赖环境 代码 导入依赖包 定义数据集路径&#xff1a; 创建训练集、验证集和测试集的文件夹&#xff1a; 代码的作用&#xff1a; 设置新的数据集路径与类别名称 代码的作用&#xff1a; 定义数据预处理和增强变换&#xff1a; 代码的作用&#xff1a; 定义数…

C语言 | Leetcode C语言题解之第122题买卖股票的最佳时机II

题目&#xff1a; 题解&#xff1a; int maxProfit(int* prices, int pricesSize) {int ans 0;for (int i 1; i < pricesSize; i) {ans fmax(0, prices[i] - prices[i - 1]);}return ans; }

FPGA DMA IP核使用指南

摘要 本文旨在介绍FPGA中DMA(Direct Memory Access)IP核的使用,包括其基本框架、测试代码编写以及仿真波形的分析。DMA是一种允许外围设备直接与内存进行数据交换的技术,无需CPU的介入,从而提高了数据传输的效率。 1. 引言 在现代FPGA设计中,DMA IP核因其…

一站式链路追踪:阿里云的端到端解决方案

作者&#xff1a;涯海 炎炎夏日&#xff0c;当你打开外卖 APP 购买奶茶却发现下单失败&#xff1b;五一佳节&#xff0c;当你自驾游途中发现导航响应缓慢&#xff0c;频繁错过路口&#xff1b;深更半夜&#xff0c;当你辅导孩子功课&#xff0c;却发现 GPT 应用迟迟无法应答。…

【VTKExamples::Utilities】第十七期 ZBuffer

很高兴在雪易的CSDN遇见你 VTK技术爱好者 QQ:870202403 公众号:VTK忠粉 前言 本文分享VTK样例ZBuffer,并解析接口vtkWindowToImageFilter,希望对各位小伙伴有所帮助! 感谢各位小伙伴的点赞+关注,小易会继续努力分享,一起进步! 你的点赞就是我的动力(^U^)ノ…

一个案例告诉你,MySQL如何查询今天、昨天、近7天、近30天、本月、上个月、本季度、上季度、本年、上一年数据

参考博客 mysql查询当天/昨天/近7天/近30天/本月/上个月/本季度/上季度/本年/上一年 数据 正文内容 创建测试案例&#xff08;也可直接使用附录MySQL脚本生成数据&#xff09; 1、新建测试表 CREATE TABLE example (id INT AUTO_INCREMENT PRIMARY KEY,date_column DATE,d…

无信号、弱信号地区的“关键先生”,北三区域短报文应急通信——户外应急救援的安全保障

随着中国经济高速发展和民众生活水平、文化素养的不断提高&#xff0c;户外探险活动已经成为越来越多民众自主选择的一种休闲生活方式。 然而&#xff0c;产业发展和参与人数激增的同时户外探险事故也不断增多。根据中国探险协会发布《2022年度中国户外探险事故报告》显示2022…

跨境电商站外推广全攻略:揭秘有效推广方法!

随着全球贸易的蓬勃兴起&#xff0c;越来越多的企业开始涉足跨境电商领域。然而&#xff0c;要在国际市场上取得成功&#xff0c;仅仅依赖平台内的推广策略是远远不够的。站外推广成为了跨境电商拓展业务、吸引潜在客户的关键策略。那么&#xff0c;跨境电商的站外推广具体包括…

计算机组成原理·海明编码及其实验

前言&#xff1a;海明编码这一块在刚开始的时候没有弄懂&#xff0c;后面通过做实验、复习慢慢摸清了门道。在学习计算机组成原理的过程中&#xff0c;实验实践是很重要的&#xff0c;它会让你去搞清楚事情背后的原理&#xff0c;逼着你学会你没听懂的东西。这篇文章会从海明码…

Vue3实战笔记(53)—奇怪+1,VUE3实战模拟股票大盘工作台

文章目录 前言一、实战模拟股票大盘工作台二、使用步骤总结 前言 实战模拟股票大盘工作台 一、实战模拟股票大盘工作台 接上文&#xff0c;这两天封装好的组件直接应用,上源码&#xff1a; <template><div class"smart_house pb-5"><v-row ><…

做外贸,怎么选国外服务器?

不管是新手还是外贸老司机&#xff0c;大家都知道要用海外服务器来做外贸网站&#xff0c;无论外贸独立站的客户是欧美、东南亚、还是非洲&#xff0c;都不能选择国内机房的服务器&#xff0c;必须选择海外服务器&#xff0c;这是共识。 但是今天&#xff0c;我要告诉大家一个…