This commit is contained in:
2025-03-26 00:29:18 +08:00
parent 9579987fd9
commit a865439f39
21 changed files with 101 additions and 43 deletions
@@ -19,6 +19,10 @@ export default defineComponent({
},
icon: {
type: String
},
type: {
type: String,
default: "primary"
}
},
setup(props, { slots }) {
@@ -1,5 +1,5 @@
<script lang="tsx">
import { selectionListEmits, selectionListProps } from "hoci"
import { selectionEmits, selectionProps } from "hoci"
import type { CSSProperties, PropType } from "vue";
import { Teleport, Transition, computed, defineComponent, onDeactivated, ref, watch } from "vue"
@@ -15,7 +15,7 @@ interface ICascaderItem {
export default defineComponent({
name: "ICascader",
props: {
...selectionListProps,
...selectionProps,
disabled: {
type: Boolean,
default: false
@@ -37,7 +37,7 @@ export default defineComponent({
default: () => []
}
},
emits: [...selectionListEmits, "select"],
emits: [...selectionEmits, "select"],
setup(props, { emit }) {
const modelValue = useVModel(props, "modelValue")
@@ -1,13 +1,13 @@
<script lang="tsx">
import { defineComponent, provide } from "vue"
import { selectionListEmits, selectionListProps, useSelectionList } from "hoci"
import { selectionEmits, selectionProps, useSelectionList } from "hoci"
import { CHECKBOX_GROUP } from "../shared"
export default defineComponent({
name: "ICheckboxGroup",
components: {},
props: {
...selectionListProps,
...selectionProps,
activeClass: {
type: String,
default: "checked"
@@ -21,7 +21,7 @@ export default defineComponent({
default: true
}
},
emits: [...selectionListEmits],
emits: [...selectionEmits],
setup(props, context) {
provide(CHECKBOX_GROUP, true)
@@ -1,7 +1,7 @@
<script lang="tsx">
import type { EmitsOptions, SetupContext } from "vue";
import { computed, defineComponent, inject, nextTick, renderSlot } from "vue"
import { selectionItemProps, switchEmits, switchProps, useSelectionItem, useSwitch } from "hoci"
import { selectionProps, switchEmits, switchProps, useSelectionItem, useSwitch } from "hoci"
import { CHECKBOX_GROUP } from "../shared"
export default defineComponent({
@@ -9,7 +9,7 @@ export default defineComponent({
components: {},
props: {
...switchProps,
...selectionItemProps,
...selectionProps,
label: {
type: String
},
@@ -1,5 +1,5 @@
<script lang="tsx">
import { selectionListEmits, selectionListProps, useSelectionList } from "hoci"
import { selectionEmits, selectionProps, useSelectionList } from "hoci"
import type { CSSProperties, PropType, RendererElement } from "vue";
import { Teleport, Transition, computed, defineComponent, onDeactivated, ref, renderSlot, watch } from "vue"
@@ -8,7 +8,7 @@ import { onClickOutside } from "@vueuse/core"
export default defineComponent({
name: "IIconselect",
props: {
...selectionListProps,
...selectionProps,
disabled: {
type: Boolean,
default: false
@@ -29,7 +29,7 @@ export default defineComponent({
default: "body"
}
},
emits: selectionListEmits,
emits: selectionEmits,
setup(props, context) {
// props.itemClass = "i-select-dropdown-item"
// const { active } = useSelectionList({ ...props, itemClass: "i-select-dropdown-item" }, context)
@@ -1,5 +1,5 @@
<script lang="tsx">
import { selectionListEmits, selectionListProps, useSelectionList } from "hoci"
import { selectionEmits, selectionProps, useSelectionList } from "hoci"
import type { CSSProperties, PropType, RendererElement } from "vue";
import { Teleport, Transition, computed, defineComponent, onDeactivated, ref, renderList, renderSlot, watch } from "vue"
@@ -9,7 +9,7 @@ import { classPropType, labelPropType } from "@/components/hooks/types"
export default defineComponent({
name: "ISelect",
props: {
...selectionListProps,
...selectionProps,
disabled: {
type: Boolean,
default: false
@@ -41,7 +41,7 @@ export default defineComponent({
}
}
},
emits: [...selectionListEmits],
emits: [...selectionEmits],
setup(props, context) {
const modelValue = useVModel(props, "modelValue", context.emit, { passive: true })
+2 -2
View File
@@ -1,11 +1,11 @@
<script lang="tsx">
import { defineComponent, renderSlot } from "vue"
import { HiItem, selectionItemProps } from "hoci"
import { HiItem, selectionProps } from "hoci"
export default defineComponent({
name: "CalcTab",
props: {
...selectionItemProps
...selectionProps
},
setup(props, { slots }) {
return () => {
+2 -2
View File
@@ -1,5 +1,5 @@
<script lang="tsx">
import { HiSelection, selectionListProps } from "hoci"
import { HiSelection, selectionProps } from "hoci"
import type { PropType } from "vue";
import { computed, defineComponent, renderSlot } from "vue"
import type { LocationQuery } from "vue-router";
@@ -9,7 +9,7 @@ import type { BaseType } from "@/components/hooks/types"
export default defineComponent({
name: "CalcTabs",
props: {
...selectionListProps,
...selectionProps,
vertical: {
type: Boolean
},
+2 -2
View File
@@ -1,5 +1,5 @@
<script lang="tsx">
import { HiSelection, selectionListProps } from "hoci"
import { HiSelection, selectionProps } from "hoci"
import { useVModel } from "@vueuse/core"
import type { PropType } from "vue";
import { computed, defineComponent, renderList, watch } from "vue"
@@ -10,7 +10,7 @@ import { labelPropType, valuePropType } from "@/components/hooks/types"
const Tree = defineComponent({
name: "CalcTree",
props: {
...selectionListProps,
...selectionProps,
modelValue: {
type: valuePropType,
default: () => null