更新文档
This commit is contained in:
parent
8ced3fe819
commit
08569ef65e
@ -21,7 +21,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-block nm>引用区域的文字</lay-block>
|
<lay-block :nm="nm">引用区域的文字</lay-block>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -30,7 +30,10 @@ import { ref } from 'vue'
|
|||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
|
const nm = ref(true)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
nm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,9 @@ export default {
|
|||||||
<template>
|
<template>
|
||||||
<lay-menu selectedKey="5" tree>
|
<lay-menu selectedKey="5" tree>
|
||||||
<lay-menu-item title="首页" id="1">
|
<lay-menu-item title="首页" id="1">
|
||||||
<template v-slot:title> 无感 </template>
|
<template v-slot:title>
|
||||||
|
<router-link to="">哈哈哈</router-link>
|
||||||
|
</template>
|
||||||
</lay-menu-item>
|
</lay-menu-item>
|
||||||
<lay-menu-item title="用户" id="2"></lay-menu-item>
|
<lay-menu-item title="用户" id="2"></lay-menu-item>
|
||||||
<lay-menu-item title="角色" id="3"></lay-menu-item>
|
<lay-menu-item title="角色" id="3"></lay-menu-item>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-page :limit="limit" :total="total" showPage></lay-page>
|
<lay-page :limit="limit" :total="total" :show-page="showPage"></lay-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -12,10 +12,12 @@ export default {
|
|||||||
|
|
||||||
const limit = ref(20)
|
const limit = ref(20)
|
||||||
const total = ref(100)
|
const total = ref(100)
|
||||||
|
const showPage = ref(true)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
limit,
|
limit,
|
||||||
total
|
total,
|
||||||
|
showPage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,11 +53,11 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-page :limit="limit" :total="total" showPage theme="red"></lay-page>
|
<lay-page :limit="limit" :total="total" :show-page="showPage" theme="red"></lay-page>
|
||||||
<br>
|
<br>
|
||||||
<lay-page :limit="limit" :total="total" showPage theme="blue"></lay-page>
|
<lay-page :limit="limit" :total="total" :show-page="showPage" theme="blue"></lay-page>
|
||||||
<br>
|
<br>
|
||||||
<lay-page :limit="limit" :total="total" theme="orange"></lay-page>
|
<lay-page :limit="limit" :total="total" :show-page="showPage" theme="orange"></lay-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -66,10 +68,12 @@ export default {
|
|||||||
|
|
||||||
const limit = ref(20)
|
const limit = ref(20)
|
||||||
const total = ref(100)
|
const total = ref(100)
|
||||||
|
const showPage = ref(true)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
limit,
|
limit,
|
||||||
total
|
total,
|
||||||
|
showPage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -80,7 +84,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-page :limit="limit" :total="total" showCount showPage showLimit showRefresh showSkip></lay-page>
|
<lay-page :limit="limit" :total="total" :show-count="showCount" :show-page="showPage" :show-limit="showLimit" :show-refresh="showRefresh" showSkip="showSkip"></lay-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -91,10 +95,20 @@ export default {
|
|||||||
|
|
||||||
const limit = ref(20)
|
const limit = ref(20)
|
||||||
const total = ref(100)
|
const total = ref(100)
|
||||||
|
const showCount = ref(true)
|
||||||
|
const showPage = ref(true)
|
||||||
|
const showLimit = ref(true)
|
||||||
|
const showRefresh = ref(true)
|
||||||
|
const showSkip = ref(true)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
limit,
|
limit,
|
||||||
total
|
total,
|
||||||
|
showCount,
|
||||||
|
showPage,
|
||||||
|
showLimit,
|
||||||
|
showRefresh,
|
||||||
|
showSkip
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,7 +119,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-page :limit="limit" :total="total" @jump="jump" showPage></lay-page>
|
<lay-page :limit="limit" :total="total" @jump="jump" :show-page="showSkip"></lay-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -116,6 +130,7 @@ export default {
|
|||||||
|
|
||||||
const limit = ref(20)
|
const limit = ref(20)
|
||||||
const total = ref(100)
|
const total = ref(100)
|
||||||
|
const showPage = ref(true)
|
||||||
const jump = function({ current }) {
|
const jump = function({ current }) {
|
||||||
console.log("当前页:" + current)
|
console.log("当前页:" + current)
|
||||||
}
|
}
|
||||||
@ -123,7 +138,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
limit,
|
limit,
|
||||||
total,
|
total,
|
||||||
jump
|
jump,
|
||||||
|
showPage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,10 +47,10 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-progress percent="80" showText></lay-progress>
|
<lay-progress percent="80" :show-text="showText"></lay-progress>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<lay-progress percent="80" showText text="销售量"></lay-progress>
|
<lay-progress percent="80" :show-text="showText" text="销售量"></lay-progress>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -59,7 +59,10 @@ import { ref } from 'vue'
|
|||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
|
const showText = ref(true)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
showText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ export default {
|
|||||||
const selected1 = ref("1");
|
const selected1 = ref("1");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
selected
|
selected1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-rate v-model="all2" length=10></lay-rate> {{all2}}
|
<lay-rate v-model="all2" :length="length"></lay-rate> {{all2}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -54,9 +54,11 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
const all2 = ref(4);
|
const all2 = ref(4);
|
||||||
|
const length = ref(10)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
all2
|
all2,
|
||||||
|
length
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-table :columns="columns" id="id" :dataSource="dataSource" v-model:selectedKeys="selectedKeys" checkbox default-toolbar>
|
<lay-table :columns="columns" id="id" :dataSource="dataSource" v-model:selectedKeys="selectedKeys" :checkbox="checkbox" :default-toolbar="defaultToolbar">
|
||||||
<template v-slot:toolbar>
|
<template v-slot:toolbar>
|
||||||
<lay-button size="sm">新增</lay-button>
|
<lay-button size="sm">新增</lay-button>
|
||||||
<lay-button size="sm">删除</lay-button>
|
<lay-button size="sm">删除</lay-button>
|
||||||
@ -147,6 +147,8 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
const selectedKeys = ref(['1'])
|
const selectedKeys = ref(['1'])
|
||||||
|
const checkbox = ref(true)
|
||||||
|
const defaultToolbar = ref(true)
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@ -179,7 +181,9 @@ export default {
|
|||||||
return {
|
return {
|
||||||
columns,
|
columns,
|
||||||
dataSource,
|
dataSource,
|
||||||
selectedKeys
|
selectedKeys,
|
||||||
|
checkbox,
|
||||||
|
defaultToolbar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@layui/layui-vue",
|
"name": "@layui/layui-vue",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"description": "a component library for Vue 3 base on layui-vue",
|
"description": "a component library for Vue 3 base on layui-vue",
|
||||||
"main": "lib/layui-vue.umd.js",
|
"main": "lib/layui-vue.umd.js",
|
||||||
"module": "lib/layui-vue.es.js",
|
"module": "lib/layui-vue.es.js",
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
:class="[isOpen && isTree ? 'layui-nav-itemed' : '']"
|
:class="[isOpen && isTree ? 'layui-nav-itemed' : '']"
|
||||||
>
|
>
|
||||||
<a href="javascript:void(0)" @click="openHandle">
|
<a href="javascript:void(0)" @click="openHandle">
|
||||||
<slot v-if="slots.title" name="title"></slot>
|
{{ title }}
|
||||||
<span v-else>{{ title }}</span>
|
|
||||||
<i class="layui-icon layui-icon-down layui-nav-more" />
|
<i class="layui-icon layui-icon-down layui-nav-more" />
|
||||||
</a>
|
</a>
|
||||||
<dl
|
<dl
|
||||||
@ -26,9 +25,9 @@
|
|||||||
:class="[selectKey === id ? 'layui-this' : '']"
|
:class="[selectKey === id ? 'layui-this' : '']"
|
||||||
@click="selectHandle()"
|
@click="selectHandle()"
|
||||||
>
|
>
|
||||||
<a href="javascript:void(0)">
|
<slot v-if="slots.title" name="title"></slot>
|
||||||
<slot v-if="slots.title" name="title"></slot>
|
<a v-else href="javascript:void(0)">
|
||||||
<span v-else> {{ title }} </span>
|
{{ title }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
@ -37,10 +36,11 @@
|
|||||||
import { defineProps, inject, Ref, ref, useSlots } from 'vue'
|
import { defineProps, inject, Ref, ref, useSlots } from 'vue'
|
||||||
const slots = useSlots()
|
const slots = useSlots()
|
||||||
|
|
||||||
const props = defineProps<{
|
const props =
|
||||||
id: string
|
defineProps<{
|
||||||
title: string
|
id: string
|
||||||
}>()
|
title: string
|
||||||
|
}>()
|
||||||
|
|
||||||
const isOpen = ref(false)
|
const isOpen = ref(false)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user