补充部分组件描述
This commit is contained in:
		
							parent
							
								
									a74c559fdd
								
							
						
					
					
						commit
						6e568f2d2f
					
				@ -1,6 +1,12 @@
 | 
			
		||||
::: anchor
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基本介绍
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: describe 在实用价值的前提之下,我们并没有内置过多花俏的动画。
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基础使用
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,12 @@
 | 
			
		||||
::: anchor
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基本介绍
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: describe 按钮用于开始一个即时操作。
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基础使用
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
@ -206,7 +212,7 @@ export default {
 | 
			
		||||
::: title 按钮容器
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: demo 使用 `lay-button-container` 标签, 创建一个按钮容器
 | 
			
		||||
::: demo 尽管按钮在同节点并排时会自动拉开间距,但在按钮太多的情况,效果并不是很美好。因为你需要用到按钮容器
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
  <lay-button-container>
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,12 @@
 | 
			
		||||
::: anchor
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基本介绍
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: describe 视觉疲劳的形成往往是由于颜色过于丰富或过于单一形成的麻木感。
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 主色调
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,12 @@
 | 
			
		||||
::: anchor
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基本介绍
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: describe 栅格化系统,是基于行(row)和列(col)来定义区块的外部框架,以保证页面的元素能够稳健地排布起来。
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基础使用
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,12 @@
 | 
			
		||||
::: anchor
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基本介绍
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: describe 语义化的矢量图形。使用图标组件,你需要安装 `@layui/icons-vue` 图标组件包
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基础使用
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,12 @@
 | 
			
		||||
::: anchor
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基本介绍
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: describe 通过鼠标或键盘输入内容,是最基础的表单域的包装。
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基础使用
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,12 @@
 | 
			
		||||
::: anchor
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基本介绍
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: describe 既可编织出绚丽的前台页面,又可满足繁杂的管理系统界面需求。
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基础使用
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,15 @@
 | 
			
		||||
::: anchor
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基本介绍
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: describe 在需要等待加载内容的位置提供一个占位图形组合。
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基础使用
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
::: demo 使用 `lay-skeleton` 标签, 创建骨架屏
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,6 @@
 | 
			
		||||
::: title 基础使用
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
::: demo
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,12 @@
 | 
			
		||||
::: anchor
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基本介绍
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: describe 开关选择器, 需要表示开关状态/两种状态之间的切换时。
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基础使用
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,12 @@
 | 
			
		||||
::: anchor
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基本介绍
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: describe 将时间抽象到二维平面,垂直呈现一段从过去到现在的故事。
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
::: title 基础使用
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -4,13 +4,11 @@
 | 
			
		||||
```
 | 
			
		||||
npm install @layui/layui-vue --save
 | 
			
		||||
```
 | 
			
		||||
:::describe 或
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
yarn add @layui/layui-vue --save
 | 
			
		||||
```
 | 
			
		||||
:::describe 或
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
pnpm install @layui/layui-vue --save
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
@ -18,7 +18,7 @@ export default function createContainer(
 | 
			
		||||
        const token = tokens[idx]
 | 
			
		||||
        const info = token.info.trim().slice(klass.length).trim()
 | 
			
		||||
        if (token.nesting === 1) {
 | 
			
		||||
          return `<p style="margin-left: 24px;margin-bottom:20px;">${info}`
 | 
			
		||||
          return `<p style="padding-left: 30px;padding-top: 20px;padding-bottom: 20px;">${info}`
 | 
			
		||||
        } else {
 | 
			
		||||
          return '</p>\n'
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -7,11 +7,13 @@ export default {
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import "./index.less";
 | 
			
		||||
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
export interface LayAvatarProps {
 | 
			
		||||
  src?: String;
 | 
			
		||||
  size?: string;
 | 
			
		||||
  radius?: boolean;
 | 
			
		||||
}>();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayAvatarProps>(), {});
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
 | 
			
		||||
@ -16,11 +16,9 @@ import LayIcon from "../icon/index";
 | 
			
		||||
import "./index.less";
 | 
			
		||||
 | 
			
		||||
export interface LayBacktopProps {
 | 
			
		||||
  /**通用*/
 | 
			
		||||
  target?: string;
 | 
			
		||||
  showHeight?: number;
 | 
			
		||||
  disabled?: boolean;
 | 
			
		||||
  /**组件样式*/
 | 
			
		||||
  position?: "fixed" | "absolute";
 | 
			
		||||
  right?: number;
 | 
			
		||||
  bottom?: number;
 | 
			
		||||
@ -30,7 +28,6 @@ export interface LayBacktopProps {
 | 
			
		||||
  color?: string;
 | 
			
		||||
  borderRadius?: number | string;
 | 
			
		||||
  circle?: boolean;
 | 
			
		||||
  /**图标样式*/
 | 
			
		||||
  icon?: string;
 | 
			
		||||
  iconSize?: number;
 | 
			
		||||
  iconColor?: string;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/backTop/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/backTop/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/badge/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/badge/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -7,10 +7,11 @@ export default {
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { provide, withDefaults } from "vue";
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
  defineProps<{
 | 
			
		||||
export interface LayBreadcrumbProps {
 | 
			
		||||
    separator?: string;
 | 
			
		||||
  }>(),
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayBreadcrumbProps>(),
 | 
			
		||||
  {
 | 
			
		||||
    separator: "/",
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/breadcrumb/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/breadcrumb/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -19,11 +19,13 @@ export default {
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { inject, useSlots } from "vue";
 | 
			
		||||
 | 
			
		||||
export interface LayBreadcrumbItemProps {
 | 
			
		||||
  title?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const slot = useSlots();
 | 
			
		||||
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
  title?: string;
 | 
			
		||||
}>();
 | 
			
		||||
const props = defineProps<LayBreadcrumbItemProps>();
 | 
			
		||||
 | 
			
		||||
const separator = inject("separator");
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/breadcrumbItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/breadcrumbItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/button/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/button/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -8,12 +8,12 @@ export default {
 | 
			
		||||
import { useSlots } from "vue";
 | 
			
		||||
import "./index.less";
 | 
			
		||||
 | 
			
		||||
const slot = useSlots();
 | 
			
		||||
 | 
			
		||||
export interface LayCardProps {
 | 
			
		||||
  title?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const slot = useSlots();
 | 
			
		||||
 | 
			
		||||
const props = defineProps<LayCardProps>();
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/card/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/card/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/checkbox/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/checkbox/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/checkboxGroup/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/checkboxGroup/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -7,7 +7,7 @@ export default {
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { computed } from "vue";
 | 
			
		||||
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
export interface LayColProps {
 | 
			
		||||
  md?: string;
 | 
			
		||||
  xs?: string;
 | 
			
		||||
  sm?: string;
 | 
			
		||||
@ -16,7 +16,9 @@ const props = defineProps<{
 | 
			
		||||
  xsOffset?: string;
 | 
			
		||||
  smOffset?: string;
 | 
			
		||||
  lgOffset?: string; 
 | 
			
		||||
}>();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = defineProps<LayColProps>();
 | 
			
		||||
 | 
			
		||||
const classes = computed(() => {
 | 
			
		||||
  return [
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/col/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/col/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -12,11 +12,12 @@ import {
 | 
			
		||||
  watch,
 | 
			
		||||
} from "vue";
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
  defineProps<{
 | 
			
		||||
export interface LayCollapseProps {
 | 
			
		||||
    modelValue?: number | string | [];
 | 
			
		||||
    accordion?: boolean;
 | 
			
		||||
  }>(),
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayCollapseProps>(),
 | 
			
		||||
  {
 | 
			
		||||
    modelValue: () => [],
 | 
			
		||||
    accordion: false,
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/collapse/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/collapse/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -7,12 +7,13 @@ export default {
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { withDefaults, inject, computed, ref } from "vue";
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
  defineProps<{
 | 
			
		||||
export interface LayCollapseItemProps {
 | 
			
		||||
    id: number | string;
 | 
			
		||||
    title: string;
 | 
			
		||||
    disabled?: boolean;  
 | 
			
		||||
  }>(),
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayCollapseItemProps>(),
 | 
			
		||||
  {
 | 
			
		||||
    disabled: false,
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/collapseItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/collapseItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										1
									
								
								src/component/container/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/component/container/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
 | 
			
		||||
@ -20,7 +20,7 @@ export interface LayCountupProps {
 | 
			
		||||
  decimalPlaces?: number; // 小数位数
 | 
			
		||||
  useGrouping?: boolean; // 是否使用千位分隔符
 | 
			
		||||
  separator?: string; // 千位分隔符
 | 
			
		||||
  useEasing?: boolean;  // 使用动画
 | 
			
		||||
  useEasing?: boolean; // 使用动画
 | 
			
		||||
  duration?: number; // 动画持续时间
 | 
			
		||||
  prefix?: string; // 前缀
 | 
			
		||||
  suffix?: string; // 后缀
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/countUp/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/countUp/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -8,13 +8,13 @@ export default {
 | 
			
		||||
import { provide, ref, watch } from "vue";
 | 
			
		||||
import { useClickOutside } from "@layui/hooks-vue";
 | 
			
		||||
 | 
			
		||||
const dropdownRef = ref<null | HTMLElement>(null);
 | 
			
		||||
const isClickOutside = useClickOutside(dropdownRef);
 | 
			
		||||
 | 
			
		||||
export interface LayDropdownProps {
 | 
			
		||||
  trigger?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const dropdownRef = ref<null | HTMLElement>(null);
 | 
			
		||||
const isClickOutside = useClickOutside(dropdownRef);
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayDropdownProps>(), {
 | 
			
		||||
  trigger: "click",
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/dropdown/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/dropdown/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/empty/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/empty/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -8,9 +8,9 @@ import { useSlots } from "vue";
 | 
			
		||||
import "./index.less";
 | 
			
		||||
 | 
			
		||||
export interface LayDropdownProps {
 | 
			
		||||
  title?: string,
 | 
			
		||||
  status?: '401' | '403' | '404' | '500',
 | 
			
		||||
  describe?: string
 | 
			
		||||
  title?: string;
 | 
			
		||||
  status?: "401" | "403" | "404" | "500";
 | 
			
		||||
  describe?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const slots = useSlots();
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								src/component/exception/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/component/exception/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
 | 
			
		||||
@ -9,9 +9,11 @@ import { useSlots } from "vue";
 | 
			
		||||
 | 
			
		||||
const slot = useSlots();
 | 
			
		||||
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
export interface LayFieldProps {
 | 
			
		||||
  title?: string;  
 | 
			
		||||
}>();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = defineProps<LayFieldProps>();
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
 | 
			
		||||
@ -13,8 +13,7 @@ import {
 | 
			
		||||
  modelType,
 | 
			
		||||
} from "../../types/form";
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
  defineProps<{
 | 
			
		||||
export interface LayFormProps {
 | 
			
		||||
    model?: modelType;
 | 
			
		||||
    required?: boolean;
 | 
			
		||||
    rules?: Rule;
 | 
			
		||||
@ -23,7 +22,9 @@ const props = withDefaults(
 | 
			
		||||
    requiredErrorMessage?: string;
 | 
			
		||||
    validateMessage?: ValidateMessages;
 | 
			
		||||
    useCN?: boolean;
 | 
			
		||||
  }>(),
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayFormProps>(),
 | 
			
		||||
  {
 | 
			
		||||
    model: function () {
 | 
			
		||||
      return {};
 | 
			
		||||
 | 
			
		||||
@ -31,15 +31,16 @@ import Schema, {
 | 
			
		||||
} from "async-validator";
 | 
			
		||||
import cnValidateMessage from "./cnValidateMessage";
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
  defineProps<{
 | 
			
		||||
export interface LayFormItemProps {
 | 
			
		||||
    prop?: string;
 | 
			
		||||
    mode?: string;
 | 
			
		||||
    label?: string;
 | 
			
		||||
    errorMessage?: string;
 | 
			
		||||
    rules?: Rule;
 | 
			
		||||
    required?: boolean;
 | 
			
		||||
  }>(),
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayFormItemProps>(),
 | 
			
		||||
  {
 | 
			
		||||
    mode: "block",
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/iconPicker/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/iconPicker/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/input/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/input/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/inputNumber/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/inputNumber/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/layout/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/layout/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -5,9 +5,11 @@ export default {
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
export interface LayLineProps {
 | 
			
		||||
  theme?: string; 
 | 
			
		||||
}>();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = defineProps<LayLineProps>();
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/menu/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/menu/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -7,12 +7,14 @@ export default {
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { inject, Ref, useSlots } from "vue";
 | 
			
		||||
 | 
			
		||||
const slots = useSlots();
 | 
			
		||||
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
export interface LayMenuItemProps {
 | 
			
		||||
  id: string;
 | 
			
		||||
  title?: string; 
 | 
			
		||||
}>();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const slots = useSlots();
 | 
			
		||||
 | 
			
		||||
const props = defineProps<LayMenuItemProps>();
 | 
			
		||||
 | 
			
		||||
const selectedKey: Ref<string> = inject("selectedKey") as Ref<string>;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,68 +1,67 @@
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
export default {
 | 
			
		||||
	name: "LayPage"
 | 
			
		||||
}
 | 
			
		||||
  name: "LayPage",
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { Ref, ref, watch, useSlots, computed } from "vue";
 | 
			
		||||
 | 
			
		||||
export interface LayPageProps {
 | 
			
		||||
  total: number;
 | 
			
		||||
  limit: number;
 | 
			
		||||
  theme?: string;
 | 
			
		||||
  showPage?: boolean | string;
 | 
			
		||||
  showSkip?: boolean | string;
 | 
			
		||||
  showCount?: boolean | string;
 | 
			
		||||
  showLimit?: boolean | string;
 | 
			
		||||
  showInput?: boolean | string;
 | 
			
		||||
  showRefresh?: boolean | string;
 | 
			
		||||
  pages?: number;
 | 
			
		||||
  limits?: number[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const slots = useSlots();
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
	defineProps<{
 | 
			
		||||
		total: number;
 | 
			
		||||
		limit: number;
 | 
			
		||||
		theme?: string;
 | 
			
		||||
		showPage?: boolean | string;
 | 
			
		||||
		showSkip?: boolean | string;
 | 
			
		||||
		showCount?: boolean | string;
 | 
			
		||||
		showLimit?: boolean | string;
 | 
			
		||||
		showInput?: boolean | string;
 | 
			
		||||
		showRefresh?: boolean | string;
 | 
			
		||||
		pages?: number;
 | 
			
		||||
		limits?: number[];
 | 
			
		||||
	}>(),
 | 
			
		||||
	{
 | 
			
		||||
		limit: 10,
 | 
			
		||||
		theme: "green",
 | 
			
		||||
		showPage: false,
 | 
			
		||||
		showSkip: false,
 | 
			
		||||
		showCount: false,
 | 
			
		||||
		showLimit: true,
 | 
			
		||||
		showInput: false,
 | 
			
		||||
		showRefresh: false,
 | 
			
		||||
		pages: 10,
 | 
			
		||||
		limits: () => [10, 20, 30, 40, 50],
 | 
			
		||||
	}
 | 
			
		||||
);
 | 
			
		||||
const props = withDefaults(defineProps<LayPageProps>(), {
 | 
			
		||||
  limit: 10,
 | 
			
		||||
  theme: "green",
 | 
			
		||||
  showPage: false,
 | 
			
		||||
  showSkip: false,
 | 
			
		||||
  showCount: false,
 | 
			
		||||
  showLimit: true,
 | 
			
		||||
  showInput: false,
 | 
			
		||||
  showRefresh: false,
 | 
			
		||||
  pages: 10,
 | 
			
		||||
  limits: () => [10, 20, 30, 40, 50],
 | 
			
		||||
});
 | 
			
		||||
const limits = ref(props.limits);
 | 
			
		||||
const pages = props.pages / 2;
 | 
			
		||||
const inlimit = computed({
 | 
			
		||||
	get() {
 | 
			
		||||
		return props.limit;
 | 
			
		||||
	},
 | 
			
		||||
	set(v: number) {
 | 
			
		||||
		emit("limit", v);
 | 
			
		||||
	},
 | 
			
		||||
  get() {
 | 
			
		||||
    return props.limit;
 | 
			
		||||
  },
 | 
			
		||||
  set(v: number) {
 | 
			
		||||
    emit("limit", v);
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
const maxPage = ref(0);
 | 
			
		||||
const totalPage = computed(() => {
 | 
			
		||||
	maxPage.value = Math.ceil(props.total / props.limit);
 | 
			
		||||
	let r: number[] = [],
 | 
			
		||||
		start =
 | 
			
		||||
			maxPage.value <= props.pages
 | 
			
		||||
				? 1
 | 
			
		||||
				: currentPage.value > pages
 | 
			
		||||
				? currentPage.value - pages
 | 
			
		||||
				: 1;
 | 
			
		||||
	for (let i = start; ; i++) {
 | 
			
		||||
		if (r.length >= props.pages || i > maxPage.value) {
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
		r.push(i);
 | 
			
		||||
	}
 | 
			
		||||
	return r;
 | 
			
		||||
  maxPage.value = Math.ceil(props.total / props.limit);
 | 
			
		||||
  let r: number[] = [],
 | 
			
		||||
    start =
 | 
			
		||||
      maxPage.value <= props.pages
 | 
			
		||||
        ? 1
 | 
			
		||||
        : currentPage.value > pages
 | 
			
		||||
        ? currentPage.value - pages
 | 
			
		||||
        : 1;
 | 
			
		||||
  for (let i = start; ; i++) {
 | 
			
		||||
    if (r.length >= props.pages || i > maxPage.value) {
 | 
			
		||||
      break;
 | 
			
		||||
    }
 | 
			
		||||
    r.push(i);
 | 
			
		||||
  }
 | 
			
		||||
  return r;
 | 
			
		||||
});
 | 
			
		||||
const currentPage: Ref<number> = ref(1);
 | 
			
		||||
const currentPageShow: Ref<number> = ref(currentPage.value);
 | 
			
		||||
@ -70,100 +69,100 @@ const currentPageShow: Ref<number> = ref(currentPage.value);
 | 
			
		||||
const emit = defineEmits(["jump", "limit"]);
 | 
			
		||||
 | 
			
		||||
const prev = function () {
 | 
			
		||||
	if (currentPage.value === 1) {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	currentPage.value--;
 | 
			
		||||
  if (currentPage.value === 1) {
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  currentPage.value--;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const next = function () {
 | 
			
		||||
	if (currentPage.value === maxPage.value) {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	currentPage.value++;
 | 
			
		||||
  if (currentPage.value === maxPage.value) {
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  currentPage.value++;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const jump = function (page: number) {
 | 
			
		||||
	currentPage.value = page;
 | 
			
		||||
  currentPage.value = page;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const jumpPage = function () {
 | 
			
		||||
	currentPage.value = currentPageShow.value;
 | 
			
		||||
  currentPage.value = currentPageShow.value;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
watch(inlimit, function () {
 | 
			
		||||
	currentPage.value = 1;
 | 
			
		||||
	// maxPage.value = Math.ceil(props.total / inlimit.value);
 | 
			
		||||
  currentPage.value = 1;
 | 
			
		||||
  // maxPage.value = Math.ceil(props.total / inlimit.value);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
watch(currentPage, function () {
 | 
			
		||||
	currentPageShow.value = currentPage.value;
 | 
			
		||||
	emit("jump", { current: currentPage.value });
 | 
			
		||||
  currentPageShow.value = currentPage.value;
 | 
			
		||||
  emit("jump", { current: currentPage.value });
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
	<div class="layui-box layui-laypage layui-laypage-default">
 | 
			
		||||
		<span v-if="showCount" class="layui-laypage-count"
 | 
			
		||||
			>共 {{ total }} 条 {{ maxPage }} 页</span
 | 
			
		||||
		>
 | 
			
		||||
		<a
 | 
			
		||||
			href="javascript:;"
 | 
			
		||||
			class="layui-laypage-prev"
 | 
			
		||||
			:class="[currentPage === 1 ? 'layui-disabled' : '']"
 | 
			
		||||
			@click="prev()"
 | 
			
		||||
		>
 | 
			
		||||
			<slot v-if="slots.prev" name="prev"></slot>
 | 
			
		||||
			<template v-else>上一页</template>
 | 
			
		||||
		</a>
 | 
			
		||||
		<template v-if="showPage">
 | 
			
		||||
			<template v-for="index of totalPage" :key="index">
 | 
			
		||||
				<span v-if="index === currentPage" class="layui-laypage-curr">
 | 
			
		||||
					<em
 | 
			
		||||
						class="layui-laypage-em"
 | 
			
		||||
						:class="[theme ? 'layui-bg-' + theme : '']"
 | 
			
		||||
					></em>
 | 
			
		||||
					<em>{{ index }}</em>
 | 
			
		||||
				</span>
 | 
			
		||||
				<a v-else href="javascript:;" @click="jump(index)">{{ index }}</a>
 | 
			
		||||
			</template>
 | 
			
		||||
		</template>
 | 
			
		||||
  <div class="layui-box layui-laypage layui-laypage-default">
 | 
			
		||||
    <span v-if="showCount" class="layui-laypage-count"
 | 
			
		||||
      >共 {{ total }} 条 {{ maxPage }} 页</span
 | 
			
		||||
    >
 | 
			
		||||
    <a
 | 
			
		||||
      href="javascript:;"
 | 
			
		||||
      class="layui-laypage-prev"
 | 
			
		||||
      :class="[currentPage === 1 ? 'layui-disabled' : '']"
 | 
			
		||||
      @click="prev()"
 | 
			
		||||
    >
 | 
			
		||||
      <slot v-if="slots.prev" name="prev"></slot>
 | 
			
		||||
      <template v-else>上一页</template>
 | 
			
		||||
    </a>
 | 
			
		||||
    <template v-if="showPage">
 | 
			
		||||
      <template v-for="index of totalPage" :key="index">
 | 
			
		||||
        <span v-if="index === currentPage" class="layui-laypage-curr">
 | 
			
		||||
          <em
 | 
			
		||||
            class="layui-laypage-em"
 | 
			
		||||
            :class="[theme ? 'layui-bg-' + theme : '']"
 | 
			
		||||
          ></em>
 | 
			
		||||
          <em>{{ index }}</em>
 | 
			
		||||
        </span>
 | 
			
		||||
        <a v-else href="javascript:;" @click="jump(index)">{{ index }}</a>
 | 
			
		||||
      </template>
 | 
			
		||||
    </template>
 | 
			
		||||
 | 
			
		||||
		<a
 | 
			
		||||
			href="javascript:;"
 | 
			
		||||
			class="layui-laypage-next"
 | 
			
		||||
			:class="[currentPage === maxPage ? 'layui-disabled' : '']"
 | 
			
		||||
			@click="next()"
 | 
			
		||||
		>
 | 
			
		||||
			<slot v-if="slots.next" name="next"></slot>
 | 
			
		||||
			<template v-else>下一页</template>
 | 
			
		||||
		</a>
 | 
			
		||||
		<span v-if="showLimit" class="layui-laypage-limits">
 | 
			
		||||
			<select v-model="inlimit">
 | 
			
		||||
				<option v-for="val of limits" :key="val" :value="val">
 | 
			
		||||
					{{ val }} 条/页
 | 
			
		||||
				</option>
 | 
			
		||||
			</select>
 | 
			
		||||
		</span>
 | 
			
		||||
		<a v-if="showRefresh" href="javascript:;" class="layui-laypage-refresh">
 | 
			
		||||
			<i class="layui-icon layui-icon-refresh"></i>
 | 
			
		||||
		</a>
 | 
			
		||||
		<span v-if="showSkip" class="layui-laypage-skip">
 | 
			
		||||
			到第
 | 
			
		||||
			<input
 | 
			
		||||
				v-model="currentPageShow"
 | 
			
		||||
				@keypress.enter="jumpPage()"
 | 
			
		||||
				type="number"
 | 
			
		||||
				class="layui-input layui-input-number"
 | 
			
		||||
			/>页
 | 
			
		||||
			<button
 | 
			
		||||
				type="button"
 | 
			
		||||
				class="layui-laypage-btn"
 | 
			
		||||
				@click="jumpPage()"
 | 
			
		||||
				:disabled="currentPageShow > maxPage"
 | 
			
		||||
			>
 | 
			
		||||
				确定
 | 
			
		||||
			</button>
 | 
			
		||||
		</span>
 | 
			
		||||
	</div>
 | 
			
		||||
    <a
 | 
			
		||||
      href="javascript:;"
 | 
			
		||||
      class="layui-laypage-next"
 | 
			
		||||
      :class="[currentPage === maxPage ? 'layui-disabled' : '']"
 | 
			
		||||
      @click="next()"
 | 
			
		||||
    >
 | 
			
		||||
      <slot v-if="slots.next" name="next"></slot>
 | 
			
		||||
      <template v-else>下一页</template>
 | 
			
		||||
    </a>
 | 
			
		||||
    <span v-if="showLimit" class="layui-laypage-limits">
 | 
			
		||||
      <select v-model="inlimit">
 | 
			
		||||
        <option v-for="val of limits" :key="val" :value="val">
 | 
			
		||||
          {{ val }} 条/页
 | 
			
		||||
        </option>
 | 
			
		||||
      </select>
 | 
			
		||||
    </span>
 | 
			
		||||
    <a v-if="showRefresh" href="javascript:;" class="layui-laypage-refresh">
 | 
			
		||||
      <i class="layui-icon layui-icon-refresh"></i>
 | 
			
		||||
    </a>
 | 
			
		||||
    <span v-if="showSkip" class="layui-laypage-skip">
 | 
			
		||||
      到第
 | 
			
		||||
      <input
 | 
			
		||||
        v-model="currentPageShow"
 | 
			
		||||
        @keypress.enter="jumpPage()"
 | 
			
		||||
        type="number"
 | 
			
		||||
        class="layui-input layui-input-number"
 | 
			
		||||
      />页
 | 
			
		||||
      <button
 | 
			
		||||
        type="button"
 | 
			
		||||
        class="layui-laypage-btn"
 | 
			
		||||
        @click="jumpPage()"
 | 
			
		||||
        :disabled="currentPageShow > maxPage"
 | 
			
		||||
      >
 | 
			
		||||
        确定
 | 
			
		||||
      </button>
 | 
			
		||||
    </span>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
							
								
								
									
										1
									
								
								src/component/page/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/component/page/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
 | 
			
		||||
@ -30,8 +30,8 @@ import {
 | 
			
		||||
  onMounted,
 | 
			
		||||
} from "vue";
 | 
			
		||||
import { on } from "../../utils/domUtil";
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
  defineProps<{
 | 
			
		||||
 | 
			
		||||
export interface LayPopperProps {
 | 
			
		||||
    el: any;
 | 
			
		||||
    content?: string | Number;
 | 
			
		||||
    position?: string;
 | 
			
		||||
@ -41,7 +41,9 @@ const props = withDefaults(
 | 
			
		||||
    disabled?: boolean;
 | 
			
		||||
    visible?: boolean;
 | 
			
		||||
    isCanHide?: boolean;
 | 
			
		||||
  }>(),
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayPopperProps>(),
 | 
			
		||||
  {
 | 
			
		||||
    position: 'top',
 | 
			
		||||
    isDark: true,
 | 
			
		||||
 | 
			
		||||
@ -7,14 +7,16 @@ export default {
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { computed } from "vue";
 | 
			
		||||
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
export interface LayProgressProps {
 | 
			
		||||
  percent: number | string;
 | 
			
		||||
  theme?: string;
 | 
			
		||||
  color?: string;
 | 
			
		||||
  size?: string;
 | 
			
		||||
  showText?: boolean;
 | 
			
		||||
  text?: string;
 | 
			
		||||
}>();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = defineProps<LayProgressProps>();
 | 
			
		||||
 | 
			
		||||
const styles = computed(() => {
 | 
			
		||||
  return [
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/progress/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/progress/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -5,12 +5,14 @@ export default {
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
export interface LayRadioProps {
 | 
			
		||||
  modelValue: string;
 | 
			
		||||
  disabled?: boolean;
 | 
			
		||||
  label?: string;
 | 
			
		||||
  name: string;
 | 
			
		||||
}>();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = defineProps<LayRadioProps>();
 | 
			
		||||
 | 
			
		||||
const emit = defineEmits(["update:modelValue", "change"]);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/radio/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/radio/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/rate/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/rate/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/result/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/result/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/row/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/row/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -20,6 +20,16 @@ import {
 | 
			
		||||
import { useClickOutside } from "@layui/hooks-vue";
 | 
			
		||||
import { SelectItem } from "../../types";
 | 
			
		||||
 | 
			
		||||
export interface LaySelectProps {
 | 
			
		||||
    modelValue?: string | number | [] | null;
 | 
			
		||||
    name?: string;
 | 
			
		||||
    placeholder?: string;
 | 
			
		||||
    disabled?: boolean;
 | 
			
		||||
    showEmpty?: boolean;
 | 
			
		||||
    emptyMessage?: string;
 | 
			
		||||
    multiple?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const selectRef = ref<null | HTMLElement>(null);
 | 
			
		||||
const isClickOutside = useClickOutside(selectRef);
 | 
			
		||||
 | 
			
		||||
@ -30,15 +40,7 @@ watch(isClickOutside, () => {
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
	defineProps<{
 | 
			
		||||
		modelValue?: string | number | [] | null;
 | 
			
		||||
		name?: string;
 | 
			
		||||
		placeholder?: string;
 | 
			
		||||
		disabled?: boolean;
 | 
			
		||||
		showEmpty?: boolean;
 | 
			
		||||
		emptyMessage?: string;
 | 
			
		||||
		multiple?: boolean;
 | 
			
		||||
	}>(),
 | 
			
		||||
	defineProps<LaySelectProps>(),
 | 
			
		||||
	{
 | 
			
		||||
		modelValue: null,
 | 
			
		||||
		placeholder: "请选择",
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/select/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/select/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -9,12 +9,13 @@ import LayCheckbox from "../checkbox";
 | 
			
		||||
import { SelectItem, SelectItemHandle, SelectItemPush } from "../../types";
 | 
			
		||||
import { computed, inject, onMounted, Ref } from "vue";
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
	defineProps<{
 | 
			
		||||
		value: string | null | undefined;
 | 
			
		||||
		label?: string;
 | 
			
		||||
		disabled?: boolean;
 | 
			
		||||
	}>(),
 | 
			
		||||
export interface LaySelectOptionProps {
 | 
			
		||||
    value: string | null | undefined;
 | 
			
		||||
    label?: string;
 | 
			
		||||
    disabled?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LaySelectOptionProps>(),
 | 
			
		||||
	{
 | 
			
		||||
		disabled: false,
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/selectOption/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/selectOption/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -9,7 +9,7 @@ import { computed, CSSProperties } from "vue";
 | 
			
		||||
import "./index.less";
 | 
			
		||||
 | 
			
		||||
export interface LaySideProps {
 | 
			
		||||
  width?: string | number;
 | 
			
		||||
    width?: string | number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LaySideProps>(), {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/side/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/side/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								src/component/skeleton/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/skeleton/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -8,7 +8,7 @@ export default {
 | 
			
		||||
import { withDefaults} from "vue";
 | 
			
		||||
 | 
			
		||||
export interface LaySkeletonProps {
 | 
			
		||||
  type?: string;
 | 
			
		||||
    type?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LaySkeletonProps>(), {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/skeletonItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/skeletonItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -106,20 +106,20 @@ import { Ref, ref, toRef } from "vue";
 | 
			
		||||
import { on, off } from "evtd";
 | 
			
		||||
import "./index.less";
 | 
			
		||||
 | 
			
		||||
const emit = defineEmits(["update:modelValue"]);
 | 
			
		||||
 | 
			
		||||
interface LaySliderProps {
 | 
			
		||||
  vertical?: boolean;
 | 
			
		||||
  modelValue?: number | Array<number>;
 | 
			
		||||
  min?: number;
 | 
			
		||||
  max?: number;
 | 
			
		||||
  step?: number;
 | 
			
		||||
  disabled?: boolean;
 | 
			
		||||
  range?: boolean;
 | 
			
		||||
  verticalrange?: number[];
 | 
			
		||||
  standardrange?: number[];
 | 
			
		||||
export interface LaySliderProps {
 | 
			
		||||
    vertical?: boolean;
 | 
			
		||||
    modelValue?: number | Array<number>;
 | 
			
		||||
    min?: number;
 | 
			
		||||
    max?: number;
 | 
			
		||||
    step?: number;
 | 
			
		||||
    disabled?: boolean;
 | 
			
		||||
    range?: boolean;
 | 
			
		||||
    verticalrange?: number[];
 | 
			
		||||
    standardrange?: number[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const emit = defineEmits(["update:modelValue"]);
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LaySliderProps>(), {
 | 
			
		||||
  vertical: false,
 | 
			
		||||
  modelValue: 0,
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/slider/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/slider/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -8,16 +8,16 @@ export default {
 | 
			
		||||
import { ref, watch, provide, withDefaults, onMounted } from "vue";
 | 
			
		||||
import "./index.less";
 | 
			
		||||
 | 
			
		||||
// 属性接口定义
 | 
			
		||||
export interface LayStepProps {
 | 
			
		||||
  vertical?: boolean;
 | 
			
		||||
  minSize?: number;
 | 
			
		||||
    vertical?: boolean;
 | 
			
		||||
    minSize?: number;
 | 
			
		||||
}
 | 
			
		||||
// props初始化数据定义
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayStepProps>(), {
 | 
			
		||||
  vertical: false,
 | 
			
		||||
  minSize: 50,
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
let domEvent = ref();
 | 
			
		||||
let domStatus = ref(false);
 | 
			
		||||
const target = ref();
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/splitPanel/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/splitPanel/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -20,7 +20,7 @@ import {
 | 
			
		||||
import type { ComputedRef } from "vue";
 | 
			
		||||
 | 
			
		||||
export interface LayStepItemProps {
 | 
			
		||||
  space?: number;
 | 
			
		||||
    space?: number;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayStepItemProps>(), {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/splitPanelItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/splitPanelItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -14,13 +14,13 @@ import {
 | 
			
		||||
import "./index.less";
 | 
			
		||||
 | 
			
		||||
export interface LayStepProps {
 | 
			
		||||
  active?: number;
 | 
			
		||||
  center?: boolean;
 | 
			
		||||
  direction?: string;
 | 
			
		||||
  space?: string;
 | 
			
		||||
  currentStatus?: string;
 | 
			
		||||
  composition?: string;
 | 
			
		||||
  simple?: boolean;
 | 
			
		||||
    active?: number;
 | 
			
		||||
    center?: boolean;
 | 
			
		||||
    direction?: string;
 | 
			
		||||
    space?: string;
 | 
			
		||||
    currentStatus?: string;
 | 
			
		||||
    composition?: string;
 | 
			
		||||
    simple?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayStepProps>(), {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/step/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/step/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -19,10 +19,10 @@ import {
 | 
			
		||||
import type { ComputedRef } from "vue";
 | 
			
		||||
 | 
			
		||||
export interface LayStepItemProps {
 | 
			
		||||
  title?: string;
 | 
			
		||||
  content?: string;
 | 
			
		||||
  icon?: string;
 | 
			
		||||
  status?: string;
 | 
			
		||||
    title?: string;
 | 
			
		||||
    content?: string;
 | 
			
		||||
    icon?: string;
 | 
			
		||||
    status?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayStepItemProps>(), {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/stepItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/stepItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -7,12 +7,14 @@ export default {
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { computed, inject, Ref, useSlots } from "vue";
 | 
			
		||||
 | 
			
		||||
const slots = useSlots();
 | 
			
		||||
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
export interface LaySubMenuProps {
 | 
			
		||||
  id: string;
 | 
			
		||||
  title?: string;
 | 
			
		||||
}>();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const slots = useSlots();
 | 
			
		||||
 | 
			
		||||
const props = defineProps<LaySubMenuProps>();
 | 
			
		||||
 | 
			
		||||
const isTree = inject("isTree");
 | 
			
		||||
const selectedKey: Ref<string> = inject("selectedKey") as Ref<string>;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/subMenu/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/subMenu/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										1
									
								
								src/component/switch/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/component/switch/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,14 @@ import {
 | 
			
		||||
  watch,
 | 
			
		||||
} from "vue";
 | 
			
		||||
 | 
			
		||||
export interface LayTabProps {
 | 
			
		||||
  type?: string;
 | 
			
		||||
  modelValue: string;
 | 
			
		||||
  allowClose?: boolean;
 | 
			
		||||
  beforeClose?: Function;
 | 
			
		||||
  beforeLeave?: Function;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const slot = useSlots();
 | 
			
		||||
const slots = slot.default && slot.default();
 | 
			
		||||
const childrens: Ref<VNode[]> = ref([]);
 | 
			
		||||
@ -32,13 +40,7 @@ const setItemInstanceBySlot = function (nodeList: VNode[]) {
 | 
			
		||||
  });
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const props = defineProps<{
 | 
			
		||||
  type?: string;
 | 
			
		||||
  modelValue: string;
 | 
			
		||||
  allowClose?: boolean;
 | 
			
		||||
  beforeClose?: Function;
 | 
			
		||||
  beforeLeave?: Function;
 | 
			
		||||
}>();
 | 
			
		||||
const props = defineProps<LayTabProps>();
 | 
			
		||||
 | 
			
		||||
const emit = defineEmits(["update:modelValue", "change", "close"]);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								src/component/tab/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/component/tab/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
 | 
			
		||||
@ -7,12 +7,14 @@ export default {
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { withDefaults, inject, Ref } from "vue";
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
  defineProps<{
 | 
			
		||||
export interface LayTabItemProps {
 | 
			
		||||
    id: string;
 | 
			
		||||
    title: string;
 | 
			
		||||
    closable?: boolean | string;  
 | 
			
		||||
  }>(),
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
  defineProps<LayTabItemProps>(),
 | 
			
		||||
  {
 | 
			
		||||
    closable: true,
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/tabItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/tabItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -22,8 +22,7 @@ import "./index.less";
 | 
			
		||||
 | 
			
		||||
const tableId = guid();
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(
 | 
			
		||||
  defineProps<{
 | 
			
		||||
export interface LayTableProps {
 | 
			
		||||
    id?: string;
 | 
			
		||||
    skin?: string;
 | 
			
		||||
    size?: string;
 | 
			
		||||
@ -33,7 +32,9 @@ const props = withDefaults(
 | 
			
		||||
    dataSource: Recordable[];
 | 
			
		||||
    defaultToolbar?: boolean;
 | 
			
		||||
    selectedKeys?: Recordable[];  
 | 
			
		||||
  }>(),
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayTableProps>(),
 | 
			
		||||
  {
 | 
			
		||||
    id: "id",
 | 
			
		||||
    size: "md",
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								src/component/table/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/component/table/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
import { Recordable } from "../../types";
 | 
			
		||||
@ -6,10 +6,10 @@ export default {
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
export interface LayTextareaProps {
 | 
			
		||||
  name?: string;
 | 
			
		||||
  modelValue?: string;
 | 
			
		||||
  placeholder?: string;
 | 
			
		||||
  disabled?: boolean;
 | 
			
		||||
    name?: string;
 | 
			
		||||
    modelValue?: string;
 | 
			
		||||
    placeholder?: string;
 | 
			
		||||
    disabled?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const props = defineProps<LayTextareaProps>();
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/textarea/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/textarea/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -7,13 +7,13 @@ export default {
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { useSlots } from "vue";
 | 
			
		||||
 | 
			
		||||
const slot = useSlots();
 | 
			
		||||
 | 
			
		||||
export interface LayTimelineItemProps {
 | 
			
		||||
  title: string;
 | 
			
		||||
  simple?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const slot = useSlots();
 | 
			
		||||
 | 
			
		||||
const props = defineProps<LayTimelineItemProps>();
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										0
									
								
								src/component/timelineItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/component/timelineItem/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -9,14 +9,14 @@ import "./index.less";
 | 
			
		||||
import { Ref, ref, useSlots, watch } from "vue";
 | 
			
		||||
import { Recordable } from "../../types";
 | 
			
		||||
 | 
			
		||||
const slot = useSlots();
 | 
			
		||||
 | 
			
		||||
export interface LayTransferProps {
 | 
			
		||||
  id?: string;
 | 
			
		||||
  title?: string[];
 | 
			
		||||
  dataSource: Recordable[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const slot = useSlots();
 | 
			
		||||
 | 
			
		||||
const props = withDefaults(defineProps<LayTransferProps>(), {
 | 
			
		||||
  id: "id",
 | 
			
		||||
  title: () => ["主列表", "副列表"],
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								src/component/transfer/interface.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								src/component/transfer/interface.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
			
		||||
import { Recordable } from "../../types";
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user