💬 补充 hooks 文档

This commit is contained in:
就眠儀式
2021-12-06 09:35:18 +08:00
parent 2fd930e6bc
commit 0592b3cd72
26 changed files with 144 additions and 291 deletions

View File

@@ -4,11 +4,11 @@ export default {
}
</script>
<script setup lang="ts">
import { Nullable } from '/@src/module/type'
import { Nullable } from '../type'
import { computed, onMounted, ref } from 'vue'
import { HSBToHEX, RGBSTo, RGBToHSB } from '/@src/module/colorPicker/colorUtil'
import { HSBToHEX, RGBSTo, RGBToHSB } from './colorUtil'
import ColorPicker from './ColorPicker.vue'
import { usePosition } from '/@src/hooks/usePosition'
import { usePosition } from '@layui/hooks-vue'
interface BoxProps {
color?: string

View File

@@ -34,7 +34,7 @@
<script setup name="LaySelect" lang="ts">
import { defineProps, provide, ref, watch } from 'vue'
import useClickOutside from '../../hooks/useClickOutside'
import { useClickOutside } from '@layui/hooks-vue'
const dropdownRef = ref<null | HTMLElement>(null)
const isClickOutside = useClickOutside(dropdownRef)

View File

@@ -22,7 +22,7 @@
<script setup name="LaySelect" lang="ts">
import { defineProps, provide, reactive, ref, watch } from 'vue'
import useClickOutside from '../../hooks/useClickOutside'
import { useClickOutside } from '@layui/hooks-vue'
const selectRef = ref<null | HTMLElement>(null)
const isClickOutside = useClickOutside(selectRef)