Ver código fonte

feat: 对接角色

王晓东 1 ano atrás
pai
commit
603ee8e1a0
100 arquivos alterados com 205 adições e 4951 exclusões
  1. 1 1
      .env.development
  2. 0 19
      .env.example
  3. 3 0
      .env.prod
  4. 1 1
      src/api/index.ts
  5. 30 5
      src/api/modules/anycallService.ts
  6. 0 0
      src/api/modules/cdn.ts
  7. 11 0
      src/api/modules/model.ts
  8. 6 3
      src/api/modules/user.ts
  9. 10 8
      src/components/Uploader/FileUploader.vue
  10. 85 0
      src/components/VoiceSelector.vue
  11. 1 0
      src/layouts/components/Topbar/Tabbar/index.vue
  12. 0 65
      src/router/modules/breadcrumb.example.ts
  13. 0 302
      src/router/modules/component.example.ts
  14. 0 37
      src/router/modules/external.link.example.ts
  15. 0 84
      src/router/modules/feature.example.ts
  16. 0 43
      src/router/modules/icon.example.ts
  17. 0 30
      src/router/modules/jsx.example.ts
  18. 0 85
      src/router/modules/keep.alive.example.ts
  19. 11 9
      src/router/modules/model.ts
  20. 0 69
      src/router/modules/multilevel.menu.example.ts
  21. 0 42
      src/router/modules/permission.example.ts
  22. 0 169
      src/router/modules/plugin.example.ts
  23. 1 0
      src/router/modules/recomendation.ts
  24. 0 30
      src/router/modules/tab.example.ts
  25. 12 34
      src/router/routes.ts
  26. 0 16
      src/service/api.js
  27. 0 13
      src/service/cdnService.js
  28. 0 16
      src/service/cdnapi.js
  29. 6 8
      src/store/modules/user.ts
  30. 0 1
      src/types/components.d.ts
  31. 1 1
      src/types/env.d.ts
  32. 11 0
      src/types/model.ts
  33. 1 1
      src/ui/components/FaImagePreview/preview.vue
  34. 11 6
      src/ui/components/FaImageUpload/index.vue
  35. 0 12
      src/views/breadcrumb_example/detail1.vue
  36. 0 12
      src/views/breadcrumb_example/detail2.vue
  37. 0 14
      src/views/breadcrumb_example/list1.vue
  38. 0 14
      src/views/breadcrumb_example/list2.vue
  39. 0 256
      src/views/component_basic_example/components/button.vue
  40. 0 76
      src/views/component_basic_example/components/checkbox.vue
  41. 0 54
      src/views/component_basic_example/components/icon.vue
  42. 0 44
      src/views/component_basic_example/components/input.vue
  43. 0 32
      src/views/component_basic_example/components/inputnumber.vue
  44. 0 73
      src/views/component_basic_example/components/link.vue
  45. 0 70
      src/views/component_basic_example/components/radio.vue
  46. 0 22
      src/views/component_basic_example/components/rate.vue
  47. 0 60
      src/views/component_basic_example/components/select.vue
  48. 0 52
      src/views/component_basic_example/components/slider.vue
  49. 0 24
      src/views/component_basic_example/components/switch.vue
  50. 0 63
      src/views/component_basic_example/index.vue
  51. 0 17
      src/views/component_built_in_example/avatar.vue
  52. 0 88
      src/views/component_built_in_example/button.vue
  53. 0 20
      src/views/component_built_in_example/card.vue
  54. 0 28
      src/views/component_built_in_example/checkbox.vue
  55. 0 40
      src/views/component_built_in_example/collapsible.vue
  56. 0 28
      src/views/component_built_in_example/contextmenu.vue
  57. 0 19
      src/views/component_built_in_example/divider.vue
  58. 0 116
      src/views/component_built_in_example/drawer.vue
  59. 0 29
      src/views/component_built_in_example/dropdown.vue
  60. 0 52
      src/views/component_built_in_example/fileupload.vue
  61. 0 28
      src/views/component_built_in_example/fixedactionbar.vue
  62. 0 36
      src/views/component_built_in_example/hovercard.vue
  63. 0 65
      src/views/component_built_in_example/imagepreview.vue
  64. 0 55
      src/views/component_built_in_example/imageupload.vue
  65. 0 17
      src/views/component_built_in_example/input.vue
  66. 0 16
      src/views/component_built_in_example/kbd.vue
  67. 0 244
      src/views/component_built_in_example/modal.vue
  68. 0 43
      src/views/component_built_in_example/notification.vue
  69. 0 20
      src/views/component_built_in_example/pageheader.vue
  70. 0 36
      src/views/component_built_in_example/pagemain.vue
  71. 0 20
      src/views/component_built_in_example/passwordstrength.vue
  72. 0 17
      src/views/component_built_in_example/pininput.vue
  73. 0 39
      src/views/component_built_in_example/popover.vue
  74. 0 13
      src/views/component_built_in_example/progress.vue
  75. 0 45
      src/views/component_built_in_example/scrollarea.vue
  76. 0 444
      src/views/component_built_in_example/searchbar.vue
  77. 0 24
      src/views/component_built_in_example/select.vue
  78. 0 20
      src/views/component_built_in_example/slider.vue
  79. 0 20
      src/views/component_built_in_example/switch.vue
  80. 0 33
      src/views/component_built_in_example/tabs.vue
  81. 0 17
      src/views/component_built_in_example/textarea.vue
  82. 0 83
      src/views/component_built_in_example/toast.vue
  83. 0 15
      src/views/component_built_in_example/tooltip.vue
  84. 0 37
      src/views/feature_example/leavetips.vue
  85. 0 27
      src/views/feature_example/menuswitch.vue
  86. 0 31
      src/views/feature_example/reload.vue
  87. 0 533
      src/views/feature_example/rules.vue
  88. 0 55
      src/views/feature_example/scroll.vue
  89. 0 137
      src/views/feature_example/table.autoheight.vue
  90. 0 67
      src/views/feature_example/vueuse.vue
  91. 0 34
      src/views/icon_example/iconify.vue
  92. 0 34
      src/views/icon_example/image.vue
  93. 0 25
      src/views/icon_example/svg.vue
  94. 3 3
      src/views/index.vue
  95. 0 25
      src/views/jsx_example/components/JsxComp/index.vue
  96. 0 94
      src/views/jsx_example/index.vue
  97. 0 16
      src/views/keep_alive_example/detail.vue
  98. 0 25
      src/views/keep_alive_example/nested/nested.vue
  99. 0 25
      src/views/keep_alive_example/nested/nested/nested.vue
  100. 0 20
      src/views/keep_alive_example/nested/nested/nested/index.vue

+ 1 - 1
.env.development

@@ -5,7 +5,7 @@ VITE_APP_TITLE = Anycall
 # 接口请求地址,会设置到 axios 的 baseURL 参数上
 VITE_APP_API_BASEURL = https://dev.nexthuman.cn/fara/api
 # 上传文件接口地址cdn
-VITE_APP_UPLOAD_BASEURL = https://dev.nexthuman.cn/zfilm/cdn
+VITE_APP_CDN_BASEURL = 	https://dev.nexthuman.cn/fara/cdn
 #VITE_PUBLIC_PATH = /admin/
 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
 VITE_APP_DEBUG_TOOL = false

+ 0 - 19
.env.example

@@ -1,19 +0,0 @@
-# 应用配置面板
-VITE_APP_SETTING = true
-# 页面标题
-VITE_APP_TITLE = Fantastic-admin 基础版
-# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = /
-# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
-VITE_APP_DEBUG_TOOL =
-# 是否禁用开发者工具,可防止被调试
-VITE_APP_DISABLE_DEVTOOL = true
-
-# 是否在打包时启用 Mock
-VITE_BUILD_MOCK = true
-# 是否在打包时生成 sourcemap
-VITE_BUILD_SOURCEMAP = false
-# 是否在打包时开启压缩,支持 gzip 和 brotli
-VITE_BUILD_COMPRESS = gzip,brotli
-# 是否在打包后生成存档,支持 zip 和 tar
-VITE_BUILD_ARCHIVE =

+ 3 - 0
.env.prod

@@ -5,6 +5,9 @@ VITE_APP_TITLE = Anycall
 VITE_BASE_URL = https://dev.nexthuman.cn
 # 接口请求地址,会设置到 axios 的 baseURL 参数上
 VITE_APP_API_BASEURL = 	https://dev.nexthuman.cn/fara/api
+# cdn
+VITE_APP_CDN_BASEURL = 	https://dev.nexthuman.cn/fara/cdn
+
 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
 VITE_APP_DEBUG_TOOL =
 # 是否禁用开发者工具,可防止被调试

+ 1 - 1
src/api/index.ts

@@ -26,7 +26,7 @@ const api = axios.create({
   headers: {
       Accept: 'application/json',
       'Content-Type': 'application/json',
-      'accessToken': 'rcOBHJ0Hb8h5xgM/CWtNd8RBhA6WS4OPyJcxrxk4xPZtzeh5PtRXVDA7Um0NZA6NQmnbnZgWB0nNPb8iCrneQj4badFveWLrFq4LrySto3pIo/Zg1dJubbwmu3Vr1LCbSYyVIFrrgt9PXiA85kb9g38FSG3KTSi3AEY/UgjLNLBtH2+91YXKEy2KRZV3v75f',
+      // 'accessToken': 'rcOBHJ0Hb8h5xgM/CWtNd8RBhA6WS4OPyJcxrxk4xPZtzeh5PtRXVDA7Um0NZA6NQmnbnZgWB0nNPb8iCrneQj4badFveWLrFq4LrySto3pIo/Zg1dJubbwmu3Vr1LCbSYyVIFrrgt9PXiA85kb9g38FSG3KTSi3AEY/UgjLNLBtH2+91YXKEy2KRZV3v75f',
   },
 })
 

+ 30 - 5
src/api/modules/anycallService.ts

@@ -17,16 +17,41 @@ export function anycallPage(params: {
 export function updateCallings(params: any){
   return request(`/anycall/updateCallings`, params)
 }
-export function updateTopFlag(params: any){
-  return request(`/anycall/updateTopFlag`, params)
+// 推荐
+export function updateTopFlag(params: {id: string, topFlag: boolean}){
+  return request(`/anycall/updateTopFlag`, {
+    cloneId: params.id,
+    topFlag: params.topFlag
+  })
 }
-export function voiceList(params: any){
+export function voiceList(params: {
+  page: number,
+  size: number,
+  gender?: number,
+  system?: boolean,
+}){
   return request<{
     total: number,
     content: TVoice[]
   }>(`/anycall/selectVoiceList`, params)
 }
-export function addRole(params: any){
+
+export type TRole = {
+  avatar: string;
+  photo: string;
+  clonedVoice: boolean;
+  clonedVoiceFileName: string;
+  description: string;
+  gender: number;
+  id?: string;
+  isCloning: boolean;
+  language: string;
+  name: string;
+  prompt: string;
+  voiceFileName: string;
+  voiceId: string;
+};
+export function createRole(params: TRole){
   return request(`/anycall/create`, params)
 }
 export function importZip(params: any){
@@ -34,7 +59,7 @@ export function importZip(params: any){
             headers: {
                 Accept: 'application/json',
                 'Content-Type': 'multipart/form-data;',
-                'accessToken': 'rcOBHJ0Hb8h5xgM/CWtNd8RBhA6WS4OPyJcxrxk4xPZtzeh5PtRXVDA7Um0NZA6NQmnbnZgWB0nNPb8iCrneQj4badFveWLrFq4LrySto3pIo/Zg1dJubbwmu3Vr1LCbSYyVIFrrgt9PXiA85kb9g38FSG3KTSi3AEY/UgjLNLBtH2+91YXKEy2KRZV3v75f',
+                // 'accessToken': 'rcOBHJ0Hb8h5xgM/CWtNd8RBhA6WS4OPyJcxrxk4xPZtzeh5PtRXVDA7Um0NZA6NQmnbnZgWB0nNPb8iCrneQj4badFveWLrFq4LrySto3pIo/Zg1dJubbwmu3Vr1LCbSYyVIFrrgt9PXiA85kb9g38FSG3KTSi3AEY/UgjLNLBtH2+91YXKEy2KRZV3v75f',
             }
         };
   return request(`/anycall/import`, params, config)

+ 0 - 0
src/api/modules/cdn.ts


+ 11 - 0
src/api/modules/model.ts

@@ -0,0 +1,11 @@
+import { request } from '@/api'
+import type { TModel } from '@/types/model'
+
+// 获取大模型列表
+export function fetchModel(){
+  return request<{
+    total: number,
+    content: TModel[]
+  }>(`/anycall/selectLLMModel`)
+}
+

+ 6 - 3
src/api/modules/user.ts

@@ -5,9 +5,12 @@ export default {
   login: (data: {
     account: string
     password: string
-  }) => api.post('user/login', data, {
-    baseURL: '/mock/',
-  }),
+  }) => {
+    return request<string>('/share/user/backPasswordLogin', {
+      account: data.account,
+      passWord: data.password
+    })
+  },
 
   // 获取权限
   permission: () => api.get('user/permission', {

+ 10 - 8
src/components/Uploader/FileUploader.vue

@@ -65,6 +65,15 @@ function handleProgress (evt: UploadProgressEvent, uploadFile: UploadFile, uploa
   console.log(evt, uploadFile, uploadFiles)
 }
 
+// 添加文件选择变化的处理
+function handleFileChange(file: UploadFile, fileList: UploadFiles) {
+  console.log(file, fileList)
+  // 当有新文件被选择时,清空现有列表,允许新文件上传
+  if (file.status === 'success') {
+    internalFileList.value = [];
+  }
+}
+
 
 </script>
 
@@ -73,20 +82,13 @@ function handleProgress (evt: UploadProgressEvent, uploadFile: UploadFile, uploa
     v-model:file-list="internalFileList"
     :action="`${BASE_URL}/anycall/import`"
     :show-file-list="false"
-    :headers="{
-      'accessToken': 'rcOBHJ0Hb8h5xgM/CWtNd8RBhA6WS4OPyJcxrxk4xPZtzeh5PtRXVDA7Um0NZA6NQmnbnZgWB0nNPb8iCrneQj4badFveWLrFq4LrySto3pIo/Zg1dJubbwmu3Vr1LCbSYyVIFrrgt9PXiA85kb9g38FSG3KTSi3AEY/UgjLNLBtH2+91YXKEy2KRZV3v75f'
-    }"
     :limit="1"
     @success="handleUploadSuccess"
     @progress="handleProgress"
+    @change="handleFileChange"
     @error="handleUploadError"
     :auto-upload="true"
   >
     <ElButton :loading="loading" type="primary" :icon="Upload">Import</ElButton>
   </ElUpload>
 </template>
-
-<!-- 可选:添加 scoped style -->
-<style scoped>
-/* .your-style { ... } */
-</style>

+ 85 - 0
src/components/VoiceSelector.vue

@@ -0,0 +1,85 @@
+<script setup lang="ts">
+import { voiceList } from '@/api/modules/anycallService'
+import type { TVoice } from '@/types/voice'
+
+// 定义组件属性
+interface Props {
+  modelValue?: string
+  disabled?: boolean
+  placeholder?: string
+  style?: string | object
+  className?: string
+}
+
+// 定义组件事件
+interface Emits {
+  (e: 'update:modelValue', value: string | undefined): void
+}
+
+// 设置默认属性
+const props = withDefaults(defineProps<Props>(), {
+  disabled: false,
+  placeholder: '请选择音色',
+  style: 'width: 140px;'
+})
+
+// 定义事件触发器
+const emit = defineEmits<Emits>()
+
+// 创建本地响应式变量用于v-model绑定
+const localValue = ref(props.modelValue)
+
+// 监听props中的modelValue变化,同步到本地变量
+watch(
+  () => props.modelValue,
+  (newValue) => {
+    localValue.value = newValue
+  },
+  { immediate: true }
+)
+
+// 音色选项数据
+const options = ref<Array<{value: string, name: string}>>([])
+
+// 获取音色数据
+const fetchData = async () => {
+  try {
+    const params = {
+      page: 1,
+      size: 100, // 获取足够多的选项
+      system: true,
+      gender: 1
+    }
+    const res = await voiceList(params)
+    if (res.code === 0) {
+      // 将API返回的数据转换为select需要的格式
+      options.value = res.data.content.map((item: any) => ({
+        value: item.id,
+        name: item.name
+      }))
+    } else {
+      console.error('获取音色失败:', res.msg)
+    }
+  } catch (error) {
+    console.error('获取音色失败:', error)
+  }
+}
+
+// 组件挂载时获取数据
+onMounted(() => {
+  fetchData()
+})
+</script>
+
+<template>
+  <el-select
+    v-model="localValue"
+    :placeholder="placeholder"
+    :style="style"
+    :disabled="disabled"
+    :class="className"
+    @update:model-value="(value) => emit('update:modelValue', value)"
+  >
+    <el-option v-for="item in options" :key="item.value" :label="item.name" :value="item.value" />
+  </el-select>
+</template>

+ 1 - 0
src/layouts/components/Topbar/Tabbar/index.vue

@@ -31,6 +31,7 @@ watch(() => route, (val) => {
     tabbarStore.add(val)
     nextTick(() => {
       const index = tabbarStore.list.findIndex(item => item.tabId === activedTabId.value)
+      console.log(tabbarStore.list, activedTabId,3333)
       if (index !== -1) {
         const tabEl = tabRef.value?.find(item => Number.parseInt(item.dataset.index!) === index)
         const containerEl = tabsRef.value?.ref?.$el

+ 0 - 65
src/router/modules/breadcrumb.example.ts

@@ -1,65 +0,0 @@
-import type { RouteRecordRaw } from 'vue-router'
-
-function Layout() {
-  return import('@/layouts/index.vue')
-}
-
-const routes: RouteRecordRaw = {
-  path: '/breadcrumb_example',
-  component: Layout,
-  name: 'breadcrumbExample',
-  meta: {
-    title: '面包屑导航',
-    icon: 'i-ic:twotone-double-arrow',
-  },
-  children: [
-    {
-      path: 'list1',
-      name: 'breadcrumbExampleList1',
-      component: () => import('@/views/breadcrumb_example/list1.vue'),
-      meta: {
-        title: '列表1(平级模式)',
-      },
-    },
-    {
-      path: 'detail1',
-      name: 'breadcrumbExampleDetail1',
-      component: () => import('@/views/breadcrumb_example/detail1.vue'),
-      meta: {
-        title: '详情1',
-        menu: false,
-        activeMenu: '/breadcrumb_example/list1',
-      },
-    },
-    {
-      path: 'list2',
-      meta: {
-        title: '列表2(层级模式)',
-      },
-      children: [
-        {
-          path: '',
-          name: 'breadcrumbExampleList2',
-          component: () => import('@/views/breadcrumb_example/list2.vue'),
-          meta: {
-            title: '列表2(层级模式)',
-            menu: false,
-            breadcrumb: false,
-          },
-        },
-        {
-          path: 'detail2',
-          name: 'breadcrumbExampleDetail2',
-          component: () => import('@/views/breadcrumb_example/detail2.vue'),
-          meta: {
-            title: '详情2',
-            menu: false,
-            activeMenu: '/breadcrumb_example/list2',
-          },
-        },
-      ],
-    },
-  ],
-}
-
-export default routes

+ 0 - 302
src/router/modules/component.example.ts

@@ -1,302 +0,0 @@
-import type { RouteRecordRaw } from 'vue-router'
-
-function Layout() {
-  return import('@/layouts/index.vue')
-}
-
-const routes: RouteRecordRaw = {
-  path: '/component_example',
-  component: Layout,
-  name: 'componentExample',
-  meta: {
-    title: '组件',
-    icon: 'i-bx:bxs-component',
-  },
-  children: [
-    {
-      path: 'basic',
-      name: 'componentExampleBasic',
-      component: () => import('@/views/component_basic_example/index.vue'),
-      meta: {
-        title: '基础组件',
-        icon: 'i-ep:element-plus',
-      },
-    },
-    {
-      path: 'builtIn',
-      name: 'componentExampleBuiltIn',
-      meta: {
-        title: '内建组件',
-      },
-      children: [
-        {
-          path: 'avatar',
-          name: 'componentExampleBuiltInAvatar',
-          component: () => import('@/views/component_built_in_example/avatar.vue'),
-          meta: {
-            title: '头像',
-          },
-        },
-        {
-          path: 'button',
-          name: 'componentExampleBuiltInButton',
-          component: () => import('@/views/component_built_in_example/button.vue'),
-          meta: {
-            title: '按钮',
-          },
-        },
-        {
-          path: 'card',
-          name: 'componentExampleBuiltInCard',
-          component: () => import('@/views/component_built_in_example/card.vue'),
-          meta: {
-            title: '卡片',
-          },
-        },
-        {
-          path: 'checkbox',
-          name: 'componentExampleBuiltInCheckbox',
-          component: () => import('@/views/component_built_in_example/checkbox.vue'),
-          meta: {
-            title: '复选框',
-          },
-        },
-        {
-          path: 'collapsible',
-          name: 'componentExampleBuiltInCollapsible',
-          component: () => import('@/views/component_built_in_example/collapsible.vue'),
-          meta: {
-            title: '折叠面板',
-          },
-        },
-        {
-          path: 'contextmenu',
-          name: 'componentExampleBuiltInContextMenu',
-          component: () => import('@/views/component_built_in_example/contextmenu.vue'),
-          meta: {
-            title: '右键菜单',
-          },
-        },
-        {
-          path: 'divider',
-          name: 'componentExampleBuiltInDivider',
-          component: () => import('@/views/component_built_in_example/divider.vue'),
-          meta: {
-            title: '分割线',
-          },
-        },
-        {
-          path: 'drawer',
-          name: 'componentExampleBuiltInDrawer',
-          component: () => import('@/views/component_built_in_example/drawer.vue'),
-          meta: {
-            title: '抽屉',
-          },
-        },
-        {
-          path: 'dropdown',
-          name: 'componentExampleBuiltInDropdown',
-          component: () => import('@/views/component_built_in_example/dropdown.vue'),
-          meta: {
-            title: '下拉菜单',
-          },
-        },
-        {
-          path: 'fileupload',
-          name: 'componentExampleBuiltInFileUpload',
-          component: () => import('@/views/component_built_in_example/fileupload.vue'),
-          meta: {
-            title: '文件上传',
-          },
-        },
-        {
-          path: 'fixedactionbar',
-          name: 'componentExampleBuiltInFixedactionbar',
-          component: () => import('@/views/component_built_in_example/fixedactionbar.vue'),
-          meta: {
-            title: '固定底部操作栏',
-            copyright: false,
-          },
-        },
-        {
-          path: 'hovercard',
-          name: 'componentExampleBuiltInHoverCard',
-          component: () => import('@/views/component_built_in_example/hovercard.vue'),
-          meta: {
-            title: '悬浮卡片',
-          },
-        },
-        {
-          path: 'imagepreview',
-          name: 'componentExampleBuiltInImagePreview',
-          component: () => import('@/views/component_built_in_example/imagepreview.vue'),
-          meta: {
-            title: '图片预览',
-          },
-        },
-        {
-          path: 'imageupload',
-          name: 'componentExampleBuiltInImageUpload',
-          component: () => import('@/views/component_built_in_example/imageupload.vue'),
-          meta: {
-            title: '图片上传',
-          },
-        },
-        {
-          path: 'input',
-          name: 'componentExampleBuiltInInput',
-          component: () => import('@/views/component_built_in_example/input.vue'),
-          meta: {
-            title: '输入框',
-          },
-        },
-        {
-          path: 'kbd',
-          name: 'componentExampleBuiltInKbd',
-          component: () => import('@/views/component_built_in_example/kbd.vue'),
-          meta: {
-            title: '键盘',
-          },
-        },
-        {
-          path: 'modal',
-          name: 'componentExampleBuiltInModal',
-          component: () => import('@/views/component_built_in_example/modal.vue'),
-          meta: {
-            title: '弹窗',
-          },
-        },
-        {
-          path: 'notification',
-          name: 'componentExampleBuiltInNotification',
-          component: () => import('@/views/component_built_in_example/notification.vue'),
-          meta: {
-            title: '通知',
-          },
-        },
-        {
-          path: 'pageheader',
-          name: 'componentExampleBuiltInPageheader',
-          component: () => import('@/views/component_built_in_example/pageheader.vue'),
-          meta: {
-            title: '页头',
-          },
-        },
-        {
-          path: 'pagemain',
-          name: 'componentExampleBuiltInPagemain',
-          component: () => import('@/views/component_built_in_example/pagemain.vue'),
-          meta: {
-            title: '内容块',
-          },
-        },
-        {
-          path: 'passwordstrength',
-          name: 'componentExampleBuiltInPasswordStrength',
-          component: () => import('@/views/component_built_in_example/passwordstrength.vue'),
-          meta: {
-            title: '密码强度',
-          },
-        },
-        {
-          path: 'pininput',
-          name: 'componentExampleBuiltInPinInput',
-          component: () => import('@/views/component_built_in_example/pininput.vue'),
-          meta: {
-            title: '数字输入框',
-          },
-        },
-        {
-          path: 'popover',
-          name: 'componentExampleBuiltInPopover',
-          component: () => import('@/views/component_built_in_example/popover.vue'),
-          meta: {
-            title: '浮动面板',
-          },
-        },
-        {
-          path: 'progress',
-          name: 'componentExampleBuiltInProgress',
-          component: () => import('@/views/component_built_in_example/progress.vue'),
-          meta: {
-            title: '进度条',
-          },
-        },
-        {
-          path: 'scrollarea',
-          name: 'componentExampleBuiltInScrollarea',
-          component: () => import('@/views/component_built_in_example/scrollarea.vue'),
-          meta: {
-            title: '滚动区域',
-          },
-        },
-        {
-          path: 'searchbar',
-          name: 'componentExampleBuiltInSearchbar',
-          component: () => import('@/views/component_built_in_example/searchbar.vue'),
-          meta: {
-            title: '搜索面板',
-          },
-        },
-        {
-          path: 'select',
-          name: 'componentExampleBuiltInSelect',
-          component: () => import('@/views/component_built_in_example/select.vue'),
-          meta: {
-            title: '选择器',
-          },
-        },
-        {
-          path: 'slider',
-          name: 'componentExampleBuiltInSlider',
-          component: () => import('@/views/component_built_in_example/slider.vue'),
-          meta: {
-            title: '滑块',
-          },
-        },
-        {
-          path: 'switch',
-          name: 'componentExampleBuiltInSwitch',
-          component: () => import('@/views/component_built_in_example/switch.vue'),
-          meta: {
-            title: '开关',
-          },
-        },
-        {
-          path: 'tabs',
-          name: 'componentExampleBuiltInTabs',
-          component: () => import('@/views/component_built_in_example/tabs.vue'),
-          meta: {
-            title: '标签页',
-          },
-        },
-        {
-          path: 'textarea',
-          name: 'componentExampleBuiltInTextarea',
-          component: () => import('@/views/component_built_in_example/textarea.vue'),
-          meta: {
-            title: '文本域',
-          },
-        },
-        {
-          path: 'toast',
-          name: 'componentExampleBuiltInToast',
-          component: () => import('@/views/component_built_in_example/toast.vue'),
-          meta: {
-            title: '轻提示',
-          },
-        },
-        {
-          path: 'tooltip',
-          name: 'componentExampleBuiltInTooltip',
-          component: () => import('@/views/component_built_in_example/tooltip.vue'),
-          meta: {
-            title: '文字提示',
-          },
-        },
-      ],
-    },
-  ],
-}
-
-export default routes

+ 0 - 37
src/router/modules/external.link.example.ts

@@ -1,37 +0,0 @@
-import type { RouteRecordRaw } from 'vue-router'
-
-function Layout() {
-  return import('@/layouts/index.vue')
-}
-
-const routes: RouteRecordRaw = {
-  path: '/link',
-  component: Layout,
-  name: 'externalLinkExample',
-  meta: {
-    title: '外链',
-    icon: 'i-ri:external-link-fill',
-  },
-  children: [
-    {
-      path: 'gitee',
-      redirect: '',
-      name: 'linkExampleWindowGitee',
-      meta: {
-        title: 'Gitee 仓库',
-        link: 'https://gitee.com/fantastic-admin/basic',
-      },
-    },
-    {
-      path: 'github',
-      redirect: '',
-      name: 'linkExampleWindowGithub',
-      meta: {
-        title: 'Github 仓库',
-        link: 'https://github.com/fantastic-admin/basic',
-      },
-    },
-  ],
-}
-
-export default routes

+ 0 - 84
src/router/modules/feature.example.ts

@@ -1,84 +0,0 @@
-import type { RouteRecordRaw } from 'vue-router'
-
-function Layout() {
-  return import('@/layouts/index.vue')
-}
-
-const routes: RouteRecordRaw = {
-  path: '/feature_example',
-  component: Layout,
-  name: 'featureExample',
-  meta: {
-    title: '功能',
-    icon: 'i-ic:twotone-auto-awesome',
-  },
-  children: [
-    {
-      path: 'vueuse',
-      name: 'featureExampleVueuse',
-      component: () => import('@/views/feature_example/vueuse.vue'),
-      meta: {
-        title: 'VueUse',
-        icon: 'i-logos:vueuse',
-      },
-    },
-    {
-      path: 'rules',
-      name: 'featureExampleRules',
-      component: () => import('@/views/feature_example/rules.vue'),
-      meta: {
-        title: '常用正则',
-        icon: 'i-mdi:regex',
-      },
-    },
-    {
-      path: 'tableautoheight',
-      name: 'featureExampleTableautoheight',
-      component: () => import('@/views/feature_example/table.autoheight.vue'),
-      meta: {
-        title: '表格高度自适应',
-        icon: 'i-tabler:arrow-autofit-height',
-      },
-    },
-    {
-      path: 'reload',
-      name: 'featureExampleReload',
-      component: () => import('@/views/feature_example/reload.vue'),
-      meta: {
-        title: '主页面刷新',
-        icon: 'i-iconoir:refresh-double',
-        cache: true,
-      },
-    },
-    {
-      path: 'menuswitch',
-      name: 'featureExampleMenuswitch',
-      component: () => import('@/views/feature_example/menuswitch.vue'),
-      meta: {
-        title: '主导航切换',
-        icon: 'i-charm:menu-hamburger',
-      },
-    },
-    {
-      path: 'leavetips',
-      name: 'featureExampleLeavetips',
-      component: () => import('@/views/feature_example/leavetips.vue'),
-      meta: {
-        title: '页面离开提醒',
-        icon: 'i-pepicons:leave',
-      },
-    },
-    {
-      path: 'scroll',
-      name: 'featureExampleScroll',
-      component: () => import('@/views/feature_example/scroll.vue'),
-      meta: {
-        title: '记录滚动位置',
-        icon: 'i-carbon:auto-scroll',
-        cache: true,
-      },
-    },
-  ],
-}
-
-export default routes

+ 0 - 43
src/router/modules/icon.example.ts

@@ -1,43 +0,0 @@
-import type { RouteRecordRaw } from 'vue-router'
-
-function Layout() {
-  return import('@/layouts/index.vue')
-}
-
-const routes: RouteRecordRaw = {
-  path: '/icon_example',
-  component: Layout,
-  name: 'iconExample',
-  meta: {
-    title: '扩展图标',
-    icon: 'i-ri:remixicon-line',
-  },
-  children: [
-    {
-      path: 'iconify',
-      name: 'iconExampleIconify',
-      component: () => import('@/views/icon_example/iconify.vue'),
-      meta: {
-        title: 'Iconify',
-      },
-    },
-    {
-      path: 'svg',
-      name: 'iconExampleSvg',
-      component: () => import('@/views/icon_example/svg.vue'),
-      meta: {
-        title: 'SVG Icon',
-      },
-    },
-    {
-      path: 'image',
-      name: 'iconExampleImage',
-      component: () => import('@/views/icon_example/image.vue'),
-      meta: {
-        title: 'Image Icon',
-      },
-    },
-  ],
-}
-
-export default routes

+ 0 - 30
src/router/modules/jsx.example.ts

@@ -1,30 +0,0 @@
-import type { RouteRecordRaw } from 'vue-router'
-
-function Layout() {
-  return import('@/layouts/index.vue')
-}
-
-const routes: RouteRecordRaw = {
-  path: '/jsx_example',
-  component: Layout,
-  name: 'jsxExample',
-  meta: {
-    title: 'JSX',
-    icon: 'i-file-icons:jsx',
-  },
-  children: [
-    {
-      path: '',
-      name: 'jsxExampleIndex',
-      component: () => import('@/views/jsx_example/index.vue'),
-      meta: {
-        title: 'JSX',
-        menu: false,
-        breadcrumb: false,
-        activeMenu: '/jsx_example',
-      },
-    },
-  ],
-}
-
-export default routes

+ 0 - 85
src/router/modules/keep.alive.example.ts

@@ -1,85 +0,0 @@
-import type { RouteRecordRaw } from 'vue-router'
-
-function Layout() {
-  return import('@/layouts/index.vue')
-}
-
-const routes: RouteRecordRaw = {
-  path: '/keep_alive_example',
-  component: Layout,
-  name: 'keepAliveExample',
-  meta: {
-    title: '页面缓存',
-    icon: 'i-cil:window-restore',
-  },
-  children: [
-    {
-      path: 'page',
-      name: 'keepAliveExamplePage',
-      component: () => import('@/views/keep_alive_example/page.vue'),
-      meta: {
-        title: '页面缓存',
-        breadcrumb: false,
-      },
-    },
-    {
-      path: 'detail',
-      name: 'keepAliveExampleDetail',
-      component: () => import('@/views/keep_alive_example/detail.vue'),
-      meta: {
-        title: '平级路由',
-        menu: false,
-        activeMenu: '/keep_alive_example/page',
-      },
-    },
-    {
-      path: 'nested',
-      meta: {
-        title: '嵌套路由',
-        menu: false,
-      },
-      children: [
-        {
-          path: 'detail',
-          name: 'keepAliveExampleNestedDetail',
-          component: () => import('@/views/keep_alive_example/detail.vue'),
-          meta: {
-            title: '嵌套路由',
-            activeMenu: '/keep_alive_example/page',
-          },
-        },
-      ],
-    },
-    {
-      path: 'nested1',
-      name: 'keepAliveExampleNested1',
-      component: () => import('@/views/keep_alive_example/nested/nested.vue'),
-      meta: {
-        title: '路由多级缓存1',
-      },
-      children: [
-        {
-          path: 'nested2',
-          name: 'keepAliveExampleNested2',
-          component: () => import('@/views/keep_alive_example/nested/nested/nested.vue'),
-          meta: {
-            title: '路由多级缓存1-1',
-          },
-          children: [
-            {
-              path: 'index',
-              name: 'keepAliveExampleNestedIndex',
-              component: () => import('@/views/keep_alive_example/nested/nested/nested/index.vue'),
-              meta: {
-                title: '路由多级缓存1-1-1',
-                cache: true,
-              },
-            },
-          ],
-        },
-      ],
-    },
-  ],
-}
-
-export default routes

+ 11 - 9
src/router/modules/mock.example.ts → src/router/modules/model.ts

@@ -1,3 +1,4 @@
+
 import type { RouteRecordRaw } from 'vue-router'
 
 function Layout() {
@@ -5,23 +6,24 @@ function Layout() {
 }
 
 const routes: RouteRecordRaw = {
-  path: '/mock_example',
+  path: '/model',
   component: Layout,
-  name: 'mockExample',
+  name: 'model',
   meta: {
-    title: 'Mock',
-    icon: 'i-ri:database-2-line',
+    title: '大模型',
+    icon: 'i-carbon:machine-learning-model',
+    singleMenu: true,
   },
   children: [
     {
       path: '',
-      name: 'mockExampleIndex',
-      component: () => import('@/views/mock_example/index.vue'),
+      name: 'modelList',
+      component: () => import('@/views/model/model-list/index.vue'),
       meta: {
-        title: 'Mock',
-        menu: false,
+        title: '大模列表',
         breadcrumb: false,
-        activeMenu: '/mock_example',
+        menu: false,
+        activeMenu: '/model',
       },
     },
   ],

+ 0 - 69
src/router/modules/multilevel.menu.example.ts

@@ -1,69 +0,0 @@
-import type { RouteRecordRaw } from 'vue-router'
-
-function Layout() {
-  return import('@/layouts/index.vue')
-}
-
-const routes: RouteRecordRaw = {
-  path: '/multilevel_menu_example',
-  component: Layout,
-  name: 'multilevelMenuExample',
-  meta: {
-    title: '多级导航',
-    icon: 'i-heroicons-solid:menu-alt-3',
-  },
-  children: [
-    {
-      path: 'page',
-      name: 'multilevelMenuExample1',
-      component: () => import('@/views/multilevel_menu_example/page.vue'),
-      meta: {
-        title: '导航1',
-      },
-    },
-    {
-      path: 'level2',
-      name: 'multilevelMenuExample2',
-      meta: {
-        title: '导航2',
-      },
-      children: [
-        {
-          path: 'page',
-          name: 'multilevelMenuExample2-1',
-          component: () => import('@/views/multilevel_menu_example/level2/page.vue'),
-          meta: {
-            title: '导航2-1',
-          },
-        },
-        {
-          path: 'level3',
-          name: 'multilevelMenuExample2-2',
-          meta: {
-            title: '导航2-2',
-          },
-          children: [
-            {
-              path: 'page1',
-              name: 'multilevelMenuExample2-2-1',
-              component: () => import('@/views/multilevel_menu_example/level2/level3/page1.vue'),
-              meta: {
-                title: '导航2-2-1',
-              },
-            },
-            {
-              path: 'page2',
-              name: 'multilevelMenuExample2-2-2',
-              component: () => import('@/views/multilevel_menu_example/level2/level3/page2.vue'),
-              meta: {
-                title: '导航2-2-2',
-              },
-            },
-          ],
-        },
-      ],
-    },
-  ],
-}
-
-export default routes

+ 0 - 42
src/router/modules/permission.example.ts

@@ -1,42 +0,0 @@
-import type { RouteRecordRaw } from 'vue-router'
-
-function Layout() {
-  return import('@/layouts/index.vue')
-}
-
-const routes: RouteRecordRaw = {
-  path: '/permission_example',
-  component: Layout,
-  name: 'permissionExample',
-  meta: {
-    title: '权限验证',
-    icon: 'i-ri:shield-keyhole-line',
-  },
-  children: [
-    {
-      path: '',
-      name: 'permissionExampleIndex',
-      component: () => import('@/views/permission_example/index.vue'),
-      meta: {
-        title: '权限验证',
-        menu: false,
-        breadcrumb: false,
-        activeMenu: '/permission_example',
-      },
-    },
-    {
-      path: 'test',
-      name: 'permissionExampleTest',
-      component: () => import('@/views/permission_example/test.vue'),
-      meta: {
-        title: '测试页面',
-        auth: ['permission.browse'],
-        menu: false,
-        breadcrumb: false,
-        activeMenu: '/permission_example',
-      },
-    },
-  ],
-}
-
-export default routes

+ 0 - 169
src/router/modules/plugin.example.ts

@@ -1,169 +0,0 @@
-import type { RouteRecordRaw } from 'vue-router'
-
-function Layout() {
-  return import('@/layouts/index.vue')
-}
-
-const routes: RouteRecordRaw = {
-  path: '/plugin_example',
-  component: Layout,
-  name: 'pluginExample',
-  meta: {
-    title: '插件',
-    icon: 'i-clarity:plugin-outline-alerted',
-  },
-  children: [
-    {
-      path: 'hooksplus',
-      name: 'pluginExampleHooksPlus',
-      component: () => import('@/views/plugin_example/hooks.plus.vue'),
-      meta: {
-        title: 'VueHooks Plus',
-        icon: 'https://inhiblabcore.github.io/docs/hooks/logo.svg',
-      },
-    },
-    {
-      path: 'qrcode',
-      name: 'pluginExampleQrcode',
-      component: () => import('@/views/plugin_example/qrcode.vue'),
-      meta: {
-        title: '二维码',
-        icon: 'i-material-symbols:qr-code',
-      },
-    },
-    {
-      path: 'print',
-      name: 'pluginExamplePrint',
-      component: () => import('@/views/plugin_example/print.vue'),
-      meta: {
-        title: '打印',
-        icon: 'i-ri:printer-line',
-      },
-    },
-    {
-      path: 'esign',
-      name: 'pluginExampleEsign',
-      component: () => import('@/views/plugin_example/esign.vue'),
-      meta: {
-        title: '电子签名',
-        icon: 'i-mdi:draw',
-      },
-    },
-    {
-      path: 'animation',
-      name: 'pluginExampleAnimation',
-      component: () => import('@/views/plugin_example/animation.vue'),
-      meta: {
-        title: '过渡动画',
-        icon: 'i-clarity:animation-line',
-      },
-    },
-    {
-      path: 'swiper',
-      name: 'pluginExampleSwiper',
-      component: () => import('@/views/plugin_example/swiper.vue'),
-      meta: {
-        title: '轮播动画',
-        icon: 'i-carbon:carousel-horizontal',
-      },
-    },
-    {
-      path: 'chart',
-      name: 'pluginExampleChart',
-      meta: {
-        title: '图表',
-        icon: 'i-ri:bar-chart-2-line',
-      },
-      children: [
-        {
-          path: 'echarts',
-          name: 'pluginExampleChartEcharts',
-          component: () => import('@/views/plugin_example/echarts.vue'),
-          meta: {
-            title: 'Echarts',
-          },
-        },
-        {
-          path: 'vchart',
-          name: 'pluginExampleChartVchart',
-          component: () => import('@/views/plugin_example/vchart.vue'),
-          meta: {
-            title: 'VChart',
-          },
-        },
-        {
-          path: 'g2plot',
-          name: 'pluginExampleChartG2plot',
-          component: () => import('@/views/plugin_example/g2plot.vue'),
-          meta: {
-            title: 'G2plot',
-          },
-        },
-        {
-          path: 'vue-data-ui',
-          name: 'pluginExampleChartVueDataUi',
-          component: () => import('@/views/plugin_example/vue-data-ui.vue'),
-          meta: {
-            title: 'VueDataUI',
-          },
-        },
-      ],
-    },
-    {
-      path: 'tinymce',
-      name: 'pluginExampleTinymce',
-      component: () => import('@/views/plugin_example/tinymce.vue'),
-      meta: {
-        title: 'TinyMCE 编辑器',
-        icon: 'i-file-icons:tinymce',
-      },
-    },
-    {
-      path: 'markdown',
-      name: 'pluginExampleMarkdown',
-      component: () => import('@/views/plugin_example/markdown.vue'),
-      meta: {
-        title: 'Markdown 编辑器',
-        icon: 'i-teenyicons:markdown-outline',
-      },
-    },
-    {
-      path: 'currencyinput',
-      name: 'pluginExampleCurrencyInput',
-      component: () => import('@/views/plugin_example/currency.input.vue'),
-      meta: {
-        title: '货币格式输入',
-        icon: 'i-ph:currency-cny-bold',
-      },
-    },
-    {
-      path: 'splitpanes',
-      name: 'pluginExampleSplitpanes',
-      component: () => import('@/views/plugin_example/splitpanes.vue'),
-      meta: {
-        title: '拆分面板',
-        icon: 'i-icon-park-outline:split-cells',
-      },
-    },
-    {
-      path: 'vxe-table',
-      name: 'pluginExampleVxeTable',
-      component: () => import('@/views/plugin_example/vxe-table.vue'),
-      meta: {
-        title: 'vxe-table',
-        icon: 'i-mdi:table-large',
-      },
-    },
-    {
-      path: 'cropper',
-      name: 'pluginExampleCropper',
-      component: () => import('@/views/plugin_example/cropper.vue'),
-      meta: {
-        title: '图片裁剪',
-        icon: 'i-mdi:crop',
-      },
-    },
-  ],
-}
-
-export default routes

+ 1 - 0
src/router/modules/recomendation.ts

@@ -24,6 +24,7 @@ const routes: RouteRecordRaw = {
         menu: false,
         breadcrumb: false,
         activeMenu: '/recomendation',
+        showTab: true,
       },
     },
   ],

+ 0 - 30
src/router/modules/tab.example.ts

@@ -1,30 +0,0 @@
-import type { RouteRecordRaw } from 'vue-router'
-
-function Layout() {
-  return import('@/layouts/index.vue')
-}
-
-const routes: RouteRecordRaw = {
-  path: '/tab_example',
-  component: Layout,
-  name: 'tabExample',
-  meta: {
-    title: '标签栏',
-    icon: 'i-ic:round-tab',
-  },
-  children: [
-    {
-      path: '',
-      name: 'tabExampleIndex',
-      component: () => import('@/views/tab_example/index.vue'),
-      meta: {
-        title: '标签栏演示',
-        menu: false,
-        breadcrumb: false,
-        activeMenu: '/tab_example',
-      },
-    },
-  ],
-}
-
-export default routes

+ 12 - 34
src/router/routes.ts

@@ -2,22 +2,11 @@ import type { Route } from '#/global'
 import type { RouteRecordRaw } from 'vue-router'
 import generatedRoutes from 'virtual:generated-pages'
 import { setupLayouts } from 'virtual:meta-layouts'
-import BreadcrumbExample from './modules/breadcrumb.example'
-import ComponentExample from './modules/component.example'
-import ExternalLinkExample from './modules/external.link.example'
-import FeatureExample from './modules/feature.example'
-import IconExample from './modules/icon.example'
-import JsxExample from './modules/jsx.example'
-import KeepAliveExample from './modules/keep.alive.example'
-import MockExample from './modules/mock.example'
-import MultilevelMenuExample from './modules/multilevel.menu.example'
-import PermissionExample from './modules/permission.example'
-import PluginExample from './modules/plugin.example'
-import TabExample from './modules/tab.example'
 
 import RoleManagement from './modules/role'
 import VoiceManagement from './modules/voice'
-import recomendation from './modules/recomendation'
+import Recomendation from './modules/recomendation'
+import Model from './modules/model'
 
 
 function Layout() {
@@ -86,29 +75,18 @@ const asyncRoutes: Route.recordMainRaw[] = [
     children: [
       RoleManagement,
       VoiceManagement,
-      recomendation,
+      Recomendation,
+    ],
+  },
+  {
+    meta: {
+      title: '大模型',
+      icon: 'i-hugeicons:brain-02',
+    },
+    children: [
+      Model,
     ],
   },
-  // {
-  //   meta: {
-  //     title: '演示',
-  //     icon: 'i-uim:box',
-  //   },
-  //   children: [
-  //     MultilevelMenuExample,
-  //     BreadcrumbExample,
-  //     KeepAliveExample,
-  //     TabExample,
-  //     ComponentExample,
-  //     IconExample,
-  //     FeatureExample,
-  //     PluginExample,
-  //     PermissionExample,
-  //     MockExample,
-  //     JsxExample,
-  //     ExternalLinkExample,
-  //   ],
-  // },
 ]
 
 const constantRoutesByFilesystem = generatedRoutes.filter((item) => {

+ 0 - 16
src/service/api.js

@@ -1,16 +0,0 @@
-import axios from 'axios'
-
-// 创建axios实例
-const service = axios.create({
-    baseURL: 'https://dev.nexthuman.cn/fara/api',
-    withCredentials: false, // 跨域请求时是否需要使用凭证
-    headers: {
-        Accept: 'application/json',
-        'Content-Type': 'application/json',
-        'accessToken': 'rcOBHJ0Hb8h5xgM/CWtNd8RBhA6WS4OPyJcxrxk4xPZtzeh5PtRXVDA7Um0NZA6NQmnbnZgWB0nNPb8iCrneQj4badFveWLrFq4LrySto3pIo/Zg1dJubbwmu3Vr1LCbSYyVIFrrgt9PXiA85kb9g38FSG3KTSi3AEY/UgjLNLBtH2+91YXKEy2KRZV3v75f',
-    },
-    // 超时
-    timeout: 10000
-})
-
-export default service

+ 0 - 13
src/service/cdnService.js

@@ -1,13 +0,0 @@
-import cdnService from "./cdnapi";
-import service from "./api"; // 导入配置好的 axios 实例
-
-// 定义所有用户相关的 API 请求函数
-export default {
-    upload(formData) {
-        return cdnService.post(`/cmn/upload`, formData);
-    },
-    uploadVoice(file) {
-        return cdnService.post(`/audio/upload`, file);
-    },
-};
-

+ 0 - 16
src/service/cdnapi.js

@@ -1,16 +0,0 @@
-import axios from 'axios'
-
-// 创建axios实例
-const cdnService = axios.create({
-    baseURL: 'https://dev.nexthuman.cn/fara/cdn',
-    withCredentials: false, // 跨域请求时是否需要使用凭证
-    headers: {
-        Accept: 'application/json',
-        'Content-Type': 'multipart/form-data;',
-        'accessToken': 'rcOBHJ0Hb8h5xgM/CWtNd8RBhA6WS4OPyJcxrxk4xPZtzeh5PtRXVDA7Um0NZA6NQmnbnZgWB0nNPb8iCrneQj4badFveWLrFq4LrySto3pIo/Zg1dJubbwmu3Vr1LCbSYyVIFrrgt9PXiA85kb9g38FSG3KTSi3AEY/UgjLNLBtH2+91YXKEy2KRZV3v75f',
-    },
-    // 超时
-    timeout: 10000
-})
-
-export default cdnService

+ 6 - 8
src/store/modules/user.ts

@@ -22,17 +22,15 @@ export const useUserStore = defineStore(
     })
 
     // 登录
-    async function login(data: {
+    async function login(params: {
       account: string
       password: string
     }) {
-      const res = await apiUser.login(data)
-      localStorage.setItem('account', res.data.account)
-      localStorage.setItem('token', res.data.token)
-      localStorage.setItem('avatar', res.data.avatar)
-      account.value = res.data.account
-      token.value = res.data.token
-      avatar.value = res.data.avatar
+      const {code, data} = await apiUser.login(params)
+      if(code === 0 ){
+        localStorage.setItem('token', data)
+        token.value = data
+      }
     }
 
     // 手动登出

+ 0 - 1
src/types/components.d.ts

@@ -30,7 +30,6 @@ declare module 'vue' {
     FaImageUpload: typeof import('./../ui/components/FaImageUpload/index.vue')['default']
     FaInput: typeof import('./../ui/components/FaInput/index.vue')['default']
     FaKbd: typeof import('./../ui/components/FaKbd/index.vue')['default']
-    FaMaskScrollContainer: typeof import('./../ui/components/FaMaskScrollContainer/index.vue')['default']
     FaModal: typeof import('./../ui/components/FaModal/index.vue')['default']
     FaNotAllowed: typeof import('./../ui/components/FaNotAllowed/index.vue')['default']
     FaNotification: typeof import('./../ui/components/FaNotification/index.vue')['default']

+ 1 - 1
src/types/env.d.ts

@@ -15,7 +15,7 @@ interface ImportMetaEnv {
   /**
    * 上传文件接口地址cdn
    */
-  readonly VITE_APP_UPLOAD_BASEURL: string
+  readonly VITE_APP_CDN_BASEURL: string
   /**
    * VITE_PUBLIC_PATH = /admin/
    * 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空

+ 11 - 0
src/types/model.ts

@@ -0,0 +1,11 @@
+// 智能体大模型
+export type TModel = {
+  id: string;
+  service: string;
+  name: string;
+  spaceId: string;
+  userId: string;
+  desc: string;
+  ctime: number;
+  customEdit: boolean;
+};

+ 1 - 1
src/ui/components/FaImagePreview/preview.vue

@@ -120,7 +120,7 @@ function handleAnimationEnd() {
 </script>
 
 <template>
-  <Dialog v-model:open="isOpen">
+  <Dialog v-model:open="isOpen" :z-index="9999">
     <DialogContent class="size-full" @animation-end="handleAnimationEnd">
       <div class="relative size-full flex-center" @wheel="handleWheel">
         <img

+ 11 - 6
src/ui/components/FaImageUpload/index.vue

@@ -6,7 +6,7 @@ import { useFaImagePreview } from '@/ui/components/FaImagePreview'
 import { cn } from '@/utils'
 
 const props = withDefaults(defineProps<{
-  action: string
+  action?: string
   method?: string
   headers?: Headers | Record<string, any>
   data?: Record<string, any>
@@ -106,7 +106,7 @@ function onSelectFile(e: Event) {
       headersObj = { ...props.headers }
     }
     return axios({
-      url: props.action,
+      url: props.action ?? `${import.meta.env.VITE_APP_API_BASEURL}/cmn/upload`,
       method: props.method,
       headers: headersObj,
       data: formData,
@@ -116,11 +116,16 @@ function onSelectFile(e: Event) {
         }
       },
     }).then(async (response) => {
-      const url = await props.afterUpload?.(response.data)
-      if (url) {
-        images.value.push(url)
+      console.log(response.data)
+      if(response.data.code === 0){
+        const url = response.data.data
+        // const url = await props.afterUpload?.(response.data.data)
+        if (url) {
+          images.value.push(url)
+        }
+        emits('onSuccess', response.data, file)
       }
-      emits('onSuccess', response.data, file)
+
     }).finally(() => {
       isUploading.value = false
       uploadProgress.value = 0

+ 0 - 12
src/views/breadcrumb_example/detail1.vue

@@ -1,12 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageMain>
-      注意看面包屑导航的变化
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 12
src/views/breadcrumb_example/detail2.vue

@@ -1,12 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageMain>
-      注意看面包屑导航的变化
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 14
src/views/breadcrumb_example/list1.vue

@@ -1,14 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <FaPageMain>
-    <RouterLink v-slot="{ navigate }" :to="{ name: 'breadcrumbExampleDetail1' }" custom>
-      <FaButton @click="navigate">
-        查看详情页
-      </FaButton>
-    </RouterLink>
-  </FaPageMain>
-</template>

+ 0 - 14
src/views/breadcrumb_example/list2.vue

@@ -1,14 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <FaPageMain>
-    <RouterLink v-slot="{ navigate }" :to="{ name: 'breadcrumbExampleDetail2' }" custom>
-      <FaButton @click="navigate">
-        查看详情页
-      </FaButton>
-    </RouterLink>
-  </FaPageMain>
-</template>

+ 0 - 256
src/views/component_basic_example/components/button.vue

@@ -1,256 +0,0 @@
-<template>
-  <div>
-    <ElDivider content-position="left">
-      基础用法
-    </ElDivider>
-    <ElRow>
-      <ElButton>默认按钮</ElButton>
-      <ElButton type="primary">
-        主要按钮
-      </ElButton>
-      <ElButton type="success">
-        成功按钮
-      </ElButton>
-      <ElButton type="info">
-        信息按钮
-      </ElButton>
-      <ElButton type="warning">
-        警告按钮
-      </ElButton>
-      <ElButton type="danger">
-        危险按钮
-      </ElButton>
-    </ElRow>
-    <ElRow>
-      <ElButton plain>
-        朴素按钮
-      </ElButton>
-      <ElButton type="primary" plain>
-        主要按钮
-      </ElButton>
-      <ElButton type="success" plain>
-        成功按钮
-      </ElButton>
-      <ElButton type="info" plain>
-        信息按钮
-      </ElButton>
-      <ElButton type="warning" plain>
-        警告按钮
-      </ElButton>
-      <ElButton type="danger" plain>
-        危险按钮
-      </ElButton>
-    </ElRow>
-    <ElRow>
-      <ElButton round>
-        圆角按钮
-      </ElButton>
-      <ElButton type="primary" round>
-        主要按钮
-      </ElButton>
-      <ElButton type="success" round>
-        成功按钮
-      </ElButton>
-      <ElButton type="info" round>
-        信息按钮
-      </ElButton>
-      <ElButton type="warning" round>
-        警告按钮
-      </ElButton>
-      <ElButton type="danger" round>
-        危险按钮
-      </ElButton>
-    </ElRow>
-    <ElRow>
-      <ElButton circle>
-        <template #icon>
-          <FaIcon name="i-ep:search" />
-        </template>
-      </ElButton>
-      <ElButton type="primary" circle>
-        <template #icon>
-          <FaIcon name="i-ep:edit" />
-        </template>
-      </ElButton>
-      <ElButton type="success" circle>
-        <template #icon>
-          <FaIcon name="i-ep:check" />
-        </template>
-      </ElButton>
-      <ElButton type="info" circle>
-        <template #icon>
-          <FaIcon name="i-ep:message" />
-        </template>
-      </ElButton>
-      <ElButton type="warning" circle>
-        <template #icon>
-          <FaIcon name="i-ep:star" />
-        </template>
-      </ElButton>
-      <ElButton type="danger" circle>
-        <template #icon>
-          <FaIcon name="i-ep:delete" />
-        </template>
-      </ElButton>
-    </ElRow>
-    <ElDivider content-position="left">
-      禁用状态
-    </ElDivider>
-    <ElRow>
-      <ElButton disabled>
-        默认按钮
-      </ElButton>
-      <ElButton type="primary" disabled>
-        主要按钮
-      </ElButton>
-      <ElButton type="success" disabled>
-        成功按钮
-      </ElButton>
-      <ElButton type="info" disabled>
-        信息按钮
-      </ElButton>
-      <ElButton type="warning" disabled>
-        警告按钮
-      </ElButton>
-      <ElButton type="danger" disabled>
-        危险按钮
-      </ElButton>
-    </ElRow>
-    <ElRow>
-      <ElButton plain disabled>
-        朴素按钮
-      </ElButton>
-      <ElButton type="primary" plain disabled>
-        主要按钮
-      </ElButton>
-      <ElButton type="success" plain disabled>
-        成功按钮
-      </ElButton>
-      <ElButton type="info" plain disabled>
-        信息按钮
-      </ElButton>
-      <ElButton type="warning" plain disabled>
-        警告按钮
-      </ElButton>
-      <ElButton type="danger" plain disabled>
-        危险按钮
-      </ElButton>
-    </ElRow>
-    <ElDivider content-position="left">
-      文字按钮
-    </ElDivider>
-    <ElButton text>
-      文字按钮
-    </ElButton>
-    <ElButton type="primary" text>
-      文字按钮
-    </ElButton>
-    <ElButton type="success" text>
-      文字按钮
-    </ElButton>
-    <ElButton type="info" text>
-      文字按钮
-    </ElButton>
-    <ElButton type="warning" text>
-      文字按钮
-    </ElButton>
-    <ElButton type="danger" text>
-      文字按钮
-    </ElButton>
-    <ElDivider content-position="left">
-      图标按钮
-    </ElDivider>
-    <ElButton type="primary">
-      <template #icon>
-        <FaIcon name="i-ep:edit" />
-      </template>
-    </ElButton>
-    <ElButton type="primary">
-      <template #icon>
-        <FaIcon name="i-ep:share" />
-      </template>
-    </ElButton>
-    <ElButton type="primary">
-      <template #icon>
-        <FaIcon name="i-ep:delete" />
-      </template>
-    </ElButton>
-    <ElButton type="primary">
-      <template #icon>
-        <FaIcon name="i-ep:search" />
-      </template>
-      搜索
-    </ElButton>
-    <ElButton type="primary">
-      上传
-      <FaIcon name="i-ep:upload" class="el-icon--right" />
-    </ElButton>
-    <ElDivider content-position="left">
-      按钮组
-    </ElDivider>
-    <ElButtonGroup style="margin-inline-end: 10px;">
-      <ElButton type="primary">
-        <FaIcon name="i-ep:arrow-left" class="el-icon--left" />
-        上一页
-      </ElButton>
-      <ElButton type="primary">
-        下一页
-        <FaIcon name="i-ep:arrow-right" class="el-icon--right" />
-      </ElButton>
-    </ElButtonGroup>
-    <ElButtonGroup>
-      <ElButton type="primary">
-        <template #icon>
-          <FaIcon name="i-ep:edit" />
-        </template>
-      </ElButton>
-      <ElButton type="primary">
-        <template #icon>
-          <FaIcon name="i-ep:share" />
-        </template>
-      </ElButton>
-      <ElButton type="primary">
-        <template #icon>
-          <FaIcon name="i-ep:delete" />
-        </template>
-      </ElButton>
-    </ElButtonGroup>
-    <ElDivider content-position="left">
-      加载中
-    </ElDivider>
-    <ElButton type="primary" :loading="true">
-      加载中
-    </ElButton>
-    <ElDivider content-position="left">
-      不同尺寸
-    </ElDivider>
-    <div style="margin-bottom: 10px;">
-      <ElButton size="large">
-        大号按钮
-      </ElButton>
-      <ElButton size="default">
-        默认按钮
-      </ElButton>
-      <ElButton size="small">
-        小号按钮
-      </ElButton>
-    </div>
-    <div>
-      <ElButton size="large" round>
-        大号按钮
-      </ElButton>
-      <ElButton size="default" round>
-        默认按钮
-      </ElButton>
-      <ElButton size="small" round>
-        小号按钮
-      </ElButton>
-    </div>
-  </div>
-</template>
-
-<style scoped>
-.el-row {
-  margin-bottom: 20px;
-}
-</style>

+ 0 - 76
src/views/component_basic_example/components/checkbox.vue

@@ -1,76 +0,0 @@
-<script setup lang="ts">
-const checked = ref(true)
-const checked1 = ref(false)
-const checked2 = ref(true)
-const checkList = ref(['选中且禁用', '复选框 A'])
-const checkedCities = ref(['上海', '北京'])
-const cities = ref(['上海', '北京', '广州', '深圳'])
-const checkboxGroup1 = ref(['上海'])
-const checked3 = ref(true)
-const checked4 = ref(false)
-</script>
-
-<template>
-  <div>
-    <ElDivider content-position="left">
-      基础用法
-    </ElDivider>
-    <ElCheckbox v-model="checked">
-      备选项
-    </ElCheckbox>
-    <ElDivider content-position="left">
-      禁用状态
-    </ElDivider>
-    <ElCheckbox v-model="checked1" disabled>
-      备选项1
-    </ElCheckbox>
-    <ElCheckbox v-model="checked2" disabled>
-      备选项
-    </ElCheckbox>
-    <ElDivider content-position="left">
-      多选框组
-    </ElDivider>
-    <ElCheckboxGroup v-model="checkList">
-      <ElCheckbox value="复选框 A">
-        复选框 A
-      </ElCheckbox>
-      <ElCheckbox value="复选框 B">
-        复选框 B
-      </ElCheckbox>
-      <ElCheckbox value="复选框 C">
-        复选框 C
-      </ElCheckbox>
-      <ElCheckbox value="禁用" disabled>
-        禁用
-      </ElCheckbox>
-      <ElCheckbox value="选中且禁用" disabled>
-        选中且禁用
-      </ElCheckbox>
-    </ElCheckboxGroup>
-    <ElDivider content-position="left">
-      可选项目数量的限制
-    </ElDivider>
-    <ElCheckboxGroup v-model="checkedCities" :min="1" :max="2">
-      <ElCheckbox v-for="city in cities" :key="city" :value="city">
-        {{ city }}
-      </ElCheckbox>
-    </ElCheckboxGroup>
-    <ElDivider content-position="left">
-      按钮样式
-    </ElDivider>
-    <ElCheckboxGroup v-model="checkboxGroup1">
-      <ElCheckboxButton v-for="city in cities" :key="city" :value="city">
-        {{ city }}
-      </ElCheckboxButton>
-    </ElCheckboxGroup>
-    <ElDivider content-position="left">
-      带有边框
-    </ElDivider>
-    <ElCheckbox v-model="checked3" value="备选项1" border>
-      备选项1
-    </ElCheckbox>
-    <ElCheckbox v-model="checked4" value="备选项2" border>
-      备选项2
-    </ElCheckbox>
-  </div>
-</template>

+ 0 - 54
src/views/component_basic_example/components/icon.vue

@@ -1,54 +0,0 @@
-<script setup lang="ts">
-import { icons } from '@/iconify'
-
-const icon = icons.filter(item => item.prefix === 'ep')[0]
-</script>
-
-<template>
-  <div>
-    <div class="demo">
-      <FaIcon name="i-ep:edit" />
-      <FaIcon name="i-ep:share" />
-      <FaIcon name="i-ep:delete" />
-      <ElButton type="primary">
-        <template #icon>
-          <FaIcon name="i-ep:search" />
-        </template>
-        搜索
-      </ElButton>
-    </div>
-    <ElDivider content-position="left">
-      图标集合
-    </ElDivider>
-    <div v-for="(item, index) in icon.icons" :key="index" class="list-icon">
-      <ElTooltip class="item" effect="dark" :content="`ep:${item}`" placement="top">
-        <FaIcon :name="`ep:${item}`" />
-      </ElTooltip>
-    </div>
-  </div>
-</template>
-
-<style scoped>
-.demo {
-  > i {
-    margin: 0 20px;
-    font-size: 1.5em;
-    vertical-align: middle;
-    color: #606266;
-  }
-
-  button {
-    margin: 0 20px;
-  }
-}
-
-.list-icon {
-  display: inline-block;
-  margin: 10px;
-
-  i {
-    font-size: 32px;
-    color: #606266;
-  }
-}
-</style>

+ 0 - 44
src/views/component_basic_example/components/input.vue

@@ -1,44 +0,0 @@
-<script setup lang="ts">
-const input = ref('')
-const input1 = ref('')
-const input2 = ref('')
-const textarea = ref('')
-</script>
-
-<template>
-  <div>
-    <ElDivider content-position="left">
-      基础用法
-    </ElDivider>
-    <ElInput v-model="input" placeholder="请输入内容" />
-    <ElDivider content-position="left">
-      禁用状态
-    </ElDivider>
-    <ElInput v-model="input" placeholder="请输入内容" :disabled="true" />
-    <ElDivider content-position="left">
-      可清空
-    </ElDivider>
-    <ElInput v-model="input" placeholder="请输入内容" clearable />
-    <ElDivider content-position="left">
-      密码框
-    </ElDivider>
-    <ElInput v-model="input" placeholder="请输入内容" show-password />
-    <ElDivider content-position="left">
-      带 icon 的输入框
-    </ElDivider>
-    <ElInput v-model="input1" placeholder="请选择日期">
-      <template #suffix>
-        <FaIcon name="i-ep:calendar" />
-      </template>
-    </ElInput>
-    <ElInput v-model="input2" placeholder="请输入内容">
-      <template #prefix>
-        <FaIcon name="i-ep:search" />
-      </template>
-    </ElInput>
-    <ElDivider content-position="left">
-      文本域
-    </ElDivider>
-    <ElInput v-model="textarea" type="textarea" :rows="2" placeholder="请输入内容" />
-  </div>
-</template>

+ 0 - 32
src/views/component_basic_example/components/inputnumber.vue

@@ -1,32 +0,0 @@
-<script setup lang="ts">
-const num = ref(1)
-const num2 = ref(1)
-const num3 = ref(5)
-const num4 = ref(1)
-const num5 = ref(1)
-</script>
-
-<template>
-  <div>
-    <ElDivider content-position="left">
-      基础用法
-    </ElDivider>
-    <ElInputNumber v-model="num" :min="1" :max="10" label="描述文字" />
-    <ElDivider content-position="left">
-      禁用状态
-    </ElDivider>
-    <ElInputNumber v-model="num2" :disabled="true" />
-    <ElDivider content-position="left">
-      步数
-    </ElDivider>
-    <ElInputNumber v-model="num3" :step="2" />
-    <ElDivider content-position="left">
-      精度
-    </ElDivider>
-    <ElInputNumber v-model="num4" :precision="2" :step="0.1" :max="10" />
-    <ElDivider content-position="left">
-      按钮位置
-    </ElDivider>
-    <ElInputNumber v-model="num5" controls-position="right" :min="1" :max="10" />
-  </div>
-</template>

+ 0 - 73
src/views/component_basic_example/components/link.vue

@@ -1,73 +0,0 @@
-<template>
-  <div>
-    <ElDivider content-position="left">
-      基础用法
-    </ElDivider>
-    <ElLink href="https://element.eleme.io" target="_blank">
-      默认链接
-    </ElLink>
-    <ElLink type="primary">
-      主要链接
-    </ElLink>
-    <ElLink type="success">
-      成功链接
-    </ElLink>
-    <ElLink type="warning">
-      警告链接
-    </ElLink>
-    <ElLink type="danger">
-      危险链接
-    </ElLink>
-    <ElLink type="info">
-      信息链接
-    </ElLink>
-    <ElDivider content-position="left">
-      禁用状态
-    </ElDivider>
-    <ElLink disabled>
-      默认链接
-    </ElLink>
-    <ElLink type="primary" disabled>
-      主要链接
-    </ElLink>
-    <ElLink type="success" disabled>
-      成功链接
-    </ElLink>
-    <ElLink type="warning" disabled>
-      警告链接
-    </ElLink>
-    <ElLink type="danger" disabled>
-      危险链接
-    </ElLink>
-    <ElLink type="info" disabled>
-      信息链接
-    </ElLink>
-    <ElDivider content-position="left">
-      下划线
-    </ElDivider>
-    <ElLink underline="always">
-      始终有划线
-    </ElLink>
-    <ElLink underline="never">
-      无下划线
-    </ElLink>
-    <ElLink>悬停有下划线</ElLink>
-    <ElDivider content-position="left">
-      图标
-    </ElDivider>
-    <ElLink>
-      <FaIcon name="i-ep:edit" class="el-icon--left" />
-      编辑
-    </ElLink>
-    <ElLink>
-      查看
-      <FaIcon name="i-ep:view" class="el-icon--right" />
-    </ElLink>
-  </div>
-</template>
-
-<style scoped>
-.el-link {
-  margin: 0 5px;
-}
-</style>

+ 0 - 70
src/views/component_basic_example/components/radio.vue

@@ -1,70 +0,0 @@
-<script setup lang="ts">
-const radio = ref('1')
-const radio2 = ref('选中且禁用')
-const radio3 = ref(3)
-const radio4 = ref('上海')
-const radio5 = ref('1')
-</script>
-
-<template>
-  <div>
-    <ElDivider content-position="left">
-      基础用法
-    </ElDivider>
-    <ElRadio v-model="radio" value="1">
-      备选项
-    </ElRadio>
-    <ElRadio v-model="radio" value="2">
-      备选项
-    </ElRadio>
-    <ElDivider content-position="left">
-      禁用状态
-    </ElDivider>
-    <ElRadio v-model="radio2" disabled value="禁用">
-      备选项
-    </ElRadio>
-    <ElRadio v-model="radio2" disabled value="选中且禁用">
-      备选项
-    </ElRadio>
-    <ElDivider content-position="left">
-      单选框组
-    </ElDivider>
-    <ElRadioGroup v-model="radio3">
-      <ElRadio :value="3">
-        备选项
-      </ElRadio>
-      <ElRadio :value="6">
-        备选项
-      </ElRadio>
-      <ElRadio :value="9">
-        备选项
-      </ElRadio>
-    </ElRadioGroup>
-    <ElDivider content-position="left">
-      按钮样式
-    </ElDivider>
-    <ElRadioGroup v-model="radio4">
-      <ElRadioButton value="上海">
-        上海
-      </ElRadioButton>
-      <ElRadioButton value="北京">
-        北京
-      </ElRadioButton>
-      <ElRadioButton value="广州">
-        广州
-      </ElRadioButton>
-      <ElRadioButton value="深圳">
-        深圳
-      </ElRadioButton>
-    </ElRadioGroup>
-    <ElDivider content-position="left">
-      带有边框
-    </ElDivider>
-    <ElRadio v-model="radio5" value="1" border>
-      备选项1
-    </ElRadio>
-    <ElRadio v-model="radio5" value="2" border>
-      备选项2
-    </ElRadio>
-  </div>
-</template>

+ 0 - 22
src/views/component_basic_example/components/rate.vue

@@ -1,22 +0,0 @@
-<script setup lang="ts">
-const value1 = ref()
-const value2 = ref()
-const value3 = ref(3.7)
-</script>
-
-<template>
-  <div>
-    <ElDivider content-position="left">
-      基础用法
-    </ElDivider>
-    <ElRate v-model="value1" />
-    <ElDivider content-position="left">
-      辅助文字
-    </ElDivider>
-    <ElRate v-model="value2" show-text :texts="['极差', '差', '一般', '好', '极好']" />
-    <ElDivider content-position="left">
-      只读
-    </ElDivider>
-    <ElRate v-model="value3" disabled show-score text-color="#ff9900" score-template="{value}" />
-  </div>
-</template>

+ 0 - 60
src/views/component_basic_example/components/select.vue

@@ -1,60 +0,0 @@
-<script setup lang="ts">
-const options1 = ref([
-  { value: '选项1', label: '黄金糕' },
-  { value: '选项2', label: '双皮奶' },
-  { value: '选项3', label: '蚵仔煎' },
-  { value: '选项4', label: '龙须面' },
-  { value: '选项5', label: '北京烤鸭' },
-])
-const value1 = ref('')
-const options2 = ref([
-  { value: '选项1', label: '黄金糕' },
-  { value: '选项2', label: '双皮奶', disabled: true },
-  { value: '选项3', label: '蚵仔煎' },
-  { value: '选项4', label: '龙须面' },
-  { value: '选项5', label: '北京烤鸭' },
-])
-const value2 = ref('')
-const value3 = ref([])
-</script>
-
-<template>
-  <div>
-    <ElDivider content-position="left">
-      基础用法
-    </ElDivider>
-    <ElSelect v-model="value1" placeholder="请选择">
-      <ElOption v-for="item in options1" :key="item.value" :label="item.label" :value="item.value" />
-    </ElSelect>
-    <ElDivider content-position="left">
-      有禁用选项
-    </ElDivider>
-    <ElSelect v-model="value2" placeholder="请选择">
-      <ElOption v-for="item in options2" :key="item.value" :label="item.label" :value="item.value" />
-    </ElSelect>
-    <ElDivider content-position="left">
-      禁用状态
-    </ElDivider>
-    <ElSelect v-model="value1" disabled placeholder="请选择">
-      <ElOption v-for="item in options1" :key="item.value" :label="item.label" :value="item.value" />
-    </ElSelect>
-    <ElDivider content-position="left">
-      可清空单选
-    </ElDivider>
-    <ElSelect v-model="value1" clearable placeholder="请选择">
-      <ElOption v-for="item in options1" :key="item.value" :label="item.label" :value="item.value" />
-    </ElSelect>
-    <ElDivider content-position="left">
-      基础多选
-    </ElDivider>
-    <ElSelect v-model="value3" multiple placeholder="请选择">
-      <ElOption v-for="item in options1" :key="item.value" :label="item.label" :value="item.value" />
-    </ElSelect>
-    <ElDivider content-position="left">
-      可搜索
-    </ElDivider>
-    <ElSelect v-model="value1" filterable placeholder="请选择">
-      <ElOption v-for="item in options1" :key="item.value" :label="item.label" :value="item.value" />
-    </ElSelect>
-  </div>
-</template>

+ 0 - 52
src/views/component_basic_example/components/slider.vue

@@ -1,52 +0,0 @@
-<script setup lang="ts">
-const value1 = ref(0)
-const value2 = ref(50)
-const value3 = ref(36)
-const value4 = ref(48)
-const value5 = ref(42)
-const value6 = ref(0)
-const value7 = ref(0)
-const value8 = ref([4, 8])
-const value9 = ref(0)
-
-function formatTooltip(val: number) {
-  return val / 100
-}
-</script>
-
-<template>
-  <div>
-    <ElDivider content-position="left">
-      基础用法
-    </ElDivider>
-    <span>默认</span>
-    <ElSlider v-model="value1" />
-    <span>自定义初始值</span>
-    <ElSlider v-model="value2" />
-    <span>隐藏 Tooltip</span>
-    <ElSlider v-model="value3" :show-tooltip="false" />
-    <span>格式化 Tooltip</span>
-    <ElSlider v-model="value4" :format-tooltip="formatTooltip" />
-    <span>禁用</span>
-    <ElSlider v-model="value5" disabled />
-    <ElDivider content-position="left">
-      离散值
-    </ElDivider>
-    <span>不显示间断点</span>
-    <ElSlider v-model="value6" :step="10" />
-    <span>显示间断点</span>
-    <ElSlider v-model="value6" :step="10" show-stops />
-    <ElDivider content-position="left">
-      带有输入框
-    </ElDivider>
-    <ElSlider v-model="value7" show-input />
-    <ElDivider content-position="left">
-      范围选择
-    </ElDivider>
-    <ElSlider v-model="value8" show-stops range :max="10" />
-    <ElDivider content-position="left">
-      竖向模式
-    </ElDivider>
-    <ElSlider v-model="value9" vertical height="200px" />
-  </div>
-</template>

+ 0 - 24
src/views/component_basic_example/components/switch.vue

@@ -1,24 +0,0 @@
-<script setup lang="ts">
-const value = ref(true)
-const value1 = ref(true)
-const value2 = ref(true)
-const value3 = ref(false)
-</script>
-
-<template>
-  <div>
-    <ElDivider content-position="left">
-      基础用法
-    </ElDivider>
-    <ElSwitch v-model="value" active-color="#13ce66" inactive-color="#ff4949" />
-    <ElDivider content-position="left">
-      文字描述
-    </ElDivider>
-    <ElSwitch v-model="value1" active-text="按月付费" inactive-text="按年付费" />
-    <ElDivider content-position="left">
-      禁用状态
-    </ElDivider>
-    <ElSwitch v-model="value2" disabled style="margin-inline-end: 10px;" />
-    <ElSwitch v-model="value3" disabled />
-  </div>
-</template>

+ 0 - 63
src/views/component_basic_example/index.vue

@@ -1,63 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-import eventBus from '@/utils/eventBus'
-import Button from './components/button.vue'
-import Checkbox from './components/checkbox.vue'
-import Icon from './components/icon.vue'
-import Input from './components/input.vue'
-import InputNumber from './components/inputnumber.vue'
-import Link from './components/link.vue'
-import Radio from './components/radio.vue'
-import Rate from './components/rate.vue'
-import Select from './components/select.vue'
-import Slider from './components/slider.vue'
-import Switch from './components/switch.vue'
-
-const components = {
-  图标: Icon,
-  按钮: Button,
-  文字链接: Link,
-  单选框: Radio,
-  多选框: Checkbox,
-  输入框: Input,
-  数字输入框: InputNumber,
-  选择器: Select,
-  开关: Switch,
-  滑块: Slider,
-  评分: Rate,
-}
-
-function open(url: string) {
-  window.open(url, '_blank')
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="基础组件">
-      <template #description>
-        <div class="space-y-2">
-          <p>框架内置 Element Plus 组件库,本页仅展示部分组件,更多组件及使用说明请查看 Element Plus 官网</p>
-          <FaButton variant="link" class="h-auto p-0" @click="eventBus.emit('global-ui-component-switch')">
-            不想使用 Element Plus ?
-          </FaButton>
-        </div>
-      </template>
-      <FaButton variant="outline" @click="open('https://element-plus.org/#/zh-CN')">
-        <FaIcon name="i-ep:link" />
-        Element Plus 官网
-      </FaButton>
-    </FaPageHeader>
-    <FaPageMain>
-      <ElTabs type="border-card">
-        <ElTabPane v-for="(item, key) in components" :key="key" :label="key">
-          <component :is="item" />
-        </ElTabPane>
-      </ElTabs>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 17
src/views/component_built_in_example/avatar.vue

@@ -1,17 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="头像" description="FaAvatar" />
-    <FaPageMain>
-      <div class="flex gap-4">
-        <FaAvatar src="https://fantastic-admin.hurui.me/logo.svg" />
-        <FaAvatar src="https://fantastic-admin.hurui.me/logo.svg" shape="square" />
-        <FaAvatar src="" fallback="Hooray" />
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 88
src/views/component_built_in_example/button.vue

@@ -1,88 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const hand = ref<'peace' | 'rock' | 'paper'>('peace')
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="按钮" description="FaButton" />
-    <FaPageMain>
-      <div class="flex gap-4">
-        <FaButton>
-          按钮
-        </FaButton>
-        <FaButton variant="destructive">
-          按钮
-        </FaButton>
-        <FaButton variant="outline">
-          按钮
-        </FaButton>
-        <FaButton variant="secondary">
-          按钮
-        </FaButton>
-        <FaButton variant="ghost">
-          按钮
-        </FaButton>
-        <FaButton variant="link">
-          按钮
-        </FaButton>
-        <FaButton disabled>
-          按钮
-        </FaButton>
-        <FaButton loading>
-          按钮
-        </FaButton>
-      </div>
-    </FaPageMain>
-    <FaPageMain title="按钮组">
-      <div class="flex flex-col items-start gap-4">
-        <FaButtonGroup>
-          <FaButton variant="secondary">
-            <FaIcon name="i-mdi:eye" class="size-4" />
-            查看详情
-          </FaButton>
-          <FaButton>
-            <FaIcon name="i-mdi:pencil" class="size-4" />
-            编辑
-          </FaButton>
-          <FaButton variant="destructive">
-            <FaIcon name="i-mdi:delete" class="size-4" />
-            删除
-          </FaButton>
-        </FaButtonGroup>
-        <FaButtonGroup vertical>
-          <FaButton variant="secondary">
-            <FaIcon name="i-mdi:eye" class="size-4" />
-            查看详情
-          </FaButton>
-          <FaButton>
-            <FaIcon name="i-mdi:pencil" class="size-4" />
-            编辑
-          </FaButton>
-          <FaButton variant="destructive">
-            <FaIcon name="i-mdi:delete" class="size-4" />
-            删除
-          </FaButton>
-        </FaButtonGroup>
-        <div class="flex flex-col gap-2">
-          <div>单选按钮组</div>
-          <FaButtonGroup class="gap-0 space-x-[-1px]">
-            <FaButton :variant="hand === 'peace' ? 'default' : 'outline'" size="icon" :class="{ 'z-1': hand === 'peace' }" @click="hand = 'peace'">
-              <FaIcon name="i-fa-regular:hand-peace" class="size-4" />
-            </FaButton>
-            <FaButton :variant="hand === 'rock' ? 'default' : 'outline'" size="icon" :class="{ 'z-1': hand === 'rock' }" @click="hand = 'rock'">
-              <FaIcon name="i-fa-regular:hand-rock" class="size-4" />
-            </FaButton>
-            <FaButton :variant="hand === 'paper' ? 'default' : 'outline'" size="icon" :class="{ 'z-1': hand === 'paper' }" @click="hand = 'paper'">
-              <FaIcon name="i-fa-regular:hand-paper" class="size-4" />
-            </FaButton>
-          </FaButtonGroup>
-        </div>
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 20
src/views/component_built_in_example/card.vue

@@ -1,20 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="卡片" description="FaCard" />
-    <FaPageMain>
-      <div class="flex gap-4">
-        <FaCard title="卡片标题" description="卡片描述" class="w-80">
-          卡片内容
-          <template #footer>
-            卡片底部
-          </template>
-        </FaCard>
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 28
src/views/component_built_in_example/checkbox.vue

@@ -1,28 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const checked = ref(false)
-const checked2 = ref<'indeterminate' | boolean>('indeterminate')
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="复选框" description="FaCheckbox" />
-    <FaPageMain>
-      <div class="flex gap-4">
-        <FaCheckbox v-model="checked">
-          复选框
-        </FaCheckbox>
-        {{ checked }}
-      </div>
-    </FaPageMain>
-    <FaPageMain title="半选状态">
-      <FaCheckbox v-model="checked2">
-        复选框
-      </FaCheckbox>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 40
src/views/component_built_in_example/collapsible.vue

@@ -1,40 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const open = ref(false)
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="折叠面板" description="FaCollapsible" />
-    <FaPageMain>
-      <FaCollapsible>
-        <template #trigger="{ open }">
-          <FaButton>
-            {{ open ? '收起' : '展开' }}
-          </FaButton>
-        </template>
-        <div class="mt-4 space-y-2">
-          <div v-for="item in 10" :key="item" class="border rounded-md px-4 py-2">
-            {{ item }}
-          </div>
-        </div>
-      </FaCollapsible>
-    </FaPageMain>
-    <FaPageMain title="手动控制">
-      <FaButton @click="open = !open">
-        {{ open ? '收起' : '展开' }}
-      </FaButton>
-      <FaCollapsible v-model="open">
-        <div class="mt-4 space-y-2">
-          <div v-for="item in 10" :key="item" class="border rounded-md px-4 py-2">
-            {{ item }}
-          </div>
-        </div>
-      </FaCollapsible>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 28
src/views/component_built_in_example/contextmenu.vue

@@ -1,28 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="右键菜单" description="FaContextMenu" />
-    <FaPageMain>
-      <FaContextMenu
-        :items="[
-          [
-            { label: '菜单1-1' },
-            { label: '菜单1-2', disabled: true },
-            { label: '菜单1-3', icon: 'i-ep:edit' },
-          ],
-          [
-            { label: '菜单2' },
-          ],
-        ]"
-      >
-        <div class="h-[150px] w-[300px] flex items-center justify-center border rounded-md border-dashed text-sm">
-          在这右键
-        </div>
-      </FaContextMenu>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 19
src/views/component_built_in_example/divider.vue

@@ -1,19 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="分割线" description="FaDivider" />
-    <FaPageMain>
-      <FaDivider>center</FaDivider>
-      <FaDivider position="start">
-        left
-      </FaDivider>
-      <FaDivider position="end">
-        right
-      </FaDivider>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 116
src/views/component_built_in_example/drawer.vue

@@ -1,116 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="tsx">
-import { useFaDrawer } from '@/ui/components/FaDrawer'
-import { useFaModal } from '@/ui/components/FaModal'
-
-const drawer = ref(false)
-
-const drawerInfo = ref({
-  side: 'right' as const,
-  closable: true,
-  header: true,
-  footer: true,
-  loading: false,
-  class: '',
-})
-watch(() => drawerInfo.value.loading, (loading) => {
-  if (loading) {
-    setTimeout(() => {
-      drawerInfo.value.loading = false
-    }, 3000)
-  }
-})
-
-function handleBeforeClose(action: 'confirm' | 'cancel' | 'close', done: () => void) {
-  if (action === 'close') {
-    useFaModal().confirm({
-      title: '提示',
-      content: '确定要关闭吗?',
-      onConfirm: () => {
-        done()
-      },
-    })
-  }
-  else {
-    done()
-  }
-}
-
-const TestComponent = defineComponent({
-  setup() {
-    const val = ref('123')
-    return () => (
-      <div>
-        <input v-model={val.value} class="w-full border rounded-md p-2" />
-      </div>
-    )
-  },
-})
-
-const { open: open2 } = useFaDrawer().create({
-  title: '标题',
-  description: '这里是一段描述介绍',
-  beforeClose: (action, done) => {
-    if (action === 'close') {
-      useFaModal().confirm({
-        title: '提示',
-        content: '确定要关闭吗?',
-        onConfirm: () => {
-          done()
-        },
-      })
-    }
-    else {
-      done()
-    }
-  },
-  content: h(TestComponent),
-})
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="抽屉" description="FaDrawer" />
-    <FaPageMain>
-      <FaButton @click="drawer = true">
-        打开
-      </FaButton>
-      <FaDrawer v-model="drawer" title="标题" description="这里是一段描述介绍" :side="drawerInfo.side" :closable="drawerInfo.closable" :loading="drawerInfo.loading" :header="drawerInfo.header" :footer="drawerInfo.footer" :before-close="handleBeforeClose" :content-class="drawerInfo.class">
-        <div class="flex-start-center flex-wrap gap-2">
-          <FaSelect
-            v-model="drawerInfo.side" :options="[
-              { label: '左侧', value: 'left' },
-              { label: '右侧', value: 'right' },
-              { label: '顶部', value: 'top' },
-              { label: '底部', value: 'bottom' },
-            ]" class="w-full"
-          />
-          <FaButton :variant="drawerInfo.closable ? 'default' : 'outline'" class="w-full" @click="drawerInfo.closable = !drawerInfo.closable">
-            关闭按钮
-          </FaButton>
-          <FaButton :variant="drawerInfo.header ? 'default' : 'outline'" class="w-full" @click="drawerInfo.header = !drawerInfo.header">
-            头部区域
-          </FaButton>
-          <FaButton :variant="drawerInfo.footer ? 'default' : 'outline'" class="w-full" @click="drawerInfo.footer = !drawerInfo.footer">
-            尾部区域
-          </FaButton>
-          <FaButton variant="outline" class="w-full" @click="drawerInfo.loading = true">
-            显示加载中
-          </FaButton>
-          <FaButton :variant="!!drawerInfo.class ? 'default' : 'outline'" class="w-full" @click="drawerInfo.class = !!drawerInfo.class ? '' : 'sm:max-w-lg'">
-            调整最大宽度
-          </FaButton>
-        </div>
-      </FaDrawer>
-    </FaPageMain>
-    <FaPageMain title="函数式调用">
-      <FaButton @click="open2">
-        打开
-      </FaButton>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 29
src/views/component_built_in_example/dropdown.vue

@@ -1,29 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="下拉菜单" description="FaDropdown" />
-    <FaPageMain>
-      <FaDropdown
-        :items="[
-          [
-            { label: '菜单1-1' },
-            { label: '菜单1-2', disabled: true },
-            { label: '菜单1-3' },
-          ],
-          [
-            { label: '菜单2' },
-          ],
-        ]"
-      >
-        <FaButton>
-          下拉菜单
-          <FaIcon name="i-ep:caret-bottom" />
-        </FaButton>
-      </FaDropdown>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 52
src/views/component_built_in_example/fileupload.vue

@@ -1,52 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-import type { FileItem } from '@/ui/components/FaFileUpload/index.vue'
-import { toast } from 'vue-sonner'
-
-const files1 = ref<FileItem[]>([])
-const files2 = ref<FileItem[]>([
-  { name: 'logo.svg', size: 1024 * 1024, url: 'https://fantastic-admin.hurui.me/logo.svg' },
-])
-
-function handleSuccess() {
-  toast.success('模拟上传成功')
-}
-
-function handleClick(fileItem: FileItem) {
-  toast.info(fileItem.name, {
-    description: fileItem.url,
-  })
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="文件上传" description="FaFileUpload" />
-    <FaPageMain>
-      <FaFileUpload
-        v-model="files1"
-        action="/mock/upload"
-        :after-upload="(response) => response.data.url"
-        multiple
-        @on-success="handleSuccess"
-      />
-    </FaPageMain>
-    <FaPageMain title="限制上传数量、大小、类型、点击事件">
-      <FaFileUpload
-        v-model="files2"
-        action="/mock/upload"
-        :after-upload="(response) => response.data.url"
-        multiple
-        :ext="['png']"
-        :size="200 * 1024"
-        :max="5"
-        @on-success="handleSuccess"
-        @on-click="handleClick"
-      />
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 28
src/views/component_built_in_example/fixedactionbar.vue

@@ -1,28 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const testHeight = ref(50)
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="固定底部操作栏">
-      <template #description>
-        <div class="space-y-2">
-          <p>FaFixedActionBar</p>
-          <p>避免因页面过长,导致操作按钮需要滚动到页面底部才能操作</p>
-        </div>
-      </template>
-    </FaPageHeader>
-    <FaPageMain>
-      <div class="h-500" />
-    </FaPageMain>
-    <FaFixedActionBar>
-      <div :style="`height: ${testHeight}px;`" />
-      <ElSlider v-model="testHeight" />
-    </FaFixedActionBar>
-  </div>
-</template>

+ 0 - 36
src/views/component_built_in_example/hovercard.vue

@@ -1,36 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="悬浮卡片" description="FaHoverCard" />
-    <FaPageMain>
-      <FaHoverCard class="min-w-auto">
-        <FaButton variant="link">
-          @hooray
-        </FaButton>
-        <template #card>
-          <div class="flex space-x-4">
-            <FaAvatar shape="circle" src="https://github.com/vuejs.png" />
-            <div class="space-y-1">
-              <h4 class="text-sm font-semibold">
-                @hooray
-              </h4>
-              <p class="text-sm">
-                一个前端开发工程师
-              </p>
-              <div class="flex items-center pt-2">
-                <FaIcon name="i-ci:calendar-days" class="mr-2 h-4 w-4 opacity-70" />
-                <span class="text-xs text-muted-foreground">
-                  2020 年注册
-                </span>
-              </div>
-            </div>
-          </div>
-        </template>
-      </FaHoverCard>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 65
src/views/component_built_in_example/imagepreview.vue

@@ -1,65 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-import { useFaImagePreview } from '@/ui/components/FaImagePreview'
-
-const { open } = useFaImagePreview()
-
-function openSingle() {
-  open('https://fantastic-admin.hurui.me/logo.svg')
-}
-
-function openMulti() {
-  open([
-    'https://fantastic-admin.hurui.me/logo.svg',
-    'https://fantastic-mobile.hurui.me/logo.png',
-  ])
-}
-
-function openMulti2() {
-  open([
-    'https://fantastic-admin.hurui.me/logo.svg',
-    'https://fantastic-mobile.hurui.me/logo.png',
-  ], 1)
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="图片预览" description="FaImagePreview" />
-    <FaPageMain>
-      <div class="space-x-4">
-        <FaImagePreview src="https://fantastic-admin.hurui.me/logo.svg" />
-        <FaImagePreview src="http://www.baidu.com" class="size-25" />
-        <FaImagePreview src="http://www.baidu.com">
-          <template #error>
-            <div class="flex-col-center text-sm text-secondary-foreground/50">
-              <div>
-                自定义错误信息
-              </div>
-              <div>
-                图片加载失败
-              </div>
-            </div>
-          </template>
-        </FaImagePreview>
-      </div>
-    </FaPageMain>
-    <FaPageMain title="函数式调用">
-      <div class="space-x-4">
-        <FaButton @click="openSingle">
-          预览单张
-        </FaButton>
-        <FaButton @click="openMulti">
-          预览多张
-        </FaButton>
-        <FaButton @click="openMulti2">
-          预览多张(初始预览第2张)
-        </FaButton>
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 55
src/views/component_built_in_example/imageupload.vue

@@ -1,55 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-import { toast } from 'vue-sonner'
-
-const files1 = ref<string[]>([])
-const files2 = ref<string[]>(['https://fantastic-admin.hurui.me/logo.svg'])
-const files3 = ref<string[]>([])
-
-function handleSuccess() {
-  toast.success('模拟上传成功')
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="图片上传" description="FaImageUpload" />
-    <FaPageMain>
-      <FaImageUpload
-        v-model="files1"
-        action="/mock/upload"
-        :after-upload="(response) => response.data.url"
-        @on-success="handleSuccess"
-      />
-    </FaPageMain>
-    <FaPageMain title="多图上传">
-      <FaImageUpload
-        v-model="files2"
-        action="/mock/upload"
-        :after-upload="(response) => response.data.url"
-        :max="2"
-        @on-success="handleSuccess"
-      />
-    </FaPageMain>
-    <FaPageMain title="自定义默认内容、容器大小、建议尺寸、限制类型、不限制数量">
-      <FaImageUpload
-        v-model="files3"
-        action="/mock/upload"
-        :after-upload="(response) => response.data.url"
-        :width="200"
-        :height="130"
-        :dimension="{ width: 400, height: 260 }"
-        :ext="['png']"
-        :size="200 * 1024"
-        :max="0"
-        @on-success="handleSuccess"
-      >
-        <FaIcon name="i-noto:identification-card" class="size-50 opacity-50" />
-      </FaImageUpload>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 17
src/views/component_built_in_example/input.vue

@@ -1,17 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const value = ref('')
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="输入框" description="FaInput" />
-    <FaPageMain>
-      <FaInput v-model="value" placeholder="请输入内容" />
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 16
src/views/component_built_in_example/kbd.vue

@@ -1,16 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="键盘" description="FaKbd" />
-    <FaPageMain>
-      <div class="flex gap-4">
-        <FaKbd>Ctrl</FaKbd>
-        <FaKbd>⌘ K</FaKbd>
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 244
src/views/component_built_in_example/modal.vue

@@ -1,244 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="tsx">
-import { toast } from 'vue-sonner'
-import { useFaModal } from '@/ui/components/FaModal'
-
-const modal = ref(false)
-const modalInfo = ref({
-  maximizable: false,
-  closable: true,
-  draggable: false,
-  center: false,
-  header: true,
-  footer: true,
-  contentHeight: '',
-  loading: false,
-  class: '',
-})
-watch(() => modalInfo.value.loading, (loading) => {
-  if (loading) {
-    setTimeout(() => {
-      modalInfo.value.loading = false
-    }, 3000)
-  }
-})
-
-function handleBeforeClose(action: 'confirm' | 'cancel' | 'close', done: () => void) {
-  if (action === 'close') {
-    useFaModal().confirm({
-      title: '提示',
-      content: '确定要关闭吗?',
-      onConfirm: () => {
-        done()
-      },
-    })
-  }
-  else {
-    done()
-  }
-}
-
-function showModalInfo() {
-  useFaModal().info({
-    title: '温馨提醒',
-    content: '这是 info 弹窗',
-    onConfirm: () => {
-      toast.info('你点了确定')
-    },
-  })
-}
-function showModalSuccess() {
-  useFaModal().success({
-    title: '温馨提醒',
-    content: '这是 success 弹窗',
-    onConfirm: () => {
-      toast.success('你点了确定')
-    },
-  })
-}
-function showModalWarning() {
-  useFaModal().warning({
-    title: '温馨提醒',
-    content: '这是 warning 弹窗',
-    onConfirm: () => {
-      toast.warning('你点了确定')
-    },
-  })
-}
-function showModalError() {
-  useFaModal().error({
-    title: '温馨提醒',
-    content: '这是 confirm 弹窗',
-    onConfirm: () => {
-      toast.error('你点了确定')
-    },
-  })
-}
-function showModalConfirm() {
-  useFaModal().confirm({
-    title: '温馨提醒',
-    content: '这是 confirm 弹窗',
-    onConfirm: () => {
-      toast.success('你点了确定')
-    },
-  })
-}
-function showModalDoubleConfirm() {
-  const { update } = useFaModal().confirm({
-    title: '温馨提醒',
-    content: '这是 confirm 弹窗',
-    beforeClose: (action, done) => {
-      if (action === 'confirm') {
-        update({
-          title: '二次确认',
-          content: '确定要关闭吗?',
-          confirmButtonText: '我确定',
-          cancelButtonText: '我取消',
-          beforeClose: (action) => {
-            if (action === 'confirm') {
-              done()
-            }
-            else {
-              done()
-            }
-          },
-        })
-      }
-      else {
-        done()
-      }
-    },
-  })
-}
-function showModalPromiseConfirm() {
-  useFaModal().confirm({
-    title: '温馨提醒',
-    content: '这是 confirm 弹窗',
-    confirmButtonText: '确认(随机成功或失败)',
-    beforeClose: async (action, done) => {
-      if (action === 'confirm') {
-        await new Promise(resolve => setTimeout(resolve, 1000))
-        if (Math.random() > 0.5) {
-          toast.success('成功了!')
-          done()
-        }
-        else {
-          toast.error('失败了!')
-        }
-      }
-      else {
-        done()
-      }
-    },
-  })
-}
-
-const TestComponent = defineComponent({
-  setup() {
-    const val = ref('123')
-    return () => (
-      <div>
-        <input v-model={val.value} class="w-full border rounded-md p-2" />
-      </div>
-    )
-  },
-})
-
-const { open: open2 } = useFaModal().create({
-  title: '标题',
-  description: '这里是一段描述介绍',
-  beforeClose: (action, done) => {
-    if (action === 'close') {
-      useFaModal().confirm({
-        title: '提示',
-        content: '确定要关闭吗?',
-        onConfirm: () => {
-          done()
-        },
-      })
-    }
-    else {
-      done()
-    }
-  },
-  content: h(TestComponent),
-})
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="弹窗" description="FaModal" />
-    <FaPageMain>
-      <FaButton @click="modal = true">
-        打开
-      </FaButton>
-      <FaModal v-model="modal" title="标题" description="这里是一段描述介绍" :maximizable="modalInfo.maximizable" :closable="modalInfo.closable" :draggable="modalInfo.draggable" :center="modalInfo.center" :loading="modalInfo.loading" :header="modalInfo.header" :footer="modalInfo.footer" :before-close="handleBeforeClose" :class="modalInfo.class">
-        <div :class="modalInfo.contentHeight">
-          <div class="flex-start-center flex-wrap gap-2">
-            <FaButton :variant="modalInfo.maximizable ? 'default' : 'outline'" class="w-full" @click="modalInfo.maximizable = !modalInfo.maximizable">
-              最大化按钮
-            </FaButton>
-            <FaButton :variant="modalInfo.closable ? 'default' : 'outline'" class="w-full" @click="modalInfo.closable = !modalInfo.closable">
-              关闭按钮
-            </FaButton>
-            <FaButton :variant="modalInfo.draggable ? 'default' : 'outline'" class="w-full" @click="modalInfo.draggable = !modalInfo.draggable">
-              拖拽
-            </FaButton>
-            <FaButton :variant="modalInfo.center ? 'default' : 'outline'" class="w-full" @click="modalInfo.center = !modalInfo.center">
-              居中显示
-            </FaButton>
-            <FaButton :variant="modalInfo.header ? 'default' : 'outline'" class="w-full" @click="modalInfo.header = !modalInfo.header">
-              头部区域
-            </FaButton>
-            <FaButton :variant="modalInfo.footer ? 'default' : 'outline'" class="w-full" @click="modalInfo.footer = !modalInfo.footer">
-              尾部区域
-            </FaButton>
-            <FaButton :variant="!!modalInfo.contentHeight ? 'default' : 'outline'" class="w-full" @click="modalInfo.contentHeight = !!modalInfo.contentHeight ? '' : 'h-400'">
-              切换内容高度
-            </FaButton>
-            <FaButton variant="outline" class="w-full" @click="modalInfo.loading = true">
-              显示加载中
-            </FaButton>
-            <FaButton :variant="!!modalInfo.class ? 'default' : 'outline'" class="w-full" @click="modalInfo.class = !!modalInfo.class ? '' : 'max-w-2xl'">
-              调整最大宽度
-            </FaButton>
-          </div>
-        </div>
-      </FaModal>
-    </FaPageMain>
-    <FaPageMain title="对话框">
-      <div class="flex gap-4">
-        <FaButton @click="showModalInfo">
-          Info
-        </FaButton>
-        <FaButton @click="showModalSuccess">
-          Success
-        </FaButton>
-        <FaButton @click="showModalWarning">
-          Warning
-        </FaButton>
-        <FaButton @click="showModalError">
-          Error
-        </FaButton>
-        <FaButton @click="showModalConfirm">
-          Confirm
-        </FaButton>
-        <FaButton @click="showModalDoubleConfirm">
-          Double Confirm
-        </FaButton>
-        <FaButton @click="showModalPromiseConfirm">
-          Confirm with promise
-        </FaButton>
-      </div>
-    </FaPageMain>
-    <FaPageMain title="函数式调用">
-      <FaButton @click="open2">
-        打开
-      </FaButton>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 43
src/views/component_built_in_example/notification.vue

@@ -1,43 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-import { faNotification } from '@/ui/components/FaNotification'
-
-function showNotification(type?: 'html') {
-  if (type === 'html') {
-    faNotification({
-      title: 'Fantastic-admin 杰出的管理系统框架',
-      description: h('null', {
-        innerHTML: '<p class="text-red-500">开箱即用,提供舒适开发体验</p>',
-      }),
-      duration: 3000,
-    })
-  }
-  else {
-    faNotification({
-      title: 'Fantastic-admin 杰出的管理系统框架',
-      description: '开箱即用,提供舒适开发体验',
-      duration: 3000,
-    })
-  }
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="通知" description="FaNotification" />
-    <FaPageMain>
-      <div class="flex gap-4">
-        <FaButton @click="showNotification()">
-          默认
-        </FaButton>
-        <FaButton @click="showNotification('html')">
-          支持 HTML 代码
-        </FaButton>
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 20
src/views/component_built_in_example/pageheader.vue

@@ -1,20 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="页头" description="FaPageHeader" />
-    <FaPageHeader title="页面标题">
-      <template #description>
-        <p>提供两块插槽:</p>
-        <p>一块是 description 区域插槽,一块是右侧区域</p>
-      </template>
-      <FaButton variant="outline">
-        <FaIcon name="i-ep:arrow-left" />
-        返回
-      </FaButton>
-    </FaPageHeader>
-  </div>
-</template>

+ 0 - 36
src/views/component_built_in_example/pagemain.vue

@@ -1,36 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="内容块" description="FaPageMain" />
-    <FaPageMain>
-      PageMain 是最常用的页面组件,几乎所有页面都会使用到
-    </FaPageMain>
-    <FaPageMain title="你可以设置一个自定义的标题">
-      这里放页面内容
-    </FaPageMain>
-    <FaPageMain>
-      <template #title>
-        <div class="flex-center-between">
-          通过 slot 设置标题
-          <FaButton variant="outline" size="sm">
-            还可以放置自定义按钮
-          </FaButton>
-        </div>
-      </template>
-      这里放页面内容
-    </FaPageMain>
-    <FaPageMain title="带展开/收起功能" collaspe height="100px">
-      <div class="space-y-4">
-        <h1 class="text-4xl font-bold">
-          Fantastic-admin
-        </h1>
-        <img src="@/assets/images/logo.svg" class="w-20">
-        <p>用过的人都说好!!!</p>
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 20
src/views/component_built_in_example/passwordstrength.vue

@@ -1,20 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const password = ref('')
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="密码强度" description="FaPasswordStrength" />
-    <FaPageMain>
-      <div class="w-80 flex-col">
-        <FaInput v-model="password" placeholder="请输入密码" class="w-full" />
-        <FaPasswordStrength :password="password" class="mt-2" />
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 17
src/views/component_built_in_example/pininput.vue

@@ -1,17 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const pin = ref('')
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="数字输入框" description="FaPinInput" />
-    <FaPageMain>
-      <FaPinInput v-model="pin" />
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 39
src/views/component_built_in_example/popover.vue

@@ -1,39 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const open = ref(false)
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="浮动面板" description="FaPopover" />
-    <FaPageMain main-class="flex gap-4">
-      <FaPopover>
-        <FaButton>
-          浮动面板
-          <FaIcon name="i-ep:caret-bottom" />
-        </FaButton>
-        <template #panel>
-          <div class="h-30 w-60 flex items-center justify-center">
-            面板内容
-          </div>
-        </template>
-      </FaPopover>
-      <FaPopover v-model:open="open">
-        <FaButton>
-          支持手动关闭
-        </FaButton>
-        <template #panel>
-          <div class="h-30 w-60 flex items-center justify-center">
-            <FaButton @click="open = false">
-              关闭
-            </FaButton>
-          </div>
-        </template>
-      </FaPopover>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 13
src/views/component_built_in_example/progress.vue

@@ -1,13 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="进度条" description="FaProgress" />
-    <FaPageMain>
-      <FaProgress :model-value="33" />
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 45
src/views/component_built_in_example/scrollarea.vue

@@ -1,45 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const scrollbar = ref(true)
-const mask = ref(false)
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="滚动区域" description="FaScrollArea" />
-    <FaPageMain>
-      <div class="flex-col-start gap-4">
-        <div class="flex-col-start gap-4">
-          <div class="flex-center-start gap-4">
-            <div class="text-sm">
-              显示滚动条
-            </div>
-            <FaSwitch v-model="scrollbar" />
-          </div>
-          <div class="flex-center-start gap-4">
-            <div class="text-sm">
-              显示遮罩
-            </div>
-            <FaSwitch v-model="mask" />
-          </div>
-        </div>
-        <FaScrollArea :scrollbar :mask class="h-72 w-48 border rounded-md">
-          <div v-for="tag in 20" :key="tag" class="p-4 text-sm">
-            {{ tag }}
-          </div>
-        </FaScrollArea>
-        <FaScrollArea horizontal :scrollbar :mask class="w-96 border rounded-md">
-          <div class="flex-center-start">
-            <div v-for="tag in 20" :key="tag" class="h-16 w-16 flex-center text-sm">
-              {{ tag }}
-            </div>
-          </div>
-        </FaScrollArea>
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 444
src/views/component_built_in_example/searchbar.vue

@@ -1,444 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-import { toast } from 'vue-sonner'
-
-const search = ref({
-  name: '',
-  department_id: '',
-  department_job_id: '',
-  role_id: '',
-  check1: true,
-  check2: false,
-})
-
-function onToggle(fold: boolean) {
-  toast(fold ? '收起' : '展开')
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="搜索面板" description="FaSearchBar" />
-    <FaPageMain>
-      <FaSearchBar>
-        <template #default="{ fold }">
-          <ElForm :model="search" size="default" label-width="120px">
-            <ElRow>
-              <ElCol :span="12">
-                <ElFormItem label="姓名 / 手机号">
-                  <ElInput v-model="search.name" placeholder="请输入姓名或者手机号,支持模糊查询" clearable />
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElRow v-show="!fold">
-              <ElCol :span="6">
-                <ElFormItem label="部门">
-                  <ElSelect v-model="search.department_id" clearable placeholder="请选择部门">
-                    <ElOption label="技术部" :value="1" />
-                    <ElOption label="设计部" :value="2" />
-                    <ElOption label="行政部" :value="3" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-              <ElCol :span="6">
-                <ElFormItem label="职位">
-                  <ElSelect v-model="search.department_job_id" clearable placeholder="请选择职位">
-                    <ElOption label="程序员" :value="1" />
-                    <ElOption label="设计师" :value="2" />
-                    <ElOption label="人事" :value="3" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-              <ElCol :span="6">
-                <ElFormItem label="角色">
-                  <ElSelect v-model="search.role_id" clearable placeholder="请选择角色">
-                    <ElOption label="主管" :value="1" />
-                    <ElOption label="普通职员" :value="2" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElRow v-show="!fold">
-              <ElCol :span="24">
-                <ElFormItem label="角色">
-                  <ElCheckbox :value="true">
-                    备选项
-                  </ElCheckbox>
-                  <ElCheckbox :value="false">
-                    备选项
-                  </ElCheckbox>
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElFormItem>
-              <ElButton type="primary">
-                <template #icon>
-                  <FaIcon name="i-ep:search" />
-                </template>
-                筛选
-              </ElButton>
-              <ElButton>导出</ElButton>
-              <ElButton type="primary" link>
-                查看已导出记录
-              </ElButton>
-            </ElFormItem>
-          </ElForm>
-        </template>
-      </FaSearchBar>
-    </FaPageMain>
-    <FaPageMain title="默认展开">
-      <FaSearchBar :fold="false">
-        <template #default="{ fold }">
-          <ElForm :model="search" size="default" label-width="120px">
-            <ElRow>
-              <ElCol :span="12">
-                <ElFormItem label="姓名 / 手机号">
-                  <ElInput v-model="search.name" placeholder="请输入姓名或者手机号,支持模糊查询" clearable />
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElRow v-show="!fold">
-              <ElCol :span="6">
-                <ElFormItem label="部门">
-                  <ElSelect v-model="search.department_id" clearable placeholder="请选择部门">
-                    <ElOption label="技术部" :value="1" />
-                    <ElOption label="设计部" :value="2" />
-                    <ElOption label="行政部" :value="3" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-              <ElCol :span="6">
-                <ElFormItem label="职位">
-                  <ElSelect v-model="search.department_job_id" clearable placeholder="请选择职位">
-                    <ElOption label="程序员" :value="1" />
-                    <ElOption label="设计师" :value="2" />
-                    <ElOption label="人事" :value="3" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-              <ElCol :span="6">
-                <ElFormItem label="角色">
-                  <ElSelect v-model="search.role_id" clearable placeholder="请选择角色">
-                    <ElOption label="主管" :value="1" />
-                    <ElOption label="普通职员" :value="2" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElRow v-show="!fold">
-              <ElCol :span="24">
-                <ElFormItem label="复选框">
-                  <ElCheckbox v-model="search.check1">
-                    备选项
-                  </ElCheckbox>
-                  <ElCheckbox v-model="search.check2">
-                    备选项
-                  </ElCheckbox>
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElFormItem>
-              <ElButton type="primary">
-                <template #icon>
-                  <FaIcon name="i-ep:search" />
-                </template>
-                筛选
-              </ElButton>
-              <ElButton>导出</ElButton>
-              <ElButton type="primary" link>
-                查看已导出记录
-              </ElButton>
-            </ElFormItem>
-          </ElForm>
-        </template>
-      </FaSearchBar>
-    </FaPageMain>
-    <FaPageMain title="显示背景">
-      <FaSearchBar background>
-        <template #default="{ fold }">
-          <ElForm :model="search" size="default" label-width="120px">
-            <ElRow>
-              <ElCol :span="12">
-                <ElFormItem label="姓名 / 手机号">
-                  <ElInput v-model="search.name" placeholder="请输入姓名或者手机号,支持模糊查询" clearable />
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElRow v-show="!fold">
-              <ElCol :span="6">
-                <ElFormItem label="部门">
-                  <ElSelect v-model="search.department_id" clearable placeholder="请选择部门">
-                    <ElOption label="技术部" :value="1" />
-                    <ElOption label="设计部" :value="2" />
-                    <ElOption label="行政部" :value="3" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-              <ElCol :span="6">
-                <ElFormItem label="职位">
-                  <ElSelect v-model="search.department_job_id" clearable placeholder="请选择职位">
-                    <ElOption label="程序员" :value="1" />
-                    <ElOption label="设计师" :value="2" />
-                    <ElOption label="人事" :value="3" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-              <ElCol :span="6">
-                <ElFormItem label="角色">
-                  <ElSelect v-model="search.role_id" clearable placeholder="请选择角色">
-                    <ElOption label="主管" :value="1" />
-                    <ElOption label="普通职员" :value="2" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElRow v-show="!fold">
-              <ElCol :span="24">
-                <ElFormItem label="复选框">
-                  <ElCheckbox :value="true">
-                    备选项
-                  </ElCheckbox>
-                  <ElCheckbox :value="false">
-                    备选项
-                  </ElCheckbox>
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElFormItem>
-              <ElButton type="primary">
-                <template #icon>
-                  <FaIcon name="i-ep:search" />
-                </template>
-                筛选
-              </ElButton>
-              <ElButton>导出</ElButton>
-              <ElButton type="primary" link>
-                查看已导出记录
-              </ElButton>
-            </ElFormItem>
-          </ElForm>
-        </template>
-      </FaSearchBar>
-    </FaPageMain>
-    <FaPageMain title="切换事件">
-      <FaSearchBar @toggle="onToggle">
-        <template #default="{ fold }">
-          <ElForm :model="search" size="default" label-width="120px">
-            <ElRow>
-              <ElCol :span="12">
-                <ElFormItem label="姓名 / 手机号">
-                  <ElInput v-model="search.name" placeholder="请输入姓名或者手机号,支持模糊查询" clearable />
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElRow v-show="!fold">
-              <ElCol :span="6">
-                <ElFormItem label="部门">
-                  <ElSelect v-model="search.department_id" clearable placeholder="请选择部门">
-                    <ElOption label="技术部" :value="1" />
-                    <ElOption label="设计部" :value="2" />
-                    <ElOption label="行政部" :value="3" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-              <ElCol :span="6">
-                <ElFormItem label="职位">
-                  <ElSelect v-model="search.department_job_id" clearable placeholder="请选择职位">
-                    <ElOption label="程序员" :value="1" />
-                    <ElOption label="设计师" :value="2" />
-                    <ElOption label="人事" :value="3" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-              <ElCol :span="6">
-                <ElFormItem label="角色">
-                  <ElSelect v-model="search.role_id" clearable placeholder="请选择角色">
-                    <ElOption label="主管" :value="1" />
-                    <ElOption label="普通职员" :value="2" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElRow v-show="!fold">
-              <ElCol :span="24">
-                <ElFormItem label="复选框">
-                  <ElCheckbox :value="true">
-                    备选项
-                  </ElCheckbox>
-                  <ElCheckbox :value="false">
-                    备选项
-                  </ElCheckbox>
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-            <ElFormItem>
-              <ElButton type="primary">
-                <template #icon>
-                  <FaIcon name="i-ep:search" />
-                </template>
-                筛选
-              </ElButton>
-              <ElButton>导出</ElButton>
-              <ElButton type="primary" link>
-                查看已导出记录
-              </ElButton>
-            </ElFormItem>
-          </ElForm>
-        </template>
-      </FaSearchBar>
-    </FaPageMain>
-    <FaPageMain title="自定义切换按钮(搭配自定义 grid 布局)">
-      <FaSearchBar :show-toggle="false">
-        <template #default="{ fold, toggle }">
-          <ElForm :model="search" size="default" label-width="120px" inline class="search-form">
-            <ElFormItem label="姓名 / 手机号" class="search-form-item-name">
-              <ElInput v-model="search.name" placeholder="请输入姓名或者手机号,支持模糊查询" clearable />
-            </ElFormItem>
-            <ElFormItem v-show="!fold" label="部门">
-              <ElSelect v-model="search.department_id" clearable placeholder="请选择部门">
-                <ElOption label="技术部" :value="1" />
-                <ElOption label="设计部" :value="2" />
-                <ElOption label="行政部" :value="3" />
-              </ElSelect>
-            </ElFormItem>
-            <ElFormItem v-show="!fold" label="职位">
-              <ElSelect v-model="search.department_job_id" clearable placeholder="请选择职位">
-                <ElOption label="程序员" :value="1" />
-                <ElOption label="设计师" :value="2" />
-                <ElOption label="人事" :value="3" />
-              </ElSelect>
-            </ElFormItem>
-            <ElFormItem v-show="!fold" label="角色">
-              <ElSelect v-model="search.role_id" clearable placeholder="请选择角色">
-                <ElOption label="主管" :value="1" />
-                <ElOption label="普通职员" :value="2" />
-              </ElSelect>
-            </ElFormItem>
-            <ElFormItem v-show="!fold" label="复选框">
-              <ElCheckbox v-model="search.check1">
-                备选项
-              </ElCheckbox>
-              <ElCheckbox v-model="search.check2">
-                备选项
-              </ElCheckbox>
-            </ElFormItem>
-            <ElFormItem>
-              <ElButton type="primary">
-                <template #icon>
-                  <FaIcon name="i-ep:search" />
-                </template>
-                筛选
-              </ElButton>
-              <ElButton link @click="toggle">
-                <template #icon>
-                  <FaIcon :name="fold ? 'i-ep:caret-bottom' : 'i-ep:caret-top' " />
-                </template>
-                {{ fold ? '展开' : '收起' }}
-              </ElButton>
-            </ElFormItem>
-          </ElForm>
-        </template>
-      </FaSearchBar>
-    </FaPageMain>
-    <FaPageMain title="自定义切换按钮(搭配 el-row 组件)">
-      <FaSearchBar :show-toggle="false">
-        <template #default="{ fold, toggle }">
-          <ElForm :model="search" size="default" label-width="120px">
-            <ElRow>
-              <ElCol :span="12">
-                <ElFormItem label="姓名 / 手机号">
-                  <ElInput v-model="search.name" placeholder="请输入姓名或者手机号,支持模糊查询" clearable />
-                </ElFormItem>
-              </ElCol>
-              <ElCol v-show="!fold" :span="6">
-                <ElFormItem label="部门">
-                  <ElSelect v-model="search.department_id" clearable placeholder="请选择部门">
-                    <ElOption label="技术部" :value="1" />
-                    <ElOption label="设计部" :value="2" />
-                    <ElOption label="行政部" :value="3" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-              <ElCol v-show="!fold" :span="6">
-                <ElFormItem label="职位">
-                  <ElSelect v-model="search.department_job_id" clearable placeholder="请选择职位">
-                    <ElOption label="程序员" :value="1" />
-                    <ElOption label="设计师" :value="2" />
-                    <ElOption label="人事" :value="3" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-              <ElCol v-show="!fold" :span="6">
-                <ElFormItem label="角色">
-                  <ElSelect v-model="search.role_id" clearable placeholder="请选择角色">
-                    <ElOption label="主管" :value="1" />
-                    <ElOption label="普通职员" :value="2" />
-                  </ElSelect>
-                </ElFormItem>
-              </ElCol>
-              <ElCol v-show="!fold" :span="6">
-                <ElFormItem label="复选框">
-                  <ElCheckbox v-model="search.check1">
-                    备选项
-                  </ElCheckbox>
-                  <ElCheckbox v-model="search.check2">
-                    备选项
-                  </ElCheckbox>
-                </ElFormItem>
-              </ElCol>
-              <ElCol :span="6" :offset="6">
-                <ElFormItem label-width="0" class="action-box">
-                  <ElButton type="primary">
-                    <template #icon>
-                      <FaIcon name="i-ep:search" />
-                    </template>
-                    筛选
-                  </ElButton>
-                  <ElButton link @click="toggle">
-                    <template #icon>
-                      <FaIcon :name="fold ? 'i-ep:caret-bottom' : 'i-ep:caret-top' " />
-                    </template>
-                    {{ fold ? '展开' : '收起' }}
-                  </ElButton>
-                </ElFormItem>
-              </ElCol>
-            </ElRow>
-          </ElForm>
-        </template>
-      </FaSearchBar>
-    </FaPageMain>
-  </div>
-</template>
-
-<style scoped>
-.search-form {
-  display: grid;
-  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
-
-  :deep(.el-form-item) {
-    grid-column: auto / span 1;
-
-    &:last-child {
-      grid-column-end: -1;
-
-      .el-form-item__content {
-        justify-content: flex-end;
-      }
-    }
-
-    &.search-form-item-name {
-      grid-column: auto / span 2;
-    }
-  }
-}
-
-.action-box {
-  :deep(.el-form-item__content) {
-    justify-content: flex-end;
-  }
-}
-</style>

+ 0 - 24
src/views/component_built_in_example/select.vue

@@ -1,24 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const select = ref('1')
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="选择器" description="FaSelect" />
-    <FaPageMain>
-      <FaSelect
-        v-model="select"
-        :options="[
-          { label: '选项1', value: '1' },
-          { label: '选项2', value: '2', disabled: true },
-          { label: '选项3', value: '3' },
-        ]"
-      />
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 20
src/views/component_built_in_example/slider.vue

@@ -1,20 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const value = ref<number[]>([0])
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="滑块" description="FaSlider" />
-    <FaPageMain>
-      <FaSlider v-model="value" />
-    </FaPageMain>
-    <FaPageMain>
-      <FaSlider v-model="value" orientation="vertical" class="data-[orientation=vertical]:h-100" />
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 20
src/views/component_built_in_example/switch.vue

@@ -1,20 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const switchVal = ref(false)
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="开关" description="FaSwitch" />
-    <FaPageMain>
-      <div class="flex gap-4">
-        <FaSwitch v-model="switchVal" />
-        <FaSwitch v-model="switchVal" on-icon="ri:sun-line" off-icon="ri:moon-line" />
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 33
src/views/component_built_in_example/tabs.vue

@@ -1,33 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const tabs = ref(1)
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="标签页" description="FaTabs" />
-    <FaPageMain>
-      <FaTabs v-model="tabs" :list="[{ label: '标签1', value: 1 }, { label: '标签2', value: 2 }, { label: '标签3', value: 3 }]" class="w-80">
-        <template #1>
-          <div class="flex-center">
-            标签1
-          </div>
-        </template>
-        <template #2>
-          <div class="flex-center">
-            标签2
-          </div>
-        </template>
-        <template #3>
-          <div class="flex-center">
-            标签3
-          </div>
-        </template>
-      </FaTabs>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 17
src/views/component_built_in_example/textarea.vue

@@ -1,17 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const value = ref('')
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="文本域" description="FaTextarea" />
-    <FaPageMain>
-      <FaTextarea v-model="value" placeholder="请输入内容" />
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 83
src/views/component_built_in_example/toast.vue

@@ -1,83 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-import { toast } from 'vue-sonner'
-
-function showToast(type?: 'success' | 'error' | 'info' | 'warning' | 'loading1' | 'loading2') {
-  if (type) {
-    if (type === 'loading1') {
-      toast.promise(() => new Promise((resolve) => {
-        setTimeout(resolve, 2000)
-      }), {
-        loading: '加载中',
-        success: () => '加载成功',
-        error: () => '加载失败',
-        position: 'top-right',
-        duration: 3000,
-      })
-    }
-    else if (type === 'loading2') {
-      const loading = toast.loading('加载中', {
-        position: 'top-right',
-        duration: Infinity,
-      })
-      setTimeout(() => {
-        toast.dismiss(loading)
-        toast('Fantastic-admin 杰出的管理系统框架', {
-          description: '开箱即用,提供舒适开发体验',
-          position: 'top-right',
-          duration: 3000,
-        })
-      }, 2000)
-    }
-    else {
-      toast[type]('Fantastic-admin 杰出的管理系统框架', {
-        description: '开箱即用,提供舒适开发体验',
-        position: 'top-right',
-        duration: 3000,
-      })
-    }
-  }
-  else {
-    toast('Fantastic-admin 杰出的管理系统框架', {
-      description: '开箱即用,提供舒适开发体验',
-      position: 'top-right',
-      duration: 3000,
-    })
-  }
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="轻提示" description="FaToast" />
-    <FaPageMain>
-      <div class="flex gap-4">
-        <FaButton @click="showToast()">
-          默认
-        </FaButton>
-        <FaButton @click="showToast('success')">
-          成功
-        </FaButton>
-        <FaButton @click="showToast('error')">
-          错误
-        </FaButton>
-        <FaButton @click="showToast('info')">
-          信息
-        </FaButton>
-        <FaButton @click="showToast('warning')">
-          警告
-        </FaButton>
-        <FaButton @click="showToast('loading1')">
-          加载中 1
-        </FaButton>
-        <FaButton @click="showToast('loading2')">
-          加载中 2
-        </FaButton>
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 15
src/views/component_built_in_example/tooltip.vue

@@ -1,15 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="文字提示" description="FaTooltip" />
-    <FaPageMain>
-      <FaTooltip text="注意噢!">
-        <FaIcon name="i-ri:question-line" />
-      </FaTooltip>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 37
src/views/feature_example/leavetips.vue

@@ -1,37 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-import { useFaModal } from '@/ui/components/FaModal'
-
-const tipsSwitch = ref(true)
-
-const FaModal = useFaModal()
-
-onBeforeRouteLeave((_from, _to, next) => {
-  if (tipsSwitch.value) {
-    FaModal.confirm({
-      title: '温馨提醒',
-      content: '当前页面还没有保存,是否确定要离开?',
-      confirmButtonText: '确定离开',
-      onConfirm: () => {
-        next()
-      },
-    })
-  }
-  else {
-    next()
-  }
-})
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="页面离开提醒" description="在页面离开时,增加弹窗二次确认,避免因误操作导致当前页面数据清空" />
-    <FaPageMain>
-      <ElSwitch v-model="tipsSwitch" active-text="开启提醒" inactive-text="关闭提醒" />
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 27
src/views/feature_example/menuswitch.vue

@@ -1,27 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-  </route>
-
-<script setup lang="ts">
-const settingsStore = useSettingsStore()
-const menuStore = useMenuStore()
-
-const menu = useMenu()
-
-function switchTo() {
-  menu.switchTo(menuStore.actived + 1 < menuStore.allMenus.length ? menuStore.actived + 1 : 0)
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="主导航切换" description="可切换并激活指定的主导航" />
-    <FaPageMain>
-      <p>该特性只有在导航模式为 side 和 head 时生效。</p>
-      <ElButton :disabled="!['side', 'head'].includes(settingsStore.settings.menu.mode)" @click="switchTo">
-        切换下一个
-      </ElButton>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 31
src/views/feature_example/reload.vue

@@ -1,31 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-defineOptions({
-  name: 'FeatureExampleReload',
-})
-
-const mainPage = useMainPage()
-
-const text = ref('')
-
-function reload() {
-  mainPage.reload()
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="主页面刷新" description="重新渲染当前页面" />
-    <FaPageMain>
-      <p>该特性无视页面缓存,意味着即便当前页面开启了页面缓存,手动刷新也会强制清除当前页面内的组件和数据的状态。</p>
-      <ElInput v-model="text" />
-      <ElButton @click="reload">
-        刷新
-      </ElButton>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 533
src/views/feature_example/rules.vue

@@ -1,533 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-import { useClipboard } from '@vueuse/core'
-import { toast } from 'vue-sonner'
-
-const { text, copy, copied } = useClipboard()
-
-/* eslint-disable regexp/no-super-linear-backtracking, regexp/no-dupe-disjunctions, regexp/optimal-quantifier-concatenation, regexp/no-useless-assertions, regexp/no-contradiction-with-assertion, regexp/no-misleading-capturing-group */
-const rules = ref([
-  {
-    title: '火车车次',
-    rule: /^[GCDZTSPKXLY1-9]\d{1,4}$/,
-    examples: ['G1868', 'D102', 'D9', 'Z5', 'Z24', 'Z17'],
-  },
-  {
-    title: '手机机身码(IMEI)',
-    rule: /^\d{15,17}$/,
-    examples: ['123456789012345', '1234567890123456', '12345678901234567'],
-  },
-  {
-    title: '必须带端口号的网址(或ip)',
-    rule: /^((ht|f)tps?:\/\/)?[\w-]+(\.[\w-]+)+:\d{1,5}\/?$/,
-    examples: ['https://www.qq.com:8080', '127.0.0.1:5050', 'baidu.com:8001', 'http://192.168.1.1:9090'],
-    counterExamples: ['192.168.1.1', 'https://www.jd.com'],
-  },
-  {
-    // 参考:
-    // https://baike.baidu.com/item/%E9%A1%B6%E7%BA%A7%E5%9F%9F%E5%90%8D#4_1
-    // https://baike.baidu.com/item/%E9%A1%B6%E7%BA%A7%E5%9F%9F%E5%90%8D#7
-    // 也参考谷歌浏览器的地址栏, 如果输入非字母不会被识别为域名
-    title: '网址(URL)',
-    rule: /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{1,64})?\.)+[a-z]{2,6}\/?/,
-    examples: ['www.qq.com', 'https://vuejs.org/v2/api/#v-model', 'www.qq.99', '//www.qq.com', 'www.腾讯.cs', 'ftp://baidu.qq', 'http://baidu.com', 'https://www.amap.com/search?id=BV10060895&city=420111&geoobj=113.207951%7C29.992557%7C115.785782%7C31.204369&query_type=IDQ&query=%E5%85%89%E8%B0%B7%E5%B9%BF%E5%9C%BA(%E5%9C%B0%E9%93%81%E7%AB%99)&zoom=10.15', '360.com:8080/vue/#/a=1&b=2'],
-    counterExamples: ['....'],
-  },
-  {
-    title: '统一社会信用代码',
-    rule: /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/,
-    examples: ['91230184MA1BUFLT44', '92371000MA3MXH0E3W'],
-  },
-  {
-    title: '统一社会信用代码(宽松匹配)(15位/18位/20位数字/字母)',
-    rule: /^(([0-9A-Z]{15})|([0-9A-Z]{18})|([0-9A-Z]{20}))$/i,
-    examples: ['91110108772551611J', '911101085923662400'],
-  },
-  {
-    title: '迅雷链接',
-    rule: /^thunderx?:\/\/[a-zA-Z\d]+=$/,
-    examples: ['thunder://QUEsICdtYWduZXQ6P3h0PXVybjpidGloOjBCQTE0RTUxRkUwNjU1RjE0Qzc4NjE4RjY4NDY0QjZFNTEyNjcyOUMnWlo='],
-  },
-
-  {
-    title: 'ed2k链接(宽松匹配)',
-    rule: /^ed2k:\/\/\|file\|.+\|\/$/,
-    examples: ['ed2k://|file|%E5%AF%84%E7%94%9F%E8%99%AB.PARASITE.2019.HD-1080p.X264.AAC-UUMp4(ED2000.COM).mp4|2501554832|C0B93E0879C6071CBED732C20CE577A3|h=5HTKZPQFYRKORN52I3M7GQ4QQCIHFIBV|/'],
-  },
-
-  {
-    title: '磁力链接(宽松匹配)',
-    rule: /^magnet:\?xt=urn:btih:[0-9a-fA-F]{40}.*$/,
-    examples: ['magnet:?xt=urn:btih:40A89A6F4FB1498A98087109D012A9A851FBE0FC'],
-  },
-  {
-    title: '子网掩码(不包含 0.0.0.0)',
-    rule: /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(255|254|252|248|240|224|192|128|0)$/,
-    examples: ['255.255.255.0', '255.255.255.255', '255.240.0.0'],
-  },
-  {
-    title: 'linux"隐藏文件"路径',
-    rule: /^\/(?:[^/]+\/)*\.[^/]*/,
-    examples: ['/usr/ad/.dd', '/root/.gitignore', '/.gitignore'],
-  },
-  {
-    title: 'linux文件夹路径',
-    rule: /^\/(?:[^/]+\/)*$/,
-    examples: ['/usr/ad/dd/', '/', '/root/', '/ a a / a / a a /'],
-  },
-  {
-    title: 'linux文件路径',
-    rule: /^\/(?:[^/]+\/)*[^/]+$/,
-    examples: ['/root/b.ts', '/root/abc'],
-  },
-  {
-    title: 'window"文件夹"路径',
-    rule: /^[a-z]:\\(?:\w+\\?)*$/i,
-    examples: ['C:\\Users\\Administrator\\Desktop', 'e:\\m\\'],
-  },
-  {
-    title: 'window下"文件"路径',
-    rule: /^[a-z]:\\(?:\w+\\)*\w+\.\w+$/i,
-    examples: ['C:\\Users\\Administrator\\Desktop\\qq.link', 'e:\\m\\vscode.exe'],
-  },
-  {
-    title: '股票代码(A股)',
-    rule: /^(s[hz]|S[HZ])(000\d{3}|002\d{3}|300\d{3}|600\d{3}|60\d{4})$/,
-    examples: ['sz000858', 'SZ002136', 'sz300675', 'SH600600', 'sh601155'],
-  },
-  {
-    title: '大于等于0, 小于等于150, 支持小数位出现5, 如145.5, 用于判断考卷分数',
-    rule: /^150$|^(?:\d|[1-9]\d|1[0-4]\d)(?:\.5)?$/,
-    examples: [150, 100.5],
-  },
-  {
-    title: 'html注释',
-    rule: /<!--[\s\S]*?-->/g,
-    examples: ['<!--<div class="_bubble"></div>--><div>chenguzhen87</div><div class="_bubble"></div>-->'],
-  },
-  {
-    title: 'md5格式(32位)',
-    rule: /^[a-f0-9]{32}$/i,
-    examples: ['21fe181c5bfc16306a6828c1f7b762e8'],
-  },
-  {
-    title: 'GUID/UUID',
-    rule: /^[a-f\d]{4}(?:[a-f\d]{4}-){4}[a-f\d]{12}$/i,
-    examples: ['e155518c-ca1b-443c-9be9-fe90fdab7345', '41E3DAF5-6E37-4BCC-9F8E-0D9521E2AA8D', '00000000-0000-0000-0000-000000000000'],
-  },
-  {
-    title: '版本号(version)格式必须为X.Y.Z',
-    rule: /^\d+(?:\.\d+){2}$/,
-    examples: ['16.3.10'],
-  },
-  {
-    title: '视频(video)链接地址(视频格式可按需增删)',
-    rule: /^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i,
-    examples: ['http://www.abc.com/video/wc.avi'],
-  },
-  {
-    title: '图片(image)链接地址(图片格式可按需增删)',
-    rule: /^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,
-    examples: ['https://www.abc.com/logo.png', 'http://www.abc.com/logo.png'],
-  },
-  {
-    title: '24小时制时间(HH:mm:ss)',
-    rule: /^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d$/,
-    examples: ['23:34:55'],
-  },
-  {
-    title: '12小时制时间(hh:mm:ss)',
-    rule: /^(?:1[0-2]|0?[1-9]):[0-5]\d:[0-5]\d$/,
-    examples: ['11:34:55'],
-    counterExamples: ['23:34:55'],
-  },
-  {
-    title: 'base64格式',
-    rule: /^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([\w!$&',()*+;=\-.~:@/?%\s]*?)\s*$/i,
-    examples: ['data:image/gif;base64,xxxx=='],
-  },
-  {
-    title: '数字/货币金额(支持负数、千分位分隔符)',
-    rule: /^-?\d{1,3}(,\d{3})*(\.\d{1,2})?$/,
-    examples: [100, -0.99, 3, 234.32, -1, 900, 235.09, '12,345,678.90'],
-  },
-  {
-    title: '银行卡号(10到30位, 覆盖对公/私账户, 参考[微信支付](https://pay.weixin.qq.com/wiki/doc/api/xiaowei.php?chapter=22_1))',
-    rule: /^[1-9]\d{9,29}$/,
-    examples: ['6234567890', '6222026006705354217'],
-  },
-  {
-    title: '中文姓名',
-    rule: /^[\u4E00-\u9FA5·]{2,16}$/,
-    examples: ['葛二蛋', '凯文·杜兰特', '德克·维尔纳·诺维茨基'],
-  },
-  {
-    title: '英文姓名',
-    rule: /(^[a-z][a-z\s]{0,20}[a-z]$)/i,
-    examples: ['James', 'Kevin Wayne Durant', 'Dirk Nowitzki'],
-  },
-  {
-    title: '车牌号(新能源)',
-    rule: /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z](([DF]((?![IO])[a-zA-Z0-9](?![IO]))\d{4})|(\d{5}[DF]))$/,
-    examples: ['京AD92035', '甘G23459F', '京A19203D'],
-  },
-  {
-    title: '车牌号(非新能源)',
-    rule: /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]$/,
-    examples: ['京A00599', '黑D23908'],
-  },
-  {
-    title: '车牌号(新能源+非新能源)',
-    rule: /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,
-    examples: ['京A12345D', '京A00599', '京AD92035', '甘G23459F', '京AA92035'],
-    counterExamples: ['宁AD1234555555', '浙苏H6F681'],
-  },
-  {
-    title: '手机号(mobile phone)中国(严谨), 根据工信部最新公布的手机号段',
-    rule: /^(?:(?:\+|00)86)?1(?:3\d|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8\d|9[0125-9])\d{8}$/,
-    examples: ['008618311006933', '+8617888829981', '19119255642', '19519255642'],
-  },
-  {
-    title: '手机号(mobile phone)中国(宽松), 只要是13,14,15,16,17,18,19开头即可',
-    rule: /^(?:(?:\+|00)86)?1[3-9]\d{9}$/,
-    examples: ['008618311006933', '+8617888829981', '19119255642'],
-  },
-  {
-    title: '手机号(mobile phone)中国(最宽松), 只要是1开头即可, 如果你的手机号是用来接收短信, 优先建议选择这一条',
-    rule: /^(?:(?:\+|00)86)?1\d{10}$/,
-    examples: ['008618311006933', '+8617888829981', '19119255642'],
-  },
-  {
-    title: '日期(宽松)',
-    rule: /^\d{1,4}(-)(1[0-2]|0?[1-9])\1(0?[1-9]|[12]\d|30|31)$/,
-    examples: ['1990-12-12', '1-1-1', '0000-1-1'],
-    counterExamples: ['2020-00-01'],
-  },
-
-  {
-    title: '日期(严谨, 支持闰年判断)',
-    rule: /^((\d{3}[1-9]|\d{2}[1-9]\d|\d[1-9]\d{2}|[1-9]\d{3})-(((0[13578]|1[02])-(0[1-9]|[12]\d|3[01]))|((0[469]|11)-(0[1-9]|[12]\d|30))|(02-(0[1-9]|1\d|2[0-8]))))|(((\d{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/,
-    examples: ['1990-12-12', '2000-02-29'],
-    counterExamples: ['2021-02-29'],
-  },
-
-  {
-    title: '中国省',
-    rule: /^浙江|上海|北京|天津|重庆|黑龙江|吉林|辽宁|内蒙古|河北|新疆|甘肃|青海|陕西|宁夏|河南|山东|山西|安徽|湖北|湖南|江苏|四川|贵州|云南|广西|西藏|江西|广东|福建|台湾|海南|香港|澳门$/,
-    examples: ['浙江', '台湾'],
-    counterExamples: ['哈尔滨'],
-  },
-
-  {
-    title: '可以被moment转化成功的时间 YYYYMMDD HH:mm:ss',
-    rule: /^\d{4}(\S)(1[0-2]|0?[1-9])\1(0?[1-9]|[12]\d|30|31) (?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d$/,
-    examples: ['2020/01/01 23:59:59', '2020-01-01 00:00:00', '20200101 11:11:11'],
-    counterExamples: ['2020/00/01 23:59:59', '2020-01/01 23:59:59', '2020-01-01 23:59:61', '2020-01-0100:00:00'],
-  },
-  {
-    title: 'email(邮箱)',
-    rule: /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-z\-0-9]+\.)+[a-z]{2,}))$/i,
-    examples: ['90203918@qq.com', 'nbilly@126.com', '汉字@qq.com'],
-  },
-
-  {
-    title: '座机(tel phone)电话(国内),如: 0341-86091234',
-    rule: /^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,
-    examples: ['0936-4211235', '89076543', '010-12345678-1234'],
-  },
-
-  {
-    title: '身份证号(1代,15位数字)',
-    rule: /^[1-9]\d{7}(?:0\d|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}$/,
-    examples: ['123456991010193'],
-  },
-  {
-    title: '身份证号(2代,18位数字),最后一位是校验位,可能为数字或字符X',
-    rule: /^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i,
-    examples: ['12345619991205131x'],
-  },
-  {
-    title: '身份证号, 支持1/2代(15位/18位数字)',
-    rule: /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))([\dX])$/i,
-    examples: ['622223199912051311', '12345619991205131x', '123456991010193'],
-  },
-  {
-    title: '护照(包含香港、澳门)',
-    rule: /(^[EKGDSPH]\d{8}$)|(^((E[a-f])|([DSP]E)|(KJ)|(MA)|(1[45]))\d{7}$)/i,
-    examples: ['s28233515', '141234567', '159203084', 'MA1234567', 'K25345719'],
-  },
-  {
-    title: '帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线组合',
-    rule: /^[a-z]\w{4,15}$/i,
-    examples: ['justin', 'justin1989', 'justin_666'],
-  },
-  {
-    title: '中文/汉字',
-    // rule: /^[\u4E00-\u9FA5]+$/,
-    rule: /^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/,
-    examples: ['正则', '前端'],
-  },
-  {
-    title: '小数(支持科学计数)',
-    rule: /^[+-]?(\d+(\.\d*)?(e[+-]?\d+)?|\.\d+(e[+-]?\d+)?)$/i,
-    examples: ['0.0', '0.09', '4E+4'],
-  },
-  {
-    title: '只包含数字',
-    rule: /^\d+$/,
-    examples: [12345678],
-  },
-  {
-    title: 'html标签(宽松匹配)',
-    rule: /<(\w+)[^>]*>(.*?<\/\1>)?/,
-    examples: ['<div id="app"> 2333 </div>', '<input type="text">', '<br>'],
-  },
-
-  {
-    title: '匹配中文汉字和中文标点',
-    rule: /[\u4E00-\u9FA5|\u3002\uFF1F\uFF01\uFF0C\u3001\uFF1B\uFF1A\u201C\u201D\u2018\u2019\uFF08\uFF09\u300A\u300B\u3008\u3009\u3010\u3011\u300E\u300F\u300C\u300D\uFE43\uFE44\u3014\u3015\u2026\u2014\uFF5E\uFE4F\uFFE5]/,
-    examples: ['匹配中文汉字以及中文标点符号 。 ? ! , 、 ; : “ ” ‘ \' ( ) 《 》 〈 〉 【 】 『 』 「 」 ﹃ ﹄ 〔 〕 … — ~ ﹏ ¥'],
-  },
-
-  {
-    title: 'qq号格式正确',
-    rule: /^[1-9]\d{4,10}$/,
-    examples: [903013545, 9020304],
-  },
-  {
-    title: '数字和字母组成',
-    rule: /^[A-Z0-9]+$/i,
-    examples: ['james666', 'haha233hi'],
-  },
-  {
-    title: '英文字母',
-    rule: /^[a-z]+$/i,
-    examples: ['Russel'],
-  },
-  {
-    title: '小写英文字母组成',
-    rule: /^[a-z]+$/,
-    examples: ['russel'],
-  },
-  {
-    title: '大写英文字母',
-    rule: /^[A-Z]+$/,
-    examples: ['ABC', 'KD'],
-  },
-  {
-    title: '密码强度校验,最少6位,包括至少1个大写字母,1个小写字母,1个数字,1个特殊字符',
-    rule: /^\S*(?=\S{6})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/,
-    examples: ['Kd@curry666'],
-  },
-  {
-    title: '用户名校验,4到16位(字母,数字,下划线,减号)',
-    rule: /^[\w-]{4,16}$/,
-    examples: ['xiaohua_qq'],
-  },
-  {
-    title: 'ip-v4[:端口]',
-    rule: /^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:\d|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$/,
-    examples: ['172.16.0.0', '172.16.0.0:8080', '127.0.0.0', '127.0.0.0:998'],
-  },
-  {
-    title: '16进制颜色',
-    rule: /^#?([a-f0-9]{6}|[a-f0-9]{3}|[a-f0-9]{8}|[a-f0-9]{4})$/i,
-    examples: ['#f00', '#F90', '#000', '#fe9de8', '#f8f8f8ff', '#f003'],
-  },
-  {
-    title: '微信号(wx),6至20位,以字母开头,字母,数字,减号,下划线',
-    rule: /^[a-z][-\w]{5,19}$/i,
-    examples: ['github666', 'kd_-666'],
-  },
-  {
-    title: '邮政编码(中国)',
-    rule: /^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/,
-    examples: ['734500', '100101'],
-  },
-  {
-    title: '中文和数字',
-    rule: /^([\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|(\d))+$/,
-    examples: ['哈哈哈', '你好6啊'],
-  },
-  {
-    title: '不能包含字母',
-    rule: /^[^A-Z]*$/i,
-    examples: ['你好6啊', '@¥()!'],
-  },
-  {
-    title: 'java包名',
-    rule: /^([a-z_]\w*)+(\.[a-z_]\w*)+$/i,
-    examples: ['com.bbb.name'],
-  },
-  {
-    title: 'mac地址',
-    rule: /^(([a-f0-9][0,2468ace]:([a-f0-9]{2}:){4})|([a-f0-9][0,2468ace]-([a-f0-9]{2}-){4}))[a-f0-9]{2}$/i,
-    examples: ['38:f9:d3:4b:f5:51', '00-0C-29-CA-E4-66'],
-  },
-  {
-    title: '匹配连续重复的字符',
-    rule: /(.)\1+/,
-    examples: ['我我我', '112233', '11234'],
-  },
-  {
-    title: '数字和英文字母组成,并且同时含有数字和英文字母',
-    rule: /^(?=.*[a-z])(?=.*\d).+$/i,
-    examples: ['我a我1我', 'a对1'],
-  },
-  {
-    title: '香港身份证 ',
-    rule: /^[a-zA-Z]\d{6}\([\dA]\)$/,
-    examples: ['K034169(1)'],
-  },
-  {
-    // 参考:
-    // https://baike.baidu.com/item/%E6%BE%B3%E9%97%A8%E5%B1%85%E6%B0%91%E8%BA%AB%E4%BB%BD%E8%AF%81/12509098?fr=aladdin#5
-    title: '澳门身份证 ',
-    rule: /^[1|57]\d{6}\(\d\)$/,
-    examples: ['5686611(1)'],
-  },
-  {
-    title: '台湾身份证 ',
-    rule: /^[a-z]\d{9}$/i,
-    examples: ['U193683453'],
-  },
-  {
-    title: '大写字母,小写字母,数字,特殊符号 `@#$%^&*`~()-+=` 中任意3项密码',
-    rule: /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_]+$)(?![a-z0-9]+$)(?![a-z\W_]+$)(?![0-9\W_]+$)[\s\S]/,
-    examples: ['a1@', 'A1@', 'Aa@'],
-  },
-  {
-    title: 'ASCII码表中的全部的特殊字符',
-    rule: /[\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]+/,
-    examples: ['[', '.', '^', '&3%'],
-  },
-  {
-    title: '正整数,不包含0',
-    rule: /^\+?[1-9]\d*$/,
-    examples: [1231],
-  },
-  {
-    title: '负整数,不包含0',
-    rule: /^-[1-9]\d*$/,
-    examples: [-1231],
-  },
-  {
-    title: '整数',
-    rule: /^(?:0|-?[1-9]\d*)$/,
-    examples: [-1231, 123, 0],
-    counterExamples: ['01'],
-  },
-  {
-    title: '浮点数',
-    rule: /^(-?[1-9]\d*\.\d+|-?0\.0*[1-9]\d*|0\.0+)$/,
-    examples: ['1.23', '-1.01', '0.00'],
-    // allow "1.23", allow "-0.1", allow "0.00", ban "-0.00", ban "2.", allow "2.0"
-  },
-  {
-    title: '浮点数(严格)',
-    rule: /^(-?[1-9]\d*\.\d+|-?0\.\d*[1-9])$/,
-    examples: ['1.23', '-1.01'],
-    // allow "1.23", allow "-0.1", ban "2.", ban "2.0"
-  },
-  {
-    title: 'email(支持中文邮箱)',
-    rule: /^[A-Z0-9\u4E00-\u9FA5]+@[\w-]+(\.[\w-]+)+$/i,
-    examples: ['90203918@qq.com', 'nbilly@126.com', '啦啦啦@126.com'],
-  },
-
-  {
-    title: '域名(非网址, 不包含协议)',
-    rule: /^([0-9a-z-]+\.)+([a-z]{2,})$/i,
-    examples: ['www.baidu.com', 'baidu.com', 'baidu.com.cn', 'api.baidu.com', 'nodejs.org', 'nodejs.cn'],
-    counterExamples: ['http://baidu.com', 'https://baidu.com', 'www.百度.com'],
-  },
-
-  {
-    title: '军官/士兵证',
-    rule: /^[\u4E00-\u9FA5](字第)([0-9a-z]{4,8})(号?)$/i,
-    examples: ['军字第2001988号', '士字第P011816X号'],
-  },
-  {
-    title: '户口薄',
-    rule: /(^\d{15}$)|(^\d{18}$)|(^\d{17}([\dX])$)/i,
-    examples: ['441421999707223115'],
-  },
-])
-
-const dialog = ref({
-  visible: false,
-  index: 0,
-  form: {
-    test: '',
-  },
-  formRules: {
-    test: [
-      {
-        validator: (_rule: any, value: any, callback: any) => {
-          if (rules.value[dialog.value.index].rule.test(value)) {
-            callback()
-          }
-          else {
-            callback(new Error('不通过'))
-          }
-        },
-        trigger: 'change',
-      },
-    ],
-  },
-})
-
-watch(copied, (val) => {
-  val && toast.success(`复制成功:${text.value}`)
-})
-
-function test(index: number) {
-  dialog.value.index = index
-  dialog.value.form.test = ''
-  dialog.value.visible = true
-}
-function open(url: string) {
-  window.open(url, '_blank')
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="常用正则" description="正则来源于 Github 上 any-rule 项目">
-      <FaButton variant="outline" @click="open('https://github.com/any86/any-rule')">
-        <FaIcon name="i-ep:link" />
-        访问 any-rule
-      </FaButton>
-    </FaPageHeader>
-    <FaPageMain v-for="(item, index) in rules" :key="index" :title="item.title">
-      <div class="rule">
-        {{ item.rule }}
-      </div>
-      <div class="space-x-2">
-        <FaButton @click="copy(item.rule.toString())">
-          复制
-        </FaButton>
-        <FaButton variant="outline" @click="test(index)">
-          测试
-        </FaButton>
-      </div>
-    </FaPageMain>
-    <ElDialog v-model="dialog.visible" :title="rules[dialog.index].title" width="500px">
-      <ElForm :model="dialog.form" :rules="dialog.formRules">
-        <ElFormItem prop="test">
-          <ElInput v-model="dialog.form.test" :placeholder="`例如:${rules[dialog.index].examples.join('、')}`" />
-        </ElFormItem>
-      </ElForm>
-    </ElDialog>
-  </div>
-</template>
-
-<style scoped>
-.rule {
-  margin-bottom: 20px;
-}
-</style>

+ 0 - 55
src/views/feature_example/scroll.vue

@@ -1,55 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-defineOptions({
-  name: 'FeatureExampleScroll',
-})
-
-const scrollTop = ref(0)
-
-// 激活时定位到缓存的滚动位置
-onActivated(() => {
-  nextTick(() => {
-    document.documentElement.scrollTop = scrollTop.value
-  })
-})
-
-// 离开时记录当前页面滚动位置
-onBeforeRouteLeave((_to, _from, next) => {
-  scrollTop.value = document.documentElement.scrollTop
-  next()
-})
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="记录滚动位置" description="当前路由需开启页面缓存。你可以滚动当前页,然后跳转到其它页面,再回来时会自动定位到离开时的滚动位置" />
-    <div>
-      <FaPageMain title="宇宙起源">
-        <p>宇宙是广袤空间和其中存在的各种天体以及弥漫物质的总称。宇宙起源是一个极其复杂的问题。 宇宙是物质世界,它处于不断的运动和发展中。千百年来,科学家们一直在探寻宇宙是什么时候、如何形成的。直到今天,许多科学家认为,宇宙是由大约137亿年前发生的一次大爆炸形成的。宇宙内的所存物质和能量都聚集到了一起,并浓缩成很小的体积,温度极高,密度极大,瞬间产生巨大压力,之后发生了大爆炸,这次大爆炸的反应原理被物理学家们称为量子物理。大爆炸使物质四散出去,宇宙空间不断膨胀,温度也相应下降,后来相继出现在宇宙中的所有星系、恒星、行星乃至生命。</p>
-      </FaPageMain>
-      <FaPageMain title="研究经历">
-        <p>空间和时间的本质是什么?这是从2000多年前的古代哲学家到现代天文学家一直都在苦苦思索的问题。经过了哥白尼、赫歇尔、哈勃的从太阳系、银河系、河外星系的探索宇宙三部曲,宇宙学已经不再是幽深玄奥的抽象哲学思辨,而是建立在天文观测和物理实验基础上的一门现代科学。</p>
-        <p>直到20世纪,出现了两种“宇宙模型”比较有影响。一是稳态理论,一是大爆炸理论。20世纪20年代后期,爱德温·哈勃发现了红移现象,说明宇宙正在膨胀。20世纪60年代中期,阿尔诺·彭齐亚斯和罗伯特·威尔逊(Robert Wilson)发现了“宇宙微波背景辐射”。这两个发现给大爆炸理论以有力的支持。</p>
-      </FaPageMain>
-      <FaPageMain title="相关理论">
-        <p>现代宇宙系当中最有影响的一种学说,又称大爆炸宇宙学。与其它宇宙模型相比,它能说明较多的观测事实。它的主要观点是认为我们的宇宙曾有一段从热到冷的演化历程。在这个时期里,宇宙体系并不是静止的,而是在不断地膨胀,使物质密度从密到稀地演化。这一从热到冷、从密到稀的过程如同一次规模巨大的爆发。根据大爆炸宇宙学的观点,大爆炸的整个过程是:在宇宙的早期,温度极高,在100亿度以上。物质密度也相当大,整个宇宙体系达到平衡。宇宙间只有中子、质子、电子、光子和中微子等一些基本粒子形态的物质。但是因为整个体系在不断膨胀,结果温度很快下降。当温度降到10亿度左右时,中子开始失去自由存在的条件,它要么发生衰变,要么与质子结合成重氢、氦等元素;化学元素就是从这一时期开始形成的。温度进一步下降到100万度后,早期形成化学元素的过程结束(见元素合成理论)。宇宙间的物质主要是质子、电子、光子和一些比较轻的原子核。当温度降到几千度时,辐射减退,宇宙间主要是气态物质,气体逐渐凝聚成气云,再进一步形成各种各样的恒星体系,成为我们今天看到的宇宙。大爆炸模型能统一地说明以下几个观测事实:</p>
-        <ol>
-          <li>大爆炸理论主张所有恒星都是在温度下降后产生的,因而任何天体的年龄都应比自温度下降至今天这一段时间为短,即应小于200亿年。各种天体年龄的测量证明了这一点。</li>
-          <li>观测到河外天体有系统性的谱线红移,而且红移与距离大体成正比。如果用多普勒效应来解释,那么红移就是宇宙膨胀的反映。</li>
-          <li>在各种不同天体上,氦丰度相当大,而且大都是30%。用恒星核反应机制不足以说明为什么有如此多的氦。而根据大爆炸理论,早期温度很高,产生氦的效率也很高,则可以说明这一事实。</li>
-          <li>根据宇宙膨胀速度以及氦丰度等,可以具体计算宇宙每一历史时期的温度。大爆炸理论的创始人之一伽莫夫曾预言,今天的宇宙已经很冷,只有绝对温度几度。1965年,果然在微波波段上探测到具有热辐射谱的微波背景辐射,温度约为3K。</li>
-        </ol>
-        <p>大爆炸理论认为,宇宙起源于一个单独的无维度的点,即一个在空间和时间上都无尺度但却包含了宇宙全部物质的奇点。至少是在120~150亿年以前,宇宙及空间本身由这个点爆炸形成。</p>
-        <p>在一次无与伦比的大爆炸中分裂成无数碎片,形成了今天的宇宙。1948年,俄裔美籍物理学家伽莫夫等人,又详细勾画出宇宙由一个致密炽热的奇点于150亿年前一次大爆炸后,经一系列元素演化到最后形成星球、星系的整个膨胀演化过程的图像,该理论存在许多使人迷惑之处。</p>
-        <p>宏观宇宙是相对无限延伸的。“大爆炸宇宙论”关于宇宙当初仅仅是一个点,而它周围却是一片空白,即将人类至今还不能确定范围也无法计算质量的宇宙压缩在一个极小空间内的假设只是一种臆测。况且从能量与质量的正比关系考虑,一个小点无缘无故地突然爆炸成浩瀚宇宙的能量从何而来呢?</p>
-        <p>人类把地球绕太阳转一圈确定为衡量时间的标准——年。宇宙中所有天体的运动速度都是不同的,在宇宙范围,时间没有衡量标准。譬如地球上东西南北的方向概念在宇宙范围就没有任何意义。既然年的概念对宇宙而言并不存在,大爆炸宇宙论又如何用年的概念去推算宇宙的确切年龄呢?</p>
-        <p>1929年,美国天文学家哈勃提出了星系的红移量与星系间的距离成正比的哈勃定律,并推导出星系都在互相远离的宇宙膨胀说。哈勃定律只是说明了距离地球越远的星系运动速度越快--星系红移量与星系距离呈正比关系。但他没能发现很重要的另一点--星系红移量与星系质量也呈正比关系。</p>
-        <p>宇宙中星系间距离非常非常遥远,光线传播因空间物质的吸收、阻挡会逐渐减弱,那些运动速度越快的星系就是质量越大的星系。质量大,能量辐射就强,因此我们观察到的红移量极大的星系,当然是质量极大的星系。这就是被称作“类星体”的遥远星系因质量巨大而红移量巨大的原因。另外那些质量小、能量辐射弱的星系(除极少数距银河系很近的星系,如大、小麦哲伦星系外)则很难观察到,大小恒星都能看到,所以恒星的红移紫移数量大致相等。</p>
-      </FaPageMain>
-    </div>
-  </div>
-</template>

+ 0 - 137
src/views/feature_example/table.autoheight.vue

@@ -1,137 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-defineOptions({
-  name: 'FeatureExampleTableautoheight',
-})
-
-const dataList = ref([
-  {
-    date: '2016-05-02',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1518 弄',
-  },
-  {
-    date: '2016-05-04',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1517 弄',
-  },
-  {
-    date: '2016-05-01',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1519 弄',
-  },
-  {
-    date: '2016-05-03',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1516 弄',
-  },
-  {
-    date: '2016-05-04',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1517 弄',
-  },
-  {
-    date: '2016-05-01',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1519 弄',
-  },
-  {
-    date: '2016-05-03',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1516 弄',
-  },
-  {
-    date: '2016-05-04',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1517 弄',
-  },
-  {
-    date: '2016-05-01',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1519 弄',
-  },
-  {
-    date: '2016-05-03',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1516 弄',
-  },
-  {
-    date: '2016-05-04',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1517 弄',
-  },
-  {
-    date: '2016-05-01',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1519 弄',
-  },
-  {
-    date: '2016-05-03',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1516 弄',
-  },
-  {
-    date: '2016-05-04',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1517 弄',
-  },
-  {
-    date: '2016-05-01',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1519 弄',
-  },
-  {
-    date: '2016-05-03',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1516 弄',
-  },
-  {
-    date: '2016-05-03',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1516 弄',
-  },
-  {
-    date: '2016-05-04',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1517 弄',
-  },
-  {
-    date: '2016-05-01',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1519 弄',
-  },
-  {
-    date: '2016-05-03',
-    name: '王小虎',
-    address: '上海市普陀区金沙江路 1516 弄',
-  },
-])
-</script>
-
-<template>
-  <div class="absolute-container">
-    <FaPageHeader title="表格高度自适应" class="mb-0" />
-    <FaPageMain class="flex-1 overflow-auto" main-class="flex-1 flex flex-col overflow-auto">
-      <ElTable :data="dataList" stripe highlight-current-row border height="100%">
-        <ElTableColumn type="index" width="50" />
-        <ElTableColumn prop="date" label="日期" width="180" />
-        <ElTableColumn prop="name" label="姓名" width="180" />
-        <ElTableColumn prop="address" label="地址" />
-      </ElTable>
-    </FaPageMain>
-  </div>
-</template>
-
-<style scoped>
-.absolute-container {
-  position: absolute;
-  display: flex;
-  flex-direction: column;
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 67
src/views/feature_example/vueuse.vue

@@ -1,67 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-import { useClipboard, useDebounceFn, useThrottleFn } from '@vueuse/core'
-import { toast } from 'vue-sonner'
-
-function message() {
-  toast.success('恭喜你,这是一条成功消息')
-}
-
-const debounce = useDebounceFn(() => {
-  message()
-}, 1000)
-
-const throttle = useThrottleFn(() => {
-  message()
-}, 1000)
-
-const input = ref('')
-const { text, copy, copied, isSupported } = useClipboard()
-watch(copied, (val) => {
-  val && toast.success(`复制成功:${text.value}`)
-})
-
-function open(url: string) {
-  window.open(url, '_blank')
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="VueUse" description="VueUse 是一个 Vue Composition API 实用程序的集合,更多 API 和例子请查看 VueUse 官网。">
-      <FaButton variant="outline" @click="open('https://vueuse.org/')">
-        <FaIcon name="i-ep:link" />
-        VueUse 官网
-      </FaButton>
-    </FaPageHeader>
-    <FaPageMain title="防抖:debounce">
-      <p class="mt-0">
-        所谓防抖,就是指触发事件后在 n 秒内函数只能执行一次,如果在 n 秒内又触发了事件,则会重新计算函数执行时间。
-      </p>
-      <ElButton @click="debounce">
-        连续点击我,只会执行最后一次点击事件
-      </ElButton>
-    </FaPageMain>
-    <FaPageMain title="节流:throttle">
-      <p class="mt-0">
-        所谓节流,就是指连续触发事件但是在 n 秒中只执行一次函数。节流会稀释函数的执行频率。
-      </p>
-      <ElButton @click="throttle">
-        连续点击我,每一秒只会执行一次点击事件
-      </ElButton>
-    </FaPageMain>
-    <FaPageMain v-if="isSupported" title="复制:clipboard">
-      <ElInput v-model="input" placeholder="输入内容,并点击复制按钮">
-        <template #append>
-          <ElButton @click="copy(input)">
-            复制
-          </ElButton>
-        </template>
-      </ElInput>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 34
src/views/icon_example/iconify.vue

@@ -1,34 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-import { useClipboard } from '@vueuse/core'
-import { toast } from 'vue-sonner'
-import { icons } from '@/iconify'
-
-const { copy, isSupported } = useClipboard()
-
-function onCopy(iconName: string) {
-  if (isSupported.value) {
-    copy(`<FaIcon name="i-${iconName}" />`)
-    toast.success('复制成功', {
-      description: `<FaIcon name="i-${iconName}" />`,
-    })
-  }
-}
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="Iconify" description="本框架支持使用 Iconify 的所有图标集,以下展示部分图标集" />
-    <FaPageMain v-for="(icon, key) in icons" :key="key" :title="icon.info.name">
-      <div class="flex-center-start gap-2">
-        <FaButton v-for="(item, index) in icon.info.samples" :key="index" variant="outline" size="icon" @click="onCopy(`${icon.prefix}:${item}`)">
-          <FaIcon :name="`${icon.prefix}:${item}`" class="size-4" />
-        </FaButton>
-      </div>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 34
src/views/icon_example/image.vue

@@ -1,34 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const webImage = ref('https://picsum.photos/50')
-function change() {
-  webImage.value = ''
-  webImage.value = `https://picsum.photos/50?random=${Math.random()}`
-}
-
-const fa = new URL('@/assets/images/logo.svg', import.meta.url).href
-</script>
-
-<template>
-  <div>
-    <FaPageHeader title="Image Icon" description="可以使用本地或网络图片" />
-    <FaPageMain>
-      <p>网络图片</p>
-      <FaIcon :name="webImage" class="size-12" />
-      <div class="space-x-2">
-        <FaButton @click="change">
-          更改图片
-        </FaButton>
-        <FaButton @click="webImage = ''">
-          创建错误
-        </FaButton>
-      </div>
-      <p>本地图片</p>
-      <FaIcon :name="fa" class="size-12" />
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 25
src/views/icon_example/svg.vue

@@ -1,25 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<template>
-  <div>
-    <FaPageHeader title="SVG Icon" description="可以使用自定义的 SVG 图标" />
-    <FaPageMain>
-      <p>单色 SVG Icon</p>
-      <FaIcon name="example-emotion-line" class="size-12" />
-      <FaIcon name="example-emotion-laugh-line" class="size-12" />
-      <FaIcon name="example-emotion-unhappy-line" class="size-12" />
-      <p>彩色 SVG Icon</p>
-      <FaIcon name="example-crown" class="size-12" />
-      <FaIcon name="example-star" class="size-12" />
-      <FaIcon name="example-vip" class="size-12" />
-      <p>使用方法:</p>
-      <ol>
-        <li>上 <a href="https://www.iconfont.cn/" target="_blank">Iconfont</a> 下载需要的 svg 图标</li>
-        <li>将 svg 文件放入 ./src/assets/icons 目录下,文件名即为 name</li>
-      </ol>
-    </FaPageMain>
-  </div>
-</template>

+ 3 - 3
src/views/index.vue

@@ -114,7 +114,7 @@ const dataList = ref([
     <FaPageHeader>
       <template #title>
         <div class="flex items-center gap-4">
-          欢迎使用角色管理系统
+          欢迎使用 anycall 管理系统
         </div>
       </template>
       <template #description>
@@ -123,14 +123,14 @@ const dataList = ref([
         </div>
       </template>
     </FaPageHeader>
-    <FaPageMain class="flex-1 overflow-auto" main-class="flex-1 flex flex-col overflow-auto">
+    <!-- <FaPageMain class="flex-1 overflow-auto" main-class="flex-1 flex flex-col overflow-auto">
       <ElTable :data="dataList" stripe highlight-current-row border height="100%">
         <ElTableColumn type="index" width="50" />
         <ElTableColumn prop="date" label="日期" width="180" />
         <ElTableColumn prop="name" label="姓名" width="180" />
         <ElTableColumn prop="address" label="地址" />
       </ElTable>
-    </FaPageMain>
+    </FaPageMain> -->
   </div>
 </template>
 

+ 0 - 25
src/views/jsx_example/components/JsxComp/index.vue

@@ -1,25 +0,0 @@
-<script lang="tsx">
-export default defineComponent({
-  name: 'JsxComp',
-  setup() {
-    return () => (
-      <div class="test">
-        这是一个用
-        <span>JSX</span>
-        编写的SFC组件。
-      </div>
-    )
-  },
-})
-</script>
-
-<style scoped>
-.test {
-  font-size: 24px;
-
-  span {
-    font-weight: bold;
-    color: #f00;
-  }
-}
-</style>

+ 0 - 94
src/views/jsx_example/index.vue

@@ -1,94 +0,0 @@
-<script lang="tsx">
-import JsxComp from './components/JsxComp/index.vue'
-
-export default defineComponent({
-  name: 'JsxExample',
-  setup() {
-    return () => {
-      const iconsArr = ref([
-        'i-file-icons:jsx',
-        'i-ep:element-plus',
-      ])
-      const icons = (
-        iconsArr.value.map((v) => {
-          return (
-            <fa-icon key={v} name={v} class="example-icon" />
-          )
-        })
-      )
-
-      const count = ref(0)
-      function onPlus(v = 1) {
-        count.value += v
-      }
-      const html = '<p>这是<i>一段</i><b>HTML</b>代码</p>'
-      const html2 = (
-        <p>
-          这也是
-          <i>一段</i>
-          <b>HTML</b>
-          代码
-        </p>
-      )
-
-      return (
-        <div>
-          <fa-page-header title="JSX" content="请查看本页面源码,更多 JSX 介绍请访问官网文档。" />
-          <fa-page-main>
-            <div class="space-y-2">
-              <p>调用 FaIcon 组件</p>
-              {icons}
-            </div>
-            <fa-divider />
-            <div class="space-y-2">
-              <div class="test1">
-                <div class="a"></div>
-              </div>
-              <div class="test2">
-                <div class="a"></div>
-              </div>
-            </div>
-            <fa-divider />
-            <div class="space-y-2">
-              <fa-button onClick={() => onPlus(10)}>
-                点我:
-                { count.value }
-              </fa-button>
-              <div v-html={html}></div>
-              {html2}
-            </div>
-            <fa-divider />
-            <JsxComp />
-          </fa-page-main>
-        </div>
-      )
-    }
-  },
-})
-</script>
-
-<style scoped>
-.example-icon {
-  font-size: 48px;
-}
-
-.test1 {
-  font-size: 24px;
-
-  .a {
-    width: 100px;
-    height: 100px;
-    background-color: #000;
-  }
-}
-
-.test2 {
-  font-size: 24px;
-
-  .a {
-    width: 100px;
-    height: 100px;
-    background-color: #ff0;
-  }
-}
-</style>

+ 0 - 16
src/views/keep_alive_example/detail.vue

@@ -1,16 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-const router = useRouter()
-</script>
-
-<template>
-  <FaPageMain>
-    <FaButton @click="router.go(-1)">
-      返回
-    </FaButton>
-  </FaPageMain>
-</template>

+ 0 - 25
src/views/keep_alive_example/nested/nested.vue

@@ -1,25 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-defineOptions({
-  name: 'TabExampleNested1',
-})
-
-const keepAliveStore = useKeepAliveStore()
-</script>
-
-<template>
-  <div>
-    <FaPageMain>
-      <div>层级:1</div>
-      <RouterView v-slot="{ Component }">
-        <KeepAlive :include="keepAliveStore.list">
-          <component :is="Component" />
-        </KeepAlive>
-      </RouterView>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 25
src/views/keep_alive_example/nested/nested/nested.vue

@@ -1,25 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-defineOptions({
-  name: 'TabExampleNested2',
-})
-
-const keepAliveStore = useKeepAliveStore()
-</script>
-
-<template>
-  <div>
-    <FaPageMain>
-      <div>层级:1-1</div>
-      <RouterView v-slot="{ Component }">
-        <KeepAlive :include="keepAliveStore.list">
-          <component :is="Component" />
-        </KeepAlive>
-      </RouterView>
-    </FaPageMain>
-  </div>
-</template>

+ 0 - 20
src/views/keep_alive_example/nested/nested/nested/index.vue

@@ -1,20 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script setup lang="ts">
-defineOptions({
-  name: 'TabExampleNestedTest',
-})
-
-const val = ref('')
-</script>
-
-<template>
-  <div>
-    <FaPageMain title="层级 1-1-1">
-      <FaInput v-model="val" />
-    </FaPageMain>
-  </div>
-</template>

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff