(component): end

This commit is contained in:
就眠儀式 2022-10-18 01:06:04 +08:00
parent b077d81569
commit eb51083a27
11 changed files with 22 additions and 23 deletions

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script lang="ts" setup> <script lang="ts" setup>
import "./index.less"; import "./index.less";
import LayTag, { LayTagProps } from "../tag/index.vue"; import LayTag, { TagProps } from "../tag/index.vue";
import LayToopTip from "../tooltip/index.vue"; import LayToopTip from "../tooltip/index.vue";
import { import {
onMounted, onMounted,
@ -27,7 +27,7 @@ export interface TagData {
[other: string]: any; [other: string]: any;
} }
export interface LayTagInputProps { export interface TagInputProps {
modelValue?: (string | number | TagData)[]; modelValue?: (string | number | TagData)[];
inputValue?: string; inputValue?: string;
disabled?: boolean; disabled?: boolean;
@ -38,11 +38,11 @@ export interface LayTagInputProps {
minCollapsedNum?: number; minCollapsedNum?: number;
collapseTagsTooltip?: boolean; collapseTagsTooltip?: boolean;
size?: TagInputSize; size?: TagInputSize;
tagProps?: LayTagProps; tagProps?: TagProps;
disabledInput?: boolean; disabledInput?: boolean;
} }
const props = withDefaults(defineProps<LayTagInputProps>(), { const props = withDefaults(defineProps<TagInputProps>(), {
placeholder: undefined, placeholder: undefined,
minCollapsedNum: 0, minCollapsedNum: 0,
size: "md", size: "md",

View File

@ -9,7 +9,7 @@ import { LayIcon } from "@layui/icons-vue";
import { computed } from "vue"; import { computed } from "vue";
import "./index.less"; import "./index.less";
export interface LayTextareaProps { export interface TextareaProps {
name?: string; name?: string;
modelValue?: string; modelValue?: string;
placeholder?: string; placeholder?: string;
@ -19,7 +19,7 @@ export interface LayTextareaProps {
maxlength?: number; maxlength?: number;
} }
const props = defineProps<LayTextareaProps>(); const props = defineProps<TextareaProps>();
interface TextareaEmits { interface TextareaEmits {
(e: "blur", event: Event): void; (e: "blur", event: Event): void;

View File

@ -8,11 +8,11 @@ export default {
import "./index.less"; import "./index.less";
import { computed, withDefaults } from "vue"; import { computed, withDefaults } from "vue";
export interface LayTimelineProps { export interface TimelineProps {
direction?: "horizontal" | "vertical"; direction?: "horizontal" | "vertical";
} }
const props = withDefaults(defineProps<LayTimelineProps>(), { const props = withDefaults(defineProps<TimelineProps>(), {
direction: "vertical", direction: "vertical",
}); });

View File

@ -7,14 +7,14 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import { useSlots } from "vue"; import { useSlots } from "vue";
export interface LayTimelineItemProps { export interface TimelineItemProps {
title?: string; title?: string;
simple?: boolean; simple?: boolean;
} }
const slot = useSlots(); const slot = useSlots();
const props = defineProps<LayTimelineItemProps>(); const props = defineProps<TimelineItemProps>();
</script> </script>
<template> <template>

View File

@ -7,13 +7,12 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import "./index.less"; import "./index.less";
import LayInput from "../input/index.vue"; import LayInput from "../input/index.vue";
import LayScroll from "../scroll/index.vue";
import LayButton from "../button/index.vue"; import LayButton from "../button/index.vue";
import LayCheckbox from "../checkbox/index.vue"; import LayCheckbox from "../checkbox/index.vue";
import { computed, Ref, ref, useSlots, watch } from "vue"; import { computed, Ref, ref, useSlots, watch } from "vue";
import { BooleanOrString, Recordable } from "../../types"; import { BooleanOrString, Recordable } from "../../types";
export interface LayTransferProps { export interface TransferProps {
id?: string; id?: string;
title?: string[]; title?: string[];
width?: string; width?: string;
@ -25,7 +24,7 @@ export interface LayTransferProps {
const slots = useSlots(); const slots = useSlots();
const props = withDefaults(defineProps<LayTransferProps>(), { const props = withDefaults(defineProps<TransferProps>(), {
id: "id", id: "id",
title: () => ["主列表", "副列表"], title: () => ["主列表", "副列表"],
dataSource: () => [], dataSource: () => [],

View File

@ -21,13 +21,13 @@ import { provide } from "vue";
import LayCollapseTransition from "./transitions/collapseTransition.vue"; import LayCollapseTransition from "./transitions/collapseTransition.vue";
import LayFadeTransition from "./transitions/fadeTransition.vue"; import LayFadeTransition from "./transitions/fadeTransition.vue";
export interface LayTransitionProps { export interface TransitionProps {
type?: string; type?: string;
enable?: boolean; enable?: boolean;
time?: string | number; time?: string | number;
} }
const props = withDefaults(defineProps<LayTransitionProps>(), { const props = withDefaults(defineProps<TransitionProps>(), {
type: "collapse", type: "collapse",
enable: true, enable: true,
time: 0.3, time: 0.3,

View File

@ -10,7 +10,7 @@ import { computed, ref, watch } from "vue";
import { getNode } from "../../utils/treeUtil"; import { getNode } from "../../utils/treeUtil";
import { TreeSelectSize } from "./interface"; import { TreeSelectSize } from "./interface";
export interface LayTreeSelect { export interface TreeSelectProps {
data: any; data: any;
modelValue: any; modelValue: any;
disabled?: boolean; disabled?: boolean;
@ -29,7 +29,7 @@ export interface TreeSelectEmits {
(e: "search", value: string): void; (e: "search", value: string): void;
} }
const props = withDefaults(defineProps<LayTreeSelect>(), { const props = withDefaults(defineProps<TreeSelectProps>(), {
disabled: false, disabled: false,
placeholder: "请选择", placeholder: "请选择",
multiple: false, multiple: false,

View File

@ -54,7 +54,7 @@ export interface cutOptions {
copperOption?: typeof Cropper; copperOption?: typeof Cropper;
} }
export interface LayUploadProps { export interface UploadProps {
url?: string; url?: string;
data?: any; data?: any;
headers?: Recordable; headers?: Recordable;
@ -116,7 +116,7 @@ let defaultCutLayerOption: LayerModal = {
type: "component", type: "component",
}; };
const props = withDefaults(defineProps<LayUploadProps>(), { const props = withDefaults(defineProps<UploadProps>(), {
field: "file", field: "file",
acceptMime: "MIME_type", acceptMime: "MIME_type",
size: 0, size: 0,

View File

@ -16,7 +16,7 @@ import {
setFetchMethod, setFetchMethod,
} from "@umijs/ssr-darkreader"; } from "@umijs/ssr-darkreader";
export interface LayConfigProviderProps { export interface ConfigProviderProps {
locale?: string; locale?: string;
locales?: []; locales?: [];
theme?: string; theme?: string;
@ -24,7 +24,7 @@ export interface LayConfigProviderProps {
darkPartial?: any; darkPartial?: any;
} }
const props = withDefaults(defineProps<LayConfigProviderProps>(), { const props = withDefaults(defineProps<ConfigProviderProps>(), {
locale: "zh_CN", locale: "zh_CN",
theme: "light", theme: "light",
}); });