Compare commits

...

2 Commits

Author SHA1 Message Date
c8e168e4c4 功能管理,完成 2026-01-20 15:33:13 +08:00
bd2b0e7f3d 初始化数据xml代码生成 2026-01-20 14:40:32 +08:00
55 changed files with 1777 additions and 8 deletions

198
doc/sql.md Normal file
View File

@@ -0,0 +1,198 @@
```sql
/* ---------------------------------------------------- */
/* Generated by Enterprise Architect Version 10.10 */
/* Created On : 20-1月-2026 15:13:42 */
/* DBMS : PostgreSQL */
/* ---------------------------------------------------- */
/* Drop Sequences for Autonumber Columns */
DROP SEQUENCE IF EXISTS cg_template_id_seq;
/* Drop Tables */
DROP TABLE IF EXISTS cg_fun_item CASCADE;
DROP TABLE IF EXISTS cg_fun_module CASCADE;
DROP TABLE IF EXISTS cg_fun_operation CASCADE;
DROP TABLE IF EXISTS cg_menu CASCADE;
DROP TABLE IF EXISTS cg_role CASCADE;
DROP TABLE IF EXISTS cg_role_fun CASCADE;
DROP TABLE IF EXISTS cg_template CASCADE;
/* Create Tables */
CREATE TABLE cg_fun_item (
id bigint NOT NULL, -- id
module_id bigint NOT NULL, -- 模块ID
item_id bigint NOT NULL, -- 功能ID
item_name varchar(50) NOT NULL, -- 功能名称
item_code varchar(64) NOT NULL, -- 功能编码
is_tenant boolean NOT NULL DEFAULT true, -- 是否租户
describe varchar(250) NULL, -- 说明
sort_order smallint NOT NULL DEFAULT 0 -- 排序
);
CREATE TABLE cg_fun_module (
id bigint NOT NULL, -- id
module_code varchar(16) NOT NULL, -- 模块编码
module_name varchar(8) NOT NULL, -- 模块名称
package_name varchar(250) NOT NULL, -- 包名称
api_package_name varchar(250) NOT NULL, -- 参数包名
sort_order smallint NOT NULL DEFAULT 0, -- 排序
describe varchar(250) NULL -- 描述
);
CREATE TABLE cg_fun_operation (
id bigint NOT NULL, -- id
module_id bigint NOT NULL, -- 模块ID
item_id bigint NOT NULL, -- 功能ID(表主键ID)
is_green_light boolean NOT NULL DEFAULT false, -- 直接放行
operation_id bigint NOT NULL, -- 操作ID
operation_code varchar(32) NULL, -- 操作编码
fun_name varchar(16) NOT NULL, -- 操作名称
fun_type smallint NOT NULL, -- 操作类型 > >查 > >改 > >删 > >增
request_type smallint NOT NULL, -- 请求类型
is_req_params boolean NOT NULL DEFAULT true, -- 是否需要请求参数
is_res_params boolean NOT NULL DEFAULT true, -- 是否需要响应参数
is_page boolean NOT NULL DEFAULT true, -- 是否分页
path_params varchar(16) NULL, -- 路径参数与请求参数true互斥
usable_config json NOT NULL DEFAULT '[]', -- 可配置数据类型json[]
field_config json NOT NULL DEFAULT '[]', -- 可配置字段
sort_order smallint NOT NULL DEFAULT 0, -- 排序
describe varchar(250) NULL -- 说明说明
);
CREATE TABLE cg_menu (
id bigint NOT NULL, -- 主键ID
client_type smallint NOT NULL, -- 客户端类型0 PC端1 小程序端2 H5端
menu_name varchar(32) NOT NULL, -- 菜单名称
parent_id bigint NOT NULL DEFAULT 0, -- 父菜单ID
fun_id bigint NULL, -- 操作ID/来自操作表
menu_type smallint NOT NULL DEFAULT 0, -- 0菜单1按钮
path varchar(64) NULL, -- 路由路径
icon varchar(64) NULL, -- 菜单图标
is_tenant boolean NOT NULL DEFAULT true, -- 是否租户
is_hide boolean NOT NULL DEFAULT false, -- 是否隐藏
sort_order smallint NOT NULL DEFAULT 0 -- 排序
);
CREATE TABLE cg_role (
id bigint NOT NULL, -- 主键ID
role_name varchar(32) NOT NULL, -- 角色名称
role_type smallint NOT NULL -- 角色类型 0平台 1套餐
);
CREATE TABLE cg_role_fun (
id bigint NOT NULL, -- 主键ID
role_id bigint NOT NULL, -- 角色ID
fun_id bigint NOT NULL, -- 操作ID
data_scope smallint NOT NULL DEFAULT 0, -- 数据权限默认:0无
assign_data_scope json NOT NULL DEFAULT '[]', -- 指定的数据权限范围
exclude_field json NOT NULL DEFAULT '[]', -- 排除的字段
client_type smallserial NOT NULL -- 客户端类型0 PC端1 小程序端2 H5端
);
CREATE TABLE cg_template (
id bigint NOT NULL DEFAULT NEXTVAL(('"cg_template_id_seq"'::text)::regclass), -- 主键ID
is_use boolean NOT NULL DEFAULT false, -- 是否使用
template_name varchar(32) NOT NULL, -- 模板名称
template_type smallint NOT NULL, -- 模板类型
content text NOT NULL -- 正文
);
/* Create Primary Keys, Indexes, Uniques, Checks */
ALTER TABLE cg_fun_item ADD CONSTRAINT "PK_cg_fun_item" PRIMARY KEY (id);
ALTER TABLE cg_fun_item ADD CONSTRAINT u_module_item_code UNIQUE (module_id, item_id, item_code);
ALTER TABLE cg_fun_item ADD CONSTRAINT u_module_item_id UNIQUE (module_id, item_id);
ALTER TABLE cg_fun_module ADD CONSTRAINT "PK_cg_fun_module" PRIMARY KEY (id);
ALTER TABLE cg_fun_operation ADD CONSTRAINT "PK_cg_fun_operation" PRIMARY KEY (id);
ALTER TABLE cg_fun_operation ADD CONSTRAINT u_module_item_opration UNIQUE (module_id, item_id, operation_code);
ALTER TABLE cg_fun_operation ADD CONSTRAINT u_module_item_operation_id UNIQUE (module_id, item_id, operation_id);
ALTER TABLE cg_menu ADD CONSTRAINT "PK_cg_menu" PRIMARY KEY (id);
ALTER TABLE cg_role ADD CONSTRAINT "PK_cg_role" PRIMARY KEY (id);
ALTER TABLE cg_role_fun ADD CONSTRAINT "PK_cg_role_fun" PRIMARY KEY (id);
ALTER TABLE cg_template ADD CONSTRAINT "PK_cg_template" PRIMARY KEY (id);
/* Create Table Comments, Sequences for Autonumber Columns */
COMMENT ON TABLE cg_fun_item IS '功能项配置';
COMMENT ON COLUMN cg_fun_item.id IS 'id';
COMMENT ON COLUMN cg_fun_item.module_id IS '模块ID';
COMMENT ON COLUMN cg_fun_item.item_id IS '功能ID';
COMMENT ON COLUMN cg_fun_item.item_name IS '功能名称';
COMMENT ON COLUMN cg_fun_item.item_code IS '功能编码';
COMMENT ON COLUMN cg_fun_item.is_tenant IS '是否租户';
COMMENT ON COLUMN cg_fun_item.describe IS '说明';
COMMENT ON COLUMN cg_fun_item.sort_order IS '排序';
COMMENT ON TABLE cg_fun_module IS '模块配置';
COMMENT ON COLUMN cg_fun_module.id IS 'id';
COMMENT ON COLUMN cg_fun_module.module_code IS '模块编码';
COMMENT ON COLUMN cg_fun_module.module_name IS '模块名称';
COMMENT ON COLUMN cg_fun_module.package_name IS '包名称';
COMMENT ON COLUMN cg_fun_module.api_package_name IS '参数包名';
COMMENT ON COLUMN cg_fun_module.sort_order IS '排序';
COMMENT ON COLUMN cg_fun_module.describe IS '描述';
COMMENT ON TABLE cg_fun_operation IS '操作配置';
COMMENT ON COLUMN cg_fun_operation.id IS 'id';
COMMENT ON COLUMN cg_fun_operation.module_id IS '模块ID';
COMMENT ON COLUMN cg_fun_operation.item_id IS '功能ID(表主键ID)';
COMMENT ON COLUMN cg_fun_operation.is_green_light IS '直接放行';
COMMENT ON COLUMN cg_fun_operation.operation_id IS '操作ID';
COMMENT ON COLUMN cg_fun_operation.operation_code IS '操作编码';
COMMENT ON COLUMN cg_fun_operation.fun_name IS '操作名称';
COMMENT ON COLUMN cg_fun_operation.fun_type IS '操作类型 > >查 > >改 > >删 > >增';
COMMENT ON COLUMN cg_fun_operation.request_type IS '请求类型';
COMMENT ON COLUMN cg_fun_operation.is_req_params IS '是否需要请求参数';
COMMENT ON COLUMN cg_fun_operation.is_res_params IS '是否需要响应参数';
COMMENT ON COLUMN cg_fun_operation.is_page IS '是否分页';
COMMENT ON COLUMN cg_fun_operation.path_params IS '路径参数与请求参数true互斥';
COMMENT ON COLUMN cg_fun_operation.usable_config IS '可配置数据类型json[]';
COMMENT ON COLUMN cg_fun_operation.field_config IS '可配置字段';
COMMENT ON COLUMN cg_fun_operation.sort_order IS '排序';
COMMENT ON COLUMN cg_fun_operation.describe IS '说明说明';
COMMENT ON TABLE cg_menu IS '菜单';
COMMENT ON COLUMN cg_menu.id IS '主键ID';
COMMENT ON COLUMN cg_menu.client_type IS '客户端类型0 PC端1 小程序端2 H5端';
COMMENT ON COLUMN cg_menu.menu_name IS '菜单名称';
COMMENT ON COLUMN cg_menu.parent_id IS '父菜单ID';
COMMENT ON COLUMN cg_menu.fun_id IS '操作ID/来自操作表';
COMMENT ON COLUMN cg_menu.menu_type IS '0菜单1按钮';
COMMENT ON COLUMN cg_menu.path IS '路由路径';
COMMENT ON COLUMN cg_menu.icon IS '菜单图标';
COMMENT ON COLUMN cg_menu.is_tenant IS '是否租户';
COMMENT ON COLUMN cg_menu.is_hide IS '是否隐藏';
COMMENT ON COLUMN cg_menu.sort_order IS '排序';
COMMENT ON TABLE cg_role IS '角色表';
COMMENT ON COLUMN cg_role.id IS '主键ID';
COMMENT ON COLUMN cg_role.role_name IS '角色名称';
COMMENT ON COLUMN cg_role.role_type IS '角色类型 0平台 1套餐';
COMMENT ON TABLE cg_role_fun IS '角色权限表';
COMMENT ON COLUMN cg_role_fun.id IS '主键ID';
COMMENT ON COLUMN cg_role_fun.role_id IS '角色ID';
COMMENT ON COLUMN cg_role_fun.fun_id IS '操作ID';
COMMENT ON COLUMN cg_role_fun.data_scope IS '数据权限默认:0无';
COMMENT ON COLUMN cg_role_fun.assign_data_scope IS '指定的数据权限范围';
COMMENT ON COLUMN cg_role_fun.exclude_field IS '排除的字段';
COMMENT ON COLUMN cg_role_fun.client_type IS '客户端类型0 PC端1 小程序端2 H5端';
COMMENT ON TABLE cg_template IS '模板表';
COMMENT ON COLUMN cg_template.id IS '主键ID';
COMMENT ON COLUMN cg_template.is_use IS '是否使用';
COMMENT ON COLUMN cg_template.template_name IS '模板名称';
COMMENT ON COLUMN cg_template.template_type IS '模板类型';
COMMENT ON COLUMN cg_template.content IS '正文';
CREATE SEQUENCE cg_template_id_seq INCREMENT 1 START 1;
```

View File

@@ -259,3 +259,106 @@ $operationList:{op |
## 模块数据
```xml
group dbXml;
moduleTemplate(module) ::= <<
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.24.xsd">
<changeSet id="insert-ms-fun-module-data" author="xinghe">
<comment>初始化模块数据</comment>
$module:{op |
<insert tableName="ms_fun_module">
<column name="id" value="$op.id$"/>
<column name="module_name" value="$op.moduleCode$"/>
</insert>
}$
</changeSet>
</databaseChangeLog>
>>
itemTemplate(item) ::= <<
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.24.xsd">
<changeSet id="insert-ms-fun-item-data" author="xinghe">
<comment>初始化功能数据</comment>
$item:{op |
<insert tableName="ms_fun_item">
<column name="id" value="$op.id$"/>
<column name="module_id" value="$op.moduleId$"/>
<column name="item_name" value="$op.itemName$"/>
<column name="is_tenant" value="$op.isTenant$"/>
<column name="describe" value="$op.describe$"/>
</insert>
}$
</changeSet>
</databaseChangeLog>
>>
funTypeAnnotations ::= [
"ADD": "0",
"DELETE": "1",
"EDIT": "2",
"QUERY": "3",
"UPLOAD": "4",
"DOWNLOAD": "5",
"IMPORT": "6",
"EXPORT": "7",
"PRINT": "8",
"REGISTER": "9",
"LOGIN": "10",
"LOGOUT": "11",
"SMS": "12",
"EMAIL": "13",
"WECHAT": "14",
"OTHER": "99"
default: "-1"
]
operationTemplate(operation) ::= <<
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.24.xsd">
<changeSet id="insert-ms-fun-operation-data" author="xinghe">
<comment>初始化操作数据</comment>
$operation:{op |
<insert tableName="ms_fun_item">
<column name="id" value="$op.id$"/>
<column name="module_id" value="$op.moduleId$"/>
<column name="item_id" value="$op.itemId$"/>
<column name="is_green_light" value="$op.isGreenLight$"/>
<column name="fun_code" value="$op.operationCode$"/>
<column name="fun_name" value="$op.funName$"/>
<column name="fun_type" value="$funTypeAnnotations.(op.funType)$"/>
<column name="usable_config" value="$op.usableConfigJson$"/>
<column name="field_cofnig" value="$op.fieldConfigJson$"/>
<column name="sort_order" value="$op.sortOrder$"/>
<column name="describe" value="$op.describe$"/>
</insert>
}$
</changeSet>
</databaseChangeLog>
>>
```

Binary file not shown.

View File

@@ -0,0 +1,26 @@
package com.cczsa.xinghe.codegen.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* @author xia
* &#064;date 2026/1/20
* @version 0.0.1
*/
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
// 将所有非 API 的路径转发到 index.html
// 注意:这里假设你的 API 请求都有 /api 前缀
registry.addViewController("/{path:[^\\.]*}")
.setViewName("forward:/index.html");
// 针对多级路径的递归处理(可选)
registry.addViewController("/**/{path:[^\\.]*}")
.setViewName("forward:/index.html");
}
}

View File

@@ -29,6 +29,9 @@ public class CodeGen implements Serializable {
@Schema(description = "功能ID")
private Long itemId;
@Schema(description = "模块ID")
private Long moduleId;
@Hidden
@AssertTrue(message = "当代码生成类型为 CONTROLLER 时功能ID不能为空")
@@ -39,4 +42,15 @@ public class CodeGen implements Serializable {
return true;
}
@Hidden
@AssertTrue(message = "当代码生成类型为 MODULE_DATA_INFO 时模块ID不能为空")
public boolean isModuleIdValid() {
if (codeGenType == CodeGenType.MODULE_DATA_INFO) {
return moduleId != null;
}
return true;
}
}

View File

@@ -14,7 +14,8 @@ import lombok.Getter;
@Getter
public enum CodeGenType {
CONTROLLER(0, "controller");
CONTROLLER(0, "controller"),
MODULE_DATA_INFO(1, "module_data_info");
private final int code;
private final String desc;

View File

@@ -1,5 +1,6 @@
package com.cczsa.xinghe.codegen.entity.domain.template;
import com.alibaba.fastjson2.JSONObject;
import com.cczsa.xinghe.codegen.entity.FunOperationEntity;
import com.cczsa.xinghe.codegen.util.StringUtils;
import lombok.Data;
@@ -42,6 +43,14 @@ public class FunOperationTemp extends FunOperationEntity {
* 路径参数 url入参
*/
private String pathParamsUrl;
/**
* usableConfig 转成字符串
*/
private String usableConfigJson;
/**
* fieldConfig 转成字符串
*/
private String fieldConfigJson;
public void info(){
@@ -54,6 +63,8 @@ public class FunOperationTemp extends FunOperationEntity {
pathParamsLong = "@PathVariable(\""+this.getPathParams()+"\") Long "+this.getPathParams();
pathParamsUrl = "/{"+this.getPathParams()+"}";
}
usableConfigJson = JSONObject.toJSONString(this.getUsableConfig());
fieldConfigJson = JSONObject.toJSONString(this.getFieldConfig()).replace("\"", "'");;
}

View File

@@ -24,7 +24,8 @@ public enum TemplateTypeEnum {
REQUEST_PARAM(1, "请求参数"),
RESPONSE_PARAM(2, "响应参数"),
SERVICE(3, "服务接口"),
SERVICE_IMPL(4, "服务实现");
SERVICE_IMPL(4, "服务实现"),
MODULE_DATA_INFO(5, "模块功能操作数据生成");
private final int code;
private final String desc;

View File

@@ -169,6 +169,7 @@ public class ControllerCodeCreate extends NodeComponent {
case RESPONSE_PARAM -> "Res.java";
case SERVICE -> "Service.java";
case SERVICE_IMPL -> "ServiceImpl.java";
default -> throw new IllegalArgumentException("Invalid template type: " + templateType);
};
}
@@ -176,7 +177,7 @@ public class ControllerCodeCreate extends NodeComponent {
* 设置模板数据
*
* @param classTemplate 模板对象
* @param basics
* @param basics 基础信息
*/
private void setTemplateData(ST classTemplate, Map<String, Object> basics) {
classTemplate.add("item", itemEntity);

View File

@@ -0,0 +1,109 @@
package com.cczsa.xinghe.codegen.service.flow.template;
import com.cczsa.xinghe.codegen.entity.FunItemEntity;
import com.cczsa.xinghe.codegen.entity.FunModuleEntity;
import com.cczsa.xinghe.codegen.entity.FunOperationEntity;
import com.cczsa.xinghe.codegen.entity.domain.template.FunOperationTemp;
import com.cczsa.xinghe.codegen.entity.enums.TemplateTypeEnum;
import com.cczsa.xinghe.codegen.mapper.FunItemMapper;
import com.cczsa.xinghe.codegen.mapper.FunModuleMapper;
import com.cczsa.xinghe.codegen.mapper.FunOperationMapper;
import com.cczsa.xinghe.codegen.service.TemplateService;
import com.mybatisflex.core.query.QueryWrapper;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.stringtemplate.v4.ST;
import org.stringtemplate.v4.STGroup;
import org.stringtemplate.v4.STGroupString;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Comparator;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/**
* @author xia
* &#064;date 2026/1/20
* @version 0.0.1
*/
@Slf4j
@RequiredArgsConstructor
@LiteflowComponent(id = "moduleDataInfo", name = "模块权限相关数据生成")
public class ModuleDataInfoCreate extends NodeComponent {
private final FunModuleMapper funModuleMapper;
private final FunItemMapper funItemMapper;
private final FunOperationMapper funOperationMapper;
private final TemplateService templateService;
// 压缩流
private ZipOutputStream zos;
@Override
public void process() throws Exception {
Long moduleId = this.getContextBean(Long.class);
FunModuleEntity moduleEntity = funModuleMapper.selectOneById(moduleId);
if (moduleEntity == null){
return;
}
// 获取 模版
String template = templateService.getTemplateTypeContent(TemplateTypeEnum.MODULE_DATA_INFO);
if (template == null){
return;
}
// 流
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
zos = new ZipOutputStream(outputStream);
// 生成
STGroup group = new STGroupString("dbXml",template, '$', '$');
ST moduleTemplate = group.getInstanceOf("moduleTemplate"); // 使用正确的模板名称
// 模块数据生成
List<FunModuleEntity> funModuleEntities = funModuleMapper.selectAll();
// funModuleEntities 按 id 升序排序
funModuleEntities.sort(Comparator.comparing(FunModuleEntity::getId));
moduleTemplate.add("module", funModuleEntities);
writeCodeToZip(moduleTemplate,"module");
ST itemTemplate = group.getInstanceOf("itemTemplate"); // 使用正确的模板名称
// 功能数据生成
List<FunItemEntity> funItemEntities = funItemMapper.selectAll();
funItemEntities.sort(Comparator.comparing(FunItemEntity::getId));
itemTemplate.add("item", funItemEntities);
writeCodeToZip(itemTemplate,"item");
ST operationTemplate = group.getInstanceOf("operationTemplate"); // 使用正确的模板名称
// 操作数据生成
List<FunOperationTemp> funOperationEntities = funOperationMapper.selectListByQueryAs(QueryWrapper.create(),FunOperationTemp.class);
funOperationEntities.sort(Comparator.comparing(FunOperationEntity::getId));
funOperationEntities.forEach(FunOperationTemp::info);
operationTemplate.add("operation", funOperationEntities);
writeCodeToZip(operationTemplate,"operation");
// 确保 ZIP 流结束
zos.finish();
// 返回数据
this.getSlot().setResponseData(outputStream.toByteArray());
}
private void writeCodeToZip(ST st,String fileName) throws IOException {
// 生成代码
String result = st.render();
// insert-ms-fun-operation-data.xml
ZipEntry entry = new ZipEntry("insert-"+ fileName +"-data.xml");
zos.putNextEntry(entry);
zos.write(result.getBytes(StandardCharsets.UTF_8));
zos.closeEntry();
}
}

View File

@@ -1,6 +1,7 @@
package com.cczsa.xinghe.codegen.service.impl;
import com.cczsa.xinghe.codegen.entity.FunItemEntity;
import com.cczsa.xinghe.codegen.entity.FunModuleEntity;
import com.cczsa.xinghe.codegen.entity.domain.template.CodeGen;
import com.cczsa.xinghe.codegen.entity.domain.template.CodeGenType;
import com.cczsa.xinghe.codegen.mapper.FunItemMapper;
@@ -33,12 +34,26 @@ public class CodeGenServiceImpl implements CodeGenService {
@Override
public byte[] generateCodeZip(CodeGen req) {
Long id = null;
if(req.getCodeGenType() == CodeGenType.CONTROLLER){
FunItemEntity funItemEntity = funItemMapper.selectOneById(req.getItemId());
if (funItemEntity == null) {
return null;
}
id = req.getItemId();
}
FunItemEntity funItemEntity = funItemMapper.selectOneById(req.getItemId());
if(req.getCodeGenType() == CodeGenType.CONTROLLER && funItemEntity != null){
LiteflowResponse response = flowExecutor.execute2Resp("controller",null,req.getItemId());
if(req.getCodeGenType() == CodeGenType.MODULE_DATA_INFO){
FunModuleEntity funModuleEntity = funModuleMapper.selectOneById(req.getModuleId());
if (funModuleEntity == null) {
return null;
}
id = req.getModuleId();
}
if(id != null){
LiteflowResponse response = flowExecutor.execute2Resp(req.getCodeGenType().getDesc(),null,id);
log.info("执行结果:{}",response);
if (response.isSuccess()) {
return (byte[]) response.getSlot().getResponseData();
}

View File

@@ -1,7 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<flow>
<!-- 主流程:用户下单 -->
<!-- 主流程:controller 代码生成 -->
<chain name="controller">
THEN(controllerCodeCreate);
</chain>
<!-- 主流程:数据初始化 -->
<chain name="module_data_info">
THEN(moduleDataInfo);
</chain>
</flow>

View File

@@ -0,0 +1,45 @@
/** 白屏阶段会执行的 CSS 加载动画 */
#app-loading {
position: relative;
top: 45vh;
margin: 0 auto;
color: #409eff;
font-size: 12px;
}
#app-loading,
#app-loading::before,
#app-loading::after {
width: 2em;
height: 2em;
border-radius: 50%;
animation: 2s ease-in-out infinite app-loading-animation;
}
#app-loading::before,
#app-loading::after {
content: "";
position: absolute;
}
#app-loading::before {
left: -4em;
animation-delay: -0.2s;
}
#app-loading::after {
left: 4em;
animation-delay: 0.2s;
}
@keyframes app-loading-animation {
0%,
80%,
100% {
box-shadow: 0 2em 0 -2em;
}
40% {
box-shadow: 0 2em 0 0;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="/app-loading.css" />
<title>功能管理</title>
<script type="module" crossorigin src="/static/index-380a124d.js"></script>
<link rel="modulepreload" crossorigin href="/static/vue-5ea6dbbd.js">
<link rel="modulepreload" crossorigin href="/static/element-a57cc571.js">
<link rel="modulepreload" crossorigin href="/static/vxe-830e4310.js">
<link rel="stylesheet" href="/static/index-213f7bee.css">
</head>
<body>
<div id="app">
<div id="app-loading"></div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.error-page[data-v-2fba9562]{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.error-page-svg[data-v-2fba9562]{width:400px;margin-bottom:50px}

View File

@@ -0,0 +1 @@
import{_}from"./index-380a124d.js";import{ag as e,l as n,m as c,p as d,H as l,U as t,O as o,S as p}from"./vue-5ea6dbbd.js";const u={},i={class:"error-page"},f={class:"error-page-svg"};function m(r,g){const a=e("el-button"),s=e("router-link");return n(),c("div",i,[d("div",f,[l(r.$slots,"default",{},void 0,!0)]),t(s,{to:"/"},{default:o(()=>[t(a,{type:"primary"},{default:o(()=>[p("回到首页")]),_:1})]),_:1})])}const x=_(u,[["render",m],["__scopeId","data-v-2fba9562"]]);export{x as E};

View File

@@ -0,0 +1 @@
.search-wrapper[data-v-9ca48dd1]{margin-bottom:20px}.search-wrapper[data-v-9ca48dd1] .el-card__body{padding-bottom:2px}.toolbar-wrapper[data-v-9ca48dd1]{display:flex;justify-content:space-between;margin-bottom:20px}.table-wrapper[data-v-9ca48dd1]{margin-bottom:20px}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.app-container[data-v-23d40a43]{padding:20px}.role-info[data-v-23d40a43]{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.role-info h2[data-v-23d40a43]{margin:0}.permission-wrapper[data-v-23d40a43]{display:flex;gap:20px;margin-bottom:30px}.menu-tree[data-v-23d40a43]{width:30%;border-right:1px solid #ebeef5;padding-right:20px}.menu-tree h3[data-v-23d40a43]{margin:0 0 15px;font-size:16px;font-weight:600}.menu-tree .tree-node[data-v-23d40a43]{display:flex;align-items:center;gap:5px}.menu-tree .tree-node.is-active[data-v-23d40a43]{color:#67c23a;font-weight:600}.menu-tree .tree-node .el-icon[data-v-23d40a43]{color:#67c23a}.permission-config[data-v-23d40a43]{width:70%}.permission-config h3[data-v-23d40a43]{margin:0 0 15px;font-size:16px;font-weight:600}.fun-permission[data-v-23d40a43]{margin-bottom:30px}.fun-permission .menu-title[data-v-23d40a43]{margin-bottom:15px;font-weight:600;color:#409eff}.fun-permission .menu-title .menu-title-header[data-v-23d40a43]{display:flex;align-items:center;gap:8px;margin-bottom:10px}.fun-permission .menu-title .menu-info-tags[data-v-23d40a43]{display:flex;flex-wrap:wrap;gap:8px}.fun-permission .fun-item[data-v-23d40a43]{padding:15px;background-color:#f5f7fa;border-radius:4px;display:flex;flex-direction:column;align-items:flex-start;gap:10px}.fun-permission .switch-with-text[data-v-23d40a43]{display:flex;align-items:center;gap:8px}.fun-permission .switch-label[data-v-23d40a43]{font-size:14px;color:#606266}.fun-permission .empty-tip[data-v-23d40a43]{text-align:center;padding:30px;color:#909399;background-color:#f5f7fa;border-radius:4px}.data-permission[data-v-23d40a43]{background-color:#f5f7fa;padding:15px;border-radius:4px}.data-permission .el-form-item[data-v-23d40a43]{margin-bottom:20px}.operation-buttons[data-v-23d40a43]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{h as O}from"./index-e628964d.js";import{B as P,E as g,C as A}from"./element-a57cc571.js";import{G as _,r as b,e as m,d as i,b as h,l as v,M as I,O as y,m as C,a7 as S,F as D,u as T}from"./vue-5ea6dbbd.js";const U=_({__name:"index",props:{idType:{},moduleId:{},itemId:{},modelValue:{},placeholder:{default:"请选择ID"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},originalId:{}},emits:["update:modelValue","change","clear"],setup(a,{emit:t}){const e=a,n=b(!1),o=b([]),E=m(()=>{let l=[...o.value];return e.originalId!==void 0&&!l.includes(e.originalId)&&(l=[e.originalId,...l].sort((u,d)=>u-d)),l.map(u=>({label:u.toString(),value:u}))}),c=m({get:()=>e.modelValue,set:l=>t("update:modelValue",l)}),s=()=>e.idType===0?!0:e.idType===1?e.moduleId===void 0||e.moduleId===null||e.moduleId===0?(console.warn("获取功能ID列表失败: moduleId 为必传参数"),!1):!0:e.idType===2?e.moduleId===void 0||e.moduleId===null||e.moduleId===0?(console.warn("获取操作ID列表失败: moduleId 为必传参数"),!1):e.itemId===void 0||e.itemId===null||e.itemId===0?(console.warn("获取操作ID列表失败: itemId 为必传参数"),!1):!0:(console.warn(`未知的 idType: ${e.idType}`),!1),r=async()=>{if(!s()){o.value=[];return}try{n.value=!0;const l=await O({idType:e.idType,moduleId:e.moduleId,itemId:e.itemId});o.value=l.data||[]}catch(l){console.error("获取ID列表失败:",l),g.error("获取ID列表失败"),o.value=[]}finally{n.value=!1}};i(()=>e.idType,()=>{r()}),i(()=>e.moduleId,()=>{(e.idType===1||e.idType===2)&&(s()?r():o.value=[])}),i(()=>e.itemId,()=>{e.idType===2&&(s()?r():o.value=[])});const f=l=>{t("change",l)},p=()=>{t("clear")};return h(()=>{r()}),(l,u)=>(v(),I(T(P),{modelValue:c.value,"onUpdate:modelValue":u[0]||(u[0]=d=>c.value=d),placeholder:l.placeholder,disabled:l.disabled,clearable:l.clearable,loading:n.value,onChange:f,onClear:p},{default:y(()=>[(v(!0),C(D,null,S(E.value,d=>(v(),I(T(A),{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled","clearable","loading"]))}});var N=(a=>(a[a.MODULE=0]="MODULE",a[a.ITEM=1]="ITEM",a[a.OPERATION=2]="OPERATION",a))(N||{});const B=[{label:"新增",value:0},{label:"删除",value:1},{label:"修改",value:2},{label:"查询",value:3},{label:"上传",value:4},{label:"下载",value:5},{label:"导入",value:6},{label:"导出",value:7},{label:"打印",value:8},{label:"注册",value:9},{label:"登录",value:10},{label:"登出",value:11},{label:"短信",value:12},{label:"邮件",value:13},{label:"微信",value:14},{label:"其它",value:99}],V={0:"新增",1:"删除",2:"修改",3:"查询",4:"上传",5:"下载",6:"导入",7:"导出",8:"打印",9:"注册",10:"登录",11:"登出",12:"短信",13:"邮件",14:"微信",99:"其它"},w=[{label:"GET",value:0},{label:"HEAD",value:1},{label:"POST",value:2},{label:"PUT",value:3},{label:"PATCH",value:4},{label:"DELETE",value:5},{label:"OPTIONS",value:6},{label:"TRACE",value:7}],G={0:"GET",1:"HEAD",2:"POST",3:"PUT",4:"PATCH",5:"DELETE",6:"OPTIONS",7:"TRACE"},k=[{label:"所有",value:1},{label:"本人",value:2},{label:"本部门",value:3},{label:"本部门及子部门",value:4},{label:"指定部门",value:5},{label:"指定人员",value:6}],F={1:"所有",2:"本人",3:"本部门",4:"本部门及子部门",5:"指定部门",6:"指定人员"};export{N as I,V as O,G as R,k as U,U as _,B as a,w as b,F as c};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{e as t}from"./index-380a124d.js";function r(e){return t({url:"/role/query",method:"post",data:e})}function n(e){return t({url:"/role/add",method:"put",data:e})}function u(e){return t({url:"/role/edit",method:"post",data:e})}function l(e){return t({url:"/role/query/fun",method:"post",data:e})}function i(e){return t({url:"/role/bind/fun",method:"post",data:e})}function d(e){return t({url:`/role/delete/${e}`,method:"delete"})}function s(e){return t({url:`/role/delete/fun/${e}`,method:"delete"})}export{n as a,l as b,s as c,d,u as e,i as f,r as g};

View File

@@ -0,0 +1 @@
.search-wrapper[data-v-ca91c9a5]{margin-bottom:20px}.search-wrapper[data-v-ca91c9a5] .el-card__body{padding-bottom:2px}.toolbar-wrapper[data-v-ca91c9a5]{display:flex;justify-content:space-between;margin-bottom:20px}.table-wrapper[data-v-ca91c9a5]{margin-bottom:20px}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
@charset "UTF-8";.app-container[data-v-fe3989f7]{padding:20px;width:100%;max-width:100%;box-sizing:border-box;overflow-x:hidden}.search-wrapper[data-v-fe3989f7]{margin-bottom:20px}.toolbar-wrapper[data-v-fe3989f7]{display:grid;grid-template-columns:1fr auto;gap:15px;align-items:center;margin-bottom:20px;padding:15px;border:1px solid #ebeef5;border-radius:4px;background-color:#fff}.toolbar-left[data-v-fe3989f7]{display:flex;gap:10px}.toolbar-right[data-v-fe3989f7]{display:flex;align-items:center}.el-button--circle[data-v-fe3989f7]{display:flex!important;align-items:center!important;justify-content:center!important;width:36px!important;height:36px!important;padding:0!important;border-radius:50%!important;box-sizing:border-box!important}.el-button--circle .el-icon[data-v-fe3989f7]{font-size:18px!important;margin:0!important;padding:0!important;line-height:1!important}.refresh-button[data-v-fe3989f7]{display:flex!important;align-items:center!important;justify-content:center!important;width:36px!important;height:36px!important;padding:0!important;border-radius:50%!important;box-sizing:border-box!important;overflow:hidden!important}.table-wrapper[data-v-fe3989f7]{margin-bottom:20px}.empty-text[data-v-fe3989f7]{text-align:center;padding:20px;color:#999}@media (max-width: 768px){.refresh-button[data-v-fe3989f7]{width:32px!important;height:32px!important}.refresh-button .el-icon[data-v-fe3989f7]{font-size:16px!important}}

View File

@@ -0,0 +1 @@
import{e}from"./index-380a124d.js";function r(o){return e({url:"/codegen/download",method:"post",data:o,responseType:"blob"})}export{r as c};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.login-container[data-v-db1658f3]{display:flex;justify-content:center;align-items:center;width:100%;min-height:100%}.login-container .theme-switch[data-v-db1658f3]{position:fixed;top:5%;right:5%;cursor:pointer}.login-container .login-card[data-v-db1658f3]{width:480px;border-radius:20px;box-shadow:0 0 10px #dcdfe6;background-color:#fff;overflow:hidden}.login-container .login-card .title[data-v-db1658f3]{display:flex;justify-content:center;align-items:center;height:150px}.login-container .login-card .title img[data-v-db1658f3]{height:100%}.login-container .login-card .content[data-v-db1658f3]{padding:20px 50px 50px}.login-container .login-card .content[data-v-db1658f3] .el-input-group__append{padding:0;overflow:hidden}.login-container .login-card .content[data-v-db1658f3] .el-input-group__append .el-image{width:100px;height:40px;border-left:0px;-webkit-user-select:none;user-select:none;cursor:pointer;text-align:center}.login-container .login-card .content .el-button[data-v-db1658f3]{width:100%;margin-top:10px}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{_ as c,c as a}from"./index-380a124d.js";import{ag as s,l as n,m as _,U as r,G as i,M as d,Q as p,u as m}from"./vue-5ea6dbbd.js";import"./element-a57cc571.js";import"./vxe-830e4310.js";const l={},u={class:"app-container center"};function f(t,o){const e=s("el-empty");return n(),_("div",u,[r(e,{description:"Admin 权限可见"})])}const v=c(l,[["render",f],["__scopeId","data-v-540a7bcc"]]);const y={},x={class:"app-container center"};function h(t,o){const e=s("el-empty");return n(),_("div",x,[r(e,{description:"Editor 权限可见"})])}const b=c(y,[["render",h],["__scopeId","data-v-e677b768"]]),C=i({__name:"index",setup(t){const e=a().roles.includes("admin");return(A,E)=>(n(),d(p(m(e)?v:b)))}});export{C as default};

View File

@@ -0,0 +1 @@
@charset "UTF-8";.app-container[data-v-7f921f63]{padding:20px;width:100%;max-width:100%;box-sizing:border-box;overflow-x:hidden}.search-wrapper[data-v-7f921f63]{margin-bottom:20px}.toolbar-wrapper[data-v-7f921f63]{display:grid;grid-template-columns:1fr auto;gap:15px;align-items:center;margin-bottom:20px;padding:15px;border:1px solid #ebeef5;border-radius:4px;background-color:#fff}.toolbar-left[data-v-7f921f63]{display:flex;gap:10px}.toolbar-right[data-v-7f921f63]{display:flex;align-items:center}.el-button--circle[data-v-7f921f63]{display:flex!important;align-items:center!important;justify-content:center!important;width:36px!important;height:36px!important;padding:0!important;border-radius:50%!important;box-sizing:border-box!important}.el-button--circle .el-icon[data-v-7f921f63]{font-size:18px!important;margin:0!important;padding:0!important;line-height:1!important}.refresh-button[data-v-7f921f63]{display:flex!important;align-items:center!important;justify-content:center!important;width:36px!important;height:36px!important;padding:0!important;border-radius:50%!important;box-sizing:border-box!important;overflow:hidden!important}.search-wrapper[data-v-7f921f63]{margin-bottom:15px}.table-wrapper[data-v-7f921f63]{margin-bottom:20px}.empty-text[data-v-7f921f63]{text-align:center;padding:20px;color:#999}.hint-text[data-v-7f921f63]{color:#909399;margin-left:10px;font-size:14px}.bound-functions-header[data-v-7f921f63]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.pagination-wrapper[data-v-7f921f63]{display:flex;justify-content:flex-end;margin-top:15px}@media (max-width: 768px){.refresh-button[data-v-7f921f63]{width:32px!important;height:32px!important}.refresh-button .el-icon[data-v-7f921f63]{font-size:16px!important}}.content-wrapper[data-v-7f921f63]{display:flex;gap:20px;height:calc(100vh - 280px)}@media (max-width: 992px){.content-wrapper[data-v-7f921f63]{flex-direction:column;height:auto}}.menu-tree-wrapper[data-v-7f921f63]{flex:0 0 40%;overflow-y:auto;min-height:600px}@media (max-width: 992px){.menu-tree-wrapper[data-v-7f921f63]{flex:0 0 auto;height:400px}}.menu-tree-wrapper .custom-tree-node[data-v-7f921f63]{display:flex;align-items:center;gap:8px;padding:2px 0}.menu-tree-wrapper .custom-tree-node .node-icon[data-v-7f921f63]{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;font-size:16px}.menu-tree-wrapper .custom-tree-node .node-name[data-v-7f921f63]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.menu-tree-wrapper .el-tree-node__content[data-v-7f921f63]{padding:4px 8px!important}.menu-tree-wrapper .el-tree-node__expand-icon[data-v-7f921f63]{font-size:12px;margin-right:4px}.menu-detail-wrapper[data-v-7f921f63]{flex:1;overflow-y:auto;padding:20px}.menu-detail-wrapper .section-title[data-v-7f921f63]{font-size:16px;font-weight:700;margin:20px 0 15px;padding-left:5px;border-left:3px solid #409eff}.menu-detail-wrapper .action-buttons[data-v-7f921f63]{display:flex;justify-content:flex-end;gap:10px;margin-top:30px;padding-top:20px;border-top:1px solid #ebeef5}.menu-detail-wrapper .empty-text[data-v-7f921f63]{color:#909399;text-align:center;padding:20px}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
.search-wrapper[data-v-92adff16]{margin-bottom:20px}.search-wrapper[data-v-92adff16] .el-card__body{padding-bottom:2px}.toolbar-wrapper[data-v-92adff16]{display:flex;justify-content:space-between;margin-bottom:20px}.table-wrapper[data-v-92adff16]{margin-bottom:20px}

View File

@@ -0,0 +1 @@
.center[data-v-540a7bcc],.center[data-v-e677b768]{height:100%;display:flex;justify-content:center;align-items:center}

View File

@@ -0,0 +1 @@
import{e as t}from"./index-380a124d.js";function n(e){return t({url:"/funModule/save/update",method:"post",data:e})}function o(e){return t({url:"/funModule/query",method:"post",data:e})}function s(e){return t({url:"/funModule/delete",method:"delete",data:e})}function d(e){return t({url:"/funItem/save/update",method:"post",data:e})}function a(e){return t({url:"/funItem/query",method:"post",data:e})}function l(e){return t({url:"/funItem/delete",method:"delete",data:e})}function f(e){return t({url:"/funOperation/save/update",method:"post",data:e})}function p(e){return t({url:"/funOperation/query",method:"post",data:e})}function i(e,u){return t({url:`/funOperation/query/${u}`,method:"post",data:e})}function m(e){return t({url:"/funOperation/delete",method:"delete",data:e})}function c(e){return t({url:"/funModule/getIdList",method:"post",data:e})}export{d as a,l as b,a as c,s as d,f as e,m as f,p as g,c as h,i,o as q,n as s};

View File

@@ -0,0 +1 @@
.search-wrapper[data-v-c0e25178]{margin-bottom:20px}.search-wrapper[data-v-c0e25178] .el-card__body{padding-bottom:2px}.toolbar-wrapper[data-v-c0e25178]{display:flex;justify-content:space-between;margin-bottom:20px}.table-wrapper[data-v-c0e25178]{margin-bottom:20px}

View File

@@ -0,0 +1 @@
import{G as t,aB as r,aD as a,l as o,m as s}from"./vue-5ea6dbbd.js";const _=t({__name:"index",setup(n){const e=r();return a().replace({path:"/"+e.params.path,query:e.query}),(c,p)=>(o(),s("div"))}});export{_ as default};

View File

@@ -0,0 +1 @@
import{G as y,aD as V,r as p,Z as k,ag as r,l as C,m as S,U as o,p as l,O as n,u as g,a2 as U,S as F,a8 as I,aG as R,aH as z}from"./vue-5ea6dbbd.js";import{c as B,_ as K}from"./index-380a124d.js";import{t as M,v as N}from"./element-a57cc571.js";import{_ as q}from"./index.vue_vue_type_script_setup_true_lang-cc3fa793.js";import"./vxe-830e4310.js";const D="/static/logo-text-2-eef467fb.png",G=t=>(R("data-v-db1658f3"),t=t(),z(),t),E={class:"login-container"},H={class:"login-card"},L=G(()=>l("div",{class:"title"},[l("img",{src:D})],-1)),O={class:"content"},T=y({__name:"index",setup(t){const v=V(),u=p(null),i=p(!1),x=p(""),e=k({username:"admin",password:"9527",code:""}),h={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:4,max:16,message:"长度在 4 到 16 个字符",trigger:"blur"}]},m=()=>{var d;(d=u.value)==null||d.validate((s,a)=>{s?(i.value=!0,B().login(e).then(()=>{v.push({path:"/"})}).catch(()=>{_(),e.password=""}).finally(()=>{i.value=!1})):console.error("表单校验不通过",a)})},_=()=>{e.code="",x.value=""};return _(),(d,s)=>{const a=r("el-input"),f=r("el-form-item"),w=r("el-button"),b=r("el-form");return C(),S("div",E,[o(q,{class:"theme-switch"}),l("div",H,[L,l("div",O,[o(b,{ref_key:"loginFormRef",ref:u,model:e,rules:h,onKeyup:I(m,["enter"])},{default:n(()=>[o(f,{prop:"username"},{default:n(()=>[o(a,{modelValue:e.username,"onUpdate:modelValue":s[0]||(s[0]=c=>e.username=c),modelModifiers:{trim:!0},placeholder:"用户名",type:"text",tabindex:"1","prefix-icon":g(M),size:"large"},null,8,["modelValue","prefix-icon"])]),_:1}),o(f,{prop:"password"},{default:n(()=>[o(a,{modelValue:e.password,"onUpdate:modelValue":s[1]||(s[1]=c=>e.password=c),modelModifiers:{trim:!0},placeholder:"密码",type:"password",tabindex:"2","prefix-icon":g(N),size:"large","show-password":""},null,8,["modelValue","prefix-icon"])]),_:1}),o(w,{loading:i.value,type:"primary",size:"large",onClick:U(m,["prevent"])},{default:n(()=>[F("登 录")]),_:1},8,["loading","onClick"])]),_:1},8,["model","onKeyup"])])])])}}});const P=K(T,[["__scopeId","data-v-db1658f3"]]);export{P as default};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{d as k}from"./index-380a124d.js";import{w as g}from"./element-a57cc571.js";import{G as C,ag as o,l,M as m,O as e,U as n,m as h,a7 as x,u as t,F as B,p as s,T}from"./vue-5ea6dbbd.js";const V=C({__name:"index",setup(b){const{themeList:d,activeThemeName:c,setTheme:r}=k();return(v,N)=>{const _=o("el-icon"),p=o("el-tooltip"),i=o("el-dropdown-item"),u=o("el-dropdown-menu"),f=o("el-dropdown");return l(),m(f,{trigger:"click",onCommand:t(r)},{dropdown:e(()=>[n(u,null,{default:e(()=>[(l(!0),h(B,null,x(t(d),(a,w)=>(l(),m(i,{key:w,disabled:t(c)===a.name,command:a.name},{default:e(()=>[s("span",null,T(a.title),1)]),_:2},1032,["disabled","command"]))),128))]),_:1})]),default:e(()=>[s("div",null,[n(p,{effect:"dark",content:"主题模式",placement:"bottom"},{default:e(()=>[n(_,{size:20},{default:e(()=>[n(t(g))]),_:1})]),_:1})])]),_:1},8,["onCommand"])}}});export{V as _};

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long