@agile-team/wl-skills-kit 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -57
- package/README.md +23 -148
- package/bin/wl-skills.js +2 -100
- package/files/.github/guides/README.md +13 -13
- package/files/.github/guides/architecture.md +555 -576
- package/files/.github/guides/usage.md +176 -176
- package/files/.github/reports/README.md +65 -65
- package/files/.github/reports/SYS_DICT_INFO.md +50 -50
- package/files/.github/reports/SYS_MENU_INFO.md +247 -247
- package/files/.github/reports/SYS_PERMISSION_INFO.md +20 -20
- package/files/.github/reports//347/273/204/344/273/266/346/217/220/345/217/226/345/273/272/350/256/256.md +33 -33
- package/files/.github/reports//350/247/204/350/214/203/345/256/241/346/237/245/346/212/245/345/221/212.md +44 -44
- package/files/.github/skills/_compat/README.md +108 -108
- package/files/.github/skills/_compat/headers/agents.txt +8 -8
- package/files/.github/skills/_compat/headers/claude-code.txt +7 -7
- package/files/.github/skills/_compat/headers/cline.txt +7 -7
- package/files/.github/skills/_compat/headers/cursor-mdc.txt +16 -16
- package/files/.github/skills/_compat/headers/cursor-rules.txt +7 -7
- package/files/.github/skills/_compat/headers/github-copilot.txt +1 -1
- package/files/.github/skills/_compat/headers/kiro.txt +10 -10
- package/files/.github/skills/_compat/headers/trae.txt +11 -11
- package/files/.github/skills/_compat/headers/windsurf.txt +7 -7
- package/files/.github/skills/_registry.md +81 -81
- package/files/.github/skills/core/api-contract/SKILL.md +344 -344
- package/files/.github/skills/core/api-contract/USAGE.md +110 -110
- package/files/.github/skills/core/convention-audit/SKILL.md +189 -189
- package/files/.github/skills/core/convention-audit/USAGE.md +99 -99
- package/files/.github/skills/core/page-codegen/SKILL.md +973 -973
- package/files/.github/skills/core/page-codegen/USAGE.md +102 -102
- package/files/.github/skills/core/page-codegen/templates/_index.md +46 -46
- package/files/.github/skills/core/page-codegen/templates/domains/_CONTRIBUTING.md +107 -107
- package/files/.github/skills/core/page-codegen/templates/domains/produce/TPL-OPERATION-STATION.md +442 -442
- package/files/.github/skills/core/page-codegen/templates/domains/sale/README.md +26 -26
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-CHANGE-HISTORY.md +276 -276
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-DETAIL-TABS.md +1145 -1145
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-DRIVEN.md +309 -124
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-FORM-ROUTE.md +436 -436
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-LIST.md +191 -191
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-MASTER-DETAIL.md +148 -148
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-RECORD-FORM.md +376 -376
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-TREE-LIST.md +186 -186
- package/files/.github/skills/core/prototype-scan/SKILL.md +498 -498
- package/files/.github/skills/core/prototype-scan/USAGE.md +95 -95
- package/files/.github/skills/core/template-extract/SKILL.md +139 -139
- package/files/.github/skills/core/template-extract/USAGE.md +93 -93
- package/files/.github/skills/domain/README.md +51 -51
- package/files/.github/skills/sync/menu-sync/SKILL.md +263 -263
- package/files/.github/skills/sync/menu-sync/USAGE.md +104 -104
- package/files/.github/skills/sync/menu-sync/env/env.local.json +7 -7
- package/files/.github/skills/sync/menu-sync/env/guide.md +99 -99
- package/files/.github/skills/sync/permission-sync/SKILL.draft.md +91 -91
- package/files/.github/standards/01-toolchain.md +57 -57
- package/files/.github/standards/02-code-structure.md +111 -111
- package/files/.github/standards/03-comments.md +53 -53
- package/files/.github/standards/04-coding-basics.md +33 -33
- package/files/.github/standards/05-logging.md +38 -38
- package/files/.github/standards/06-security.md +44 -44
- package/files/.github/standards/07-config.md +52 -52
- package/files/.github/standards/08-git.md +60 -60
- package/files/.github/standards/09-typescript.md +71 -71
- package/files/.github/standards/10-pinia.md +57 -57
- package/files/.github/standards/11-form-validation.md +81 -81
- package/files/.github/standards/12-base-table.md +153 -153
- package/files/.github/standards/13-platform-components.md +123 -123
- package/files/.github/standards/index.md +89 -89
- package/files/demo/produce/aiflow/mmwr-customer-apply-add/api.md +1 -1
- package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/data.ts +196 -196
- package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.scss +150 -150
- package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.vue +79 -79
- package/files/docs/jh-date-range.md +257 -257
- package/files/docs/jh-date.md +222 -222
- package/files/docs/jh-dept-picker.md +190 -190
- package/files/docs/jh-drag-row.md +590 -590
- package/files/docs/jh-file-upload.md +216 -216
- package/files/docs/jh-picker.md +218 -218
- package/files/docs/jh-select.md +148 -148
- package/files/docs/jh-text.md +248 -248
- package/files/docs/jh-user-picker.md +197 -197
- package/files/docs/request.md +24 -9
- package/files/src/components/global/C_RightToolbar/data.ts +228 -0
- package/files/src/components/global/C_RightToolbar/index.scss +44 -0
- package/files/src/components/global/C_RightToolbar/index.vue +34 -336
- package/files/src/components/global/C_Splitter/index.scss +61 -0
- package/files/src/components/global/C_Splitter/index.vue +2 -64
- package/files/src/components/global/C_SvgIcon/index.scss +15 -0
- package/files/src/components/global/C_SvgIcon/index.vue +20 -50
- package/files/src/components/global/C_TagStatus/index.scss +20 -0
- package/files/src/components/global/C_TagStatus/index.vue +1 -22
- package/files/src/components/global/C_Tree/data.ts +61 -0
- package/files/src/components/global/C_Tree/index.vue +12 -53
- package/files/src/components/local/c_listModal/index.scss +4 -0
- package/files/src/components/local/c_listModal/index.vue +1 -1
- package/package.json +5 -9
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ref, watch } from "vue";
|
|
2
|
+
import { Search } from "@element-plus/icons-vue";
|
|
3
|
+
|
|
4
|
+
// ===== 类型定义 =====
|
|
5
|
+
export interface Props {
|
|
6
|
+
tabs?: Array<{ label: string; name: string }>;
|
|
7
|
+
treeData: any[];
|
|
8
|
+
treeProps?: Record<string, string>;
|
|
9
|
+
defaultActiveTab?: string;
|
|
10
|
+
showSearch?: boolean;
|
|
11
|
+
searchPlaceholder?: string;
|
|
12
|
+
defaultExpandAll?: boolean;
|
|
13
|
+
highlightCurrent?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// ===== 组件逻辑 =====
|
|
17
|
+
export function createTree(
|
|
18
|
+
props: Props,
|
|
19
|
+
emit: (e: "node-click" | "tab-change", ...args: any[]) => void,
|
|
20
|
+
) {
|
|
21
|
+
const activeTab = ref(props.defaultActiveTab ?? "tab1");
|
|
22
|
+
const searchKeyword = ref("");
|
|
23
|
+
const treeRef = ref<any>(null);
|
|
24
|
+
|
|
25
|
+
const filterNode = (value: string, data: any) => {
|
|
26
|
+
if (!value) return true;
|
|
27
|
+
const label = data[props.treeProps?.label || "label"];
|
|
28
|
+
return label && label.includes(value);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const handleNodeClick = (data: any) => {
|
|
32
|
+
emit("node-click", data);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
watch(searchKeyword, (val) => {
|
|
36
|
+
treeRef.value?.filter(val);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
watch(activeTab, (val) => {
|
|
40
|
+
emit("tab-change", val);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const clearSearch = () => {
|
|
44
|
+
searchKeyword.value = "";
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const switchTab = (tabName: string) => {
|
|
48
|
+
activeTab.value = tabName;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
Search,
|
|
53
|
+
activeTab,
|
|
54
|
+
searchKeyword,
|
|
55
|
+
treeRef,
|
|
56
|
+
filterNode,
|
|
57
|
+
handleNodeClick,
|
|
58
|
+
clearSearch,
|
|
59
|
+
switchTab,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -45,20 +45,7 @@
|
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
47
|
<script setup lang="ts">
|
|
48
|
-
import {
|
|
49
|
-
import { Search } from "@element-plus/icons-vue";
|
|
50
|
-
|
|
51
|
-
// Props 定义
|
|
52
|
-
interface Props {
|
|
53
|
-
tabs?: Array<{ label: string; name: string }>;
|
|
54
|
-
treeData: any[];
|
|
55
|
-
treeProps?: Record<string, string>;
|
|
56
|
-
defaultActiveTab?: string;
|
|
57
|
-
showSearch?: boolean;
|
|
58
|
-
searchPlaceholder?: string;
|
|
59
|
-
defaultExpandAll?: boolean;
|
|
60
|
-
highlightCurrent?: boolean;
|
|
61
|
-
}
|
|
48
|
+
import { createTree, type Props } from "./data";
|
|
62
49
|
|
|
63
50
|
const props = withDefaults(defineProps<Props>(), {
|
|
64
51
|
treeProps: () => ({ children: "children", label: "label" }),
|
|
@@ -69,51 +56,23 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
69
56
|
highlightCurrent: true
|
|
70
57
|
});
|
|
71
58
|
|
|
72
|
-
// Emits 定义
|
|
73
59
|
const emit = defineEmits<{
|
|
74
60
|
(e: "node-click", data: any): void;
|
|
75
61
|
(e: "tab-change", tabName: string): void;
|
|
76
62
|
}>();
|
|
77
63
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const searchKeyword = ref("");
|
|
81
|
-
const treeRef = ref<any>(null);
|
|
82
|
-
|
|
83
|
-
// 过滤节点
|
|
84
|
-
const filterNode = (value: string, data: any) => {
|
|
85
|
-
if (!value) return true;
|
|
86
|
-
const label = data[props.treeProps.label || "label"];
|
|
87
|
-
return label && label.includes(value);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
// 节点点击
|
|
91
|
-
const handleNodeClick = (data: any) => {
|
|
92
|
-
emit("node-click", data);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
// 监听搜索关键词
|
|
96
|
-
watch(searchKeyword, (val) => {
|
|
97
|
-
treeRef.value?.filter(val);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
// 监听tab切换
|
|
101
|
-
watch(activeTab, (val) => {
|
|
102
|
-
emit("tab-change", val);
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
// 暴露方法
|
|
106
|
-
defineExpose({
|
|
107
|
-
treeRef,
|
|
108
|
-
searchKeyword,
|
|
64
|
+
const {
|
|
65
|
+
Search,
|
|
109
66
|
activeTab,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
});
|
|
67
|
+
searchKeyword,
|
|
68
|
+
treeRef,
|
|
69
|
+
filterNode,
|
|
70
|
+
handleNodeClick,
|
|
71
|
+
clearSearch,
|
|
72
|
+
switchTab
|
|
73
|
+
} = createTree(props, emit);
|
|
74
|
+
|
|
75
|
+
defineExpose({ treeRef, searchKeyword, activeTab, clearSearch, switchTab });
|
|
117
76
|
</script>
|
|
118
77
|
|
|
119
78
|
<style scoped lang="scss" src="./index.scss"></style>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agile-team/wl-skills-kit",
|
|
3
|
-
"version": "2.3.
|
|
4
|
-
"description": "AI Skill 模板包
|
|
3
|
+
"version": "2.3.2",
|
|
4
|
+
"description": "AI Skill 模板包 — 一键导入 AI 指令 + 组件文档 + 通用组件 + 领域样例,覆盖 Copilot/Cursor/Windsurf/Kiro 等主流 AI 编辑器",
|
|
5
5
|
"main": "./bin/wl-skills.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"wl-skills": "bin/wl-skills.js"
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
],
|
|
28
28
|
"author": "JHLC Frontend Team",
|
|
29
29
|
"license": "UNLICENSED",
|
|
30
|
-
"homepage": "https://github.com/ChenyCHENYU/wl-skills-kit#readme",
|
|
31
30
|
"repository": {
|
|
32
31
|
"type": "git",
|
|
33
32
|
"url": "git+https://github.com/ChenyCHENYU/wl-skills-kit.git"
|
|
@@ -35,10 +34,7 @@
|
|
|
35
34
|
"engines": {
|
|
36
35
|
"node": ">=16.0.0"
|
|
37
36
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
},
|
|
41
|
-
"scripts": {
|
|
42
|
-
"version": "node scripts/sync-version.js && git add README.md files/.github/guides/architecture.md bin/wl-skills.js"
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"xlsx": "^0.18.5"
|
|
43
39
|
}
|
|
44
|
-
}
|
|
40
|
+
}
|