docs: 更新文档
This commit is contained in:
parent
e6cd15ea05
commit
da8c0c190f
@ -131,12 +131,11 @@ export default {
|
||||
|
||||
:::
|
||||
|
||||
|
||||
::: title 评分属性
|
||||
:::
|
||||
|
||||
| | | |
|
||||
| ------- | -------- | --- |
|
||||
| v-model | 评分值 | -- |
|
||||
| length | 评分长度 | -- |
|
||||
| readonly | 只读模式 | -- |
|
||||
| | | |
|
||||
| -------- | -------- | --- |
|
||||
| v-model | 评分值 | -- |
|
||||
| length | 评分长度 | -- |
|
||||
| readonly | 只读模式 | -- |
|
||||
|
@ -18,7 +18,7 @@
|
||||
v-if="trigger === 'hover'"
|
||||
class="layui-dropdown"
|
||||
:class="[openState ? 'layui-dropdown-up' : '']"
|
||||
@mouseenter="open"
|
||||
@mouseenter="open"
|
||||
@mouseleave="hide"
|
||||
>
|
||||
<div>
|
||||
|
@ -7,9 +7,9 @@
|
||||
</template>
|
||||
|
||||
<script setup name="LayDropdownItem" lang="ts">
|
||||
import { inject, Ref } from "vue";
|
||||
import { inject, Ref } from 'vue'
|
||||
|
||||
const openState:Ref<boolean> = inject('openState') as Ref<boolean>
|
||||
const openState: Ref<boolean> = inject('openState') as Ref<boolean>
|
||||
|
||||
const click = function () {
|
||||
openState.value = false
|
||||
|
@ -35,15 +35,19 @@ const props = withDefaults(
|
||||
}
|
||||
)
|
||||
|
||||
watch(props, function () {
|
||||
rates.value = []
|
||||
for (let index = 0; index < props.length; index++) {
|
||||
rates.value.push(false)
|
||||
}
|
||||
for (let index = props.modelValue - 1; index >= 0; index--) {
|
||||
rates.value[index] = true
|
||||
}
|
||||
},{deep: true, immediate: true})
|
||||
watch(
|
||||
props,
|
||||
function () {
|
||||
rates.value = []
|
||||
for (let index = 0; index < props.length; index++) {
|
||||
rates.value.push(false)
|
||||
}
|
||||
for (let index = props.modelValue - 1; index >= 0; index--) {
|
||||
rates.value[index] = true
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
)
|
||||
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user