ThinkPHP分页类的使用相关有关问题
ThinkPHP分页类的使用相关问题
ThinkPHP3.2.3<span style="color: #000000;">Page</span>.<span style="color: #0000ff;">class</span>.<span style="color: #000000;">php文件源码</span><span style="color: #000000;">php</span><span style="color: #008000;">//</span><span style="color: #008000;"> +----------------------------------------------------------------------// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]// +----------------------------------------------------------------------// | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.// +----------------------------------------------------------------------// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )// +----------------------------------------------------------------------// | Author: 麦当苗儿 <http:>// +----------------------------------------------------------------------</http:></span><span style="color: #000000;">namespace Think;</span><span style="color: #0000ff;">class</span><span style="color: #000000;"> Page{ </span><span style="color: #0000ff;">public</span> <span style="color: #800080;">$firstRow</span>; <span style="color: #008000;">//</span><span style="color: #008000;"> 起始行数</span> <span style="color: #0000ff;">public</span> <span style="color: #800080;">$listRows</span>; <span style="color: #008000;">//</span><span style="color: #008000;"> 列表每页显示行数</span> <span style="color: #0000ff;">public</span> <span style="color: #800080;">$parameter</span>; <span style="color: #008000;">//</span><span style="color: #008000;"> 分页跳转时要带的参数</span> <span style="color: #0000ff;">public</span> <span style="color: #800080;">$totalRows</span>; <span style="color: #008000;">//</span><span style="color: #008000;"> 总行数</span> <span style="color: #0000ff;">public</span> <span style="color: #800080;">$totalPages</span>; <span style="color: #008000;">//</span><span style="color: #008000;"> 分页总页面数</span> <span style="color: #0000ff;">public</span> <span style="color: #800080;">$rollPage</span> = 11;<span style="color: #008000;">//</span><span style="color: #008000;"> 分页栏每页显示的页数</span> <span style="color: #0000ff;">public</span> <span style="color: #800080;">$lastSuffix</span> = <span style="color: #0000ff;">true</span>; <span style="color: #008000;">//</span><span style="color: #008000;"> 最后一页是否显示总页数</span> <span style="color: #0000ff;">private</span> <span style="color: #800080;">$p</span> = 'p'; <span style="color: #008000;">//</span><span style="color: #008000;">分页参数名</span> <span style="color: #0000ff;">private</span> <span style="color: #800080;">$url</span> = ''; <span style="color: #008000;">//</span><span style="color: #008000;">当前链接URL</span> <span style="color: #0000ff;">private</span> <span style="color: #800080;">$nowPage</span> = 1<span style="color: #000000;">; </span><span style="color: #008000;">//</span><span style="color: #008000;"> 分页显示定制</span> <span style="color: #0000ff;">private</span> <span style="color: #800080;">$config</span> = <span style="color: #0000ff;">array</span><span style="color: #000000;">( </span>'header' => '<span class="rows">共 %TOTAL_ROW% 条记录</span>', 'prev' => ' '>>', 'first' => '1...', 'last' => '...%TOTAL_PAGE%', 'theme' => '%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END%',<span style="color: #000000;"> ); </span><span style="color: #008000;">/*</span><span style="color: #008000;">* * 架构函数 * @param array $totalRows 总的记录数 * @param array $listRows 每页显示记录数 * @param array $parameter 分页跳转的参数 </span><span style="color: #008000;">*/</span> <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">function</span> __construct(<span style="color: #800080;">$totalRows</span>, <span style="color: #800080;">$listRows</span>=20, <span style="color: #800080;">$parameter</span> = <span style="color: #0000ff;">array</span><span style="color: #000000;">()) { C(</span>'VAR_PAGE') && <span style="color: #800080;">$this</span>->p = C('VAR_PAGE'); <span style="color: #008000;">//</span><span style="color: #008000;">设置分页参数名称</span> <span style="color: #008000;">/*</span><span style="color: #008000;"> 基础设置 </span><span style="color: #008000;">*/</span> <span style="color: #800080;">$this</span>->totalRows = <span style="color: #800080;">$totalRows</span>; <span style="color: #008000;">//</span><span style="color: #008000;">设置总记录数</span> <span style="color: #800080;">$this</span>->listRows = <span style="color: #800080;">$listRows</span>; <span style="color: #008000;">//</span><span style="color: #008000;">设置每页显示行数</span> <span style="color: #800080;">$this</span>->parameter = <span style="color: #0000ff;">empty</span>(<span style="color: #800080;">$parameter</span>) ? <span style="color: #800080;">$_GET</span> : <span style="color: #800080;">$parameter</span><span style="color: #000000;">; </span><span style="color: #800080;">$this</span>->nowPage = <span style="color: #0000ff;">empty</span>(<span style="color: #800080;">$_GET</span>[<span style="color: #800080;">$this</span>->p]) ? 1 : <span style="color: #008080;">intval</span>(<span style="color: #800080;">$_GET</span>[<span style="color: #800080;">$this</span>-><span style="color: #000000;">p]); </span><span style="color: #800080;">$this</span>->nowPage = <span style="color: #800080;">$this</span>->nowPage>0 ? <span style="color: #800080;">$this</span>->nowPage : 1<span style="color: #000000;">; </span><span style="color: #800080;">$this</span>->firstRow = <span style="color: #800080;">$this</span>->listRows * (<span style="color: #800080;">$this</span>->nowPage - 1<span style="color: #000000;">); } </span><span style="color: #008000;">/*</span><span style="color: #008000;">* * 定制分页链接设置 * @param string $name 设置名称 * @param string $value 设置值 </span><span style="color: #008000;">*/</span> <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">function</span> setConfig(<span style="color: #800080;">$name</span>,<span style="color: #800080;">$value</span><span style="color: #000000;">) { </span><span style="color: #0000ff;">if</span>(<span style="color: #0000ff;">isset</span>(<span style="color: #800080;">$this</span>->config[<span style="color: #800080;">$name</span><span style="color: #000000;">])) { </span><span style="color: #800080;">$this</span>->config[<span style="color: #800080;">$name</span>] = <span style="color: #800080;">$value</span><span style="color: #000000;">; } } </span><span style="color: #008000;">/*</span><span style="color: #008000;">* * 生成链接URL * @param integer $page 页码 * @return string </span><span style="color: #008000;">*/</span> <span style="color: #0000ff;">private</span> <span style="color: #0000ff;">function</span> url(<span style="color: #800080;">$page</span><span style="color: #000000;">){ </span><span style="color: #0000ff;">return</span> <span style="color: #008080;">str_replace</span>(<span style="color: #008080;">urlencode</span>('[PAGE]'), <span style="color: #800080;">$page</span>, <span style="color: #800080;">$this</span>-><span style="color: #000000;">url); } </span><span style="color: #008000;">/*</span><span style="color: #008000;">* * 组装分页链接 * @return string </span><span style="color: #008000;">*/</span> <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">function</span><span style="color: #000000;"> show() { </span><span style="color: #0000ff;">if</span>(0 == <span style="color: #800080;">$this</span>->totalRows) <span style="color: #0000ff;">return</span> ''<span style="color: #000000;">; </span><span style="color: #008000;">/*</span><span style="color: #008000;"> 生成URL </span><span style="color: #008000;">*/</span> <span style="color: #800080;">$this</span>->parameter[<span style="color: #800080;">$this</span>->p] = '[PAGE]'<span style="color: #000000;">; </span><span style="color: #800080;">$this</span>->url = U(ACTION_NAME, <span style="color: #800080;">$this</span>-><span style="color: #000000;">parameter); </span><span style="color: #008000;">/*</span><span style="color: #008000;"> 计算分页信息 </span><span style="color: #008000;">*/</span> <span style="color: #800080;">$this</span>->totalPages = <span style="color: #008080;">ceil</span>(<span style="color: #800080;">$this</span>->totalRows / <span style="color: #800080;">$this</span>->listRows); <span style="color: #008000;">//</span><span style="color: #008000;">总页数</span> <span style="color: #0000ff;">if</span>(!<span style="color: #0000ff;">empty</span>(<span style="color: #800080;">$this</span>->totalPages) && <span style="color: #800080;">$this</span>->nowPage > <span style="color: #800080;">$this</span>-><span style="color: #000000;">totalPages) { </span><span style="color: #800080;">$this</span>->nowPage = <span style="color: #800080;">$this</span>-><span style="color: #000000;">totalPages; } </span><span style="color: #008000;">/*</span><span style="color: #008000;"> 计算分页临时变量 </span><span style="color: #008000;">*/</span> <span style="color: #800080;">$now_cool_page</span> = <span style="color: #800080;">$this</span>->rollPage/2<span style="color: #000000;">; </span><span style="color: #800080;">$now_cool_page_ceil</span> = <span style="color: #008080;">ceil</span>(<span style="color: #800080;">$now_cool_page</span><span style="color: #000000;">); </span><span style="color: #800080;">$this</span>->lastSuffix && <span style="color: #800080;">$this</span>->config['last'] = <span style="color: #800080;">$this</span>-><span style="color: #000000;">totalPages; </span><span style="color: #008000;">//</span><span style="color: #008000;">上一页</span> <span style="color: #800080;">$up_row</span> = <span style="color: #800080;">$this</span>->nowPage - 1<span style="color: #000000;">; </span><span style="color: #800080;">$up_page</span> = <span style="color: #800080;">$up_row</span> > 0 ? '<a class="prev" href="'%20.%20<span%20style=" color:>$this->url(<span style="color: #800080;">$up_row</span>) . '">' . <span style="color: #800080;">$this</span>->config['prev'] . '</a>' : ''<span style="color: #000000;">; </span><span style="color: #008000;">//</span><span style="color: #008000;">下一页</span> <span style="color: #800080;">$down_row</span> = <span style="color: #800080;">$this</span>->nowPage + 1<span style="color: #000000;">; </span><span style="color: #800080;">$down_page</span> = (<span style="color: #800080;">$down_row</span> $this->totalPages) ? '<a class="next" href="'%20.%20<span%20style=" color:>$this->url(<span style="color: #800080;">$down_row</span>) . '">' . <span style="color: #800080;">$this</span>->config['next'] . '</a>' : ''<span style="color: #000000;">; </span><span style="color: #008000;">//</span><span style="color: #008000;">第一页</span> <span style="color: #800080;">$the_first</span> = ''<span style="color: #000000;">; </span><span style="color: #0000ff;">if</span>(<span style="color: #800080;">$this</span>->totalPages > <span style="color: #800080;">$this</span>->rollPage && (<span style="color: #800080;">$this</span>->nowPage - <span style="color: #800080;">$now_cool_page</span>) >= 1<span style="color: #000000;">){ </span><span style="color: #800080;">$the_first</span> = '<a class="first" href="'%20.%20<span%20style=" color:>$this->url(1) . '">' . <span style="color: #800080;">$this</span>->config['first'] . '</a>'<span style="color: #000000;">; } </span><span style="color: #008000;">//</span><span style="color: #008000;">最后一页</span> <span style="color: #800080;">$the_end</span> = ''<span style="color: #000000;">; </span><span style="color: #0000ff;">if</span>(<span style="color: #800080;">$this</span>->totalPages > <span style="color: #800080;">$this</span>->rollPage && (<span style="color: #800080;">$this</span>->nowPage + <span style="color: #800080;">$now_cool_page</span>) $this-><span style="color: #000000;">totalPages){ </span><span style="color: #800080;">$the_end</span> = '<a class="end" href="'%20.%20<span%20style=" color:>$this->url(<span style="color: #800080;">$this</span>->totalPages) . '">' . <span style="color: #800080;">$this</span>->config['last'] . '</a>'<span style="color: #000000;">; } </span><span style="color: #008000;">//</span><span style="color: #008000;">数字连接</span> <span style="color: #800080;">$link_page</span> = ""<span style="color: #000000;">; </span><span style="color: #0000ff;">for</span>(<span style="color: #800080;">$i</span> = 1; <span style="color: #800080;">$i</span> $this->rollPage; <span style="color: #800080;">$i</span>++<span style="color: #000000;">){ </span><span style="color: #0000ff;">if</span>((<span style="color: #800080;">$this</span>->nowPage - <span style="color: #800080;">$now_cool_page</span>) ){ <span style="color: #800080;">$page</span> = <span style="color: #800080;">$i</span><span style="color: #000000;">; }</span><span style="color: #0000ff;">elseif</span>((<span style="color: #800080;">$this</span>->nowPage + <span style="color: #800080;">$now_cool_page</span> - 1) >= <span style="color: #800080;">$this</span>-><span style="color: #000000;">totalPages){ </span><span style="color: #800080;">$page</span> = <span style="color: #800080;">$this</span>->totalPages - <span style="color: #800080;">$this</span>->rollPage + <span style="color: #800080;">$i</span><span style="color: #000000;">; }</span><span style="color: #0000ff;">else</span><span style="color: #000000;">{ </span><span style="color: #800080;">$page</span> = <span style="color: #800080;">$this</span>->nowPage - <span style="color: #800080;">$now_cool_page_ceil</span> + <span style="color: #800080;">$i</span><span style="color: #000000;">; } </span><span style="color: #0000ff;">if</span>(<span style="color: #800080;">$page</span> > 0 && <span style="color: #800080;">$page</span> != <span style="color: #800080;">$this</span>-><span style="color: #000000;">nowPage){ </span><span style="color: #0000ff;">if</span>(<span style="color: #800080;">$page</span> $this-><span style="color: #000000;">totalPages){ </span><span style="color: #800080;">$link_page</span> .= '<a class="num" href="'%20.%20<span%20style=" color:>$this->url(<span style="color: #800080;">$page</span>) . '">' . <span style="color: #800080;">$page</span> . '</a>'<span style="color: #000000;">; }</span><span style="color: #0000ff;">else</span><span style="color: #000000;">{ </span><span style="color: #0000ff;">break</span><span style="color: #000000;">; } }</span><span style="color: #0000ff;">else</span><span style="color: #000000;">{ </span><span style="color: #0000ff;">if</span>(<span style="color: #800080;">$page</span> > 0 && <span style="color: #800080;">$this</span>->totalPages != 1<span style="color: #000000;">){ </span><span style="color: #800080;">$link_page</span> .= '<span class="current">' . <span style="color: #800080;">$page</span> . '</span>'<span style="color: #000000;">; } } } </span><span style="color: #008000;">//</span><span style="color: #008000;">替换分页内容</span> <span style="color: #800080;">$page_str</span> = <span style="color: #008080;">str_replace</span><span style="color: #000000;">( </span><span style="color: #0000ff;">array</span>('%HEADER%', '%NOW_PAGE%', '%UP_PAGE%', '%DOWN_PAGE%', '%FIRST%', '%LINK_PAGE%', '%END%', '%TOTAL_ROW%', '%TOTAL_PAGE%'), <span style="color: #0000ff;">array</span>(<span style="color: #800080;">$this</span>->config['header'], <span style="color: #800080;">$this</span>->nowPage, <span style="color: #800080;">$up_page</span>, <span style="color: #800080;">$down_page</span>, <span style="color: #800080;">$the_first</span>, <span style="color: #800080;">$link_page</span>, <span style="color: #800080;">$the_end</span>, <span style="color: #800080;">$this</span>->totalRows, <span style="color: #800080;">$this</span>->totalPages), <span style="color: #800080;">$this</span>->config['theme'<span style="color: #000000;">]); </span><span style="color: #0000ff;">return</span> "<div>{<span style="color: #800080;">$page_str</span>}</div>"<span style="color: #000000;">; }}</span>
通常在数据查询后都会对数据集进行分页操作,ThinkPHP也提供了分页类来对数据分页提供支持。 下面是数据分页的两种示例。
第一种:利用Page类和limit方法
<span style="color: #800080;">$User</span> = M('User'); <span style="color: #008000;">//</span><span style="color: #008000;"> 实例化User对象</span><span style="color: #800080;">$count</span> = <span style="color: #800080;">$User</span>->where('status=1')-><span style="color: #008080;">count</span>();<span style="color: #008000;">//</span><span style="color: #008000;"> 查询满足要求的总记录数</span><span style="color: #800080;">$Page</span> = <span style="color: #0000ff;">new</span> \Think\Page(<span style="color: #800080;">$count</span>,25);<span style="color: #008000;">//</span><span style="color: #008000;"> 实例化分页类 传入总记录数和每页显示的记录数(25)</span><span style="color: #800080;">$show</span> = <span style="color: #800080;">$Page</span>->show();<span style="color: #008000;">//</span><span style="color: #008000;"> 分页显示输出// 进行分页数据查询 注意limit方法的参数要使用Page类的属性</span><span style="color: #800080;">$list</span> = <span style="color: #800080;">$User</span>->where('status=1')->order('create_time')->limit(<span style="color: #800080;">$Page</span>->firstRow.','.<span style="color: #800080;">$Page</span>->listRows)-><span style="color: #000000;">select();</span><span style="color: #800080;">$this</span>->assign('list',<span style="color: #800080;">$list</span>);<span style="color: #008000;">//</span><span style="color: #008000;"> 赋值数据集</span><span style="color: #800080;">$this</span>->assign('page',<span style="color: #800080;">$show</span>);<span style="color: #008000;">//</span><span style="color: #008000;"> 赋值分页输出</span><span style="color: #800080;">$this</span>->display(); <span style="color: #008000;">//</span><span style="color: #008000;"> 输出模板</span>
第二种:分页类和page方法的实现
<span style="color: #800080;">$User</span> = M('User'); <span style="color: #008000;">//</span><span style="color: #008000;"> 实例化User对象// 进行分页数据查询 注意page方法的参数的前面部分是当前的页数使用 $_GET[p]获取</span><span style="color: #800080;">$list</span> = <span style="color: #800080;">$User</span>->where('status=1')->order('create_time')->page(<span style="color: #800080;">$_GET</span>['p'].',25')-><span style="color: #000000;">select();</span><span style="color: #800080;">$this</span>->assign('list',<span style="color: #800080;">$list</span>);<span style="color: #008000;">//</span><span style="color: #008000;"> 赋值数据集</span><span style="color: #800080;">$count</span> = <span style="color: #800080;">$User</span>->where('status=1')-><span style="color: #008080;">count</span>();<span style="color: #008000;">//</span><span style="color: #008000;"> 查询满足要求的总记录数</span><span style="color: #800080;">$Page</span> = <span style="color: #0000ff;">new</span> \Think\Page(<span style="color: #800080;">$count</span>,25);<span style="color: #008000;">//</span><span style="color: #008000;"> 实例化分页类 传入总记录数和每页显示的记录数</span><span style="color: #800080;">$show</span> = <span style="color: #800080;">$Page</span>->show();<span style="color: #008000;">//</span><span style="color: #008000;"> 分页显示输出</span><span style="color: #800080;">$this</span>->assign('page',<span style="color: #800080;">$show</span>);<span style="color: #008000;">//</span><span style="color: #008000;"> 赋值分页输出</span><span style="color: #800080;">$this</span>->display(); <span style="color: #008000;">//</span><span style="color: #008000;"> 输出模板</span>
带入查询条件
如果是POST方式查询,如何确保分页之后能够保持原先的查询条件呢,我们可以给分页类传入参数,方法是给分页类的parameter属性赋值
<span style="color: #800080;">$count</span> = <span style="color: #800080;">$User</span>->where(<span style="color: #800080;">$map</span>)-><span style="color: #008080;">count</span>();<span style="color: #008000;">//</span><span style="color: #008000;"> 查询满足要求的总记录数</span><span style="color: #800080;">$Page</span> = <span style="color: #0000ff;">new</span> \Think\Page(<span style="color: #800080;">$count</span>,25);<span style="color: #008000;">//</span><span style="color: #008000;"> 实例化分页类 传入总记录数和每页显示的记录数//分页跳转的时候保证查询条件</span><span style="color: #0000ff;">foreach</span>(<span style="color: #800080;">$map</span> <span style="color: #0000ff;">as</span> <span style="color: #800080;">$key</span>=><span style="color: #800080;">$val</span><span style="color: #000000;">) { </span><span style="color: #800080;">$Page</span>->parameter[<span style="color: #800080;">$key</span>] = <span style="color: #008080;">urlencode</span>(<span style="color: #800080;">$val</span><span style="color: #000000;">);}</span><span style="color: #800080;">$show</span> = <span style="color: #800080;">$Page</span>->show();<span style="color: #008000;">//</span><span style="color: #008000;"> 分页显示输出</span>
分页样式定制
我们可以对输出的分页样式进行定制,分页类Page提供了一个setConfig方法来修改默认的一些设置。例如:
<span style="color: #800080;">$page</span>->setConfig('header','
setConfig方法支持的属性包括:
header:头部描述信息,默认值 “共 %TOTAL_ROW% 条记录”
next:下一页描述信息,默认值 “>>”
first:第一页描述信息,默认值 “1…”
last:最后一页描述信息,默认值 “…%TOTAL_PAGE%”
theme :分页主题描述信息,包括了上面所有元素的组合 ,设置该属性可以改变分页的各个单元的显示位置,默认值是 “%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END%”
其中,显示位置的对应的关系为:
位置 说明
%FIRST% 表示第一页的链接显示
%UP_PAGE% 表示上一页的链接显示
%LINK_PAGE% 表示分页的链接显示
%DOWN_PAGE% 表示下一页的链接显示
%END% 表示最后一页的链接显示
除了改变显示信息外,你还可以使用样式来定义分页的显示效果。 这些样式class包括:first(第一页)、prev(上一页)、next(下一页)、end(最后一页)、num(其他页的数字)、current(当前页)。
ThinkPHP系统分页类写的已经很完善只要花几分钟时间研究一下源代码即可,官方注释也很清晰。这里注解一下使用中的问题。系统默认设置了
<code class="hljs cs has-numbering"><span class="hljs-keyword">public $rollPage = <span class="hljs-number">11;<span class="hljs-comment">// 分页栏每页显示的页数<span class="hljs-keyword">public $lastSuffix = <span class="hljs-keyword">true; <span class="hljs-comment">// 最后一页是否显示总页数</span></span></span></span></span></span></code><br><br>
一开始看注释还不是很清楚,其实第一个参数是控制显示多少页数,如果默认显示11个页码一般太长,个人喜欢设置为5,当然修改这些参数不要在系统源文件中修改,而是在使用的时候设置$page->rollPage=5
即可。
而第二个参数就比较坑人了,我们在个性化分页显示的时候通常会采用setConfig('last','尾页');
用来设置最后一页显示为“尾页”,但是在show方法中可以看到tp在$this->lastSuffix
为真的时候重置该$this->config['last']
的值为总页数这样导致无论你怎么设置最后一业都显示为数字。也不知道官方为什么这么设置,解决办法依然是重新设置$page->lastSuffix = false;
即可。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Many users will choose the Huawei brand when choosing smart watches. Among them, Huawei GT3pro and GT4 are very popular choices. Many users are curious about the difference between Huawei GT3pro and GT4. Let’s introduce the two to you. . What are the differences between Huawei GT3pro and GT4? 1. Appearance GT4: 46mm and 41mm, the material is glass mirror + stainless steel body + high-resolution fiber back shell. GT3pro: 46.6mm and 42.9mm, the material is sapphire glass + titanium body/ceramic body + ceramic back shell 2. Healthy GT4: Using the latest Huawei Truseen5.5+ algorithm, the results will be more accurate. GT3pro: Added ECG electrocardiogram and blood vessel and safety

Why Snipping Tool Not Working on Windows 11 Understanding the root cause of the problem can help find the right solution. Here are the top reasons why the Snipping Tool might not be working properly: Focus Assistant is On: This prevents the Snipping Tool from opening. Corrupted application: If the snipping tool crashes on launch, it might be corrupted. Outdated graphics drivers: Incompatible drivers may interfere with the snipping tool. Interference from other applications: Other running applications may conflict with the Snipping Tool. Certificate has expired: An error during the upgrade process may cause this issu simple solution. These are suitable for most users and do not require any special technical knowledge. 1. Update Windows and Microsoft Store apps

Implementing data paging and display optimization in Vue projects. In Vue projects, when a page needs to display a large amount of data, data paging and display optimization usually need to be performed to improve user experience. This article will introduce how to use Vue to implement data paging and display optimization. , and provide specific code examples. 1. Data paging Data paging refers to dividing a large amount of data into multiple pages according to certain rules and displaying them on the page. You can use the following steps to implement data paging in a Vue project: Define the data source. First, define a

Part 1: Initial Troubleshooting Steps Checking Apple’s System Status: Before delving into complex solutions, let’s start with the basics. The problem may not lie with your device; Apple's servers may be down. Visit Apple's System Status page to see if the AppStore is working properly. If there's a problem, all you can do is wait for Apple to fix it. Check your internet connection: Make sure you have a stable internet connection as the "Unable to connect to AppStore" issue can sometimes be attributed to a poor connection. Try switching between Wi-Fi and mobile data or resetting network settings (General > Reset > Reset Network Settings > Settings). Update your iOS version:

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

This article will help you interpret the vue source code and introduce why you can use this to access properties in various options in Vue2. I hope it will be helpful to everyone!

A colleague got stuck due to a bug pointed by this. Vue2’s this pointing problem caused an arrow function to be used, resulting in the inability to get the corresponding props. He didn't know it when I introduced it to him, and then I deliberately looked at the front-end communication group. So far, at least 70% of front-end programmers still don't understand it. Today I will share with you this link. If everything is wrong If you haven’t learned it yet, please give me a big mouth.

Watch4pro and gt each have different features and applicable scenarios. If you focus on comprehensive functions, high performance and stylish appearance, and are willing to bear a higher price, then Watch 4 Pro may be more suitable. If you don’t have high functional requirements and pay more attention to battery life and reasonable price, then the GT series may be more suitable. The final choice should be decided based on personal needs, budget and preferences. It is recommended to carefully consider your own needs before purchasing and refer to the reviews and comparisons of various products to make a more informed choice.
