mirror of https://github.com/jeecgboot/jeecg-boot
Merge remote-tracking branch 'origin/master' into springboot3
# Conflicts: # README.md # jeecg-boot/jeecg-server-cloud/jeecg-visual/jeecg-cloud-test/jeecg-cloud-test-seata/pom.xml # jeecg-boot/pom.xml # jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useFinallyProps.tsspringboot3
commit
f1ceb08e16
|
@ -0,0 +1,30 @@
|
||||||
|
package org.jeecg.config.init;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
|
import org.jeecg.common.util.RedisUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.ApplicationArguments;
|
||||||
|
import org.springframework.boot.ApplicationRunner;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shiro缓存清理
|
||||||
|
* 在应用启动时清除所有的Shiro授权缓存
|
||||||
|
* 主要用于解决重启项目,用户未重新登录,按钮权限不生效的问题
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class ShiroCacheClearRunner implements ApplicationRunner {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisUtil redisUtil;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(ApplicationArguments args) {
|
||||||
|
// 清空所有授权redis缓存
|
||||||
|
log.info("———————清空所有用户授权缓存———————clearAllCache——————— ");
|
||||||
|
redisUtil.removeAll(CommonConstant.PREFIX_USER_SHIRO_CACHE);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,27 +1,47 @@
|
||||||
-- 注意:该页面对应的前台目录为views/${entityPackagePath}文件夹下
|
-- 注意:该页面对应的前台目录为views/${entityPackagePath}文件夹下
|
||||||
-- 如果你想更改到其他目录,请修改sql中component字段对应的值
|
-- 如果你想更改到其他目录,请修改sql中component字段对应的值
|
||||||
|
|
||||||
<#assign id = '${.now?string["yyyyMMddhhmmSSsss"]}0'>
|
<#assign mainId = "${.now?long}01">
|
||||||
|
<#assign addId = "${.now?long}02">
|
||||||
|
<#assign editId = "${.now?long}03">
|
||||||
|
<#assign delId = "${.now?long}04">
|
||||||
|
<#assign batchDelId = "${.now?long}05">
|
||||||
|
<#assign exportId = "${.now?long}06">
|
||||||
|
<#assign importId = "${.now?long}07">
|
||||||
|
|
||||||
|
-- 主菜单
|
||||||
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
|
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
|
||||||
VALUES ('${id}', NULL, '${tableVo.ftlDescription}', '/${entityPackagePath}/${entityName?uncap_first}List', '${entityPackagePath}/${entityName}List', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0);
|
VALUES ('${mainId}', NULL, '${tableVo.ftlDescription}', '/${entityPackagePath}/${entityName?uncap_first}List', '${entityPackagePath}/${entityName}List', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0);
|
||||||
|
|
||||||
-- 权限控制sql
|
|
||||||
-- 新增
|
-- 新增
|
||||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}1', '${id}', '添加${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
VALUES ('${addId}', '${mainId}', '添加${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
|
||||||
-- 编辑
|
-- 编辑
|
||||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}2', '${id}', '编辑${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
VALUES ('${editId}', '${mainId}', '编辑${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
|
||||||
-- 删除
|
-- 删除
|
||||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}3', '${id}', '删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
VALUES ('${delId}', '${mainId}', '删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
|
||||||
-- 批量删除
|
-- 批量删除
|
||||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}4', '${id}', '批量删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
VALUES ('${batchDelId}', '${mainId}', '批量删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
|
||||||
-- 导出excel
|
-- 导出excel
|
||||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}5', '${id}', '导出excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
VALUES ('${exportId}', '${mainId}', '导出excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
|
||||||
-- 导入excel
|
-- 导入excel
|
||||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}6', '${id}', '导入excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
VALUES ('${importId}', '${mainId}', '导入excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||||
|
|
||||||
|
-- 角色授权(以 admin 角色为例,role_id 可替换)
|
||||||
|
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}08', 'f6817f48af4fb3af11b9e8bf182f618b', '${mainId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||||
|
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}09', 'f6817f48af4fb3af11b9e8bf182f618b', '${addId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||||
|
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}10', 'f6817f48af4fb3af11b9e8bf182f618b', '${editId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||||
|
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}11', 'f6817f48af4fb3af11b9e8bf182f618b', '${delId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||||
|
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}12', 'f6817f48af4fb3af11b9e8bf182f618b', '${batchDelId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||||
|
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}13', 'f6817f48af4fb3af11b9e8bf182f618b', '${exportId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
||||||
|
INSERT INTO sys_role_permission (id, role_id, permission_id, data_rule_ids, operate_date, operate_ip) VALUES ('${.now?long}14', 'f6817f48af4fb3af11b9e8bf182f618b', '${importId}', NULL, '${.now?string["yyyy-MM-dd HH:mm:ss"]}', '127.0.0.1');
|
|
@ -241,6 +241,12 @@ jeecg:
|
||||||
dataSourceSafe: false
|
dataSourceSafe: false
|
||||||
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
||||||
lowCodeMode: dev
|
lowCodeMode: dev
|
||||||
|
# 高德地图Api配置(v2.1.3+ BI新增高德地图)
|
||||||
|
gao-de-api:
|
||||||
|
# 应用key
|
||||||
|
api-key: ??
|
||||||
|
# 应用秘钥
|
||||||
|
secret-key: ??
|
||||||
#xxl-job配置
|
#xxl-job配置
|
||||||
xxljob:
|
xxljob:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -262,6 +262,12 @@ jeecg:
|
||||||
dataSourceSafe: false
|
dataSourceSafe: false
|
||||||
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
||||||
lowCodeMode: dev
|
lowCodeMode: dev
|
||||||
|
# 高德地图Api配置(v2.1.3+ BI新增高德地图)
|
||||||
|
gao-de-api:
|
||||||
|
# 应用key
|
||||||
|
api-key: ??
|
||||||
|
# 应用秘钥
|
||||||
|
secret-key: ??
|
||||||
#xxl-job配置
|
#xxl-job配置
|
||||||
xxljob:
|
xxljob:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -256,6 +256,12 @@ jeecg:
|
||||||
dataSourceSafe: false
|
dataSourceSafe: false
|
||||||
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
||||||
lowCodeMode: dev
|
lowCodeMode: dev
|
||||||
|
# 高德地图Api配置(v2.1.3+ BI新增高德地图)
|
||||||
|
gao-de-api:
|
||||||
|
# 应用key
|
||||||
|
api-key: ??
|
||||||
|
# 应用秘钥
|
||||||
|
secret-key: ??
|
||||||
#xxl-job配置
|
#xxl-job配置
|
||||||
xxljob:
|
xxljob:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -255,6 +255,12 @@ jeecg:
|
||||||
dataSourceSafe: false
|
dataSourceSafe: false
|
||||||
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
||||||
lowCodeMode: dev
|
lowCodeMode: dev
|
||||||
|
# 高德地图Api配置(v2.1.3+ BI新增高德地图)
|
||||||
|
gao-de-api:
|
||||||
|
# 应用key
|
||||||
|
api-key: ??
|
||||||
|
# 应用秘钥
|
||||||
|
secret-key: ??
|
||||||
#xxl-job配置
|
#xxl-job配置
|
||||||
xxljob:
|
xxljob:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -268,6 +268,12 @@ jeecg:
|
||||||
dataSourceSafe: false
|
dataSourceSafe: false
|
||||||
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
||||||
lowCodeMode: dev
|
lowCodeMode: dev
|
||||||
|
# 高德地图Api配置(v2.1.3+ BI新增高德地图)
|
||||||
|
gao-de-api:
|
||||||
|
# 应用key
|
||||||
|
api-key: ??
|
||||||
|
# 应用秘钥
|
||||||
|
secret-key: ??
|
||||||
#xxl-job配置
|
#xxl-job配置
|
||||||
xxljob:
|
xxljob:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -260,6 +260,12 @@ jeecg:
|
||||||
dataSourceSafe: true
|
dataSourceSafe: true
|
||||||
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
||||||
lowCodeMode: prod
|
lowCodeMode: prod
|
||||||
|
# 高德地图Api配置(v2.1.3+ BI新增高德地图)
|
||||||
|
gao-de-api:
|
||||||
|
# 应用key
|
||||||
|
api-key: ??
|
||||||
|
# 应用秘钥
|
||||||
|
secret-key: ??
|
||||||
#xxl-job配置
|
#xxl-job配置
|
||||||
xxljob:
|
xxljob:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -250,6 +250,12 @@ jeecg:
|
||||||
dataSourceSafe: false
|
dataSourceSafe: false
|
||||||
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
||||||
lowCodeMode: dev
|
lowCodeMode: dev
|
||||||
|
# 高德地图Api配置(v2.1.3+ BI新增高德地图)
|
||||||
|
gao-de-api:
|
||||||
|
# 应用key
|
||||||
|
api-key: ??
|
||||||
|
# 应用秘钥
|
||||||
|
secret-key: ??
|
||||||
#xxl-job配置
|
#xxl-job配置
|
||||||
xxljob:
|
xxljob:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -263,6 +263,12 @@ jeecg:
|
||||||
dataSourceSafe: true
|
dataSourceSafe: true
|
||||||
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
# 低代码开发模式(dev:开发模式,prod:发布模式—关闭在线报表设计功能,分配角色admin、lowdeveloper可以放开限制)
|
||||||
lowCodeMode: prod
|
lowCodeMode: prod
|
||||||
|
# 高德地图Api配置(v2.1.3+ BI新增高德地图)
|
||||||
|
gao-de-api:
|
||||||
|
# 应用key
|
||||||
|
api-key: ??
|
||||||
|
# 应用秘钥
|
||||||
|
secret-key: ??
|
||||||
#xxl-job配置
|
#xxl-job配置
|
||||||
xxljob:
|
xxljob:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { unref, computed, ref, watch, nextTick } from 'vue';
|
import { unref, computed, ref, watch, nextTick } from 'vue';
|
||||||
import { merge } from 'lodash-es';
|
import { merge, debounce } from 'lodash-es';
|
||||||
import { isArray } from '/@/utils/is';
|
import { isArray } from '/@/utils/is';
|
||||||
import { useAttrs } from '/@/hooks/core/useAttrs';
|
import { useAttrs } from '/@/hooks/core/useAttrs';
|
||||||
import { useKeyboardEdit } from '../hooks/useKeyboardEdit';
|
import { useKeyboardEdit } from '../hooks/useKeyboardEdit';
|
||||||
|
@ -41,17 +41,8 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
|
||||||
return events;
|
return events;
|
||||||
});
|
});
|
||||||
|
|
||||||
// update-begin--author:sunjianlei---date:20250804---for:【issues/8593】修复列改变后内容不刷新
|
|
||||||
const vxeColumnsRef = ref([])
|
|
||||||
watch(data.vxeColumns, async () => {
|
|
||||||
vxeColumnsRef.value = []
|
|
||||||
await nextTick()
|
|
||||||
vxeColumnsRef.value = data.vxeColumns.value
|
|
||||||
}, {immediate: true})
|
|
||||||
// update-end----author:sunjianlei---date:20250804---for:【issues/8593】修复列改变后内容不刷新
|
|
||||||
|
|
||||||
// vxe 最终 props
|
// vxe 最终 props
|
||||||
const vxeProps = computed(() => {
|
const vxePropsMerge = computed(() => {
|
||||||
// update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
|
// update-begin--author:liaozhiyang---date:20240417---for:【QQYUN-8785】online表单列位置的id未做限制,拖动其他列到id列上面,同步数据库时报错
|
||||||
let rowClass = {};
|
let rowClass = {};
|
||||||
if (props.dragSort) {
|
if (props.dragSort) {
|
||||||
|
@ -88,7 +79,6 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
|
||||||
loading: false,
|
loading: false,
|
||||||
disabled: props.disabled,
|
disabled: props.disabled,
|
||||||
// columns: unref(data.vxeColumns),
|
// columns: unref(data.vxeColumns),
|
||||||
columns: vxeColumnsRef.value,
|
|
||||||
editRules: unref(vxeEditRules),
|
editRules: unref(vxeEditRules),
|
||||||
height: props.height === 'auto' ? null : props.height,
|
height: props.height === 'auto' ? null : props.height,
|
||||||
maxHeight: props.maxHeight,
|
maxHeight: props.maxHeight,
|
||||||
|
@ -125,6 +115,25 @@ export function useFinallyProps(props: JVxeTableProps, data: JVxeDataProps, meth
|
||||||
unref(keyboardEditConfig)
|
unref(keyboardEditConfig)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// update-begin--author:sunjianlei---date:20250804---for:【issues/8593】修复列改变后内容不刷新
|
||||||
|
const vxeColumnsRef = ref(data.vxeColumns!.value || [])
|
||||||
|
const watchColumnsDebounce = debounce(async () => {
|
||||||
|
vxeColumnsRef.value = []
|
||||||
|
await nextTick()
|
||||||
|
vxeColumnsRef.value = data.vxeColumns!.value
|
||||||
|
}, 50)
|
||||||
|
watch(data.vxeColumns!, watchColumnsDebounce)
|
||||||
|
// update-end----author:sunjianlei---date:20250804---for:【issues/8593】修复列改变后内容不刷新
|
||||||
|
|
||||||
|
const vxeProps = computed(() => {
|
||||||
|
return {
|
||||||
|
...unref(vxePropsMerge),
|
||||||
|
// 【issue/8695】单独抽出 columns,防止性能问题
|
||||||
|
columns: unref(vxeColumnsRef),
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
vxeProps,
|
vxeProps,
|
||||||
prefixCls: data.prefixCls,
|
prefixCls: data.prefixCls,
|
||||||
|
|
|
@ -116,7 +116,14 @@ export function getValueTypeBySchema(schema: FormSchema, formAction: FormActionT
|
||||||
let valueType = 'string';
|
let valueType = 'string';
|
||||||
if (schema) {
|
if (schema) {
|
||||||
const componentProps = formAction.getSchemaComponentProps(schema);
|
const componentProps = formAction.getSchemaComponentProps(schema);
|
||||||
valueType = componentProps?.valueType ? componentProps?.valueType : valueType;
|
// update-begin--author:liaozhiyang---date:20250825---for:【issues/8738】componentProps是函数时获取不到valueType
|
||||||
|
if (isFunction(componentProps)) {
|
||||||
|
const result = componentProps(schema);
|
||||||
|
valueType = result?.valueType ?? valueType;
|
||||||
|
} else {
|
||||||
|
valueType = componentProps?.valueType ? componentProps?.valueType : valueType;
|
||||||
|
}
|
||||||
|
// update-end--author:liaozhiyang---date:20250825---for:【issues/8738】componentProps是函数时获取不到valueType
|
||||||
}
|
}
|
||||||
return valueType;
|
return valueType;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue