153 lines
38 KiB
Plaintext
153 lines
38 KiB
Plaintext
import{l as b}from"./index.e7555e34.js";import{f as e,r as u,o as K,j as M,h as a,g as o,B as s,a7 as f,v as t,t as x,i as n}from"./.pnpm.8fb36023.js";const O={class:"markdown-body"},Q=n("p",{class:"describe-plugin"},"\u63D0\u4F9B\u6781\u81F4\u7684\u5206\u9875\u903B\u8F91\uFF0C\u65E2\u53EF\u8F7B\u677E\u80DC\u4EFB\u5F02\u6B65\u5206\u9875\uFF0C\u4E5F\u53EF\u4F5C\u4E3A\u9875\u9762\u5237\u65B0\u5F0F\u5206\u9875\u3002",-1),W=n("p",null,[t("\u4F7F\u7528 "),n("code",null,"lay-page"),t(" \u6807\u7B7E, \u521B\u5EFA\u5206\u9875")],-1),X=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("lay-page")]),t(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("currentPage"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":limit"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("limit"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":total"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("total"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":show-page"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("true"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("lay-page")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[t(`
|
|
`),n("span",{class:"token keyword"},"import"),t(),n("span",{class:"token punctuation"},"{"),t(" ref "),n("span",{class:"token punctuation"},"}"),t(),n("span",{class:"token keyword"},"from"),t(),n("span",{class:"token string"},"'vue'"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"export"),t(),n("span",{class:"token keyword"},"default"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"const"),t(" limit "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"20"),n("span",{class:"token punctuation"},")"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(" total "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(" currentPage "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"2"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"return"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
limit`),n("span",{class:"token punctuation"},","),t(`
|
|
total`),n("span",{class:"token punctuation"},","),t(`
|
|
currentPage
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("script")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`)])],-1),Y=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("lay-page")]),t(),n("span",{class:"token attr-name"},":limit"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("limit1"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("current1"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":total"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("total1"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("lay-page")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[t(`
|
|
`),n("span",{class:"token keyword"},"import"),t(),n("span",{class:"token punctuation"},"{"),t(" ref "),n("span",{class:"token punctuation"},"}"),t(),n("span",{class:"token keyword"},"from"),t(),n("span",{class:"token string"},"'vue'"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"export"),t(),n("span",{class:"token keyword"},"default"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"const"),t(" limit1 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(" total1 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(" current1 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"return"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
limit1`),n("span",{class:"token punctuation"},","),t(`
|
|
total1`),n("span",{class:"token punctuation"},","),t(`
|
|
current1
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("script")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`)])],-1),Z=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("lay-page")]),t(),n("span",{class:"token attr-name"},":limit"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("limit2"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":total"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("total2"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":show-page"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("true"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},"theme"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("blue"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("lay-page")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[t(`
|
|
`),n("span",{class:"token keyword"},"import"),t(),n("span",{class:"token punctuation"},"{"),t(" ref "),n("span",{class:"token punctuation"},"}"),t(),n("span",{class:"token keyword"},"from"),t(),n("span",{class:"token string"},"'vue'"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"export"),t(),n("span",{class:"token keyword"},"default"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"const"),t(" limit2 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"20"),n("span",{class:"token punctuation"},")"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(" total2 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"return"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
limit2`),n("span",{class:"token punctuation"},","),t(`
|
|
total2`),n("span",{class:"token punctuation"},","),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("script")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`)])],-1),$=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("lay-page")]),t(),n("span",{class:"token attr-name"},":limit"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("limit3"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":total"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("total3"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},"showCount"),t(),n("span",{class:"token attr-name"},"showPage"),t(),n("span",{class:"token attr-name"},":limits"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("limits3"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("lay-page")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[t(`
|
|
`),n("span",{class:"token keyword"},"import"),t(),n("span",{class:"token punctuation"},"{"),t(" ref "),n("span",{class:"token punctuation"},"}"),t(),n("span",{class:"token keyword"},"from"),t(),n("span",{class:"token string"},"'vue'"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"export"),t(),n("span",{class:"token keyword"},"default"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"const"),t(" limit3 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},")"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(" total3 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"125"),n("span",{class:"token punctuation"},")"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(" limits3 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"["),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},","),t(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),t(),n("span",{class:"token number"},"50"),n("span",{class:"token punctuation"},","),t(),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},","),t(),n("span",{class:"token number"},"200"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"return"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
limit3`),n("span",{class:"token punctuation"},","),t(`
|
|
total3`),n("span",{class:"token punctuation"},","),t(`
|
|
limits3
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("script")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`)])],-1),nn=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("lay-page")]),t(),n("span",{class:"token attr-name"},":limit"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("limit4"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":total"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("total4"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},"@change"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("change4"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":show-page"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("true"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("lay-page")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[t(`
|
|
`),n("span",{class:"token keyword"},"import"),t(),n("span",{class:"token punctuation"},"{"),t(" ref "),n("span",{class:"token punctuation"},"}"),t(),n("span",{class:"token keyword"},"from"),t(),n("span",{class:"token string"},"'vue'"),t(`
|
|
`),n("span",{class:"token keyword"},"import"),t(),n("span",{class:"token punctuation"},"{"),t(" layer "),n("span",{class:"token punctuation"},"}"),t(),n("span",{class:"token keyword"},"from"),t(),n("span",{class:"token string"},'"@layui/layui-vue"'),n("span",{class:"token punctuation"},";"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"export"),t(),n("span",{class:"token keyword"},"default"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"const"),t(" limit4 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"20"),n("span",{class:"token punctuation"},")"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(" total4 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(),n("span",{class:"token function-variable function"},"change4"),t(),n("span",{class:"token operator"},"="),t(),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},[n("span",{class:"token punctuation"},"{"),t(" current"),n("span",{class:"token punctuation"},","),t(" limit "),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token operator"},"=>"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"msg"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"current:"'),t(),n("span",{class:"token operator"},"+"),t(" current "),n("span",{class:"token operator"},"+"),t(),n("span",{class:"token string"},'" limit:"'),t(),n("span",{class:"token operator"},"+"),t(" limit"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"return"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
limit4`),n("span",{class:"token punctuation"},","),t(`
|
|
total4`),n("span",{class:"token punctuation"},","),t(`
|
|
change4
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("script")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`)])],-1),tn=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("lay-button-container")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("lay-button")]),t(),n("span",{class:"token attr-name"},"type"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("primary"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},"size"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("sm"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("changeCurrent5"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),t("update model {{ current5 }}"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("lay-button")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("lay-button")]),t(),n("span",{class:"token attr-name"},"type"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("primary"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},"size"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("sm"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("changeLimit5"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),t("update limit {{ limit5 }}"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("lay-button")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("lay-button-container")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("br")]),n("span",{class:"token punctuation"},"/>")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("lay-page")]),t(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("current5"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},[n("span",{class:"token namespace"},"v-model:"),t("limit")]),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("limit5"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":pages"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("pages5"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":total"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("total5"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":show-count"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("true"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":show-page"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("true"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":show-limit"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("true"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":show-refresh"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("true"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},":showSkip"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("true"),n("span",{class:"token punctuation"},'"')]),t(),n("span",{class:"token attr-name"},"@change"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),t("change5"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("lay-page")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
|
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[t(`
|
|
`),n("span",{class:"token keyword"},"import"),t(),n("span",{class:"token punctuation"},"{"),t(" ref "),n("span",{class:"token punctuation"},"}"),t(),n("span",{class:"token keyword"},"from"),t(),n("span",{class:"token string"},"'vue'"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"export"),t(),n("span",{class:"token keyword"},"default"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
|
|
`),n("span",{class:"token keyword"},"const"),t(" limit5 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},")"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(" total5 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"99"),n("span",{class:"token punctuation"},")"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(" pages5 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"7"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(" current5 "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(),n("span",{class:"token function-variable function"},"changeCurrent5"),t(),n("span",{class:"token operator"},"="),t(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token operator"},"=>"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
current5`),n("span",{class:"token punctuation"},"."),t("value "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token number"},"2"),n("span",{class:"token punctuation"},";"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(),n("span",{class:"token function-variable function"},"changeLimit5"),t(),n("span",{class:"token operator"},"="),t(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token operator"},"=>"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
limit5`),n("span",{class:"token punctuation"},"."),t("value "),n("span",{class:"token operator"},"="),t(),n("span",{class:"token number"},"20"),n("span",{class:"token punctuation"},";"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token keyword"},"const"),t(),n("span",{class:"token function-variable function"},"change5"),t(),n("span",{class:"token operator"},"="),t(),n("span",{class:"token punctuation"},"("),n("span",{class:"token parameter"},[n("span",{class:"token punctuation"},"{"),t(" current"),n("span",{class:"token punctuation"},","),t(" limit "),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token operator"},"=>"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"msg"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"current:"'),t(),n("span",{class:"token operator"},"+"),t(" current "),n("span",{class:"token operator"},"+"),t(),n("span",{class:"token string"},'" limit:"'),t(),n("span",{class:"token operator"},"+"),t(" limit"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token keyword"},"return"),t(),n("span",{class:"token punctuation"},"{"),t(`
|
|
limit5`),n("span",{class:"token punctuation"},","),t(`
|
|
total5`),n("span",{class:"token punctuation"},","),t(`
|
|
pages5`),n("span",{class:"token punctuation"},","),t(`
|
|
current5`),n("span",{class:"token punctuation"},","),t(`
|
|
changeCurrent5`),n("span",{class:"token punctuation"},","),t(`
|
|
changeLimit5`),n("span",{class:"token punctuation"},","),t(`
|
|
change5
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`),n("span",{class:"token punctuation"},"}"),t(`
|
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("script")]),n("span",{class:"token punctuation"},">")]),t(`
|
|
`)])],-1),an=n("br",null,null,-1),sn=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u9ED8\u8BA4\u503C")])]),n("tbody",null,[n("tr",null,[n("td",null,"v-model"),n("td",null,"\u5F53\u524D\u9875"),n("td",null,"\u2013")]),n("tr",null,[n("td",null,"limit"),n("td",null,"\u6BCF\u9875\u6570\u91CF"),n("td",null,"\u2013")]),n("tr",null,[n("td",null,"total"),n("td",null,"\u603B\u6761\u6570"),n("td",null,"\u2013")]),n("tr",null,[n("td",null,"showCount"),n("td",null,"\u663E\u793A\u603B\u6570"),n("td",null,[n("code",null,"false")])]),n("tr",null,[n("td",null,"showPage"),n("td",null,"\u663E\u793A\u6BCF\u9875"),n("td",null,[n("code",null,"false")])]),n("tr",null,[n("td",null,"showLimit"),n("td",null,"\u663E\u793A\u6BCF\u9875\u6570\u91CF"),n("td",null,[n("code",null,"false")])]),n("tr",null,[n("td",null,"showRefresh"),n("td",null,"\u663E\u793A\u5237\u65B0\u6309\u94AE"),n("td",null,[n("code",null,"false")])]),n("tr",null,[n("td",null,"showSkip"),n("td",null,"\u663E\u793A\u8DF3\u8F6C"),n("td",null,[n("code",null,"false")])]),n("tr",null,[n("td",null,"pages"),n("td",null,"\u663E\u793A\u5207\u9875\u6309\u94AE\u6570\u91CF"),n("td",null,[n("code",null,"10")])]),n("tr",null,[n("td",null,"limits"),n("td",null,"\u5207\u6362\u6BCF\u9875\u6570\u91CF\u7684\u9009\u62E9\u9879"),n("td",null,[n("code",null,"[10,20,30,40,50]")])]),n("tr",null,[n("td",null,"theme"),n("td",null,"\u4E3B\u9898\u8272"),n("td",null,[n("code",null,"green")])])])],-1),on=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u4E8B\u4EF6"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u53C2\u6570"),n("th",null,"\u7248\u672C")])]),n("tbody",null,[n("tr",null,[n("td",null,"jump"),n("td",null,"\u5207\u6362\u56DE\u8C03"),n("td",null,"{ current: \u5F53\u524D\u9875\u9762 }"),n("td",null,[n("code",null,"\u79FB\u9664")])]),n("tr",null,[n("td",null,"limit"),n("td",null,"\u6BCF\u9875\u6570\u91CF\u53D8\u5316"),n("td",null,"\u53D8\u5316\u540E\u7684\u503C"),n("td",null,[n("code",null,"\u79FB\u9664")])]),n("tr",null,[n("td",null,"change"),n("td",null,"\u5206\u9875\u4E8B\u4EF6"),n("td",null,"{ current: \u5F53\u524D\u9875\u7801, limit: \u6BCF\u9875\u6570\u91CF }"),n("td",null,[n("code",null,"1.4.3")])])])],-1),en=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u63D2\u69FD"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u9ED8\u8BA4\u503C")])]),n("tbody",null,[n("tr",null,[n("td",null,"prev"),n("td",null,"\u4E0A\u4E00\u9875"),n("td",null,"\u4E0A\u4E00\u9875")]),n("tr",null,[n("td",null,"next"),n("td",null,"\u4E0B\u4E00\u9875"),n("td",null,"\u4E0B\u4E00\u9875")])])],-1),ln={style:{display:"flex","justify-content":"space-between","margin-top":"20px"}},kn={},rn={__name:"page",setup(pn,{expose:q}){let C=e(20),P=e(100),d=e(2),V=e(10),j=e(100),g=e(1),z=e(20),L=e(100),N=e(5),B=e(125),S=e([5,10,50,100,200]),U=e(20),R=e(100),D=({current:y,limit:l})=>{b.msg("current:"+y+" limit:"+l)},k=e(10),E=e(99),I=e(7),i=e(1),T=()=>{i.value=2},A=()=>{k.value=20},F=({current:y,limit:l})=>{b.msg("current:"+y+" limit:"+l)};return q({frontmatter:{}}),(y,l)=>{const G=u("lay-anchor"),c=u("lay-field"),r=u("lay-page"),m=u("lay-code"),w=u("lay-button"),H=u("lay-button-container"),h=u("lay-table-box"),J=u("lay-contributor"),_=u("lay-icon"),v=u("router-link");return K(),M("div",O,[a(G,{anchors:"\u57FA\u672C\u4ECB\u7ECD,\u57FA\u7840\u4F7F\u7528,\u7B80\u6D01\u6A21\u5F0F,\u8BBE\u7F6E\u4E3B\u9898,\u5206\u9875\u5BB9\u91CF,\u56DE\u8C03\u4E8B\u4EF6,\u5B8C\u6574\u5206\u9875,Page \u5C5E\u6027,Page \u4E8B\u4EF6,Page \u63D2\u69FD",currIndex:-1,show:!0}),a(c,{id:"\u57FA\u672C\u4ECB\u7ECD",title:"\u57FA\u672C\u4ECB\u7ECD",style:{"margin-top":"21px","margin-bottom":"20px"}}),Q,a(c,{id:"\u57FA\u7840\u4F7F\u7528",title:"\u57FA\u7840\u4F7F\u7528",style:{"margin-top":"21px","margin-bottom":"20px"}}),a(m,null,{description:o(()=>[W]),code:o(()=>[X]),default:o(()=>[a(r,{modelValue:s(d),"onUpdate:modelValue":l[0]||(l[0]=p=>f(d)?d.value=p:d=p),limit:s(C),total:s(P),"show-page":!0},null,8,["modelValue","limit","total"])]),_:1}),a(c,{id:"\u7B80\u6D01\u6A21\u5F0F",title:"\u7B80\u6D01\u6A21\u5F0F",style:{"margin-top":"21px","margin-bottom":"20px"}}),a(m,null,{code:o(()=>[Y]),default:o(()=>[a(r,{limit:s(V),modelValue:s(g),"onUpdate:modelValue":l[1]||(l[1]=p=>f(g)?g.value=p:g=p),total:s(j)},null,8,["limit","modelValue","total"])]),_:1}),a(c,{id:"\u8BBE\u7F6E\u4E3B\u9898",title:"\u8BBE\u7F6E\u4E3B\u9898",style:{"margin-top":"21px","margin-bottom":"20px"}}),a(m,null,{code:o(()=>[Z]),default:o(()=>[a(r,{limit:s(z),total:s(L),"show-page":!0,theme:"blue"},null,8,["limit","total"])]),_:1}),a(c,{id:"\u5206\u9875\u5BB9\u91CF",title:"\u5206\u9875\u5BB9\u91CF",style:{"margin-top":"21px","margin-bottom":"20px"}}),a(m,null,{code:o(()=>[$]),default:o(()=>[a(r,{limit:s(N),total:s(B),showCount:"",showPage:"",limits:s(S)},null,8,["limit","total","limits"])]),_:1}),a(c,{id:"\u56DE\u8C03\u4E8B\u4EF6",title:"\u56DE\u8C03\u4E8B\u4EF6",style:{"margin-top":"21px","margin-bottom":"20px"}}),a(m,null,{code:o(()=>[nn]),default:o(()=>[a(r,{limit:s(U),total:s(R),onChange:s(D),"show-page":!0},null,8,["limit","total","onChange"])]),_:1}),a(c,{id:"\u5B8C\u6574\u5206\u9875",title:"\u5B8C\u6574\u5206\u9875",style:{"margin-top":"21px","margin-bottom":"20px"}}),a(m,null,{code:o(()=>[tn]),default:o(()=>[a(H,null,{default:o(()=>[a(w,{type:"primary",size:"sm",onClick:s(T)},{default:o(()=>[t("update model "+x(s(i)),1)]),_:1},8,["onClick"]),a(w,{type:"primary",size:"sm",onClick:s(A)},{default:o(()=>[t("update limit "+x(s(k)),1)]),_:1},8,["onClick"])]),_:1}),an,a(r,{modelValue:s(i),"onUpdate:modelValue":l[2]||(l[2]=p=>f(i)?i.value=p:i=p),limit:s(k),"onUpdate:limit":l[3]||(l[3]=p=>f(k)?k.value=p:k=p),pages:s(I),total:s(E),"show-count":!0,"show-page":!0,"show-limit":!0,"show-refresh":!0,showSkip:!0,onChange:s(F)},null,8,["modelValue","limit","pages","total","onChange"])]),_:1}),a(c,{id:"Page \u5C5E\u6027",title:"Page \u5C5E\u6027",style:{"margin-top":"21px","margin-bottom":"20px"}}),a(h,null,{default:o(()=>[sn]),_:1}),a(c,{id:"Page \u4E8B\u4EF6",title:"Page \u4E8B\u4EF6",style:{"margin-top":"21px","margin-bottom":"20px"}}),a(h,null,{default:o(()=>[on]),_:1}),a(c,{id:"Page \u63D2\u69FD",title:"Page \u63D2\u69FD",style:{"margin-top":"21px","margin-bottom":"20px"}}),a(h,null,{default:o(()=>[en]),_:1}),a(J,{"file-path":"page"}),n("div",ln,[n("div",null,[a(v,{to:"/zh-CN/components/empty",class:"lay-link",style:{display:""}},{default:o(()=>[a(_,{type:"layui-icon-left"}),t("\u7A7A")]),_:1})]),n("div",null,[a(v,{to:"/zh-CN/components/tree",class:"lay-link",style:{display:""}},{default:o(()=>[t("\u6811\u5F62\u7EC4\u4EF6 "),a(_,{type:"layui-icon-right"})]),_:1})])])])}}};export{rn as default,kn as frontmatter};
|