diff --git a/package/component/src/component/iconPicker/index.vue b/package/component/src/component/iconPicker/index.vue index 069b69bc..a0586ed4 100644 --- a/package/component/src/component/iconPicker/index.vue +++ b/package/component/src/component/iconPicker/index.vue @@ -9,7 +9,7 @@ import "./index.less"; import { Ref, ref } from "vue"; import { LayIconList as icons } from "@layui/icons-vue"; import LayDropdown from "../dropdown/index.vue"; -import layInput from "../input/index.vue"; +import LayInput from "../input/index.vue"; export interface LayIconPickerProps { page?: boolean; @@ -26,7 +26,7 @@ const emit = defineEmits(["update:modelValue", "change"]); const selectedIcon: Ref = ref(props.modelValue as string); const dropdownRef = ref(null); -const selectIcon = function (icon: string) { +const selectIcon = function (icon: string) : void { emit("update:modelValue", icon); emit("change", icon); selectedIcon.value = icon; @@ -34,9 +34,9 @@ const selectIcon = function (icon: string) { }; const icones: Ref = ref([]); -const total = ref(icons.length); -const totalPage = ref(total.value / 12); -const currentPage: Ref = ref(1); +const total: Ref = ref(icons.length); +const totalPage: Ref = ref(total.value / 12); +const currentPage: Ref = ref(1); if (props.page) { icones.value = icons.slice(0, 12); diff --git a/package/component/src/component/noticeBar/index.vue b/package/component/src/component/noticeBar/index.vue index aca4a77d..4c0cf137 100644 --- a/package/component/src/component/noticeBar/index.vue +++ b/package/component/src/component/noticeBar/index.vue @@ -1,18 +1,18 @@ @@ -63,12 +63,10 @@ export default { @@ -33,14 +58,12 @@ const handleClick = function () {
- = withInstall(Component); +export default component; \ No newline at end of file diff --git a/package/component/src/component/radioGroup/index.vue b/package/component/src/component/radioGroup/index.vue new file mode 100644 index 00000000..26e1fe47 --- /dev/null +++ b/package/component/src/component/radioGroup/index.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/package/component/src/component/select/index.vue b/package/component/src/component/select/index.vue index 3a1147a7..6b67590d 100644 --- a/package/component/src/component/select/index.vue +++ b/package/component/src/component/select/index.vue @@ -34,10 +34,9 @@ export interface LaySelectProps { items?: { label: string; value: string | number | [] | null; key: string }[]; } -const selectRef = ref(null); +const selectRef = ref(); -// @ts-ignore -onClickOutside(selectRef, (event) => { +onClickOutside(selectRef, (event: Event) => { openState.value = false; }); @@ -53,7 +52,6 @@ const props = withDefaults(defineProps(), { const openState = ref(false); const open = function () { - // 禁用 if (props.disabled) { openState.value = false; return; diff --git a/package/component/src/index.ts b/package/component/src/index.ts index 1c78cfb0..98588f1d 100644 --- a/package/component/src/index.ts +++ b/package/component/src/index.ts @@ -11,6 +11,7 @@ import LayBacktop from "./component/backTop/index"; import LayAvatar from "./component/avatar/index"; import LayAvatarList from "./component/avatarList/index"; import LayRadio from "./component/radio/index"; +import LayRadioGroup from "./component/radioGroup/index"; import LayButton from "./component/button/index"; import LayButtonContainer from "./component/buttonContainer/index"; import LayButtonGroup from "./component/buttonGroup/index"; @@ -90,6 +91,7 @@ const components: Record = { LaySplitPanel, LaySplitPanelItem, LayRadio, + LayRadioGroup, LayButton, LayIcon, LayBacktop, @@ -178,6 +180,7 @@ export { LaySplitPanel, LaySplitPanelItem, LayRadio, + LayRadioGroup, LayButton, LayIcon, LayBacktop, diff --git a/package/document/src/document/zh-CN/components/noticeBar.md b/package/document/src/document/zh-CN/components/noticeBar.md index 4d659a1a..d652f46a 100644 --- a/package/document/src/document/zh-CN/components/noticeBar.md +++ b/package/document/src/document/zh-CN/components/noticeBar.md @@ -84,7 +84,7 @@ export default { ::: demo @@ -94,16 +94,14 @@ import { ref,reactive } from "vue" export default { setup() { - const list = reactive([ + const list = reactive([ { id: '1', text: '条目一' }, { id: '2', text: '条目二' }, { id: '3', text: '条目三' }, { id: '4', text: '条目四' }, ]) return { - list, - } } } diff --git a/package/document/src/document/zh-CN/components/radio.md b/package/document/src/document/zh-CN/components/radio.md index 0a5c3293..efb1cef7 100644 --- a/package/document/src/document/zh-CN/components/radio.md +++ b/package/document/src/document/zh-CN/components/radio.md @@ -97,6 +97,39 @@ export default { ::: +::: title 事件回调 +::: + +::: demo + + + + + +::: + ::: title Radio 属性 :::