\ No newline at end of file
+
diff --git a/src/components/Form/src/jeecg/components/JSelectPosition.vue b/src/components/Form/src/jeecg/components/JSelectPosition.vue
index 879ad70..e895577 100644
--- a/src/components/Form/src/jeecg/components/JSelectPosition.vue
+++ b/src/components/Form/src/jeecg/components/JSelectPosition.vue
@@ -1,8 +1,12 @@
-
+
diff --git a/src/components/Icon/src/IconPicker.vue b/src/components/Icon/src/IconPicker.vue
index af95c46..7abbd66 100644
--- a/src/components/Icon/src/IconPicker.vue
+++ b/src/components/Icon/src/IconPicker.vue
@@ -1,70 +1,67 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/InFilter/DatePickerInFilter.vue b/src/components/InFilter/DatePickerInFilter.vue
new file mode 100644
index 0000000..6f74af7
--- /dev/null
+++ b/src/components/InFilter/DatePickerInFilter.vue
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+ {{ opt.label }}
+
+
+ 自定义日期
+
+
+
+
+
+
+
+
+
+
+ {{ opt.label }}
+
+
+ 自定义日期
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/InFilter/index.ts b/src/components/InFilter/index.ts
new file mode 100644
index 0000000..b37c83c
--- /dev/null
+++ b/src/components/InFilter/index.ts
@@ -0,0 +1,2 @@
+export {default as DatePickerInFilter} from './DatePickerInFilter.vue';
+export {default as CascaderPcaInFilter} from './CascaderPcaInFilter.vue';
diff --git a/src/components/JVxeCustom/index.ts b/src/components/JVxeCustom/index.ts
index b0d48cb..5625d0f 100644
--- a/src/components/JVxeCustom/index.ts
+++ b/src/components/JVxeCustom/index.ts
@@ -2,7 +2,6 @@ import { registerComponent, registerAsyncComponent, registerASyncComponentReal }
import { JVxeTypes } from '/@/components/jeecg/JVxeTable/types';
import { DictSearchSpanCell, DictSearchInputCell } from './src/components/JVxeSelectDictSearchCell';
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
-
export async function registerJVxeCustom() {
// ----------------- ⚠ 注意事项 ⚠ -----------------
// 当组件内包含 BasicModal 时,必须使用异步引入!
@@ -24,8 +23,11 @@ export async function registerJVxeCustom() {
// 注册【部门选择】组件
await registerAsyncComponent(JVxeTypes.departSelect, import('./src/components/JVxeDepartSelectCell.vue'));
// 注册【省市区选择】组件
+ // await registerAsyncComponent(JVxeTypes.pca, import('./src/components/JVxePcaCell.vue'));
+ // update-begin--author:liaozhiyang---date:20240308---for:【QQYUN-8241】为避免首次加载china-area-data,JVxePcaCell组件需异步加载
registerASyncComponentReal(
JVxeTypes.pca,
createAsyncComponent(() => import('./src/components/JVxePcaCell.vue'))
);
+ // update-end--author:liaozhiyang---date:20240308---for:【QQYUN-8241】为避免首次加载china-area-data,JVxePcaCell组件需异步加载
}
diff --git a/src/components/JVxeCustom/src/components/JVxeFileCell.vue b/src/components/JVxeCustom/src/components/JVxeFileCell.vue
index a4abd95..44048a5 100644
--- a/src/components/JVxeCustom/src/components/JVxeFileCell.vue
+++ b/src/components/JVxeCustom/src/components/JVxeFileCell.vue
@@ -17,7 +17,7 @@
{{ ellipsisFileName }}
-
+
@@ -26,10 +26,10 @@
下载
-
+
删除
-
+
更多
@@ -39,6 +39,7 @@
-
+
@@ -17,8 +17,9 @@
+
{
return unref(setup.cellProps).disabled ? null : 'click';
@@ -84,13 +89,21 @@
});
}
}
-
+ // update-begin--author:liaozhiyang---date:20240523---for:【TV360X-121】jvxetable文件组件禁用状态(详情)下可下载
+ const handlePreview = () => {
+ if (unref(setup.cellProps).disabled) {
+ createImgPreview({ imageList: imgList.value });
+ }
+ };
+ // update-end--author:liaozhiyang---date:20240523---for:【TV360X-121】jvxetable文件组件禁用状态(详情)下可下载
return {
...setup,
imgList,
maxCount,
handleClickShowImageError,
- clickEvent
+ clickEvent,
+ handlePreview,
+ acceptFileType,
};
},
// 【组件增强】注释详见:JVxeComponent.Enhanced
diff --git a/src/components/JVxeCustom/src/hooks/useFileCell.ts b/src/components/JVxeCustom/src/hooks/useFileCell.ts
index e86abdc..4a8bcc3 100644
--- a/src/components/JVxeCustom/src/hooks/useFileCell.ts
+++ b/src/components/JVxeCustom/src/hooks/useFileCell.ts
@@ -63,6 +63,11 @@ export function useFileCell(props, fileType: UploadTypeEnum, options?) {
// 更多上传回调
function onModalChange(path) {
if (path) {
+ // update-begin--author:liaozhiyang---date:20240524---for:【TV360X-235】富文本禁用状态下图片上传按钮文字看不清
+ if (innerFile.value === null) {
+ innerFile.value = {};
+ }
+ // update-end-author:liaozhiyang---date:20240524---for:【TV360X-235】富文本禁用状态下图片上传按钮文字看不清
innerFile.value.path = path;
handleChangeCommon(innerFile.value);
} else {
diff --git a/src/components/Markdown/src/Markdown.vue b/src/components/Markdown/src/Markdown.vue
index 3d0eaa1..9cb94be 100644
--- a/src/components/Markdown/src/Markdown.vue
+++ b/src/components/Markdown/src/Markdown.vue
@@ -112,8 +112,46 @@
const insEditor = new Vditor(wrapEl, {
theme: getDarkMode.value === 'dark' ? 'dark' : 'classic',
lang: unref(getCurrentLang),
+ // update-begin--author:liaozhiyang---date:20240520---for:【TV360X-146】Markdown组件去掉录音选项
+ toolbar: [
+ 'emoji',
+ 'headings',
+ 'bold',
+ 'italic',
+ 'strike',
+ 'link',
+ '|',
+ 'list',
+ 'ordered-list',
+ 'check',
+ 'outdent',
+ 'indent',
+ '|',
+ 'quote',
+ 'line',
+ 'code',
+ 'inline-code',
+ 'insert-before',
+ 'insert-after',
+ '|',
+ 'upload',
+ // 'record',
+ 'table',
+ '|',
+ 'undo',
+ 'redo',
+ '|',
+ 'fullscreen',
+ 'edit-mode',
+ {
+ name: 'more',
+ toolbar: ['both', 'code-theme', 'content-theme', 'export', 'outline', 'preview', 'devtools', 'info', 'help'],
+ },
+ ],
+ // update-end--author:liaozhiyang---date:20240520---for:【TV360X-146】Markdown组件去掉录音选项
mode: 'sv',
- cdn: 'https://cdn.jsdelivr.net/npm/vditor@3.9.6',
+ // cdn: 'https://cdn.jsdelivr.net/npm/vditor@3.9.6',
+ cdn: 'https://unpkg.com/vditor@3.10.1',
fullscreen: {
index: 520,
},
@@ -186,3 +224,10 @@
},
});
+
diff --git a/src/components/Menu/src/BasicMenu.vue b/src/components/Menu/src/BasicMenu.vue
index a61fe97..2048541 100644
--- a/src/components/Menu/src/BasicMenu.vue
+++ b/src/components/Menu/src/BasicMenu.vue
@@ -25,7 +25,7 @@
import { MenuModeEnum, MenuTypeEnum } from '/@/enums/menuEnum';
import { useOpenKeys } from './useOpenKeys';
import { RouteLocationNormalizedLoaded, useRouter } from 'vue-router';
- import { isFunction } from '/@/utils/is';
+ import { isFunction, isUrl } from '/@/utils/is';
import { basicProps } from './props';
import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
import { REDIRECT_NAME } from '/@/router/constant';
@@ -33,6 +33,9 @@
import { getCurrentParentPath } from '/@/router/menus';
import { listenerRouteChange } from '/@/logics/mitt/routeChange';
import { getAllParentPath } from '/@/router/helper/menuHelper';
+ import { createBasicRootMenuContext } from './useBasicMenuContext';
+ import { URL_HASH_TAB } from '/@/utils';
+ import { getMenus } from '/@/router/menus';
export default defineComponent({
name: 'BasicMenu',
@@ -52,7 +55,9 @@
selectedKeys: [],
collapsedOpenKeys: [],
});
-
+ // update-begin--author:liaozhiyang---date:20230326---for:【QQYUN-8691】顶部菜单模式online不显示菜单名显示默认的auto在线表单
+ createBasicRootMenuContext({ menuState: menuState });
+ // update-end--author:liaozhiyang---date:20230326---for:【QQYUN-8691】顶部菜单模式online不显示菜单名显示默认的auto在线表单
const { prefixCls } = useDesign('basic-menu');
const { items, mode, accordion } = toRefs(props);
@@ -112,11 +117,43 @@
//update-begin-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
async function handleMenuClick({ item, key }: { item: any; key: string; keyPath: string[] }) {
const { beforeClickFn } = props;
+ // update-begin--author:liaozhiyang---date:20240402---for:【QQYUN-8773】配置外部网址在顶部菜单模式和搜索打不开
+ if (isUrl(key)) {
+ key = key.replace(URL_HASH_TAB, '#');
+ window.open(key);
+ return;
+ }
+ // update-end--author:liaozhiyang---date:20240402---for:【QQYUN-8773】配置外部网址在顶部菜单模式和搜索打不开
if (beforeClickFn && isFunction(beforeClickFn)) {
const flag = await beforeClickFn(key);
if (!flag) return;
}
- emit('menuClick', key, item);
+ // update-begin--author:liaozhiyang---date:20240418---for:【QQYUN-8773】顶部混合导航(顶部左侧组合菜单)一级菜单没有配置redirect默认跳子菜单的第一个
+ if (props.type === MenuTypeEnum.MIX) {
+ const menus = await getMenus();
+ const menuItem = getMatchingPath(menus, key);
+ if (menuItem && !menuItem.redirect && menuItem.children?.length) {
+ const subMenuItem = getSubMenu(menuItem.children);
+ if (subMenuItem?.path) {
+ const path = subMenuItem.redirect ?? subMenuItem.path;
+ let _key = path;
+ if (isUrl(path)) {
+ window.open(path);
+ // 外部打开emit出去的key不能是url,否则左侧菜单出不来
+ _key = key;
+ }
+ emit('menuClick', _key, { title: subMenuItem.title });
+ } else {
+ emit('menuClick', key, item);
+ }
+ } else {
+ emit('menuClick', key, item);
+ }
+ } else {
+ emit('menuClick', key, item);
+ }
+ // emit('menuClick', key, item);
+ // update-begin--author:liaozhiyang---date:20240418---for:【QQYUN-8773】顶部混合导航(顶部左侧组合菜单)一级菜单没有配置redirect默认跳子菜单的第一个
//update-end-author:taoyan date:2022-6-1 for: VUEN-1144 online 配置成菜单后,打开菜单,显示名称未展示为菜单名称
isClickGo.value = true;
@@ -142,6 +179,45 @@
menuState.selectedKeys = parentPaths;
}
}
+ /**
+ * liaozhiyang
+ * 2024-05-18
+ * 获取指定菜单下的第一个菜单
+ */
+ function getSubMenu(menus) {
+ for (let i = 0, len = menus.length; i < len; i++) {
+ const item = menus[i];
+ if (item.path && !item.children?.length) {
+ return item;
+ } else if (item.children?.length) {
+ const result = getSubMenu(item.children);
+ if (result) {
+ return result;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * liaozhiyang
+ * 2024-05-18
+ * 获取匹配path的菜单
+ */
+ function getMatchingPath(menus, path) {
+ for (let i = 0, len = menus.length; i < len; i++) {
+ const item = menus[i];
+ if (item.path === path) {
+ return item;
+ } else if (item.children?.length) {
+ const result = getMatchingPath(item.children, path);
+ if (result) {
+ return result;
+ }
+ }
+ }
+ return null;
+ }
return {
handleMenuClick,
diff --git a/src/components/Menu/src/components/BasicSubMenuItem.vue b/src/components/Menu/src/components/BasicSubMenuItem.vue
index 5f92f96..bc358c6 100644
--- a/src/components/Menu/src/components/BasicSubMenuItem.vue
+++ b/src/components/Menu/src/components/BasicSubMenuItem.vue
@@ -1,6 +1,6 @@
-
+
@@ -12,14 +12,17 @@
+
diff --git a/src/components/Menu/src/index.less b/src/components/Menu/src/index.less
index 8bfbb0d..c969109 100644
--- a/src/components/Menu/src/index.less
+++ b/src/components/Menu/src/index.less
@@ -18,7 +18,9 @@
&.ant-menu-dark {
background-color: transparent;
-
+ // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】顶部菜单模式文字调整
+ color: rgba(255 ,255 ,255, 1);
+ // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】顶部菜单模式文字调整
.ant-menu-submenu:hover,
.ant-menu-item-open,
.ant-menu-submenu-open,
diff --git a/src/components/Menu/src/useBasicMenuContext.ts b/src/components/Menu/src/useBasicMenuContext.ts
new file mode 100644
index 0000000..4e687c7
--- /dev/null
+++ b/src/components/Menu/src/useBasicMenuContext.ts
@@ -0,0 +1,16 @@
+import type { InjectionKey, Ref } from 'vue';
+import { createContext, useContext } from '/@/hooks/core/useContext';
+
+export interface BasicRootMenuContextProps {
+ menuState: any;
+}
+
+const key: InjectionKey = Symbol();
+
+export function createBasicRootMenuContext(context: BasicRootMenuContextProps) {
+ return createContext(context, key, { readonly: false, native: true });
+}
+
+export function useBasicRootMenuContext() {
+ return useContext(key);
+}
diff --git a/src/components/Modal/src/BasicModal.vue b/src/components/Modal/src/BasicModal.vue
index 3713e4c..01cbf6f 100644
--- a/src/components/Modal/src/BasicModal.vue
+++ b/src/components/Modal/src/BasicModal.vue
@@ -73,7 +73,7 @@
components: { Modal, ModalWrapper, ModalClose, ModalFooter, ModalHeader },
inheritAttrs: false,
props: basicProps,
- emits: ['visible-change', 'open-change', 'height-change', 'cancel', 'ok', 'register', 'update:visible', 'update:open', 'fullScreen'],
+ emits: ['visible-change', 'open-change', 'height-change', 'cancel', 'ok', 'register', 'update:visible', 'update:open', 'fullScreen','comment-open'],
setup(props, { emit, attrs , slots}) {
const visibleRef = ref(false);
const propsRef = ref | null>(null);
@@ -183,6 +183,7 @@
() => unref(visibleRef),
(v) => {
emit('visible-change', v);
+ emit('open-change', v);
emit('update:visible', v);
emit('update:open', v);
instance && modalMethods.emitVisible?.(v, instance.uid);
@@ -263,6 +264,9 @@
}else{
commentSpan.value = 0
}
+ // update-begin--author:liaozhiyang---date:20240528---for:【TV360X-485】开启评论之后弹窗按钮居右隔一个评论的距离
+ emit('comment-open', commentSpan.value === 0, commentSpan.value);
+ // update-end--author:liaozhiyang---date:20240528---for:【TV360X-485】开启评论之后弹窗按钮居右隔一个评论的距离
}
//update-end-author:taoyan date:2022-7-18 for: modal支持评论 slot
diff --git a/src/components/Modal/src/JModal/JModal.vue b/src/components/Modal/src/JModal/JModal.vue
new file mode 100644
index 0000000..bf15836
--- /dev/null
+++ b/src/components/Modal/src/JModal/JModal.vue
@@ -0,0 +1,327 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Modal/src/components/ModalWrapper.vue b/src/components/Modal/src/components/ModalWrapper.vue
index 2e3125a..b583f0f 100644
--- a/src/components/Modal/src/components/ModalWrapper.vue
+++ b/src/components/Modal/src/components/ModalWrapper.vue
@@ -46,34 +46,50 @@
useWindowSizeFn(setModalHeight.bind(null, false));
// update-begin--author:liaozhiyang---date:2024-04-18---for:【QQYUN-9035】basicModal不设置maxHeight或height会一直执行setModalHeight,需即使销毁MutationObserver
+ // update-begin--author:liaozhiyang---date:2024-05-30---for:【TV360X-145】将弹窗还原全屏后,关闭再打开窗口变小了
let observer,
recordCount: any = {};
- if (!(props.maxHeight || props.height)) {
- observer = useMutationObserver(
- spinRef,
- () => {
- setModalHeight({
- source: 'muob',
- callBack: (height) => {
- const count = recordCount[height];
- if (count) {
- recordCount[height] = ++recordCount[height];
- if (count > 5) {
- observer.stop();
- recordCount = null;
- }
- } else {
- recordCount[height] = 1;
- }
+ watch(
+ () => props.visible,
+ () => {
+ if (props.visible && !observer && !(props.maxHeight || props.height)) {
+ recordCount = {};
+ observer = useMutationObserver(
+ spinRef,
+ () => {
+ setModalHeight({
+ source: 'muob',
+ callBack: (height) => {
+ const count = recordCount[height];
+ if (count) {
+ recordCount[height] = ++recordCount[height];
+ if (count > 10) {
+ observer.stop();
+ recordCount = {};
+ observer = null;
+ }
+ } else {
+ recordCount = {};
+ recordCount[height] = 1;
+ }
+ },
+ });
},
- });
- },
- {
- attributes: true,
- subtree: true,
+ {
+ attributes: true,
+ subtree: true,
+ }
+ );
+ } else {
+ if (observer) {
+ observer.stop();
+ observer = null;
+ }
}
- );
- }
+ },
+ { immediate: true }
+ );
+ // update-end--author:liaozhiyang---date:2024-05-30---for:【TV360X-145】将弹窗还原全屏后,关闭再打开窗口变小了
// update-end--author:liaozhiyang---date:2024-04-18---for:【QQYUN-9035】basicModal不设置maxHeight或height会一直执行setModalHeight,需即使销毁MutationObserver
createModalContext({
diff --git a/src/components/SimpleMenu/src/SimpleMenu.vue b/src/components/SimpleMenu/src/SimpleMenu.vue
index 9150907..3bdf4c4 100644
--- a/src/components/SimpleMenu/src/SimpleMenu.vue
+++ b/src/components/SimpleMenu/src/SimpleMenu.vue
@@ -3,12 +3,12 @@
v-bind="getBindValues"
:activeName="activeName"
:openNames="getOpenKeys"
- :class="prefixCls"
+ :class="`${prefixCls} ${isThemeBright ? 'bright' : ''}`"
:activeSubMenuNames="activeSubMenuNames"
@select="handleSelect"
>
-
+
@@ -29,6 +29,7 @@
import { useOpenKeys } from './useOpenKeys';
import { URL_HASH_TAB } from '/@/utils';
+ import { useAppStore } from '/@/store/modules/app';
export default defineComponent({
name: 'SimpleMenu',
@@ -56,6 +57,8 @@
setup(props, { attrs, emit }) {
const currentActiveMenu = ref('');
const isClickGo = ref(false);
+ const appStore = useAppStore();
+ const isThemeBright = ref(false);
const menuState = reactive({
activeName: '',
@@ -93,7 +96,15 @@
},
{ flush: 'post' }
);
-
+ // update-begin--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
+ watch(
+ () => appStore.getProjectConfig.menuSetting,
+ (menuSetting) => {
+ isThemeBright.value = !!menuSetting?.isThemeBright;
+ },
+ { immediate: true, deep: true }
+ );
+ // update-end--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
listenerRouteChange((route) => {
if (route.name === REDIRECT_NAME) return;
@@ -174,6 +185,7 @@
handleSelect,
getOpenKeys,
...toRefs(menuState),
+ isThemeBright,
};
},
});
diff --git a/src/components/SimpleMenu/src/SimpleSubMenu.vue b/src/components/SimpleMenu/src/SimpleSubMenu.vue
index e713f62..278a7db 100644
--- a/src/components/SimpleMenu/src/SimpleSubMenu.vue
+++ b/src/components/SimpleMenu/src/SimpleSubMenu.vue
@@ -11,7 +11,13 @@
-
+
@@ -25,7 +31,7 @@
-
+
@@ -60,6 +66,12 @@
collapsedShowTitle: propTypes.bool,
collapse: propTypes.bool,
theme: propTypes.oneOf(['dark', 'light']),
+ // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8927】侧边栏导航二级菜单彩色模式文字颜色调整
+ isThemeBright: {
+ type: Boolean,
+ default: false,
+ },
+ // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8927】侧边栏导航二级菜单彩色模式文字颜色调整
},
setup(props) {
const { t } = useI18n();
diff --git a/src/components/SimpleMenu/src/components/SubMenuItem.vue b/src/components/SimpleMenu/src/components/SubMenuItem.vue
index bbfc3d9..e52f214 100644
--- a/src/components/SimpleMenu/src/components/SubMenuItem.vue
+++ b/src/components/SimpleMenu/src/components/SubMenuItem.vue
@@ -37,7 +37,7 @@
@@ -75,6 +75,12 @@
},
disabled: propTypes.bool,
collapsedShowTitle: propTypes.bool,
+ // update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8927】侧边栏导航二级菜单彩色模式文字颜色调整
+ isThemeBright: {
+ type: Boolean,
+ default: false,
+ },
+ // update-end--author:liaozhiyang---date:20240417---for:【QQYUN-8927】侧边栏导航二级菜单彩色模式文字颜色调整
},
setup(props) {
const instance = getCurrentInstance();
@@ -128,9 +134,11 @@
const getTheme = computed(() => rootProps.theme);
const getOverlayStyle = computed((): CSSProperties => {
+ // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8774】侧边混合导航菜单宽度调整
return {
- minWidth: '200px',
+ minWidth: '150px',
};
+ // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8774】侧边混合导航菜单宽度调整
});
const getIsOpend = computed(() => {
diff --git a/src/components/SimpleMenu/src/components/menu.less b/src/components/SimpleMenu/src/components/menu.less
index ae787f8..4d25785 100644
--- a/src/components/SimpleMenu/src/components/menu.less
+++ b/src/components/SimpleMenu/src/components/menu.less
@@ -36,7 +36,7 @@
&-submenu-title {
position: relative;
z-index: 1;
- padding: 12px 20px;
+ padding: 10px 14px;
color: @menu-dark-subsidiary-color;
cursor: pointer;
transition: all @transition-time @ease-in-out;
@@ -65,6 +65,16 @@
background-color: @primary-color !important;
}
}
+ // 彩色模式(绿色,橘红等)
+ &.bright {
+ .@{menu-prefix-cls}-item,
+ .@{menu-prefix-cls}-submenu-title {
+ color: #fff;
+ &:hover {
+ color: rgba(255, 255, 255, 0.8);
+ }
+ }
+ }
}
&-light {
@@ -108,7 +118,15 @@
&-light {
background-color: #fff;
-
+ color: rgba(0, 0, 0, 0.65);
+ .@{menu-prefix-cls} {
+ color: rgba(0, 0, 0, 0.65);
+ }
+ .@{namespace}-menu-submenu:not(.@{namespace}-menu-item-active) .@{namespace}-menu-submenu-title {
+ .anticon {
+ color: rgba(0, 0, 0, 0.9);
+ }
+ }
.@{menu-prefix-cls}-submenu-active {
color: @primary-color !important;
@@ -129,7 +147,6 @@
z-index: 1;
display: flex;
font-size: @font-size-base;
- color: inherit;
list-style: none;
cursor: pointer;
outline: none;
@@ -262,6 +279,20 @@
color: #fff;
}
}
+ // update-begin--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
+ &-dark&-vertical&.bright &-item,
+ &-dark&-vertical.bright &-submenu-title {
+ color: rgba(255, 255, 255, 1);
+ &-active:not(.@{menu-prefix-cls}-submenu) {
+ color: #fff !important;
+ background-color: @primary-color !important;
+ }
+
+ &:hover {
+ color: rgba(255, 255, 255, 0.8);
+ }
+ }
+ // update-end--author:liaozhiyang---date:20240408---for:【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
&-dark&-vertical&-collapse {
> li.@{menu-prefix-cls}-item-active,
diff --git a/src/components/Table/src/BasicTable.vue b/src/components/Table/src/BasicTable.vue
index b9422c5..ff9f67c 100644
--- a/src/components/Table/src/BasicTable.vue
+++ b/src/components/Table/src/BasicTable.vue
@@ -3,7 +3,7 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
@@ -61,6 +71,7 @@
import CustomSelectHeader from './components/CustomSelectHeader.vue'
import expandIcon from './components/ExpandIcon';
import HeaderCell from './components/HeaderCell.vue';
+ import TableSummary from './components/TableSummary';
import { InnerHandlers } from './types/table';
import { usePagination } from './hooks/usePagination';
import { useColumns } from './hooks/useColumns';
@@ -78,7 +89,7 @@
import { useDesign } from '/@/hooks/web/useDesign';
import { useCustomSelection } from "./hooks/useCustomSelection";
- import { omit } from 'lodash-es';
+ import { omit, pick } from 'lodash-es';
import { basicProps } from './props';
import { isFunction } from '/@/utils/is';
import { warn } from '/@/utils/log';
@@ -88,6 +99,7 @@
Table,
BasicForm,
HeaderCell,
+ TableSummary,
CustomSelectHeader,
},
props: basicProps,
@@ -232,6 +244,18 @@
};
const { getHeaderProps } = useTableHeader(getProps, slots, handlers);
+ // update-begin--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计)
+ const getSummaryProps = computed(() => {
+ return pick(unref(getProps), ['summaryFunc', 'summaryData', 'hasExpandedRow', 'rowKey']);
+ });
+ const getIsEmptyData = computed(() => {
+ return (unref(getDataSourceRef) || []).length === 0;
+ });
+ const showSummaryRef = computed(() => {
+ const summaryProps = unref(getSummaryProps);
+ return (summaryProps.summaryFunc || summaryProps.summaryData) && !unref(getIsEmptyData);
+ });
+ // update-end--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计)
const { getFooterProps } = useTableFooter(getProps, slots, getScrollRef, tableElRef, getDataSourceRef);
@@ -266,7 +290,7 @@
/*if (slots.expandedRowRender) {
propsData = omit(propsData, 'scroll');
}*/
- //update-end---author:wangshuai ---date:20230214 for:[QQYUN-4237]代码生成 内嵌子表模式 没有滚动条------------
+ //update-end---author:wangshuai ---date:20230214 for:[QQYUN-4237]代码生成 内嵌子表模式 没有滚动条------------
// update-begin--author:sunjianlei---date:220230630---for:【QQYUN-5571】自封装选择列,解决数据行选择卡顿问题
// 自定义选择列,需要去掉原生的
@@ -414,6 +438,10 @@
isCustomSelection,
// update-end--author:sunjianlei---date:220230630---for:【QQYUN-5571】自封装选择列,解决数据行选择卡顿问题
slotNamesGroup,
+ // update-begin--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计)
+ getSummaryProps,
+ showSummaryRef,
+ // update-end--author:liaozhiyang---date:20240425---for:【pull/1201】添加antd的TableSummary功能兼容老的summary(表尾合计)
};
},
});
@@ -563,5 +591,10 @@
}
}
// update-end--author:sunjianlei---date:220230718---for:【issues/622】修复表尾合计错位的问题
+ // update-begin--author:liaozhiyang---date:20240604---for:【TV360X-377】关联记录必填影响到了table的输入框和页码样式
+ > .ant-form-item {
+ margin-bottom: 0;
+ }
+ // update-end--author:liaozhiyang---date:20240604---for:【TV360X-377】关联记录必填影响到了table的输入框和页码样式
}
diff --git a/src/components/Table/src/components/TableAction.vue b/src/components/Table/src/components/TableAction.vue
index 9566a5a..a9fb46f 100644
--- a/src/components/Table/src/components/TableAction.vue
+++ b/src/components/Table/src/components/TableAction.vue
@@ -19,7 +19,13 @@
-
+
@@ -63,6 +69,7 @@
},
setup(props) {
const { prefixCls } = useDesign('basic-table-action');
+ const dropdownCls = `${prefixCls}-dropdown`;
let table: Partial = {};
if (!props.outside) {
table = useTableContext();
@@ -189,8 +196,8 @@
});
isInButton && e.stopPropagation();
}
-
- return { prefixCls, getActions, getDropdownList, getDropdownSlotList, getAlign, onCellClick, getTooltip };
+
+ return { prefixCls, getActions, getDropdownList, getDropdownSlotList, getAlign, onCellClick, getTooltip, dropdownCls };
},
});
@@ -258,5 +265,19 @@
// update-end--author:liaozhiyang---date:20240124---for:【issues/1019】popConfirm确认框待端后端返回过程中(处理中)样式错乱
}
}
+ // update-begin--author:liaozhiyang---date:20240407---for:【QQYUN-8762】调整table操作栏ant-dropdown样式
+ &-dropdown {
+ .ant-dropdown-menu .ant-dropdown-menu-item-divider {
+ margin: 2px 0;
+ }
+ .ant-dropdown-menu .ant-dropdown-menu-item {
+ padding: 3px 8px;
+ font-size: 13.6px;
+ }
+ .dropdown-event-area {
+ padding: 0 !important;
+ }
+ }
+ // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】调整table操作栏ant-dropdown样式
}
diff --git a/src/components/Table/src/components/TableSummary.tsx b/src/components/Table/src/components/TableSummary.tsx
new file mode 100644
index 0000000..63709b4
--- /dev/null
+++ b/src/components/Table/src/components/TableSummary.tsx
@@ -0,0 +1,163 @@
+import type { PropType, VNode } from 'vue';
+import { defineComponent, unref, computed, isVNode } from 'vue';
+import { cloneDeep, pick } from 'lodash-es';
+import { isFunction } from '/@/utils/is';
+import type { BasicColumn } from '../types/table';
+import { INDEX_COLUMN_FLAG } from '../const';
+import { propTypes } from '/@/utils/propTypes';
+import { useTableContext } from '../hooks/useTableContext';
+import { TableSummary, TableSummaryRow, TableSummaryCell } from 'ant-design-vue';
+
+const SUMMARY_ROW_KEY = '_row';
+const SUMMARY_INDEX_KEY = '_index';
+export default defineComponent({
+ name: 'BasicTableSummary',
+ components: { TableSummary, TableSummaryRow, TableSummaryCell },
+ props: {
+ summaryFunc: {
+ type: Function as PropType,
+ },
+ summaryData: {
+ type: Array as PropType,
+ },
+ rowKey: propTypes.string.def('key'),
+ // 是否有展开列
+ hasExpandedRow: propTypes.bool,
+ data: {
+ type: Object as PropType,
+ default: () => {},
+ },
+ },
+ setup(props) {
+ const table = useTableContext();
+
+ const getDataSource = computed((): Recordable[] => {
+ const {
+ summaryFunc,
+ summaryData,
+ data: { pageData },
+ } = props;
+ if (summaryData?.length) {
+ summaryData.forEach((item, i) => (item[props.rowKey] = `${i}`));
+ return summaryData;
+ }
+ if (!isFunction(summaryFunc)) {
+ return [];
+ }
+ let dataSource = cloneDeep(unref(pageData));
+ dataSource = summaryFunc(dataSource);
+ dataSource.forEach((item, i) => {
+ item[props.rowKey] = `${i}`;
+ });
+ return dataSource;
+ });
+
+ const getColumns = computed(() => {
+ const dataSource = unref(getDataSource);
+ let columns: BasicColumn[] = cloneDeep(table.getColumns({ sort: true }));
+ columns = columns.filter((item) => !item.defaultHidden);
+ const index = columns.findIndex((item) => item.flag === INDEX_COLUMN_FLAG);
+ const hasRowSummary = dataSource.some((item) => Reflect.has(item, SUMMARY_ROW_KEY));
+ const hasIndexSummary = dataSource.some((item) => Reflect.has(item, SUMMARY_INDEX_KEY));
+
+ // 是否有序号列
+ let hasIndexCol = false;
+ // 是否有选择列
+ const hasSelection = table.getRowSelection() && hasRowSummary;
+
+ if (index !== -1) {
+ if (hasIndexSummary) {
+ hasIndexCol = true;
+ columns[index].customSummaryRender = ({ record }) => record[SUMMARY_INDEX_KEY];
+ columns[index].ellipsis = false;
+ } else {
+ Reflect.deleteProperty(columns[index], 'customSummaryRender');
+ }
+ }
+
+ if (hasSelection) {
+ const isFixed = columns.some((col) => col.fixed === 'left' || col.fixed === true);
+ columns.unshift({
+ width: 60,
+ title: 'selection',
+ key: 'selectionKey',
+ align: 'center',
+ ...(isFixed ? { fixed: 'left' } : {}),
+ customSummaryRender: ({ record }) => (hasIndexCol ? '' : record[SUMMARY_ROW_KEY]),
+ });
+ }
+
+ if (props.hasExpandedRow) {
+ const isFixed = columns.some((col) => col.fixed === 'left');
+ columns.unshift({
+ width: 50,
+ title: 'expandedRow',
+ key: 'expandedRowKey',
+ align: 'center',
+ ...(isFixed ? { fixed: 'left' } : {}),
+ customSummaryRender: () => '',
+ });
+ }
+ return columns;
+ });
+
+ function isRenderCell(data: any) {
+ return data && typeof data === 'object' && !Array.isArray(data) && !isVNode(data);
+ }
+
+ const getValues = (row: Recordable, col: BasicColumn, index: number) => {
+ const value = row[col.dataIndex as string];
+ let childNode: VNode | JSX.Element | string | number | undefined | null;
+ childNode = value;
+ if (col.customSummaryRender) {
+ const renderData = col.customSummaryRender({
+ text: value,
+ value,
+ record: row,
+ index,
+ column: cloneDeep(col),
+ });
+ if (isRenderCell(renderData)) {
+ childNode = renderData.children;
+ } else {
+ childNode = renderData;
+ }
+ if (typeof childNode === 'object' && !Array.isArray(childNode) && !isVNode(childNode)) {
+ childNode = null;
+ }
+ if (Array.isArray(childNode) && childNode.length === 1) {
+ childNode = childNode[0];
+ }
+ return childNode;
+ }
+ return childNode;
+ };
+
+ const getCellProps = (col: BasicColumn) => {
+ const cellProps = pick(col, ['colSpan', 'rowSpan', 'align']);
+ return {
+ ...cellProps,
+ };
+ };
+
+ return () => {
+ return (
+
+ {(unref(getDataSource) || []).map((row) => {
+ return (
+
+ {unref(getColumns).map((col, index) => {
+ return (
+
+ {getValues(row, col, index)}
+
+ );
+ })}
+
+ );
+ })}
+
+ );
+ };
+ },
+});
diff --git a/src/components/Table/src/components/settings/ColumnSetting.vue b/src/components/Table/src/components/settings/ColumnSetting.vue
index e10eb6f..01985d4 100644
--- a/src/components/Table/src/components/settings/ColumnSetting.vue
+++ b/src/components/Table/src/components/settings/ColumnSetting.vue
@@ -142,9 +142,9 @@
setup(props, { emit, attrs }) {
const { t } = useI18n();
const table = useTableContext();
- const popoverVisible = ref(true);
+ const popoverVisible = ref(false);
// update-begin--author:sunjianlei---date:20221101---for: 修复第一次进入时列表配置不能拖拽
- nextTick(() => popoverVisible.value = false);
+ // nextTick(() => popoverVisible.value = false);
// update-end--author:sunjianlei---date:20221101---for: 修复第一次进入时列表配置不能拖拽
const defaultRowSelection = omit(table.getRowSelection(), 'selectedRowKeys');
let inited = false;
@@ -311,7 +311,9 @@
// Open the pop-up window for drag and drop initialization
function handleVisibleChange() {
if (inited) return;
- nextTick(() => {
+ // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-254】列设置闪现及苹果浏览器弹窗过长
+ setTimeout(() => {
+ // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-254】列设置闪现及苹果浏览器弹窗过长
const columnListEl = unref(columnListRef);
if (!columnListEl) return;
const el = columnListEl.$el as any;
@@ -340,14 +342,14 @@
plainSortOptions.value = columns;
// update-begin--author:liaozhiyang---date:20230904---for:【QQYUN-6424】table字段列表设置不显示后,再拖拽字段顺序,原本不显示的,又显示了
- if(state.checkedList.length != columns.length){
- const cols = columns.map(item => item.value);
- const arr = cols.filter((cItem) => state.checkedList.find((lItem) => lItem === cItem));
- setColumns(arr);
- } else {
- setColumns(columns);
- }
- // update-begin--author:liaozhiyang---date:20230904---for:【QQYUN-6424】table字段列表设置不显示后,再拖拽字段顺序,原本不显示的,又显示了
+ // update-begin--author:liaozhiyang---date:20240522---for:【TV360X-108】刷新后勾选之前未勾选的字段拖拽之后该字段对应的表格列消失了
+ const cols = columns.map((item) => item.value);
+ const arr = cols.filter((cItem) => state.checkedList.find((lItem) => lItem === cItem));
+ setColumns(arr);
+ // 最开始的代码
+ // setColumns(columns);
+ // update-end--author:liaozhiyang---date:20240522---for:【TV360X-108】刷新后勾选之前未勾选的字段拖拽之后该字段对应的表格列消失了
+ // update-end--author:liaozhiyang---date:20230904---for:【QQYUN-6424】table字段列表设置不显示后,再拖拽字段顺序,原本不显示的,又显示了
},
});
// 记录原始 order 序列
@@ -355,7 +357,7 @@
sortableOrder.value = sortable.toArray();
}
inited = true;
- });
+ }, 2000);
}
// Control whether the serial number column is displayed
@@ -516,6 +518,16 @@
// flex-wrap: wrap;
}
+ // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-254】列设置闪现及苹果浏览器弹窗过长
+ &.ant-popover,
+ .ant-popover-content,
+ .ant-popover-inner,
+ .ant-popover-inner-content,
+ .scroll-container,
+ .scrollbar__wrap {
+ max-width: min-content;
+ }
+ // update-end--author:liaozhiyang---date:20240529---for:【TV360X-254】列设置闪现及苹果浏览器弹窗过长
.scrollbar {
height: 220px;
}
diff --git a/src/components/Table/src/components/settings/SizeSetting.vue b/src/components/Table/src/components/settings/SizeSetting.vue
index e681747..355816c 100644
--- a/src/components/Table/src/components/settings/SizeSetting.vue
+++ b/src/components/Table/src/components/settings/SizeSetting.vue
@@ -8,8 +8,8 @@