ckl1 пре 1 година
родитељ
комит
ea9a934104
7 измењених фајлова са 127 додато и 36 уклоњено
  1. 8 0
      .vitepress/config.js
  2. 0 33
      __unconfig_vite.config.ts
  3. 74 0
      components/avatars.md
  4. 37 0
      components/i-agree.md
  5. 2 1
      components/table.md
  6. 1 1
      group/group.md
  7. 5 1
      guide/fqa.md

+ 8 - 0
.vitepress/config.js

@@ -310,6 +310,14 @@ function createSidebar() {
             text: '视频播放器组件(2.5.0+)',
             link: '/components/video-player',
           },
+          {
+            text: '头像列表组件(2.7.0+)',
+            link: '/components/avatars',
+          },
+          {
+            text: '我同意组件(2.7.0+)',
+            link: '/components/i-agree',
+          },
         ],
       },
       {

+ 0 - 33
__unconfig_vite.config.ts

@@ -1,33 +0,0 @@
-
-let __unconfig_data;
-let __unconfig_stub = function (data = {}) { __unconfig_data = data };
-__unconfig_stub.default = (data = {}) => { __unconfig_data = data };
-import { UserConfig } from 'vite';
-import WindiCSS from 'vite-plugin-windicss';
-import Icons, { ViteIconsResolver } from 'vite-plugin-icons';
-import Components from 'vite-plugin-components';
-
-const config: UserConfig = {
-  optimizeDeps: {
-    exclude: ['vue-demi', '@vueuse/shared', '@vueuse/core'],
-  },
-  plugins: [
-    Components({
-      dirs: ['.vitepress/theme/components'],
-      customLoaderMatcher: (id) => id.endsWith('.md'),
-      customComponentResolvers: [
-        ViteIconsResolver({
-          componentPrefix: '',
-        }),
-      ],
-    }),
-    Icons(),
-    WindiCSS({
-      preflight: false,
-    }),
-  ],
-};
-
-const __unconfig_default =  config;
-
-if (typeof __unconfig_default === "function") __unconfig_default(...[{"command":"serve","mode":"development"}]);export default __unconfig_data;

+ 74 - 0
components/avatars.md

@@ -0,0 +1,74 @@
+# Avatars 头像列表
+
+展示多个头像集合
+
+Avatars 组件位于 [src/components/Avatars](https://github.com/kailong321200875/vue-element-plus-admin/tree/master/src/components/Avatars) 内
+
+## 用法
+
+
+```vue
+<script lang="ts" setup>
+import { Avatars } from '@/components/Avatars'
+
+const data = ref<AvatarItem[]>([
+  {
+    name: 'Lily',
+    url: 'https://avatars.githubusercontent.com/u/3459374?v=4'
+  },
+  {
+    name: 'Amanda',
+    url: 'https://avatars.githubusercontent.com/u/3459375?v=4'
+  },
+  {
+    name: 'Daisy',
+    url: 'https://avatars.githubusercontent.com/u/3459376?v=4'
+  },
+  {
+    name: 'Olivia',
+    url: 'https://avatars.githubusercontent.com/u/3459377?v=4'
+  },
+  {
+    name: 'Tina',
+    url: 'https://avatars.githubusercontent.com/u/3459378?v=4'
+  },
+  {
+    name: 'Kitty',
+    url: 'https://avatars.githubusercontent.com/u/3459323?v=4'
+  },
+  {
+    name: 'Helen',
+    url: 'https://avatars.githubusercontent.com/u/3459324?v=4'
+  },
+  {
+    name: 'Sophia',
+    url: 'https://avatars.githubusercontent.com/u/3459325?v=4'
+  },
+  {
+    name: 'Wendy',
+    url: 'https://avatars.githubusercontent.com/u/3459326?v=4'
+  }
+])
+</script>
+
+<template>
+  <Avatars :data="data" />
+</template>
+
+```
+
+## Avatars 属性<span id="Avatars"></span>
+
+| 属性 | 说明 | 类型 | 可选值 | 默认值 |
+| ---- | ---- | ---- | ---- | ---- |
+| size | 头像尺寸 | `ComponentSize、number` | - | - |
+| max | 最大展示个数 | `number` | - | 5 |
+| data | 头像数据,[详见](#data) | `AvatarItem[]` | - | - |
+| showTooltip | 是否展示名称tip | `boolean` | - | true |
+
+### data<span id="data"></span>
+
+| 属性 | 说明 | 类型 | 可选值 | 默认值 |
+| ---- | ---- | ---- | ---- | ---- |
+| url | 头像图片地址 | `string` | - | - |
+| name | 名称,非必填 | `string` | - | - |

+ 37 - 0
components/i-agree.md

@@ -0,0 +1,37 @@
+# IAgree 我同意
+
+用于同意协议选项
+
+IAgree 组件位于 [src/components/IAgree](https://github.com/kailong321200875/vue-element-plus-admin/tree/master/src/components/IAgree) 内
+
+## 用法
+
+```vue
+<template>
+  <IAgree
+    :link="[
+      {
+        text: '《隐私政策》',
+        url: 'https://www.baidu.com'
+      }
+    ]"
+    text="我同意《隐私政策》"
+  />
+</template>
+
+```
+
+## Avatars 属性<span id="Avatars"></span>
+
+| 属性 | 说明 | 类型 | 可选值 | 默认值 |
+| ---- | ---- | ---- | ---- | ---- |
+| text | 文案 | `string` | - | - |
+| link | 需要跳转的高亮数据,[详见](#link) | `LinkItem[]` | - | - |
+
+### link<span id="link"></span>
+
+| 属性 | 说明 | 类型 | 可选值 | 默认值 |
+| ---- | ---- | ---- | ---- | ---- |
+| url | 跳转地址,非必填 | `string` | - | - |
+| text | 高亮文案 | `string` | - | - |
+| onClick | 点击高亮文案执行的方法,非必填 | `() => void` | - | - |

+ 2 - 1
components/table.md

@@ -246,7 +246,8 @@ const { tableRegister, tableState, tableMethods } = useTable(props: UseTableConf
 | headerAlign | 表头对齐方式 | `string` | `left`/`center`/`right` | left |
 | data | 表格数据 | `Recordable[]` | - | [] |
 | showAction | 是否显示表格操作 | `boolean` | - | false |
-| preview | 需要展示图片或者视频的字段 | `string[]` | - | - |
+| imagePreview | 需要展示图片的字段 | `string[]` | - | - |
+| videoPreview | 需要展示视频的字段 | `string[]` | - | - |
 | customContent | 是否自定义内容 | `boolean` | - | false |
 | cardBodyStyle | 卡片内容样式 | `CSSProperties` | - | - |
 | cardBodyClass | 卡片内容类名 | `string` | - | - |

+ 1 - 1
group/group.md

@@ -4,7 +4,7 @@
 
 ## 群二维码
 
-<img src = "https://github.com/kailong321200875/my-image/raw/master/WechatIMG429.jpg" />
+<img src = "https://github.com/kailong321200875/my-image/raw/master/WechatIMG435.jpg" />
 
 ## 我的二维码
 

+ 5 - 1
guide/fqa.md

@@ -79,4 +79,8 @@
 
 ## 添加新的 vue 文件后,编辑器类型报错
 
-这是 `Volar` 插件的问题,一般重启下编辑器即可生效。
+这是 `Volar` 插件的问题,一般重启下编辑器即可生效。
+
+## 如何启用非在线图标
+
+设置 VITE_USE_ONLINE_ICON=false ,可能在有的版本设置之后会无效,是因为有BUG,可以复制最新版本的 `uno.config.ts` 和 `Icon.vue` 的最新代码。