antd4改造
parent
a72dcdf0ec
commit
313e5a4e53
|
@ -1,11 +1,21 @@
|
|||
import { generateAntColors, primaryColor } from '../config/themeConfig';
|
||||
import { getThemeVariables } from 'ant-design-vue/dist/theme';
|
||||
import { primaryColor } from '../config/themeConfig';
|
||||
// import { getThemeVariables } from 'ant-design-vue/dist/theme';
|
||||
import { resolve } from 'path';
|
||||
import { generate } from '@ant-design/colors';
|
||||
import { theme } from 'ant-design-vue/lib';
|
||||
import convertLegacyToken from 'ant-design-vue/lib/theme/convertLegacyToken';
|
||||
const { defaultAlgorithm, defaultSeed } = theme;
|
||||
|
||||
function generateAntColors(color: string, theme: 'default' | 'dark' = 'default') {
|
||||
return generate(color, {
|
||||
theme,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* less global variable
|
||||
*/
|
||||
export function generateModifyVars(dark = false) {
|
||||
export function generateModifyVars() {
|
||||
const palettes = generateAntColors(primaryColor);
|
||||
const primary = palettes[5];
|
||||
|
||||
|
@ -15,12 +25,14 @@ export function generateModifyVars(dark = false) {
|
|||
primaryColorObj[`primary-${index + 1}`] = palettes[index];
|
||||
}
|
||||
|
||||
const modifyVars = getThemeVariables({ dark });
|
||||
const mapToken = defaultAlgorithm(defaultSeed);
|
||||
const v3Token = convertLegacyToken(mapToken);
|
||||
return {
|
||||
...modifyVars,
|
||||
...v3Token,
|
||||
// ...modifyVars,
|
||||
// Used for global import to avoid the need to import each style file separately
|
||||
// reference: Avoid repeated references
|
||||
hack: `${modifyVars.hack} @import (reference) "${resolve('src/design/config.less')}";`,
|
||||
hack: `true; @import (reference) "${resolve('src/design/config.less')}";`,
|
||||
'primary-color': primary,
|
||||
...primaryColorObj,
|
||||
'info-color': primary,
|
||||
|
|
|
@ -11,7 +11,6 @@ import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus';
|
|||
import { configHtmlPlugin } from './html';
|
||||
import { configMockPlugin } from './mock';
|
||||
import { configCompressPlugin } from './compress';
|
||||
import { configStyleImportPlugin } from './styleImport';
|
||||
import { configVisualizerConfig } from './visualizer';
|
||||
import { configThemePlugin } from './theme';
|
||||
import { configSvgIconsPlugin } from './svgSprite';
|
||||
|
@ -49,9 +48,6 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
|
|||
// vite-plugin-purge-icons
|
||||
vitePlugins.push(purgeIcons());
|
||||
|
||||
// vite-plugin-style-import
|
||||
vitePlugins.push(configStyleImportPlugin(isBuild));
|
||||
|
||||
// rollup-plugin-visualizer
|
||||
vitePlugins.push(configVisualizerConfig());
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ export function configThemePlugin(isBuild: boolean): PluginOption[] {
|
|||
vite_theme_plugin,
|
||||
antdDarkThemePlugin({
|
||||
preloadFiles: [
|
||||
path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.less'),
|
||||
// path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/reset.css'),
|
||||
//path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.dark.less'),
|
||||
path.resolve(process.cwd(), 'src/design/index.less'),
|
||||
],
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"author": {
|
||||
"name": "北京国炬信息技术有限公司",
|
||||
"email": "jeecgos@163.com",
|
||||
"url": "http://guojusoft.com"
|
||||
"url": "https://github.com/jeecgboot/jeecgboot-vue3"
|
||||
},
|
||||
"scripts": {
|
||||
"pinstall": "pnpm install",
|
||||
|
@ -22,7 +22,6 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@jeecg/online": "3.6.0-beta",
|
||||
"@qiaoqiaoyun/drag-free": "^1.1.4",
|
||||
"@iconify/iconify": "^3.1.1",
|
||||
"@ant-design/colors": "^7.0.0",
|
||||
"@ant-design/icons-vue": "^6.1.0",
|
||||
|
@ -32,8 +31,9 @@
|
|||
"@vue/shared": "^3.3.4",
|
||||
"@vueuse/shared": "^10.4.1",
|
||||
"@vueuse/core": "^10.4.1",
|
||||
"@tinymce/tinymce-vue": "^4.0.7",
|
||||
"@zxcvbn-ts/core": "^3.0.3",
|
||||
"ant-design-vue": "^3.2.20",
|
||||
"ant-design-vue": "^4.0.6",
|
||||
"axios": "^1.5.0",
|
||||
"china-area-data": "^5.0.1",
|
||||
"clipboard": "^2.0.11",
|
||||
|
@ -61,7 +61,7 @@
|
|||
"resize-observer-polyfill": "^1.5.1",
|
||||
"showdown": "^2.1.0",
|
||||
"sortablejs": "^1.15.0",
|
||||
"tinymce": "^5.10.3",
|
||||
"tinymce": "^6.6.2",
|
||||
"vditor": "^3.9.5",
|
||||
"vue": "^3.3.4",
|
||||
"vue-cropper": "^0.6.2",
|
||||
|
@ -150,7 +150,6 @@
|
|||
"vite-plugin-mkcert": "^1.16.0",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
"vite-plugin-purge-icons": "^0.9.2",
|
||||
"vite-plugin-style-import": "^2.0.0",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"@rys-fe/vite-plugin-theme": "^0.8.6",
|
||||
"vite-plugin-vue-setup-extend-plus": "^0.1.0",
|
||||
|
|
9797
pnpm-lock.yaml
9797
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
61
src/App.vue
61
src/App.vue
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<ConfigProvider :locale="getAntdLocale">
|
||||
<ConfigProvider :theme="appTheme" :locale="getAntdLocale">
|
||||
<AppProvider>
|
||||
<RouterView />
|
||||
</AppProvider>
|
||||
|
@ -7,20 +7,73 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { watch, ref } from 'vue';
|
||||
import { theme } from 'ant-design-vue';
|
||||
import { ConfigProvider } from 'ant-design-vue';
|
||||
import { AppProvider } from '/@/components/Application';
|
||||
import { useTitle } from '/@/hooks/web/useTitle';
|
||||
import { useLocale } from '/@/locales/useLocale';
|
||||
import { useAppStore } from '/@/store/modules/app';
|
||||
import { useRootSetting } from '/@/hooks/setting/useRootSetting';
|
||||
import { ThemeEnum } from '/@/enums/appEnum';
|
||||
import { changeTheme } from '/@/logics/theme/index';
|
||||
|
||||
const appStore = useAppStore();
|
||||
// 解决日期时间国际化问题
|
||||
import 'dayjs/locale/zh-cn';
|
||||
// support Multi-language
|
||||
const { getAntdLocale } = useLocale();
|
||||
|
||||
useTitle();
|
||||
// update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
const appTheme: any = ref({});
|
||||
const { getDarkMode } = useRootSetting();
|
||||
watch(
|
||||
() => getDarkMode.value,
|
||||
(newValue) => {
|
||||
delete appTheme.value.algorithm;
|
||||
if (newValue === ThemeEnum.DARK) {
|
||||
appTheme.value.algorithm = theme.darkAlgorithm;
|
||||
}
|
||||
appTheme.value = {
|
||||
...appTheme.value,
|
||||
};
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
watch(
|
||||
appStore.getProjectConfig,
|
||||
(newValue) => {
|
||||
const primary = newValue.themeColor;
|
||||
appTheme.value = {
|
||||
...appTheme.value,
|
||||
...{
|
||||
token: {
|
||||
colorPrimary: primary,
|
||||
wireframe: true,
|
||||
fontSize: 14,
|
||||
colorSuccess: '#55D187',
|
||||
colorInfo: primary,
|
||||
borderRadius: 2,
|
||||
sizeStep: 4,
|
||||
sizeUnit: 4,
|
||||
colorWarning: '#EFBD47',
|
||||
colorError: '#ED6F6F',
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
setTimeout(() => {
|
||||
appStore.getProjectConfig?.themeColor && changeTheme(appStore.getProjectConfig.themeColor);
|
||||
}, 300);
|
||||
// update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
</script>
|
||||
<style lang="less">
|
||||
// update-begin--author:liaozhiyang---date:20230803---for:【QQYUN-5839】windi会影响到html2canvas绘制的图片样式
|
||||
img{display:inline-block;}
|
||||
// update-end--author:liaozhiyang---date:20230803---for:【QQYUN-5839】windi会影响到html2canvas绘制的图片样式
|
||||
// update-begin--author:liaozhiyang---date:20230803---for:【QQYUN-5839】windi会影响到html2canvas绘制的图片样式
|
||||
img {
|
||||
display: inline-block;
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20230803---for:【QQYUN-5839】windi会影响到html2canvas绘制的图片样式
|
||||
</style>
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
&-input {
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
font-size: 1.5em;
|
||||
font-size: 1.3em;
|
||||
color: #1c1e21;
|
||||
border-radius: 6px;
|
||||
|
||||
|
@ -222,7 +222,7 @@
|
|||
font-size: 14px;
|
||||
color: @text-color-base;
|
||||
cursor: pointer;
|
||||
background-color: @component-background;
|
||||
// background-color: @component-background;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 3px 0 #d4d9e1;
|
||||
align-items: center;
|
||||
|
|
|
@ -53,6 +53,10 @@
|
|||
cursor: move;
|
||||
user-select: none;
|
||||
|
||||
&.is-drawer {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&-normal {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
components: { Drawer, ScrollContainer, DrawerFooter, DrawerHeader },
|
||||
inheritAttrs: false,
|
||||
props: basicProps,
|
||||
emits: ['visible-change', 'ok', 'close', 'register'],
|
||||
emits: ['visible-change', 'open-change', 'ok', 'close', 'register'],
|
||||
setup(props, { emit }) {
|
||||
const visibleRef = ref(false);
|
||||
const attrs = useAttrs();
|
||||
|
@ -63,12 +63,14 @@
|
|||
});
|
||||
|
||||
const getProps = computed((): DrawerProps => {
|
||||
// update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
const opt = {
|
||||
placement: 'right',
|
||||
...unref(attrs),
|
||||
...unref(getMergeProps),
|
||||
visible: unref(visibleRef),
|
||||
open: unref(visibleRef),
|
||||
};
|
||||
// update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
opt.title = undefined;
|
||||
let { isDetail, width, wrapClassName, getContainer } = opt;
|
||||
if (isDetail) {
|
||||
|
@ -123,11 +125,20 @@
|
|||
{ deep: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.open,
|
||||
(newVal, oldVal) => {
|
||||
if (newVal !== oldVal) visibleRef.value = newVal;
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => visibleRef.value,
|
||||
(visible) => {
|
||||
nextTick(() => {
|
||||
emit('visible-change', visible);
|
||||
emit('open-change', visible);
|
||||
instance && drawerInstance.emitVisible?.(visible, instance.uid);
|
||||
});
|
||||
}
|
||||
|
@ -152,6 +163,9 @@
|
|||
if (Reflect.has(props, 'visible')) {
|
||||
visibleRef.value = !!props.visible;
|
||||
}
|
||||
if (Reflect.has(props, 'open')) {
|
||||
visibleRef.value = !!props.open;
|
||||
}
|
||||
}
|
||||
|
||||
function handleOk() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<BasicTitle v-if="!isDetail" :class="prefixCls">
|
||||
<BasicTitle v-if="!isDetail" :class="[prefixCls, 'is-drawer']">
|
||||
<slot name="title"></slot>
|
||||
{{ !$slots.title ? title : '' }}
|
||||
</BasicTitle>
|
||||
|
|
|
@ -31,6 +31,7 @@ export const basicProps = {
|
|||
loadingText: { type: String },
|
||||
showDetailBack: { type: Boolean, default: true },
|
||||
visible: { type: Boolean },
|
||||
open: { type: Boolean },
|
||||
loading: { type: Boolean },
|
||||
maskClosable: { type: Boolean, default: true },
|
||||
getContainer: {
|
||||
|
|
|
@ -11,6 +11,7 @@ export interface ReturnMethods extends DrawerInstance {
|
|||
openDrawer: <T = any>(visible?: boolean, data?: T, openOnSet?: boolean) => void;
|
||||
closeDrawer: () => void;
|
||||
getVisible?: ComputedRef<boolean>;
|
||||
getOpen?: ComputedRef<boolean>;
|
||||
}
|
||||
|
||||
export type RegisterFn = (drawerInstance: DrawerInstance, uuid?: string) => void;
|
||||
|
@ -20,6 +21,7 @@ export interface ReturnInnerMethods extends DrawerInstance {
|
|||
changeLoading: (loading: boolean) => void;
|
||||
changeOkLoading: (loading: boolean) => void;
|
||||
getVisible?: ComputedRef<boolean>;
|
||||
getOpen?: ComputedRef<boolean>;
|
||||
}
|
||||
|
||||
export type UseDrawerReturnType = [RegisterFn, ReturnMethods];
|
||||
|
@ -74,6 +76,7 @@ export interface DrawerProps extends DrawerFooterProps {
|
|||
loading?: boolean;
|
||||
showDetailBack?: boolean;
|
||||
visible?: boolean;
|
||||
open?: boolean;
|
||||
/**
|
||||
* Built-in ScrollContainer component configuration
|
||||
* @type ScrollContainerOptions
|
||||
|
|
|
@ -58,10 +58,16 @@ export function useDrawer(): UseDrawerReturnType {
|
|||
return visibleData[~~unref(uid)];
|
||||
}),
|
||||
|
||||
getOpen: computed((): boolean => {
|
||||
return visibleData[~~unref(uid)];
|
||||
}),
|
||||
|
||||
openDrawer: <T = any>(visible = true, data?: T, openOnSet = true): void => {
|
||||
// update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
getInstance()?.setDrawerProps({
|
||||
visible: visible,
|
||||
open: visible,
|
||||
});
|
||||
// update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
if (!data) return;
|
||||
|
||||
if (openOnSet) {
|
||||
|
@ -75,7 +81,9 @@ export function useDrawer(): UseDrawerReturnType {
|
|||
}
|
||||
},
|
||||
closeDrawer: () => {
|
||||
getInstance()?.setDrawerProps({ visible: false });
|
||||
// update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
getInstance()?.setDrawerProps({ open: false });
|
||||
// update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -133,9 +141,11 @@ export const useDrawerInner = (callbackFn?: Fn): UseDrawerInnerReturnType => {
|
|||
getVisible: computed((): boolean => {
|
||||
return visibleData[~~unref(uidRef)];
|
||||
}),
|
||||
|
||||
getOpen: computed((): boolean => {
|
||||
return visibleData[~~unref(uidRef)];
|
||||
}),
|
||||
closeDrawer: () => {
|
||||
getInstance()?.setDrawerProps({ visible: false });
|
||||
getInstance()?.setDrawerProps({ open: false });
|
||||
},
|
||||
|
||||
setDrawerProps: (props: Partial<DrawerProps>) => {
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
allowClear: propTypes.bool.def(false),
|
||||
getPopupContainer: {
|
||||
type: Function,
|
||||
default: (node) => node.parentNode,
|
||||
default: (node) => node?.parentNode,
|
||||
},
|
||||
},
|
||||
emits: ['change', 'update:value','update:area','update:city','update:province'],
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
// 是否显示全屏按钮
|
||||
fullScreen: propTypes.bool.def(false),
|
||||
// 全屏以后的z-index
|
||||
zIndex: propTypes.any.def(999),
|
||||
zIndex: propTypes.any.def(1500),
|
||||
theme: propTypes.string.def('idea'),
|
||||
language: propTypes.string.def(''),
|
||||
// 代码提示
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
stringToNumber: propTypes.bool,
|
||||
getPopupContainer: {
|
||||
type: Function,
|
||||
default: (node) => node.parentNode,
|
||||
default: (node) => node?.parentNode,
|
||||
},
|
||||
// 是否显示【请选择】选项
|
||||
showChooseOption: propTypes.bool.def(true),
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</a-button>
|
||||
</div>
|
||||
</a-upload>
|
||||
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel()">
|
||||
<a-modal :open="previewVisible" :footer="null" @cancel="handleCancel()">
|
||||
<img alt="example" style="width: 100%" :src="previewImage" />
|
||||
</a-modal>
|
||||
</div>
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<div>
|
||||
<BasicModal v-bind="$attrs" @register="register" title="导入EXCEL" :width="600" @cancel="handleClose" :confirmLoading="uploading" destroyOnClose>
|
||||
<!--是否校验-->
|
||||
<div style="margin: 0 5px 1px" v-if="online">
|
||||
<div style="margin: 0 5px 5px" v-if="online">
|
||||
<span style="display: inline-block; height: 32px; line-height: 32px; vertical-align: middle">是否开启校验:</span>
|
||||
<span style="margin-left: 6px">
|
||||
<a-switch :checked="validateStatus == 1" @change="handleChangeValidateStatus" checked-children="是" un-checked-children="否" size="small" />
|
||||
<a-switch :checked="validateStatus == 1" @change="handleChangeValidateStatus" checked-children="是" un-checked-children="否" />
|
||||
</span>
|
||||
</div>
|
||||
<!--上传-->
|
||||
<a-upload name="file" accept=".xls,.xlsx" :multiple="true" :fileList="fileList" :remove="handleRemove" :beforeUpload="beforeUpload">
|
||||
<a-upload name="file" accept=".xls,.xlsx" :multiple="true" :fileList="fileList" @remove="handleRemove" :beforeUpload="beforeUpload">
|
||||
<a-button preIcon="ant-design:upload-outlined">选择导入文件</a-button>
|
||||
</a-upload>
|
||||
<!--页脚-->
|
||||
|
@ -81,7 +81,10 @@
|
|||
|
||||
//关闭方法
|
||||
function handleClose() {
|
||||
closeModal() && reset();
|
||||
// update-begin--author:liaozhiyang---date:20231226---for:【QQYUN-7477】关闭弹窗清空内容(之前上传失败关闭后不会清除)
|
||||
closeModal();
|
||||
reset();
|
||||
// update-end--author:liaozhiyang---date:20231226---for:【QQYUN-7477】关闭弹窗清空内容(之前上传失败关闭后不会清除)
|
||||
}
|
||||
|
||||
//校验状态切换
|
||||
|
@ -139,6 +142,8 @@
|
|||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
}).catch(() => {
|
||||
uploading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<a-popover
|
||||
trigger="contextmenu"
|
||||
v-model:visible="visible"
|
||||
v-model:open="visible"
|
||||
:overlayClassName="`${prefixCls}-popover`"
|
||||
:getPopupContainer="getPopupContainer"
|
||||
:placement="position"
|
||||
|
@ -80,7 +80,7 @@
|
|||
// 获取弹出框挂载的元素
|
||||
function getPopupContainer(node) {
|
||||
if (!props.popContainer) {
|
||||
return node.parentNode;
|
||||
return node?.parentNode;
|
||||
} else if (typeof props.popContainer === 'function') {
|
||||
return props.popContainer(node);
|
||||
} else {
|
||||
|
|
|
@ -115,7 +115,10 @@
|
|||
//匹配popup设置的回调值
|
||||
let values = {};
|
||||
for (let item of fieldConfig) {
|
||||
let val = rows.map((row) => row[item.source]).join(',');
|
||||
let val = rows.map((row) => row[item.source]);
|
||||
// update-begin--author:liaozhiyang---date:20230831---for:【QQYUN-7535】数组只有一个且是number类型,join会改变值的类型为string
|
||||
val = val.length == 1 ? val[0] : val.join(',');
|
||||
// update-begin--author:liaozhiyang---date:20230831---for:【QQYUN-7535】数组只有一个且是number类型,join会改变值的类型为string
|
||||
item.target.split(',').forEach((target) => {
|
||||
values[target] = val;
|
||||
});
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
pageSize: propTypes.number.def(10),
|
||||
getPopupContainer: {
|
||||
type: Function,
|
||||
default: (node) => node.parentNode,
|
||||
default: (node) => node?.parentNode,
|
||||
},
|
||||
//默认开启Y轴溢出位置调整,因此在可视空间不足时下拉框位置会自动上移,导致Select的输入框被遮挡。需要注意的是,默认情况是是可视空间,而不是所拥有的空间
|
||||
//update-begin-author:liusq date:2023-04-04 for:[issue/286]下拉搜索框遮挡问题
|
||||
|
@ -288,7 +288,7 @@
|
|||
if (typeof props.getPopupContainer === 'function') {
|
||||
return props.getPopupContainer(node);
|
||||
} else {
|
||||
return node.parentNode;
|
||||
return node?.parentNode;
|
||||
}
|
||||
}
|
||||
// update-end-author:taoyan date:20220407 for: getPopupContainer一直有值 导致popContainer的逻辑永远走不进去,把它挪到前面判断
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
|
||||
function getParentContainer(node) {
|
||||
if (!props.popContainer) {
|
||||
return node.parentNode;
|
||||
return node?.parentNode;
|
||||
} else {
|
||||
return document.querySelector(props.popContainer);
|
||||
}
|
||||
|
|
|
@ -41,12 +41,14 @@
|
|||
() => props.value,
|
||||
(val) => {
|
||||
if (!props.query) {
|
||||
if (!val) {
|
||||
// update-begin--author:liaozhiyang---date:20231226---for:【QQYUN-7473】options使用[0,1],导致开关无法切换
|
||||
if (!val && !props.options.includes(val)) {
|
||||
checked.value = false;
|
||||
emitValue(props.options[1]);
|
||||
} else {
|
||||
checked.value = props.options[0] == val;
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20231226---for:【QQYUN-7473】options使用[0,1],导致开关无法切换
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
allowClear
|
||||
labelInValue
|
||||
style="width: 100%"
|
||||
:getPopupContainer="(node) => node.parentNode"
|
||||
:getPopupContainer="(node) => node?.parentNode"
|
||||
:dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
:placeholder="placeholder"
|
||||
:loadData="asyncLoadTreeData"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
v-bind="$attrs"
|
||||
@register="register"
|
||||
:title="modalTitle"
|
||||
width="900px"
|
||||
width="1100px"
|
||||
wrapClassName="j-user-select-modal"
|
||||
@ok="handleOk"
|
||||
destroyOnClose
|
||||
|
@ -90,7 +90,7 @@
|
|||
//查询form
|
||||
const formConfig = {
|
||||
labelCol: {
|
||||
span: 8,
|
||||
span: 4,
|
||||
},
|
||||
baseColProps: {
|
||||
xs: 24,
|
||||
|
|
|
@ -59,9 +59,9 @@ export interface FormProps {
|
|||
// Submit form on reset
|
||||
submitOnReset?: boolean;
|
||||
// Col configuration for the entire form
|
||||
labelCol?: Partial<ColEx>;
|
||||
labelCol?: Partial<ColEx> | null;
|
||||
// Col configuration for the entire form
|
||||
wrapperCol?: Partial<ColEx>;
|
||||
wrapperCol?: Partial<ColEx> | null;
|
||||
|
||||
// General row style
|
||||
baseRowStyle?: CSSProperties;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
:loading="getProps.loading"
|
||||
:loading-tip="getProps.loadingTip"
|
||||
:minHeight="getProps.minHeight"
|
||||
:maxHeight="getProps.maxHeight"
|
||||
:height="getWrapperHeight"
|
||||
:visible="visibleRef"
|
||||
:modalFooterHeight="footer !== undefined && !footer ? 0 : undefined"
|
||||
|
@ -69,7 +70,7 @@
|
|||
components: { Modal, ModalWrapper, ModalClose, ModalFooter, ModalHeader },
|
||||
inheritAttrs: false,
|
||||
props: basicProps,
|
||||
emits: ['visible-change', 'height-change', 'cancel', 'ok', 'register', 'update:visible', 'fullScreen'],
|
||||
emits: ['visible-change', 'open-change', 'height-change', 'cancel', 'ok', 'register', 'update:visible', 'update:open', 'fullScreen'],
|
||||
setup(props, { emit, attrs , slots}) {
|
||||
const visibleRef = ref(false);
|
||||
const propsRef = ref<Partial<ModalProps> | null>(null);
|
||||
|
@ -131,16 +132,18 @@
|
|||
});
|
||||
|
||||
const getBindValue = computed((): Recordable => {
|
||||
// update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
const attr = {
|
||||
...attrs,
|
||||
...unref(getMergeProps),
|
||||
visible: unref(visibleRef),
|
||||
open: unref(visibleRef),
|
||||
wrapClassName: unref(getWrapClassName),
|
||||
};
|
||||
if (unref(fullScreenRef)) {
|
||||
return omit(attr, ['height', 'title']);
|
||||
return omit(attr, ['height', 'title', 'visible']);
|
||||
}
|
||||
return omit(attr, 'title');
|
||||
return omit(attr, ['title', 'visible']);
|
||||
// update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
});
|
||||
|
||||
const getWrapperHeight = computed(() => {
|
||||
|
@ -156,11 +159,16 @@
|
|||
visibleRef.value = !!props.visible;
|
||||
});
|
||||
|
||||
watchEffect(() => {
|
||||
visibleRef.value = !!props.open;
|
||||
});
|
||||
|
||||
watch(
|
||||
() => unref(visibleRef),
|
||||
(v) => {
|
||||
emit('visible-change', v);
|
||||
emit('update:visible', v);
|
||||
emit('update:open', v);
|
||||
instance && modalMethods.emitVisible?.(v, instance.uid);
|
||||
nextTick(() => {
|
||||
if (props.scrollTop && v && unref(modalWrapperRef)) {
|
||||
|
@ -197,6 +205,9 @@
|
|||
if (Reflect.has(props, 'visible')) {
|
||||
visibleRef.value = !!props.visible;
|
||||
}
|
||||
if (Reflect.has(props, 'open')) {
|
||||
visibleRef.value = !!props.open;
|
||||
}
|
||||
if (Reflect.has(props, 'defaultFullscreen')) {
|
||||
fullScreenRef.value = !!props.defaultFullscreen;
|
||||
}
|
||||
|
@ -272,7 +283,9 @@
|
|||
}
|
||||
.jeecg-modal-content{
|
||||
>.scroll-container{
|
||||
padding: 14px;
|
||||
//update-begin---author:wangshuai---date:2023-12-05---for:【QQYUN-7297】表单讨论弹窗放大按钮时只显示一部分---
|
||||
padding: 6px;
|
||||
//update-end---author:wangshuai---date:2023-12-05---for:【QQYUN-7297】表单讨论弹窗放大按钮时只显示一部分---
|
||||
}
|
||||
}
|
||||
/*update-end-author:taoyan date:2022-7-27 for:modal评论区域样式*/
|
||||
|
|
|
@ -55,15 +55,19 @@ export function useModal(): UseModalReturnType {
|
|||
getVisible: computed((): boolean => {
|
||||
return visibleData[~~unref(uid)];
|
||||
}),
|
||||
|
||||
getOpen: computed((): boolean => {
|
||||
return visibleData[~~unref(uid)];
|
||||
}),
|
||||
redoModalHeight: () => {
|
||||
getInstance()?.redoModalHeight?.();
|
||||
},
|
||||
|
||||
openModal: <T = any>(visible = true, data?: T, openOnSet = true): void => {
|
||||
// update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
getInstance()?.setModalProps({
|
||||
visible: visible,
|
||||
open: visible,
|
||||
});
|
||||
// update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
|
||||
if (!data) return;
|
||||
const id = unref(uid);
|
||||
|
@ -79,7 +83,9 @@ export function useModal(): UseModalReturnType {
|
|||
},
|
||||
|
||||
closeModal: () => {
|
||||
getInstance()?.setModalProps({ visible: false });
|
||||
// update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
getInstance()?.setModalProps({ open: false });
|
||||
// update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
},
|
||||
};
|
||||
return [register, methods];
|
||||
|
@ -126,13 +132,15 @@ export const useModalInner = (callbackFn?: Fn): UseModalInnerReturnType => {
|
|||
getVisible: computed((): boolean => {
|
||||
return visibleData[~~unref(uidRef)];
|
||||
}),
|
||||
|
||||
getOpen: computed((): boolean => {
|
||||
return visibleData[~~unref(uidRef)];
|
||||
}),
|
||||
changeOkLoading: (loading = true) => {
|
||||
getInstance()?.setModalProps({ confirmLoading: loading });
|
||||
},
|
||||
|
||||
closeModal: () => {
|
||||
getInstance()?.setModalProps({ visible: false });
|
||||
getInstance()?.setModalProps({ open: false });
|
||||
},
|
||||
|
||||
setModalProps: (props: Partial<ModalProps>) => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.fullscreen-modal {
|
||||
.ant-modal-root .fullscreen-modal {
|
||||
overflow: hidden;
|
||||
|
||||
.ant-modal {
|
||||
|
@ -30,7 +30,7 @@
|
|||
padding: 14px;
|
||||
}
|
||||
|
||||
&-title {
|
||||
.ant-modal-title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
line-height: 16px;
|
||||
|
@ -48,7 +48,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
&-large {
|
||||
.ant-modal-large {
|
||||
top: 60px;
|
||||
|
||||
&--mini {
|
||||
|
@ -56,34 +56,33 @@
|
|||
}
|
||||
}
|
||||
|
||||
&-header {
|
||||
.ant-modal-header {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
&-content {
|
||||
.ant-modal-content {
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
|
||||
&-footer {
|
||||
.ant-modal-footer {
|
||||
button + button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&-close {
|
||||
.ant-modal-close {
|
||||
font-weight: normal;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&-close-x {
|
||||
.ant-modal-close-x {
|
||||
display: inline-block;
|
||||
width: 96px;
|
||||
/* width: auto;*/
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
}
|
||||
|
||||
&-confirm-body {
|
||||
.ant-modal-confirm-body {
|
||||
.ant-modal-confirm-content {
|
||||
// color: #fff;
|
||||
|
||||
|
@ -93,23 +92,23 @@
|
|||
}
|
||||
}
|
||||
|
||||
&-confirm-confirm.error .ant-modal-confirm-body > .anticon {
|
||||
.ant-modal-confirm-confirm.error .ant-modal-confirm-body > .anticon {
|
||||
color: @error-color;
|
||||
}
|
||||
|
||||
&-confirm-btns {
|
||||
.ant-modal-confirm-btns {
|
||||
.ant-btn:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-confirm-info {
|
||||
.ant-modal-confirm-info {
|
||||
.ant-modal-confirm-body > .anticon {
|
||||
color: @warning-color;
|
||||
}
|
||||
}
|
||||
|
||||
&-confirm-confirm.success {
|
||||
.ant-modal-confirm-confirm.success {
|
||||
.ant-modal-confirm-body > .anticon {
|
||||
color: @success-color;
|
||||
}
|
||||
|
|
|
@ -75,12 +75,14 @@ export const basicProps = Object.assign({}, modalProps, {
|
|||
|
||||
visible: { type: Boolean },
|
||||
|
||||
open: { type: Boolean },
|
||||
|
||||
width: [String, Number] as PropType<string | number>,
|
||||
|
||||
wrapClassName: { type: String },
|
||||
|
||||
zIndex: { type: Number },
|
||||
|
||||
maxHeight: { type: Number },
|
||||
// 是否开启评论区域
|
||||
enableComment: { type: Boolean, default: false },
|
||||
});
|
||||
|
|
|
@ -15,6 +15,7 @@ export interface ReturnMethods extends ModalMethods {
|
|||
openModal: <T = any>(props?: boolean, data?: T, openOnSet?: boolean) => void;
|
||||
closeModal: () => void;
|
||||
getVisible?: ComputedRef<boolean>;
|
||||
getOpen?: ComputedRef<boolean>;
|
||||
}
|
||||
|
||||
export type UseModalReturnType = [RegisterFn, ReturnMethods];
|
||||
|
@ -24,6 +25,7 @@ export interface ReturnInnerMethods extends ModalMethods {
|
|||
changeLoading: (loading: boolean) => void;
|
||||
changeOkLoading: (loading: boolean) => void;
|
||||
getVisible?: ComputedRef<boolean>;
|
||||
getOpen?: ComputedRef<boolean>;
|
||||
redoModalHeight: () => void;
|
||||
}
|
||||
|
||||
|
@ -41,6 +43,7 @@ export interface ModalProps {
|
|||
canFullscreen?: boolean;
|
||||
defaultFullscreen?: boolean;
|
||||
visible?: boolean;
|
||||
open?: boolean;
|
||||
// 温馨提醒信息
|
||||
helpMessage: string | string[];
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
placement="right"
|
||||
:overlayClassName="`${prefixCls}-menu-popover`"
|
||||
v-else
|
||||
:visible="getIsOpend"
|
||||
@visibleChange="handleVisibleChange"
|
||||
:open="getIsOpend"
|
||||
@openChange="handleVisibleChange"
|
||||
:overlayStyle="getOverlayStyle"
|
||||
:align="{ offset: [0, 0] }"
|
||||
>
|
||||
|
|
|
@ -268,7 +268,7 @@
|
|||
.@{menu-prefix-cls}-submenu-active {
|
||||
position: relative;
|
||||
color: #fff !important;
|
||||
background-color: @sider-dark-darken-bg-color !important;
|
||||
background-color: @primary-color !important;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
|
|
|
@ -29,7 +29,16 @@
|
|||
const { prefixCls } = useDesign('basic-table-header-cell');
|
||||
|
||||
const getIsEdit = computed(() => !!props.column?.edit);
|
||||
const getTitle = computed(() => props.column?.customTitle || props.column?.title);
|
||||
const getTitle = computed(() => {
|
||||
// update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
const result = props.column?.customTitle || props.column?.title;
|
||||
if (typeof result === 'string') {
|
||||
return result;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
});
|
||||
const getHelpMessage = computed(() => props.column?.helpMessage);
|
||||
|
||||
return { prefixCls, getIsEdit, getTitle, getHelpMessage };
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<slot name="toolbar"></slot>
|
||||
<Divider type="vertical" v-if="$slots.toolbar && showTableSetting" />
|
||||
<TableSetting :class="`${prefixCls}__toolbar-desktop`" style="white-space: nowrap;" :setting="tableSetting" v-if="showTableSetting" @columns-change="handleColumnChange" />
|
||||
<a-popover :overlayClassName="`${prefixCls}__toolbar-mobile`" trigger="click" placement="left" :getPopupContainer="(n) => n.parentElement">
|
||||
<a-popover :overlayClassName="`${prefixCls}__toolbar-mobile`" trigger="click" placement="left" :getPopupContainer="(n) => n?.parentElement">
|
||||
<template #content>
|
||||
<TableSetting mode="mobile" :setting="tableSetting" v-if="showTableSetting" @columns-change="handleColumnChange" />
|
||||
</template>
|
||||
|
|
|
@ -27,7 +27,7 @@ export const CellComponent: FunctionalComponent = (
|
|||
Popover,
|
||||
{
|
||||
overlayClassName: 'edit-cell-rule-popover',
|
||||
visible: !!popoverVisible,
|
||||
open: !!popoverVisible,
|
||||
...(getPopupContainer ? { getPopupContainer } : {}),
|
||||
},
|
||||
{
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<span>{{ t('component.table.settingColumn') }}</span>
|
||||
</template>
|
||||
<Popover
|
||||
v-model:visible="popoverVisible"
|
||||
v-model:open="popoverVisible"
|
||||
placement="bottomLeft"
|
||||
trigger="click"
|
||||
@visible-change="handleVisibleChange"
|
||||
@open-change="handleVisibleChange"
|
||||
:overlayClassName="`${prefixCls}__cloumn-list`"
|
||||
:getPopupContainer="getPopupContainer"
|
||||
>
|
||||
|
@ -174,7 +174,7 @@
|
|||
const getBindProps = computed(() => {
|
||||
let obj = {};
|
||||
if (props.isMobile) {
|
||||
obj['visible'] = false;
|
||||
obj['open'] = false;
|
||||
}
|
||||
return obj;
|
||||
});
|
||||
|
|
|
@ -186,7 +186,7 @@ export function useColumns(
|
|||
return reactive(column);
|
||||
});
|
||||
// update-begin--author:liaozhiyang---date:20230919---for:【QQYUN-6387】展开写法(去掉报错)
|
||||
if (propsRef.value.expandedRowKeys) {
|
||||
if (propsRef.value.expandedRowKeys && !propsRef.value.isTreeTable) {
|
||||
let index = 0;
|
||||
const findIndex = result.findIndex((item) => item.key === CUS_SEL_COLUMN_KEY);
|
||||
if (findIndex != -1) {
|
||||
|
|
|
@ -77,7 +77,7 @@ export interface ColumnProps<T> {
|
|||
* Whether filterDropdown is visible
|
||||
* @type boolean
|
||||
*/
|
||||
filterDropdownVisible?: boolean;
|
||||
filterDropdownOpen?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the dataSource is filtered
|
||||
|
@ -181,7 +181,7 @@ export interface ColumnProps<T> {
|
|||
onFilter?: (value: any, record: T) => boolean;
|
||||
|
||||
/**
|
||||
* Callback executed when filterDropdownVisible is changed, Use as a filterDropdownVisible event when using template or jsx
|
||||
* Callback executed when filterDropdownOpen is changed, Use as a filterDropdownVisible event when using template or jsx
|
||||
* @type Function
|
||||
*/
|
||||
onFilterDropdownVisibleChange?: (visible: boolean) => void;
|
||||
|
|
|
@ -414,7 +414,7 @@ export interface BasicTableProps<T = any> {
|
|||
export type CellFormat = string | ((text: string, record: Recordable, index: number) => string | number) | Map<string | number, any>;
|
||||
|
||||
// @ts-ignore
|
||||
export interface BasicColumn extends ColumnProps {
|
||||
export interface BasicColumn extends ColumnProps<Recordable> {
|
||||
children?: BasicColumn[];
|
||||
filters?: {
|
||||
text: string;
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
let modalProps: Partial<ModalProps> = {
|
||||
width: (opt.width ?? 500) as number,
|
||||
title: (opt.title ?? 'prompt') as string,
|
||||
visible: unref(visible),
|
||||
open: unref(visible),
|
||||
confirmLoading: unref(loading),
|
||||
};
|
||||
let finalProps: Recordable = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<a-popover :visible="visible" :placement="placement" overlayClassName="j-vxe-popover-overlay" :overlayStyle="overlayStyle">
|
||||
<a-popover :open="visible" :placement="placement" overlayClassName="j-vxe-popover-overlay" :overlayStyle="overlayStyle">
|
||||
<template #title>
|
||||
<div class="j-vxe-popover-title">
|
||||
<div>子表</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
allowClear
|
||||
:format="dateFormat"
|
||||
:showTime="isDatetime"
|
||||
dropdownClassName="j-vxe-date-picker"
|
||||
popupClassName="j-vxe-date-picker"
|
||||
style="min-width: 0"
|
||||
v-model:open="openPicker"
|
||||
v-bind="cellProps"
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
:value="innerTimeValue"
|
||||
allowClear
|
||||
:format="format"
|
||||
dropdownClassName="j-vxe-time-picker"
|
||||
popupClassName="j-vxe-time-picker"
|
||||
style="min-width: 0"
|
||||
v-model:open="openPicker"
|
||||
v-bind="cellProps"
|
||||
@change="handleChange"
|
||||
:getPopupContainer="(node) => node.parentNode"
|
||||
:getPopupContainer="(node) => node?.parentNode"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<template v-if="item.toUserId">
|
||||
<span>回复</span>
|
||||
<span>{{ item.toUserId_dictText }}</span>
|
||||
<Tooltip class="comment-last-content" @visibleChange="(v)=>visibleChange(v, item)">
|
||||
<Tooltip class="comment-last-content" @openChange="(v)=>visibleChange(v, item)">
|
||||
<template #title>
|
||||
<div v-html="getHtml(item.commentId_dictText)"></div>
|
||||
</template>
|
||||
|
@ -320,7 +320,7 @@
|
|||
.comment-last-content {
|
||||
margin-left: 5px;
|
||||
&:hover{
|
||||
color: #1890ff;
|
||||
color: @primary-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<upload-chunk ref="uploadRef" :visible="uploadVisible" @select="selectFirstFile"></upload-chunk>
|
||||
</div>
|
||||
<UserSelectModal labelKey="realname" rowKey="username" @register="registerModal" @getSelectResult="setValue" isRadioSelection></UserSelectModal>
|
||||
<a-modal v-model:visible="visibleEmoji" :footer="null" wrapClassName="emoji-modal" :closable="false" :width="490">
|
||||
<a-modal v-model:open="visibleEmoji" :footer="null" wrapClassName="emoji-modal" :closable="false" :width="490">
|
||||
<template #title>
|
||||
<span></span>
|
||||
</template>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@import './pagination.less';
|
||||
@import './input.less';
|
||||
@import './btn.less';
|
||||
//@import './btn.less';
|
||||
// @import './table.less';
|
||||
|
||||
// TODO beta.11 fix
|
||||
|
@ -13,11 +13,11 @@
|
|||
display: unset;
|
||||
}
|
||||
}
|
||||
//update-begin---author:scott ---date:2023-08-28 for:【QQYUN-6374】UnoCSS替代windicss导致应用样式问题--
|
||||
//update-begin---author:scott ---date:2023-08-28 for<EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQYUN-6374<37><34>UnoCSS<53><53><EFBFBD>windicss<73><73><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>--
|
||||
/*span.anticon:not(.app-iconify) {
|
||||
vertical-align: 0.125em !important;
|
||||
}*/
|
||||
//update-end---author:scott ---date::2023-08-28 for:【QQYUN-6374】UnoCSS替代windicss导致应用样式问题--
|
||||
//update-end---author:scott ---date::2023-08-28 for<EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQYUN-6374<37><34>UnoCSS<53><53><EFBFBD>windicss<73><73><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>--
|
||||
|
||||
.ant-back-top {
|
||||
right: 20px;
|
||||
|
@ -64,3 +64,64 @@
|
|||
border-top: 0 !important;
|
||||
border-left: 0 !important;
|
||||
}
|
||||
|
||||
// update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
.ant-modal {
|
||||
.ant-modal-close {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
.ant-modal-content {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-input-affix-wrapper > input.ant-input {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.ant-pagination-options-size-changer.ant-select {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.ant-tree-select-dropdown .ant-select-tree .ant-select-tree-list-holder-inner {
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.ant-list .ant-list-item {padding-left: 0;padding-right: 0;}
|
||||
|
||||
|
||||
.ant-list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 0;
|
||||
color: #000000d9;
|
||||
}
|
||||
/** anticon-down跟3.x保持一致*/
|
||||
.ant-dropdown-trigger>.anticon.anticon-down, .ant-dropdown-link>.anticon.anticon-down, .ant-dropdown-button>.anticon.anticon-down {
|
||||
font-size: 10px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
/** 表格排序箭头尺寸保持跟3.x一致 */
|
||||
.ant-table-wrapper .ant-table-column-sorter-up, .ant-table-wrapper .ant-table-column-sorter-down {
|
||||
font-size: 11px;
|
||||
}
|
||||
/** 表格头部文字颜色跟3.x版本保持一致 */
|
||||
.ant-table-wrapper .ant-table-thead >tr>th, .ant-table-wrapper .ant-table-thead >tr>td {
|
||||
color: #000000d9;
|
||||
font-weight: 500;
|
||||
}
|
||||
html[data-theme='dark'] .ant-table-wrapper .ant-table-thead >tr>th, .ant-table-wrapper .ant-table-thead >tr>td {
|
||||
color:rgba(255,255,255,.65);
|
||||
}
|
||||
/** 下拉菜单文字和图标折叠了 */
|
||||
.ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-title-content, .ant-dropdown-menu-submenu .ant-dropdown-menu .ant-dropdown-menu-title-content{
|
||||
flex: auto;
|
||||
white-space:nowrap;
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
|
|
|
@ -22,7 +22,9 @@ html,
|
|||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
// body添加行高保持跟3.x一致
|
||||
line-height: 1.5715;
|
||||
|
||||
&.color-weak {
|
||||
filter: invert(80%);
|
||||
}
|
||||
|
@ -82,3 +84,8 @@ img, video {
|
|||
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20231013---for:【QQYUN-5133】升级之后提示样式跟之前一致
|
||||
// update-begin--author:liaozhiyang---date:20231116---for:【QQYUN-7011】online表单多了一个蓝色的边框
|
||||
// .vxe-table.vxe-table--render-default .vxe-body--column.col--selected {
|
||||
// box-shadow: none;
|
||||
// }
|
||||
// update-end--author:liaozhiyang---date:20231116---for:【QQYUN-7011】online表单多了一个蓝色的边框
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div :class="prefixCls">
|
||||
<Popover v-model:visible="popoverVisible" title="" trigger="click" :overlayClassName="`${prefixCls}__overlay`">
|
||||
<Popover v-model:open="popoverVisible" title="" trigger="click" :overlayClassName="`${prefixCls}__overlay`">
|
||||
<Badge :count="count" :overflowCount="9" :offset="[-4, 10]" :numberStyle="numberStyle">
|
||||
<BellOutlined />
|
||||
</Badge>
|
||||
|
|
|
@ -219,9 +219,10 @@
|
|||
//顶部欢迎语展示样式
|
||||
@prefix-cls: ~'@{namespace}-layout-header';
|
||||
|
||||
.@{prefix-cls} {
|
||||
.ant-layout .@{prefix-cls} {
|
||||
display: flex;
|
||||
padding: 0 8px;
|
||||
height: 48px;
|
||||
align-items: center;
|
||||
|
||||
.headerIntroductionClass {
|
||||
|
@ -241,7 +242,7 @@
|
|||
.headerIntroductionClass {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
.anticon {
|
||||
.anticon, .truncate {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,4 +48,9 @@
|
|||
width: 126px;
|
||||
}
|
||||
}
|
||||
html[data-theme='dark'] {
|
||||
.@{prefix-cls} {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -65,4 +65,9 @@
|
|||
width: 126px;
|
||||
}
|
||||
}
|
||||
html[data-theme='dark'] {
|
||||
.@{prefix-cls} {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -63,4 +63,9 @@
|
|||
justify-content: space-between;
|
||||
margin: 16px 0;
|
||||
}
|
||||
html[data-theme='dark'] {
|
||||
.@{prefix-cls} {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -62,7 +62,9 @@
|
|||
flex-wrap: wrap;
|
||||
margin: 16px 0;
|
||||
justify-content: space-around;
|
||||
|
||||
// update-begin--author:liaozhiyang---date:20231220---for:【QQYUN-7677】antd4兼容改造,勾选垂直居中
|
||||
line-height: 1.3;
|
||||
// update-end--author:liaozhiyang---date:20231220---for:【QQYUN-7677】antd4兼容改造,勾选垂直居中
|
||||
&__item {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
z-index: @layout-sider-fixed-z-index;
|
||||
|
||||
&--fixed {
|
||||
position: fixed;
|
||||
position: fixed !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
:class="prefixCls"
|
||||
:width="getMenuWidth"
|
||||
:getContainer="null"
|
||||
:visible="!getCollapsed"
|
||||
:open="!getCollapsed"
|
||||
@close="handleClose"
|
||||
>
|
||||
<Sider />
|
||||
|
|
|
@ -98,9 +98,7 @@ html[data-theme='light'] {
|
|||
|
||||
.ant-tabs-tab:not(.ant-tabs-tab-active) {
|
||||
&:hover {
|
||||
background-color: #ecf5ff;
|
||||
color: @primary-color;
|
||||
border-color: #b3d8ff;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -145,3 +145,11 @@
|
|||
@import './tabs.theme.card.less';
|
||||
@import './tabs.theme.smooth.less';
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
@prefix-cls: ~'@{namespace}-multiple-tabs';
|
||||
.@{prefix-cls} {
|
||||
:deep(.anticon) {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -2,8 +2,14 @@ import { getThemeColors, generateColors } from '../../../build/config/themeConfi
|
|||
|
||||
import { replaceStyleVariables } from '@rys-fe/vite-plugin-theme/es/client';
|
||||
import { mixLighten, mixDarken, tinycolor } from '@rys-fe/vite-plugin-theme/es/colorUtils';
|
||||
import { useAppStore } from '/@/store/modules/app';
|
||||
|
||||
|
||||
export async function changeTheme(color: string) {
|
||||
// update-begin--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
const appStore = useAppStore();
|
||||
appStore.setProjectConfig({ themeColor: color });
|
||||
// update-end--author:liaozhiyang---date:20231218---for:【QQYUN-6366】升级到antd4.x
|
||||
const colors = generateColors({
|
||||
mixDarken,
|
||||
mixLighten,
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import 'uno.css';
|
||||
import '/@/design/index.less';
|
||||
import 'ant-design-vue/dist/reset.css';
|
||||
// 注册图标
|
||||
import 'virtual:svg-icons-register';
|
||||
|
||||
import App from './App.vue';
|
||||
import { createApp } from 'vue';
|
||||
import { initAppConfigStore } from '/@/logics/initAppConfig';
|
||||
|
@ -17,11 +19,6 @@ import { useSso } from '/@/hooks/web/useSso';
|
|||
// 注册online模块lib
|
||||
import { registerPackages } from '/@/utils/monorepo/registerPackages';
|
||||
|
||||
// 在本地开发中引入的,以提高浏览器响应速度
|
||||
if (import.meta.env.DEV) {
|
||||
// @ts-ignore
|
||||
import('ant-design-vue/dist/antd.less');
|
||||
}
|
||||
async function bootstrap() {
|
||||
// 创建应用实例
|
||||
const app = createApp(App);
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<div class="ant-upload-text">Upload</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
<a-modal :visible="previewVisible" :footer="null" @cancel="previewVisible = false">
|
||||
<a-modal :open="previewVisible" :footer="null" @cancel="previewVisible = false">
|
||||
<img alt="example" style="width: 100%" :src="previewImage" />
|
||||
</a-modal>
|
||||
</a-col>
|
||||
|
|
|
@ -155,15 +155,17 @@ export function getCustomHeaderColumns(): BasicColumn[] {
|
|||
},
|
||||
];
|
||||
}
|
||||
const renderContent = ({ text, index }: { text: any; index: number }) => {
|
||||
const obj: any = {
|
||||
children: text,
|
||||
attrs: {},
|
||||
const renderContent = (filed) => {
|
||||
return (record, rowIndex) => {
|
||||
const obj: any = {
|
||||
children: record[filed],
|
||||
attrs: {},
|
||||
};
|
||||
if (rowIndex === 9) {
|
||||
obj.attrs.colSpan = 0;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
if (index === 9) {
|
||||
obj.attrs.colSpan = 0;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
export function getMergeHeaderColumns(): BasicColumn[] {
|
||||
return [
|
||||
|
@ -171,13 +173,13 @@ export function getMergeHeaderColumns(): BasicColumn[] {
|
|||
title: 'ID',
|
||||
dataIndex: 'id',
|
||||
width: 300,
|
||||
customRender: renderContent,
|
||||
customCell: renderContent('id'),
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'name',
|
||||
width: 300,
|
||||
customRender: renderContent,
|
||||
customCell: renderContent('name'),
|
||||
},
|
||||
{
|
||||
title: '地址',
|
||||
|
@ -185,15 +187,15 @@ export function getMergeHeaderColumns(): BasicColumn[] {
|
|||
colSpan: 2,
|
||||
width: 120,
|
||||
sorter: true,
|
||||
customRender: ({ text, index }: { text: any; index: number }) => {
|
||||
customCell: (record: any, rowIndex) => {
|
||||
const obj: any = {
|
||||
children: text,
|
||||
children: record['address'],
|
||||
attrs: {},
|
||||
};
|
||||
if (index === 2) {
|
||||
if (rowIndex === 2) {
|
||||
obj.attrs.rowSpan = 2;
|
||||
}
|
||||
if (index === 3) {
|
||||
if (rowIndex === 3) {
|
||||
obj.attrs.colSpan = 0;
|
||||
}
|
||||
return obj;
|
||||
|
@ -207,19 +209,19 @@ export function getMergeHeaderColumns(): BasicColumn[] {
|
|||
{ text: 'Male', value: 'male', children: [] },
|
||||
{ text: 'Female', value: 'female', children: [] },
|
||||
],
|
||||
customRender: renderContent,
|
||||
customCell: renderContent('no'),
|
||||
},
|
||||
{
|
||||
title: '开始时间',
|
||||
dataIndex: 'beginTime',
|
||||
width: 200,
|
||||
customRender: renderContent,
|
||||
customCell: renderContent('beginTime'),
|
||||
},
|
||||
{
|
||||
title: '结束时间',
|
||||
dataIndex: 'endTime',
|
||||
width: 200,
|
||||
customRender: renderContent,
|
||||
customCell: renderContent('endTime'),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,10 +3,8 @@
|
|||
<template #headerContent>
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="flex-1">
|
||||
<a :href="GITHUB_URL" target="_blank">JeecgBoot</a>
|
||||
是一款基于BPM的低代码平台!前后端分离架构 SpringBoot 2.x,SpringCloud,Ant Design&Vue,Mybatis-plus,Shiro,JWT,支持微服务。
|
||||
强大的代码生成器让前后端代码一键生成,实现低代码开发! JeecgBoot引领新低代码开发模式 OnlineCoding-> 代码生成器-> 手工MERGE,
|
||||
帮助Java项目解决70%的重复工作,让开发更多关注业务,既能快速提高效率,节省研发成本,同时又不失灵活性!一系列低代码能力:Online表单、Online报表、Online图表、表单设计、流程设计、报表设计、大屏设计 等等...
|
||||
<a :href="GITHUB_URL" target="_blank">{{ name }}</a>
|
||||
是一款基于BPM的低代码平台!前后端分离架构 SpringBoot 2.x,SpringCloud,Ant Design&Vue,Mybatis-plus,Shiro,JWT,支持微服务。强大的代码生成器让前后端代码一键生成,实现低代码开发! JeecgBoot引领新低代码开发模式 OnlineCoding-> 代码生成器-> 手工MERGE, 帮助Java项目解决70%的重复工作,让开发更多关注业务,既能快速提高效率,节省研发成本,同时又不失灵活性!一系列低代码能力:Online表单、Online报表、Online图表、表单设计、流程设计、报表设计、大屏设计 等等...。
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<!-- 第三方登录绑定账号密码输入弹框 -->
|
||||
<a-modal title="请输入密码" v-model:visible="thirdPasswordShow" @ok="thirdLoginCheckPassword" @cancel="thirdLoginNoPassword">
|
||||
<a-modal title="请输入密码" v-model:open="thirdPasswordShow" @ok="thirdLoginCheckPassword" @cancel="thirdLoginNoPassword">
|
||||
<a-input-password placeholder="请输入密码" v-model:value="thirdLoginPassword" style="margin: 15px; width: 80%" />
|
||||
</a-modal>
|
||||
|
||||
<!-- 第三方登录提示是否绑定账号弹框 -->
|
||||
<a-modal :footer="null" :closable="false" v-model:visible="thirdConfirmShow" :class="'ant-modal-confirm'">
|
||||
<a-modal :footer="null" :closable="false" v-model:open="thirdConfirmShow" :class="'ant-modal-confirm'">
|
||||
<div class="ant-modal-confirm-body-wrapper">
|
||||
<div class="ant-modal-confirm-body">
|
||||
<QuestionCircleFilled style="color: #faad14" />
|
||||
|
@ -20,7 +20,7 @@
|
|||
</a-modal>
|
||||
|
||||
<!-- 第三方登录绑定手机号 -->
|
||||
<a-modal title="绑定手机号" v-model:visible="bindingPhoneModal" :maskClosable="false">
|
||||
<a-modal title="绑定手机号" v-model:open="bindingPhoneModal" :maskClosable="false">
|
||||
<Form class="p-4 enter-x" style="margin: 15px 10px">
|
||||
<FormItem class="enter-x">
|
||||
<a-input size="large" placeholder="请输入手机号" v-model:value="thirdPhone" class="fix-auto-fill">
|
||||
|
|
|
@ -58,13 +58,13 @@
|
|||
<template #title="{ key: treeKey, title, dataRef }">
|
||||
<a-dropdown :trigger="['contextmenu']">
|
||||
<Popconfirm
|
||||
:visible="visibleTreeKey === treeKey"
|
||||
:open="visibleTreeKey === treeKey"
|
||||
title="确定要删除吗?"
|
||||
ok-text="确定"
|
||||
cancel-text="取消"
|
||||
placement="rightTop"
|
||||
@confirm="onDelete(dataRef)"
|
||||
@visibleChange="onVisibleChange"
|
||||
@openChange="onVisibleChange"
|
||||
>
|
||||
<span>{{ title }}</span>
|
||||
</Popconfirm>
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
</div>
|
||||
<div class="aui-formButton">
|
||||
<div class="aui-flex">
|
||||
<a-button :loading="loginLoading" class="aui-link-login aui-flex-box" type="primary" @click="loginHandleClick">
|
||||
<a-button :loading="loginLoading" class="aui-link-login" type="primary" @click="loginHandleClick">
|
||||
{{ t('sys.login.loginButton') }}</a-button>
|
||||
</div>
|
||||
<div class="aui-flex">
|
||||
|
@ -459,6 +459,8 @@
|
|||
border-radius: 8px;
|
||||
margin-top: 15px;
|
||||
margin-bottom: 8px;
|
||||
flex: 1;
|
||||
color: #fff;
|
||||
}
|
||||
.aui-phone-logo{
|
||||
position: absolute;
|
||||
|
|
|
@ -132,7 +132,7 @@ export const formSchema: FormSchema[] = [
|
|||
dropdownStyle: {
|
||||
maxHeight: '50vh',
|
||||
},
|
||||
getPopupContainer: (node) => node.parentNode,
|
||||
getPopupContainer: (node) => node?.parentNode,
|
||||
},
|
||||
ifShow: ({ values }) => !isDir(values.menuType),
|
||||
},
|
||||
|
|
|
@ -82,7 +82,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||
entryFileNames: 'js/[name]-[hash].js', // 包的入口文件名称
|
||||
// manualChunks配置 (依赖包从大到小排列)
|
||||
manualChunks: {
|
||||
'tinymce-vendor': ['tinymce'],
|
||||
'tinymce-vendor': ['tinymce','@tinymce/tinymce-vue'],
|
||||
'echarts-vendor': ['echarts'],
|
||||
'antd-vue-vendor': ['ant-design-vue','@ant-design/icons-vue','@ant-design/colors'],
|
||||
'vxe-table-vendor': ['vxe-table','vxe-table-plugin-antd','xe-utils'],
|
||||
|
|
Loading…
Reference in New Issue