mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-23 08:24:32 +08:00
init: antdv-next
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import type { ButtonProps } from 'ant-design-vue';
|
||||
import type { ButtonProps } from 'antdv-next';
|
||||
|
||||
import type { CSSProperties, PropType } from 'vue';
|
||||
|
||||
@@ -8,7 +8,7 @@ import { computed, ref, unref, watch, watchEffect } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { $t as t } from '@vben/locales';
|
||||
|
||||
import { message } from 'ant-design-vue';
|
||||
import { message } from 'antdv-next';
|
||||
|
||||
import cropperModal from './cropper-modal.vue';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import { ref } from 'vue';
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { $t as t } from '@vben/locales';
|
||||
|
||||
import { Avatar, message, Space, Tooltip, Upload } from 'ant-design-vue';
|
||||
import { Avatar, message, Space, Tooltip, Upload } from 'antdv-next';
|
||||
import { isFunction } from 'lodash-es';
|
||||
|
||||
import { dataURLtoBlob } from '#/utils/file/base64Conver';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="tsx">
|
||||
import type { CardSize } from 'ant-design-vue/es/card/Card';
|
||||
import type { DescriptionsProps } from 'ant-design-vue/es/descriptions';
|
||||
import type { CardSize } from 'antdv-next/es/card/Card';
|
||||
import type { DescriptionsProps } from 'antdv-next/es/descriptions';
|
||||
|
||||
import type { CSSProperties, PropType, Slots } from 'vue';
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { DescInstance, DescItem, DescriptionProps } from './typing';
|
||||
|
||||
import { computed, defineComponent, ref, toRefs, unref, useAttrs } from 'vue';
|
||||
|
||||
import { Card, Descriptions } from 'ant-design-vue';
|
||||
import { Card, Descriptions } from 'antdv-next';
|
||||
import { get, isFunction } from 'lodash-es';
|
||||
|
||||
const props = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DescriptionsProps } from 'ant-design-vue/es/descriptions';
|
||||
import type { DescriptionsProps } from 'antdv-next/es/descriptions';
|
||||
import type { JSX } from 'vue/jsx-runtime';
|
||||
|
||||
import type { CSSProperties, VNode } from 'vue';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { VNode } from 'vue';
|
||||
|
||||
import { Tag } from 'ant-design-vue';
|
||||
import { Tag } from 'antdv-next';
|
||||
|
||||
interface TagType {
|
||||
[key: string]: { color: string; label: string };
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { DictData } from '#/api/system/dict/dict-data-model';
|
||||
|
||||
import { computed, defineComponent, h, isVNode } from 'vue';
|
||||
|
||||
import { Spin, Tag } from 'ant-design-vue';
|
||||
import { Spin, Tag } from 'antdv-next';
|
||||
import { isFunction, isString } from 'lodash-es';
|
||||
|
||||
import { tagTypes } from './data';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { defineComponent, h } from 'vue';
|
||||
|
||||
import { Button } from 'ant-design-vue';
|
||||
import buttonProps from 'ant-design-vue/es/button/buttonTypes';
|
||||
import { Button } from 'antdv-next';
|
||||
import { omit } from 'lodash-es';
|
||||
|
||||
/**
|
||||
@@ -9,12 +8,18 @@ import { omit } from 'lodash-es';
|
||||
*/
|
||||
export const GhostButton = defineComponent({
|
||||
name: 'GhostButton',
|
||||
props: omit(buttonProps(), ['type', 'ghost', 'size']),
|
||||
props: omit({}, ['type', 'ghost', 'size']),
|
||||
setup(props, { attrs, slots }) {
|
||||
return () =>
|
||||
h(
|
||||
Button,
|
||||
{ ...props, ...attrs, type: 'primary', ghost: true, size: 'small' },
|
||||
{
|
||||
...props,
|
||||
...attrs,
|
||||
type: 'primary',
|
||||
ghost: true,
|
||||
size: 'small',
|
||||
},
|
||||
slots,
|
||||
);
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { App } from 'vue';
|
||||
|
||||
import { Button as AButton } from 'ant-design-vue';
|
||||
import { Button as AButton } from 'antdv-next';
|
||||
|
||||
import { GhostButton } from './button';
|
||||
|
||||
@@ -8,7 +8,7 @@ import { GhostButton } from './button';
|
||||
* 全局组件注册
|
||||
*/
|
||||
export function setupGlobalComponent(app: App) {
|
||||
app.use(AButton);
|
||||
app.component('AButton', AButton);
|
||||
// 表格操作列专用按钮
|
||||
app.component('GhostButton', GhostButton);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="tsx">
|
||||
import { computed } from 'vue';
|
||||
|
||||
import { Tag } from 'ant-design-vue';
|
||||
import { Tag } from 'antdv-next';
|
||||
|
||||
defineOptions({ name: 'OptionsTag' });
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { computed, ref } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { Modal, Switch } from 'ant-design-vue';
|
||||
import { Modal, Switch } from 'antdv-next';
|
||||
import { isFunction } from 'lodash-es';
|
||||
|
||||
type CheckedType = boolean | number | string;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { MessageType } from 'ant-design-vue/es/message';
|
||||
import type { SelectHandler } from 'ant-design-vue/es/vc-select/Select';
|
||||
import type { MessageType } from 'antdv-next/dist/message/interface';
|
||||
|
||||
import type { TenantOption } from '#/api';
|
||||
|
||||
@@ -11,7 +10,7 @@ import { useAccess } from '@vben/access';
|
||||
import { useTabs } from '@vben/hooks';
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { message, Select, Spin } from 'ant-design-vue';
|
||||
import { message, Select, Spin } from 'antdv-next';
|
||||
import { storeToRefs } from 'pinia';
|
||||
|
||||
import { tenantDynamicClear, tenantDynamicToggle } from '#/api/system/tenant';
|
||||
@@ -133,6 +132,7 @@ function filterOption(input: string, option: TenantOption) {
|
||||
<template>
|
||||
<div v-if="showToggle" class="mr-[8px] hidden md:block">
|
||||
<Select
|
||||
variant="outlined"
|
||||
v-model:value="selected"
|
||||
:disabled="loading"
|
||||
:field-names="{ label: 'companyName', value: 'tenantId' }"
|
||||
|
||||
@@ -9,7 +9,7 @@ import { computed, nextTick, ref, shallowRef, useAttrs, watch } from 'vue';
|
||||
import { preferences, usePreferences } from '@vben/preferences';
|
||||
|
||||
import Editor from '@tinymce/tinymce-vue';
|
||||
import { Spin } from 'ant-design-vue';
|
||||
import { Spin } from 'antdv-next';
|
||||
import { camelCase } from 'lodash-es';
|
||||
|
||||
import { uploadApi } from '#/api';
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { MenuOption } from '#/api/system/menu/model';
|
||||
|
||||
import { eachTree, treeToList } from '@vben/utils';
|
||||
|
||||
import { notification } from 'ant-design-vue';
|
||||
import { notification } from 'antdv-next';
|
||||
import { difference, isEmpty, isUndefined } from 'lodash-es';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
import type { TourProps } from 'ant-design-vue';
|
||||
import type { TourProps } from 'antdv-next';
|
||||
|
||||
import { defineComponent, ref } from 'vue';
|
||||
|
||||
import { useLocalStorage } from '@vueuse/core';
|
||||
import { Tour } from 'ant-design-vue';
|
||||
import { Tour } from 'antdv-next';
|
||||
|
||||
/**
|
||||
* 全屏引导
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
比如: 按钮下放目录 按钮下放菜单 按钮下放按钮
|
||||
-->
|
||||
<script setup lang="tsx">
|
||||
import type { RadioChangeEvent } from 'ant-design-vue';
|
||||
import type { RadioChangeEvent } from 'antdv-next';
|
||||
|
||||
import type { MenuPermissionOption } from './data';
|
||||
|
||||
@@ -15,7 +15,7 @@ import { nextTick, onMounted, ref, shallowRef, watch } from 'vue';
|
||||
|
||||
import { cloneDeep, findGroupParentIds } from '@vben/utils';
|
||||
|
||||
import { Alert, Checkbox, RadioGroup, Space } from 'ant-design-vue';
|
||||
import { Alert, Checkbox, RadioGroup, Space } from 'antdv-next';
|
||||
import { uniq } from 'lodash-es';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import type { CheckboxChangeEvent } from 'ant-design-vue/es/checkbox/interface';
|
||||
import type { DataNode } from 'ant-design-vue/es/tree';
|
||||
import type { CheckboxChangeEvent } from 'antdv-next/es/checkbox/interface';
|
||||
import type { DataNode } from 'antdv-next/es/tree';
|
||||
|
||||
import { computed, nextTick, onMounted, ref } from 'vue';
|
||||
|
||||
import { treeToList } from '@vben/utils';
|
||||
|
||||
import { Checkbox, Tree } from 'ant-design-vue';
|
||||
import { Checkbox, Tree } from 'antdv-next';
|
||||
|
||||
/** 需要禁止透传 */
|
||||
defineOptions({ inheritAttrs: false });
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import type { UploadFile, UploadProps } from 'ant-design-vue';
|
||||
import type { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
||||
import type { UploadFile, UploadProps } from 'antdv-next';
|
||||
import type { UploadRequestOption } from 'antdv-next/lib/vc-upload/interface';
|
||||
|
||||
import type { AxiosProgressEvent, UploadApi } from '#/api';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { ref, toRefs, watch } from 'vue';
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { UploadOutlined } from '@ant-design/icons-vue';
|
||||
import { message, Upload } from 'ant-design-vue';
|
||||
import { message, Upload } from 'antdv-next';
|
||||
import { isArray, isFunction, isObject, isString } from 'lodash-es';
|
||||
|
||||
import { uploadApi } from '#/api';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import type { UploadFile, UploadProps } from 'ant-design-vue';
|
||||
import type { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
||||
import type { UploadFile, UploadProps } from 'antdv-next';
|
||||
import type { UploadRequestOption } from 'antdv-next/lib/vc-upload/interface';
|
||||
|
||||
import type { AxiosProgressEvent, UploadApi } from '#/api';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { ref, toRefs, watch } from 'vue';
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { PlusOutlined } from '@ant-design/icons-vue';
|
||||
import { message, Modal, Upload } from 'ant-design-vue';
|
||||
import { message, Modal, Upload } from 'antdv-next';
|
||||
import { isArray, isFunction, isObject, isString, uniqueId } from 'lodash-es';
|
||||
|
||||
import { uploadApi } from '#/api';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
去除使用`file-type`库进行文件类型检测 在Safari无法使用
|
||||
-->
|
||||
<script setup lang="ts">
|
||||
import type { UploadListType } from 'ant-design-vue/es/upload/interface';
|
||||
import type { UploadListType } from 'antdv-next/es/upload/interface';
|
||||
|
||||
import type { BaseUploadProps, UploadEmits } from './props';
|
||||
|
||||
@@ -12,7 +12,7 @@ import { computed } from 'vue';
|
||||
import { $t, I18nT } from '@vben/locales';
|
||||
|
||||
import { InboxOutlined, UploadOutlined } from '@ant-design/icons-vue';
|
||||
import { Upload } from 'ant-design-vue';
|
||||
import { Upload } from 'antdv-next';
|
||||
|
||||
import { uploadApi } from '#/api';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { UploadFile } from 'ant-design-vue';
|
||||
import type { UploadFile } from 'antdv-next';
|
||||
|
||||
/**
|
||||
* 默认支持上传的图片文件类型
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
import type { UploadChangeParam, UploadFile } from 'ant-design-vue';
|
||||
import type { FileType } from 'ant-design-vue/es/upload/interface';
|
||||
import type { UploadChangeParam, UploadFile } from 'antdv-next';
|
||||
import type { FileType } from 'antdv-next/es/upload/interface';
|
||||
import type {
|
||||
RcFile,
|
||||
UploadRequestOption,
|
||||
} from 'ant-design-vue/es/vc-upload/interface';
|
||||
} from 'antdv-next/es/vc-upload/interface';
|
||||
|
||||
import type { ModelRef } from 'vue';
|
||||
|
||||
@@ -22,7 +22,7 @@ import { computed, onUnmounted, ref, watch } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { message, Modal } from 'antdv-next';
|
||||
import { isFunction, isString } from 'lodash-es';
|
||||
|
||||
import { ossInfo } from '#/api/system/oss';
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
import type {
|
||||
UploadFile,
|
||||
UploadListType,
|
||||
} from 'ant-design-vue/es/upload/interface';
|
||||
} from 'antdv-next/es/upload/interface';
|
||||
|
||||
import type { BaseUploadProps, UploadEmits } from './props';
|
||||
|
||||
import { $t, I18nT } from '@vben/locales';
|
||||
|
||||
import { PlusOutlined, UploadOutlined } from '@ant-design/icons-vue';
|
||||
import { Image, ImagePreviewGroup, Upload } from 'ant-design-vue';
|
||||
import { Image, ImagePreviewGroup, Upload } from 'antdv-next';
|
||||
import { isFunction } from 'lodash-es';
|
||||
|
||||
import { uploadApi } from '#/api';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { UploadFile } from 'ant-design-vue';
|
||||
import type { RcFile } from 'ant-design-vue/es/vc-upload/interface';
|
||||
import type { UploadFile } from 'antdv-next';
|
||||
import type { RcFile } from 'antdv-next/es/vc-upload/interface';
|
||||
|
||||
import type { UploadApi, UploadResult } from '#/api';
|
||||
import type { OssFile } from '#/api/system/oss/model';
|
||||
|
||||
import { UploadChangeParam } from 'ant-design-vue';
|
||||
import { UploadChangeParam } from 'antdv-next';
|
||||
|
||||
export type UploadType = 'file' | 'image';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user