perf: 发布 0.2.3 版本

This commit is contained in:
就眠仪式 2021-11-08 00:54:38 +08:00
parent 45bfa46a4a
commit b2e6afd7b3
8 changed files with 61 additions and 37 deletions

View File

@ -16,10 +16,17 @@
[新增] layer 弹层 closeBtn 属性, 允许隐藏关闭操作。<br>
[新增] layer 弹层 btnAlign 属性, 允许自定义按钮布局。<br>
[新增] layer 弹层 anim 属性, 支持 7 种入场动画。<br>
[修复] layer 弹层 btn 属性为非必填。<br>
[修复] layer 弹层 boolean 类型推断造成的警告。<br>
[修复] mackdown 文档 table 样式对 table 组件的污染。<br>
[修复] breadcrumb-item 面包屑 title 属性, 未填写造成的警告。<br>
[修复] select-option 下拉选择 disabled 属性的类型推断造成的警告。<br>
[修复] page 分页 showSkip 属性的类型推断造成的警告。<br>
[修复] rate 评分 readonly 属性的类型推断造成的警告。<br>
[修复] carousel 轮播 anim arrow indicator 属性为非必传。<br>
[优化] carousel 轮播逻辑, 允许循环切换。<br>
[优化] layer 弹层 border 样式。<br>
[优化] layer 弹层 id 默认生成方式, 使用 Guid 作为编号。<br>
[优化] carousel 轮播逻辑, 允许循环切换。<br>
[升级] vue-router 4.0.12 版本。<br>
[升级] vue 3.2.21 版本。<br>
</lay-timeline-item>

View File

@ -15,10 +15,9 @@ import { defineProps, inject, useSlots } from 'vue'
const slot = useSlots()
const props =
defineProps<{
title: string
}>()
const props = defineProps<{
title?: string
}>()
const separator = inject('separator')
</script>

View File

@ -52,9 +52,9 @@ const props = withDefaults(
width?: string
height?: string
modelValue: string
anim: string
arrow: string
indicator: string
anim?: string
arrow?: string
indicator?: string
}>(),
{
width: '100%',

View File

@ -110,15 +110,15 @@ const props = withDefaults(
offset?: string[]
width?: string
height?: string
visible?: boolean
maxmin?: boolean
btn: Record<string, unknown>[]
move?: boolean
visible?: boolean | string
maxmin?: boolean | string
btn?: Record<string, unknown>[]
move?: boolean | string
type?: number
content?: string
shade?: boolean
shadeClose?: boolean
closeBtn?: boolean
shade?: boolean | string
shadeClose?: boolean | string
closeBtn?: boolean | string
btnAlign?: string
anim?: number
}>(),
@ -139,6 +139,7 @@ const props = withDefaults(
closeBtn: true,
btnAlign: 'l',
anim: 0,
content: '',
}
)

View File

@ -62,15 +62,22 @@ const props = withDefaults(
total: number
limit: number
theme?: string
showPage?: boolean
showSkip?: boolean
showCount?: boolean
showLimit?: boolean
showInput?: boolean
showRefresh?: boolean
showPage?: boolean | string
showSkip?: boolean | string
showCount?: boolean | string
showLimit?: boolean | string
showInput?: boolean | string
showRefresh?: boolean | string
}>(),
{
limit: 10,
theme: 'green',
showPage: false,
showSkip: false,
showCount: false,
showLimit: true,
showInput: false,
showRefresh: false,
}
)

View File

@ -19,20 +19,20 @@
</ul>
</template>
<script setup lang="ts">
import { computed, defineProps, Ref, ref, watch, withDefaults } from 'vue'
import { computed, defineProps, withDefaults } from 'vue'
const props = withDefaults(
defineProps<{
length?: number
modelValue: number
character?: string
readonly?: boolean
readonly?: boolean | string
theme?: string
}>(),
{
length: 5,
modelValue: 0,
readonly: false,
theme: 'green',
}
)

View File

@ -1,7 +1,10 @@
<template>
<dd
:value="value"
:class="[selectItem.value === value ? 'layui-this' : '',disabled ? 'layui-disabled':'']"
:class="[
selectItem.value === value ? 'layui-this' : '',
disabled ? 'layui-disabled' : '',
]"
@click="selectHandle"
>
{{ label }}
@ -10,19 +13,24 @@
<script setup name="LaySelectOption" lang="ts">
import { SelectItem } from '../type'
import { defineProps, inject, Ref } from 'vue'
import { defineProps, inject, onMounted, Ref } from 'vue'
const props = defineProps<{
value?: string
label?: string
disabled?: boolean
}>()
const props = withDefaults(
defineProps<{
value: string
label: string
disabled?: boolean | string
}>(),
{
disabled: false,
}
)
const selectItem = inject('selectItem') as SelectItem
const openState = inject('openState') as Ref<boolean>
const selectHandle = function () {
if(props.disabled) {
if (props.disabled) {
return
}
openState.value = false
@ -31,8 +39,10 @@ const selectHandle = function () {
}
// init selected
if (selectItem.value === props.value) {
selectItem.value = props.value
selectItem.label = props.label
}
onMounted(() => {
if (selectItem.value === props.value) {
selectItem.value = props.value
selectItem.label = props.label
}
})
</script>

View File

@ -15,7 +15,7 @@ import { computed, CSSProperties, defineProps } from 'vue'
const props = withDefaults(
defineProps<{
width?: string
width?: string | number
}>(),
{
width: '200',