fix: document 引用 main.ts 以实现实时调试
This commit is contained in:
parent
2accc9b024
commit
303256afa1
@ -43,7 +43,8 @@ const props = withDefaults(defineProps<LayPageProps>(), {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const limits = ref(props.limits);
|
const limits = ref(props.limits);
|
||||||
const pages = props.pages / 2;
|
const pages = Math.ceil(props.pages / 2);
|
||||||
|
|
||||||
const inlimit = computed({
|
const inlimit = computed({
|
||||||
get() {
|
get() {
|
||||||
return props.limit;
|
return props.limit;
|
||||||
@ -52,7 +53,9 @@ const inlimit = computed({
|
|||||||
emit("limit", v);
|
emit("limit", v);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const maxPage = ref(0);
|
const maxPage = ref(0);
|
||||||
|
|
||||||
const totalPage = computed(() => {
|
const totalPage = computed(() => {
|
||||||
maxPage.value = Math.ceil(props.total / props.limit);
|
maxPage.value = Math.ceil(props.total / props.limit);
|
||||||
let r: number[] = [],
|
let r: number[] = [],
|
||||||
|
@ -293,6 +293,7 @@ onMounted(() => {
|
|||||||
<table class="layui-table" :lay-size="size">
|
<table class="layui-table" :lay-size="size">
|
||||||
<tbody>
|
<tbody>
|
||||||
<template v-for="data in tableDataSource" :key="data">
|
<template v-for="data in tableDataSource" :key="data">
|
||||||
|
<!-- sub table impl -->
|
||||||
<tr
|
<tr
|
||||||
@click.stop="rowClick(data, $event)"
|
@click.stop="rowClick(data, $event)"
|
||||||
@dblclick.stop="rowDoubleClick(data, $event)"
|
@dblclick.stop="rowDoubleClick(data, $event)"
|
||||||
|
@ -197,7 +197,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-page :limit="limit" :total="9999" :show-count="showCount" @limit="limit=$event" :show-page="showPage" :show-limit="showLimit" :show-refresh="showRefresh" showSkip="showSkip"></lay-page>
|
<lay-page :limit="limit1" :pages="pages1" :total="9999" :show-count="showCount1" @limit="limit1=$event" :show-page="showPage1" :show-limit="showLimit1" :show-refresh="showRefresh1" showSkip="showSkip1"></lay-page>
|
||||||
每页数量:{{limit}}
|
每页数量:{{limit}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -207,22 +207,24 @@ import { ref } from 'vue'
|
|||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
const limit = ref(5)
|
const limit1 = ref(5)
|
||||||
const total = ref(9999)
|
const total1 = ref(9999)
|
||||||
const showCount = ref(true)
|
const showCount1 = ref(true)
|
||||||
const showPage = ref(true)
|
const showPage1 = ref(true)
|
||||||
const showLimit = ref(true)
|
const showLimit1 = ref(true)
|
||||||
const showRefresh = ref(true)
|
const showRefresh1 = ref(true)
|
||||||
const showSkip = ref(true)
|
const showSkip1 = ref(true)
|
||||||
|
const pages1 = ref(3);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
limit,
|
limit1,
|
||||||
total,
|
total1,
|
||||||
showCount,
|
pages1,
|
||||||
showPage,
|
showCount1,
|
||||||
showLimit,
|
showPage1,
|
||||||
showRefresh,
|
showLimit1,
|
||||||
showSkip
|
showRefresh1,
|
||||||
|
showSkip1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,8 @@ import Layout from "./App.vue";
|
|||||||
import { App, createApp as _createApp } from "vue";
|
import { App, createApp as _createApp } from "vue";
|
||||||
import { createRouter } from "./router/index";
|
import { createRouter } from "./router/index";
|
||||||
import { Router } from "vue-router";
|
import { Router } from "vue-router";
|
||||||
import layui from "@layui/layui-vue";
|
|
||||||
import Store from "./store";
|
import Store from "./store";
|
||||||
import "@layui/layui-vue/lib/index.css";
|
import layui from '../../component/src/index'
|
||||||
import LayCode from "./components/LayCode.vue";
|
import LayCode from "./components/LayCode.vue";
|
||||||
import LaySearch from "./components/LaySearch.vue";
|
import LaySearch from "./components/LaySearch.vue";
|
||||||
import LayTableBox from "./components/LayTableBox.vue";
|
import LayTableBox from "./components/LayTableBox.vue";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user