@qin-ui/antdv-next-pro 1.1.12 → 1.1.14

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/AI-CONTEXT.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # @qin-ui/antdv-next-pro
2
2
 
3
- > 基于 ant-design-vue v4 (next) 的配置驱动表单和表格组件库。
3
+ > 基于 antdv-next 的配置驱动表单和表格组件库。
4
4
 
5
5
  ## 安装
6
6
 
7
7
  ```bash
8
- npm install @qin-ui/antdv-next-pro ant-design-vue vue
8
+ npm install @qin-ui/antdv-next-pro antdv-next vue
9
9
  ```
10
10
 
11
11
  ## 核心导出
@@ -34,4 +34,4 @@ npm install @qin-ui/antdv-next-pro ant-design-vue vue
34
34
  - `dataIndex` - 数据路径(优先使用)
35
35
  - `key` - 列标识(dataIndex 不满足时使用)
36
36
  - `hidden` - 是否隐藏
37
- - 所有 ant-design-vue ColumnType 属性
37
+ - 所有 antdv-next ColumnType 属性
package/api.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-06-04T09:03:35.742Z",
2
+ "generatedAt": "2026-06-25T06:47:30.124Z",
3
3
  "name": "@qin-ui/antdv-next-pro",
4
4
  "api": [
5
5
  {
@@ -0,0 +1,142 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * @qin-ui/* AI 上下文初始化 CLI 工具
5
+ *
6
+ * 遵循 Agentic Collaboration Standard (ACS),
7
+ * 在消费方项目中自动生成统一的 .agents 规范配置文件。
8
+ *
9
+ * 用法:
10
+ * npx @qin-ui/antdv-next-pro init-ai
11
+ */
12
+
13
+ import fs from 'node:fs';
14
+ import path from 'node:path';
15
+ import { fileURLToPath } from 'node:url';
16
+
17
+ // ==================== 常量 ====================
18
+
19
+ const __filename = fileURLToPath(import.meta.url);
20
+ const __dirname = path.dirname(__filename);
21
+ const PKG_ROOT = path.resolve(__dirname, '..');
22
+
23
+ const PKG_JSON = JSON.parse(
24
+ fs.readFileSync(path.join(PKG_ROOT, 'package.json'), 'utf-8')
25
+ );
26
+ const PKG_NAME = PKG_JSON.name;
27
+ const PKG_SHORT = PKG_NAME.replace(/^@qin-ui\//, '');
28
+
29
+ // ==================== 终端颜色 ====================
30
+
31
+ const green = (s) => `\x1b[32m${s}\x1b[0m`;
32
+ const cyan = (s) => `\x1b[36m${s}\x1b[0m`;
33
+ const bold = (s) => `\x1b[1m${s}\x1b[0m`;
34
+ const red = (s) => `\x1b[31m${s}\x1b[0m`;
35
+
36
+ // ==================== 内容生成 ====================
37
+
38
+ function getAiContextContent() {
39
+ const filePath = path.join(PKG_ROOT, 'AI-CONTEXT.md');
40
+ if (fs.existsSync(filePath)) {
41
+ return fs.readFileSync(filePath, 'utf-8').trim();
42
+ }
43
+ return `# ${PKG_NAME}\n\n> 基于 Vue 3 的配置驱动组件库。`;
44
+ }
45
+
46
+ function getUnifiedAgentContent() {
47
+ const aiContext = getAiContextContent();
48
+ const core = [
49
+ aiContext,
50
+ '',
51
+ '## 完整 API 参考',
52
+ '',
53
+ `使用 \`${PKG_NAME}\` 时,请阅读以下文件获取完整的 API 定义、类型签名和使用示例:`,
54
+ `- \`node_modules/${PKG_NAME}/README.md\` — 详细使用文档和代码示例`,
55
+ `- \`node_modules/${PKG_NAME}/api.json\` — 结构化 API 元数据(组件、Hook、类型的签名和 JSDoc 示例)`,
56
+ '',
57
+ ].join('\n');
58
+
59
+ // 包含兼容性的 Frontmatter(如 Cursor 支持的 globs 等)
60
+ return [
61
+ '---',
62
+ `description: "${PKG_NAME} 组件库使用规范"`,
63
+ 'globs: ["**/*.vue", "**/*.ts", "**/*.tsx"]',
64
+ 'alwaysApply: false',
65
+ '---',
66
+ '',
67
+ core,
68
+ ].join('\n');
69
+ }
70
+
71
+ // ==================== 文件写入 ====================
72
+
73
+ function ensureDir(dirPath) {
74
+ if (!fs.existsSync(dirPath)) {
75
+ fs.mkdirSync(dirPath, { recursive: true });
76
+ }
77
+ }
78
+
79
+ // ==================== CLI 入口 ====================
80
+
81
+ function printHelp() {
82
+ console.log(`
83
+ ${bold(`${PKG_NAME} CLI`)}
84
+
85
+ ${bold('用法:')}
86
+ npx ${PKG_NAME} init-ai
87
+
88
+ ${bold('命令:')}
89
+ init-ai 在当前项目中生成统一的 .agents 规范配置文件
90
+
91
+ ${bold('选项:')}
92
+ --help 显示帮助信息
93
+
94
+ ${bold('说明:')}
95
+ 该命令将采用统一的 Agentic 标准,在项目的 .agents/rules/ 目录下
96
+ 生成上下文文件。兼容支持读取 .agents 的主流 AI IDE 和 CLI 工具。
97
+ `);
98
+ }
99
+
100
+ function main() {
101
+ const args = process.argv.slice(2);
102
+ const subcommand = args.find((a) => !a.startsWith('-'));
103
+ const flags = args.filter((a) => a.startsWith('-'));
104
+
105
+ if (!subcommand || flags.includes('--help') || flags.includes('-h')) {
106
+ printHelp();
107
+ process.exit(0);
108
+ }
109
+
110
+ if (subcommand !== 'init-ai') {
111
+ console.error(red(`\n 未知命令: ${subcommand}\n`));
112
+ printHelp();
113
+ process.exit(1);
114
+ }
115
+
116
+ console.log('');
117
+ console.log(bold(`📦 ${PKG_NAME} — AI 上下文初始化 (ACS 标准)`));
118
+ console.log('');
119
+
120
+ const content = getUnifiedAgentContent();
121
+ const dirPath = '.agents/rules';
122
+ const fileName = `${PKG_SHORT}.md`;
123
+
124
+ const fullDir = path.join(process.cwd(), dirPath);
125
+ const fullPath = path.join(fullDir, fileName);
126
+
127
+ ensureDir(fullDir);
128
+ fs.writeFileSync(fullPath, content, 'utf-8');
129
+
130
+ const relPath = path.join(dirPath, fileName);
131
+ console.log(` ${green('✔')} ${cyan(relPath)} ${green('[created/updated]')}`);
132
+
133
+ console.log('');
134
+ console.log(green('✅ 完成!已生成统一标准规则文件。'));
135
+ console.log('');
136
+ console.log(`${bold('下一步:')}`);
137
+ console.log(
138
+ ` 将 ${cyan(dirPath)} 目录提交到 Git,团队即可自动享受 AI 增强\n`
139
+ );
140
+ }
141
+
142
+ main();
@@ -1,13 +1,13 @@
1
- .pro-table_search-form[data-v-6dbd8950] [class*='-form-item'] {
1
+ .pro-table_search-form[data-v-3b60234a] [class*='-form-item'] {
2
2
  margin: 0;
3
3
  }
4
- .pro-table_search-form_expand-toggle-button[data-v-6dbd8950] {
4
+ .pro-table_search-form_expand-toggle-button[data-v-3b60234a] {
5
5
  display: flex;
6
6
  align-items: center;
7
7
  padding: 0;
8
8
  padding-left: 4px;
9
9
  }
10
- .pro-table_search-form .transition[data-v-6dbd8950] {
10
+ .pro-table_search-form .transition[data-v-3b60234a] {
11
11
  transition: all 0.25s;
12
12
  }
13
13
  .pro-table_search-form-container[data-v-f115fbbe] {
package/es/index.d.ts CHANGED
@@ -1081,9 +1081,11 @@ declare type SearchFormProps = {
1081
1081
  form: Form;
1082
1082
  layout?: 'grid' | 'inline';
1083
1083
  expand?: boolean | Expand;
1084
- searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps>;
1085
- resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps>;
1086
- expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps>;
1084
+ searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
1085
+ resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
1086
+ expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps> | false;
1087
+ rowGap?: number;
1088
+ columnGap?: number;
1087
1089
  } & /* @vue-ignore */ _FormProps & AllowedComponentProps;
1088
1090
 
1089
1091
  declare type SetColumn<T extends Data = Data, C extends BaseColumn<T> = BaseColumn<T>> = (key: Path<T>, column: C | ((pre: Readonly<C>) => C), options?: {
package/es/table/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createElementBlock, openBlock, createElementVNode, defineComponent, ref, computed, watch, watchEffect, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot, resolveDynamicComponent, createTextVNode, createCommentVNode, Fragment, toDisplayString, normalizeStyle, useModel, h, mergeModels, inject, useAttrs, useSlots, onMounted, normalizeClass, createSlots, renderList, normalizeProps, guardReactiveProps, nextTick } from "vue";
1
+ import { createElementBlock, openBlock, createElementVNode, defineComponent, ref, computed, watch, watchEffect, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot, createCommentVNode, Fragment, resolveDynamicComponent, createTextVNode, toDisplayString, normalizeStyle, useModel, h, mergeModels, inject, useAttrs, useSlots, onMounted, normalizeClass, createSlots, renderList, normalizeProps, guardReactiveProps, nextTick } from "vue";
2
2
  import { Space, Button, theme, useConfig, Dropdown, Menu, Checkbox, Table } from "antdv-next";
3
3
  import "antdv-next/dist/config-provider/DisabledContext";
4
4
  import { _ as _sfc_main$9, t as tableProps, a as _sfc_main$a } from "../form/index-7clzY8ZD.js";
@@ -35,9 +35,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
35
35
  form: {},
36
36
  layout: { default: "grid" },
37
37
  expand: { type: [Boolean, Object], default: true },
38
- searchButton: { type: [Object, Function], default: void 0 },
39
- resetButton: { type: [Object, Function], default: void 0 },
40
- expandButton: { type: [Object, Function], default: void 0 },
38
+ searchButton: { type: [Object, Function, Boolean], default: void 0 },
39
+ resetButton: { type: [Object, Function, Boolean], default: void 0 },
40
+ expandButton: { type: [Object, Function, Boolean], default: void 0 },
41
+ rowGap: { default: 16 },
42
+ columnGap: { default: 24 },
41
43
  class: {},
42
44
  style: {}
43
45
  },
@@ -47,8 +49,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
47
49
  const proFormHeight = ref("unset");
48
50
  const collapseHeight = ref(0);
49
51
  let rowHeight = 32;
50
- const rowGap = 16;
51
- const columnGap = 24;
52
52
  const computedExpand = computed(() => {
53
53
  if (!__props.expand) return false;
54
54
  if (__props.expand === true) return { minExpandRows: 2, expandStatus: false };
@@ -114,7 +114,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
114
114
  if (__props.layout === "grid" && computedExpand.value) {
115
115
  const { minExpandRows } = computedExpand.value;
116
116
  collapseHeight.value = Math.min(
117
- minExpandRows * rowHeight + (minExpandRows - 1) * rowGap,
117
+ minExpandRows * rowHeight + (minExpandRows - 1) * __props.rowGap,
118
118
  +proFormHeight.value
119
119
  );
120
120
  showExpandToggle.value = +proFormHeight.value - collapseHeight.value > 1;
@@ -130,7 +130,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
130
130
  const layoutProps = computed(
131
131
  () => __props.layout === "grid" ? {
132
132
  grid: {
133
- gutter: [columnGap, rowGap],
133
+ gutter: [__props.columnGap, __props.rowGap],
134
134
  style: { flex: 1, marginRight: "12px" }
135
135
  },
136
136
  style: {
@@ -140,7 +140,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
140
140
  }
141
141
  } : {
142
142
  layout: "inline",
143
- style: { gap: `${rowGap}px ${columnGap}px` },
143
+ style: { gap: `${__props.rowGap}px ${__props.columnGap}px` },
144
144
  grid: false
145
145
  }
146
146
  );
@@ -162,39 +162,43 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
162
162
  }, {
163
163
  default: withCtx(() => [
164
164
  renderSlot(_ctx.$slots, "reset-button", { onClick: onReset }, () => [
165
- __props.resetButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.resetButton), {
166
- key: 0,
167
- onClick: onReset
168
- })) : (openBlock(), createBlock(unref(Button), {
169
- key: 1,
170
- class: "pro-table_search-form_reset-button",
171
- onClick: onReset
172
- }, {
173
- default: withCtx(() => [..._cache[0] || (_cache[0] = [
174
- createTextVNode("重置", -1)
175
- ])]),
176
- _: 1
177
- }))
165
+ __props.resetButton !== false ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
166
+ __props.resetButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.resetButton), {
167
+ key: 0,
168
+ onClick: onReset
169
+ })) : (openBlock(), createBlock(unref(Button), {
170
+ key: 1,
171
+ class: "pro-table_search-form_reset-button",
172
+ onClick: onReset
173
+ }, {
174
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [
175
+ createTextVNode("重置", -1)
176
+ ])]),
177
+ _: 1
178
+ }))
179
+ ], 64)) : createCommentVNode("", true)
178
180
  ], true),
179
181
  renderSlot(_ctx.$slots, "search-button", { onClick: onSearch }, () => [
180
- __props.searchButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.searchButton), {
181
- key: 0,
182
- onClick: onSearch
183
- })) : (openBlock(), createBlock(unref(Button), {
184
- key: 1,
185
- class: "pro-table_search-form_search-button",
186
- type: "primary",
187
- "html-type": "submit",
188
- onClick: onSearch
189
- }, {
190
- default: withCtx(() => [..._cache[1] || (_cache[1] = [
191
- createTextVNode(" 查询 ", -1)
192
- ])]),
193
- _: 1
194
- }))
182
+ __props.searchButton !== false ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
183
+ __props.searchButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.searchButton), {
184
+ key: 0,
185
+ onClick: onSearch
186
+ })) : (openBlock(), createBlock(unref(Button), {
187
+ key: 1,
188
+ class: "pro-table_search-form_search-button",
189
+ type: "primary",
190
+ "html-type": "submit",
191
+ onClick: onSearch
192
+ }, {
193
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [
194
+ createTextVNode(" 查询 ", -1)
195
+ ])]),
196
+ _: 1
197
+ }))
198
+ ], 64)) : createCommentVNode("", true)
195
199
  ], true),
196
200
  renderSlot(_ctx.$slots, "expand-button", { onClick: changeExpandStatus }, () => [
197
- showExpandToggle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
201
+ __props.expandButton !== false && showExpandToggle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
198
202
  __props.expandButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.expandButton), {
199
203
  key: 0,
200
204
  "expand-status": expandStatus.value,
@@ -225,7 +229,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
225
229
  };
226
230
  }
227
231
  });
228
- const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-6dbd8950"]]);
232
+ const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-3b60234a"]]);
229
233
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
230
234
  __name: "DefaultSearchFormContainer",
231
235
  setup(__props) {
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@qin-ui/antdv-next-pro",
3
- "version": "1.1.12",
3
+ "version": "1.1.14",
4
4
  "description": "基于 antdv-next 的二次封装组件",
5
+ "bin": {
6
+ "antdv-next-pro": "./bin/init-ai.mjs"
7
+ },
5
8
  "type": "module",
6
9
  "module": "es/index.js",
7
10
  "types": "es/index.d.ts",
@@ -14,6 +17,7 @@
14
17
  },
15
18
  "files": [
16
19
  "es",
20
+ "bin",
17
21
  "README.md",
18
22
  "LICENSE",
19
23
  "api.json",