king-design-analyzer 2.2.0 → 2.2.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/components/actions.json +8 -0
- package/components/advancedset.json +1 -0
- package/components/affix.json +1 -0
- package/components/anchor.json +220 -0
- package/components/anchorlink.json +111 -0
- package/components/badge.json +1 -0
- package/components/breadcrumb.json +2 -1
- package/components/button.json +1 -0
- package/components/buttonlink.json +1 -0
- package/components/card.json +6 -3
- package/components/cardcontent.json +5 -0
- package/components/cascader.json +56 -0
- package/components/collapse.json +335 -348
- package/components/configprovider.json +96 -0
- package/components/copyrow.json +1 -0
- package/components/descriptions.json +10 -3
- package/components/diagram.json +295 -0
- package/components/dialog.json +4 -0
- package/components/divider.json +1 -0
- package/components/drawer.json +32 -0
- package/components/dropdown.json +13 -4
- package/components/flex.json +1 -0
- package/components/form.json +12 -3
- package/components/header.json +4 -0
- package/components/input.json +8 -4
- package/components/layoutcontent.json +9 -0
- package/components/layoutlistcontent.json +9 -0
- package/components/layoutpermissioncontent.json +1 -0
- package/components/layoutstandardlist.json +1 -0
- package/components/lazymount.json +1 -0
- package/components/lazyteleport.json +1 -0
- package/components/menu.json +4 -3
- package/components/notification.json +351 -0
- package/components/popover.json +23 -0
- package/components/protable.json +2 -0
- package/components/rate.json +1 -0
- package/components/scrollselect.json +140 -0
- package/components/select.json +72 -0
- package/components/skeleton.json +1 -0
- package/components/slider.json +12 -2
- package/components/spin.json +2 -1
- package/components/spinner.json +422 -428
- package/components/split.json +3 -0
- package/components/switch.json +4 -2
- package/components/table.json +6 -1
- package/components/tabs.json +2 -2
- package/components/tag.json +8 -5
- package/components/timeline.json +3 -1
- package/components/tip.json +20 -0
- package/components/tooltip.json +8 -0
- package/components/tour.json +16 -0
- package/components/transfer.json +52 -5
- package/components/tree.json +22 -1
- package/components/treeselect.json +56 -0
- package/components/upload.json +16 -0
- package/components/vdialog.json +1 -0
- package/components/vdrawer.json +4 -0
- package/components/virtuallist.json +9 -0
- package/dist/ast/index.d.mts +30 -1
- package/dist/ast/index.d.ts +30 -1
- package/dist/ast/index.js +3 -3
- package/dist/ast/index.mjs +1 -1
- package/dist/{chunk-BI5TIQID.mjs → chunk-4OTQAQ6J.mjs} +13 -2
- package/dist/chunk-6HOIRUQB.mjs +409 -0
- package/dist/{chunk-XGPHQHLR.mjs → chunk-BSCASJTV.mjs} +27 -4
- package/dist/{chunk-CR3GC4H3.js → chunk-DHLWNT53.js} +13 -2
- package/dist/{chunk-CJGGFVQJ.js → chunk-HARQRI4F.js} +31 -8
- package/dist/{chunk-TA3SV4SP.js → chunk-JJ6AB4ZH.js} +2 -2
- package/dist/{chunk-3LYQ5XFM.mjs → chunk-NZL6T22V.mjs} +1 -1
- package/dist/chunk-V5N65MRP.js +411 -0
- package/dist/{chunk-SZYVGYKK.js → chunk-XPHDD6XR.js} +113 -35
- package/dist/{chunk-KMIDURUR.mjs → chunk-YRGYDK2I.mjs} +113 -35
- package/dist/full/index.d.mts +2 -0
- package/dist/full/index.d.ts +2 -0
- package/dist/full/index.js +6 -6
- package/dist/full/index.mjs +4 -4
- package/dist/index.js +13 -13
- package/dist/index.mjs +5 -5
- package/dist/metadata/index.d.mts +17 -2
- package/dist/metadata/index.d.ts +17 -2
- package/dist/runtime/index.d.mts +2 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +4 -4
- package/dist/runtime/index.mjs +2 -2
- package/dist/static/index.js +5 -5
- package/dist/static/index.mjs +2 -2
- package/docs_for_llm/actions.doc.md +11 -1
- package/docs_for_llm/advancedset.doc.md +10 -1
- package/docs_for_llm/affix.doc.md +5 -0
- package/docs_for_llm/anchor.doc.md +155 -0
- package/docs_for_llm/anchorlink.doc.md +75 -0
- package/docs_for_llm/badge.doc.md +5 -0
- package/docs_for_llm/breadcrumb.doc.md +74 -1
- package/docs_for_llm/button.doc.md +57 -0
- package/docs_for_llm/buttonlink.doc.md +10 -1
- package/docs_for_llm/card.doc.md +50 -3
- package/docs_for_llm/cardcontent.doc.md +21 -0
- package/docs_for_llm/carousel.doc.md +71 -0
- package/docs_for_llm/cascader.doc.md +62 -0
- package/docs_for_llm/collapse.doc.md +138 -8
- package/docs_for_llm/configprovider.doc.md +77 -0
- package/docs_for_llm/copyrow.doc.md +10 -1
- package/docs_for_llm/datepicker.doc.md +19 -0
- package/docs_for_llm/descriptions.doc.md +113 -4
- package/docs_for_llm/diagram.doc.md +343 -0
- package/docs_for_llm/dialog.doc.md +49 -0
- package/docs_for_llm/divider.doc.md +5 -0
- package/docs_for_llm/drawer.doc.md +86 -0
- package/docs_for_llm/dropdown.doc.md +257 -3
- package/docs_for_llm/flex.doc.md +10 -1
- package/docs_for_llm/form.doc.md +163 -4
- package/docs_for_llm/formitemspinner.doc.md +1 -1
- package/docs_for_llm/grid.doc.md +71 -0
- package/docs_for_llm/header.doc.md +33 -4
- package/docs_for_llm/input.doc.md +109 -2
- package/docs_for_llm/layoutcontent.doc.md +37 -0
- package/docs_for_llm/layoutlistcontent.doc.md +82 -9
- package/docs_for_llm/layoutpermissioncontent.doc.md +10 -1
- package/docs_for_llm/layoutstandardlist.doc.md +10 -1
- package/docs_for_llm/lazymount.doc.md +10 -1
- package/docs_for_llm/lazyteleport.doc.md +10 -1
- package/docs_for_llm/menu.doc.md +125 -3
- package/docs_for_llm/message.doc.md +45 -0
- package/docs_for_llm/notification.doc.md +214 -0
- package/docs_for_llm/popover.doc.md +34 -0
- package/docs_for_llm/protable.doc.md +9 -0
- package/docs_for_llm/rate.doc.md +5 -0
- package/docs_for_llm/scrollselect.doc.md +90 -0
- package/docs_for_llm/select.doc.md +189 -0
- package/docs_for_llm/skeleton.doc.md +35 -0
- package/docs_for_llm/slider.doc.md +11 -1
- package/docs_for_llm/spin.doc.md +10 -1
- package/docs_for_llm/spinner.doc.md +1 -1
- package/docs_for_llm/split.doc.md +13 -0
- package/docs_for_llm/steps.doc.md +71 -0
- package/docs_for_llm/switch.doc.md +15 -2
- package/docs_for_llm/table.doc.md +199 -4
- package/docs_for_llm/tabs.doc.md +98 -2
- package/docs_for_llm/tag.doc.md +148 -5
- package/docs_for_llm/timeline.doc.md +80 -2
- package/docs_for_llm/timepicker.doc.md +19 -0
- package/docs_for_llm/tip.doc.md +30 -0
- package/docs_for_llm/tooltip.doc.md +46 -0
- package/docs_for_llm/tour.doc.md +102 -0
- package/docs_for_llm/transfer.doc.md +59 -4
- package/docs_for_llm/tree.doc.md +64 -1
- package/docs_for_llm/treeselect.doc.md +68 -0
- package/docs_for_llm/upload.doc.md +28 -0
- package/docs_for_llm/vdialog.doc.md +26 -1
- package/docs_for_llm/vdrawer.doc.md +33 -4
- package/docs_for_llm/virtuallist.doc.md +165 -0
- package/package.json +3 -3
- package/dist/chunk-D2SXGGTX.mjs +0 -162
- package/dist/chunk-EYKZY2F3.js +0 -164
|
@@ -32244,7 +32244,14 @@ var ComponentRegistry = class {
|
|
|
32244
32244
|
newComponents.set(resolvedData.name, resolvedData);
|
|
32245
32245
|
if (resolvedData.subComponents) {
|
|
32246
32246
|
for (const sub of resolvedData.subComponents) {
|
|
32247
|
-
newComponents.set(sub.name,
|
|
32247
|
+
newComponents.set(sub.name, {
|
|
32248
|
+
id: sub.name,
|
|
32249
|
+
name: sub.name,
|
|
32250
|
+
props: sub.props || [],
|
|
32251
|
+
events: sub.events || [],
|
|
32252
|
+
slots: sub.slots || [],
|
|
32253
|
+
methods: sub.methods || []
|
|
32254
|
+
});
|
|
32248
32255
|
}
|
|
32249
32256
|
}
|
|
32250
32257
|
}
|
|
@@ -33060,23 +33067,7 @@ function checkNestingRules(tagName, metadata, ancestors, violations) {
|
|
|
33060
33067
|
});
|
|
33061
33068
|
}
|
|
33062
33069
|
}
|
|
33063
|
-
function checkComponentSpecificRules(tagName, node, violations) {
|
|
33064
|
-
if (tagName === "Dropdown") {
|
|
33065
|
-
node.children?.forEach((child) => {
|
|
33066
|
-
if (child.type === 1 && child.tag === "template") {
|
|
33067
|
-
const slotProp = child.props?.find(
|
|
33068
|
-
(p) => p.type === 7 && p.name === "slot" && p.arg?.content === "menu"
|
|
33069
|
-
);
|
|
33070
|
-
if (slotProp) {
|
|
33071
|
-
violations.push({
|
|
33072
|
-
rule: "DropdownMenu \u4E0D\u80FD\u653E\u5728 #menu \u63D2\u69FD\u4E2D",
|
|
33073
|
-
match: "<template #menu>",
|
|
33074
|
-
suggestion: "\u8BF7\u79FB\u9664 <template #menu>\uFF0C\u5C06 DropdownMenu \u76F4\u63A5\u4F5C\u4E3A Dropdown \u7684\u7B2C\u4E8C\u4E2A\u5B50\u5143\u7D20"
|
|
33075
|
-
});
|
|
33076
|
-
}
|
|
33077
|
-
}
|
|
33078
|
-
});
|
|
33079
|
-
}
|
|
33070
|
+
function checkComponentSpecificRules(tagName, node, metadata, violations) {
|
|
33080
33071
|
if (tagName === "Table") {
|
|
33081
33072
|
node.props.forEach((prop) => {
|
|
33082
33073
|
if (prop.type === 6 && (prop.name === "rowKey" || prop.name === "row-key")) {
|
|
@@ -33099,23 +33090,110 @@ function checkComponentSpecificRules(tagName, node, violations) {
|
|
|
33099
33090
|
}
|
|
33100
33091
|
});
|
|
33101
33092
|
}
|
|
33102
|
-
if (
|
|
33103
|
-
|
|
33104
|
-
|
|
33105
|
-
|
|
33106
|
-
|
|
33107
|
-
|
|
33108
|
-
|
|
33109
|
-
|
|
33110
|
-
|
|
33111
|
-
|
|
33112
|
-
|
|
33113
|
-
|
|
33114
|
-
|
|
33115
|
-
|
|
33116
|
-
|
|
33117
|
-
|
|
33093
|
+
if (!metadata?.slots?.length) {
|
|
33094
|
+
return;
|
|
33095
|
+
}
|
|
33096
|
+
const validateSlotBinding = (slotName, expression) => {
|
|
33097
|
+
if (!expression) return;
|
|
33098
|
+
const slot = metadata.slots.find((item) => item.name === slotName);
|
|
33099
|
+
if (!slot) return;
|
|
33100
|
+
const exp = expression.trim();
|
|
33101
|
+
const bindingType = resolveSlotBindingType(slot);
|
|
33102
|
+
if (!bindingType) return;
|
|
33103
|
+
if (bindingType === "none") {
|
|
33104
|
+
violations.push({
|
|
33105
|
+
rule: `${tagName} \u63D2\u69FD #${slotName} \u4E0D\u63D0\u4F9B\u53C2\u6570`,
|
|
33106
|
+
match: exp,
|
|
33107
|
+
suggestion: `\u8BF7\u79FB\u9664 ${slotName} \u63D2\u69FD\u4E0A\u7684\u53C2\u6570\u58F0\u660E`
|
|
33108
|
+
});
|
|
33109
|
+
return;
|
|
33110
|
+
}
|
|
33111
|
+
if (bindingType === "array" && isObjectDestructuringExpression(exp)) {
|
|
33112
|
+
violations.push({
|
|
33113
|
+
rule: `${tagName} \u63D2\u69FD\u53C2\u6570\u5E94\u4E3A\u6570\u7EC4\u7ED3\u6784`,
|
|
33114
|
+
match: exp,
|
|
33115
|
+
suggestion: `\u8BF7\u5C06 ${exp} \u6539\u4E3A ${getSlotBindingExample(slot, "array")}`
|
|
33116
|
+
});
|
|
33117
|
+
return;
|
|
33118
|
+
}
|
|
33119
|
+
if (bindingType === "object" && isArrayDestructuringExpression(exp)) {
|
|
33120
|
+
violations.push({
|
|
33121
|
+
rule: `${tagName} \u63D2\u69FD\u53C2\u6570\u5E94\u4E3A\u5BF9\u8C61\u7ED3\u6784`,
|
|
33122
|
+
match: exp,
|
|
33123
|
+
suggestion: `\u8BF7\u5C06 ${exp} \u6539\u4E3A ${getSlotBindingExample(slot, "object")}`
|
|
33124
|
+
});
|
|
33125
|
+
return;
|
|
33126
|
+
}
|
|
33127
|
+
if (bindingType === "single" && (isArrayDestructuringExpression(exp) || isObjectDestructuringExpression(exp))) {
|
|
33128
|
+
violations.push({
|
|
33129
|
+
rule: `${tagName} \u63D2\u69FD\u53C2\u6570\u5E94\u4E3A\u5355\u503C\u7ED3\u6784`,
|
|
33130
|
+
match: exp,
|
|
33131
|
+
suggestion: `\u8BF7\u5C06 ${exp} \u6539\u4E3A ${getSlotBindingExample(slot, "single")}`
|
|
33132
|
+
});
|
|
33133
|
+
}
|
|
33134
|
+
};
|
|
33135
|
+
node.props.forEach((prop) => {
|
|
33136
|
+
if (prop.type !== 7 || prop.name !== "slot") return;
|
|
33137
|
+
validateSlotBinding(slotNameFromVSlotDirective(prop), getDirectiveExpressionContent(prop.exp));
|
|
33138
|
+
});
|
|
33139
|
+
node.children?.forEach((child) => {
|
|
33140
|
+
if (child.type !== 1 || child.tag !== "template") return;
|
|
33141
|
+
const slotProp = child.props?.find((p) => p.type === 7 && p.name === "slot");
|
|
33142
|
+
if (!slotProp) return;
|
|
33143
|
+
validateSlotBinding(slotNameFromVSlotDirective(slotProp), getDirectiveExpressionContent(slotProp.exp));
|
|
33144
|
+
});
|
|
33145
|
+
}
|
|
33146
|
+
function isArrayDestructuringExpression(expression) {
|
|
33147
|
+
return expression.startsWith("[") && expression.endsWith("]");
|
|
33148
|
+
}
|
|
33149
|
+
function isObjectDestructuringExpression(expression) {
|
|
33150
|
+
return expression.startsWith("{") && expression.endsWith("}");
|
|
33151
|
+
}
|
|
33152
|
+
function extractBindingExpressionFromVueTemplate(vueTemplate) {
|
|
33153
|
+
if (!vueTemplate) return void 0;
|
|
33154
|
+
const match = vueTemplate.match(/=\s*"([^"]+)"/);
|
|
33155
|
+
return match?.[1]?.trim();
|
|
33156
|
+
}
|
|
33157
|
+
function getDirectiveExpressionContent(exp) {
|
|
33158
|
+
if (!exp || !("content" in exp)) return void 0;
|
|
33159
|
+
return typeof exp.content === "string" ? exp.content : void 0;
|
|
33160
|
+
}
|
|
33161
|
+
function resolveSlotBindingType(slot) {
|
|
33162
|
+
if (slot.bindingType) {
|
|
33163
|
+
return slot.bindingType;
|
|
33164
|
+
}
|
|
33165
|
+
const templateExpression = extractBindingExpressionFromVueTemplate(slot.vueTemplate);
|
|
33166
|
+
if (templateExpression) {
|
|
33167
|
+
if (isArrayDestructuringExpression(templateExpression)) return "array";
|
|
33168
|
+
if (isObjectDestructuringExpression(templateExpression)) return "object";
|
|
33169
|
+
}
|
|
33170
|
+
const destructuringExample = slot.slotProps?.find((prop) => prop.destructuringExample)?.destructuringExample?.trim();
|
|
33171
|
+
if (destructuringExample) {
|
|
33172
|
+
if (isArrayDestructuringExpression(destructuringExample)) return "array";
|
|
33173
|
+
if (isObjectDestructuringExpression(destructuringExample)) return "object";
|
|
33174
|
+
}
|
|
33175
|
+
return void 0;
|
|
33176
|
+
}
|
|
33177
|
+
function getSlotBindingExample(slot, fallbackType) {
|
|
33178
|
+
const templateExpression = extractBindingExpressionFromVueTemplate(slot.vueTemplate);
|
|
33179
|
+
if (templateExpression) {
|
|
33180
|
+
return templateExpression;
|
|
33181
|
+
}
|
|
33182
|
+
const destructuringExample = slot.slotProps?.find((prop) => prop.destructuringExample)?.destructuringExample?.trim();
|
|
33183
|
+
if (destructuringExample) {
|
|
33184
|
+
return destructuringExample;
|
|
33185
|
+
}
|
|
33186
|
+
const paramNames = slot.slotProps?.map((prop) => prop.name).filter(Boolean) || [];
|
|
33187
|
+
if (paramNames.length > 0) {
|
|
33188
|
+
if (fallbackType === "single") {
|
|
33189
|
+
return paramNames[0];
|
|
33190
|
+
}
|
|
33191
|
+
return fallbackType === "array" ? `[${paramNames.join(", ")}]` : `{ ${paramNames.join(", ")} }`;
|
|
33192
|
+
}
|
|
33193
|
+
if (fallbackType === "single") {
|
|
33194
|
+
return "slotProp";
|
|
33118
33195
|
}
|
|
33196
|
+
return fallbackType === "array" ? "[slotProps]" : "{ slotProps }";
|
|
33119
33197
|
}
|
|
33120
33198
|
function typeRawAllowsNumber(typeRaw) {
|
|
33121
33199
|
if (!typeRaw) return false;
|
|
@@ -33281,7 +33359,7 @@ function checkTemplate(node, violations, ancestors) {
|
|
|
33281
33359
|
if (metadata) {
|
|
33282
33360
|
checkNestingRules(displayTag, metadata, ancestors, violations);
|
|
33283
33361
|
}
|
|
33284
|
-
checkComponentSpecificRules(displayTag, elementNode, violations);
|
|
33362
|
+
checkComponentSpecificRules(displayTag, elementNode, metadata, violations);
|
|
33285
33363
|
if (metadata) {
|
|
33286
33364
|
checkProps(displayTag, elementNode, metadata, violations);
|
|
33287
33365
|
checkEvents(displayTag, elementNode, metadata, violations);
|
package/dist/full/index.d.mts
CHANGED
package/dist/full/index.d.ts
CHANGED
package/dist/full/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunkHARQRI4F_js = require('../chunk-HARQRI4F.js');
|
|
4
|
+
require('../chunk-XPHDD6XR.js');
|
|
5
|
+
require('../chunk-V5N65MRP.js');
|
|
6
|
+
require('../chunk-DHLWNT53.js');
|
|
7
7
|
require('../chunk-KF5YBEM5.js');
|
|
8
8
|
require('../chunk-JSBRDJBE.js');
|
|
9
9
|
|
|
@@ -11,9 +11,9 @@ require('../chunk-JSBRDJBE.js');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "validateCode", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkHARQRI4F_js.validateCode; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "validateCodeSync", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkHARQRI4F_js.validateCodeSync; }
|
|
19
19
|
});
|
package/dist/full/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { validateCode, validateCodeSync } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { validateCode, validateCodeSync } from '../chunk-BSCASJTV.mjs';
|
|
2
|
+
import '../chunk-YRGYDK2I.mjs';
|
|
3
|
+
import '../chunk-6HOIRUQB.mjs';
|
|
4
|
+
import '../chunk-4OTQAQ6J.mjs';
|
|
5
5
|
import '../chunk-QC6VTSA3.mjs';
|
|
6
6
|
import '../chunk-UJCSKKID.mjs';
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJJ6AB4ZH_js = require('./chunk-JJ6AB4ZH.js');
|
|
4
4
|
require('./chunk-YTEYDSDW.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
5
|
+
var chunkHARQRI4F_js = require('./chunk-HARQRI4F.js');
|
|
6
|
+
var chunkXPHDD6XR_js = require('./chunk-XPHDD6XR.js');
|
|
7
|
+
var chunkV5N65MRP_js = require('./chunk-V5N65MRP.js');
|
|
8
|
+
var chunkDHLWNT53_js = require('./chunk-DHLWNT53.js');
|
|
9
9
|
require('./chunk-KF5YBEM5.js');
|
|
10
10
|
require('./chunk-JSBRDJBE.js');
|
|
11
11
|
|
|
@@ -13,33 +13,33 @@ require('./chunk-JSBRDJBE.js');
|
|
|
13
13
|
|
|
14
14
|
Object.defineProperty(exports, "validateCompilation", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkJJ6AB4ZH_js.validateCompilation; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "validateCode", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkHARQRI4F_js.validateCode; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "validateCodeSync", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkHARQRI4F_js.validateCodeSync; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "analyzeCodeWithAST", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkXPHDD6XR_js.analyzeCodeWithAST; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "componentRegistry", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkXPHDD6XR_js.componentRegistry; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "validateRuntimePrecheck", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkV5N65MRP_js.validateRuntimePrecheck; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "compileSFC", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkDHLWNT53_js.compileSFC; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "scopeStyles", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkDHLWNT53_js.scopeStyles; }
|
|
45
45
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { validateCompilation } from './chunk-
|
|
1
|
+
export { validateCompilation } from './chunk-NZL6T22V.mjs';
|
|
2
2
|
import './chunk-5H7N2A5X.mjs';
|
|
3
|
-
export { validateCode, validateCodeSync } from './chunk-
|
|
4
|
-
export { analyzeCodeWithAST, componentRegistry } from './chunk-
|
|
5
|
-
export { validateRuntimePrecheck } from './chunk-
|
|
6
|
-
export { compileSFC, scopeStyles } from './chunk-
|
|
3
|
+
export { validateCode, validateCodeSync } from './chunk-BSCASJTV.mjs';
|
|
4
|
+
export { analyzeCodeWithAST, componentRegistry } from './chunk-YRGYDK2I.mjs';
|
|
5
|
+
export { validateRuntimePrecheck } from './chunk-6HOIRUQB.mjs';
|
|
6
|
+
export { compileSFC, scopeStyles } from './chunk-4OTQAQ6J.mjs';
|
|
7
7
|
import './chunk-QC6VTSA3.mjs';
|
|
8
8
|
import './chunk-UJCSKKID.mjs';
|
|
@@ -51,6 +51,21 @@ interface ComponentSlot {
|
|
|
51
51
|
description: string;
|
|
52
52
|
vueTemplate?: string;
|
|
53
53
|
usageExample?: string;
|
|
54
|
+
bindingType?: 'array' | 'object' | 'single' | 'none';
|
|
55
|
+
slotProps?: {
|
|
56
|
+
name: string;
|
|
57
|
+
type?: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
destructuringExample?: string;
|
|
60
|
+
}[];
|
|
61
|
+
}
|
|
62
|
+
interface ComponentSubComponent {
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
props?: ComponentProp[];
|
|
66
|
+
events?: ComponentEvent[];
|
|
67
|
+
slots?: ComponentSlot[];
|
|
68
|
+
methods?: ComponentMethod[];
|
|
54
69
|
}
|
|
55
70
|
interface ComponentMetadata {
|
|
56
71
|
id: string;
|
|
@@ -64,7 +79,7 @@ interface ComponentMetadata {
|
|
|
64
79
|
slots: ComponentSlot[];
|
|
65
80
|
methods?: ComponentMethod[];
|
|
66
81
|
examples?: any[];
|
|
67
|
-
subComponents?:
|
|
82
|
+
subComponents?: ComponentSubComponent[];
|
|
68
83
|
commonMistakes?: any[];
|
|
69
84
|
searchKeywords?: string[];
|
|
70
85
|
useCases?: string[];
|
|
@@ -94,4 +109,4 @@ declare function getComponentsDir(): string;
|
|
|
94
109
|
*/
|
|
95
110
|
declare function getComponentPath(componentName: string): string;
|
|
96
111
|
|
|
97
|
-
export { type ComponentActionParam, type ComponentEvent, type ComponentMetadata, type ComponentMethod, type ComponentProp, type ComponentSlot, getAllComponentsMetadata, getComponentMetadata, getComponentPath, getComponentsDir, getComponentsList };
|
|
112
|
+
export { type ComponentActionParam, type ComponentEvent, type ComponentMetadata, type ComponentMethod, type ComponentProp, type ComponentSlot, type ComponentSubComponent, getAllComponentsMetadata, getComponentMetadata, getComponentPath, getComponentsDir, getComponentsList };
|
package/dist/metadata/index.d.ts
CHANGED
|
@@ -51,6 +51,21 @@ interface ComponentSlot {
|
|
|
51
51
|
description: string;
|
|
52
52
|
vueTemplate?: string;
|
|
53
53
|
usageExample?: string;
|
|
54
|
+
bindingType?: 'array' | 'object' | 'single' | 'none';
|
|
55
|
+
slotProps?: {
|
|
56
|
+
name: string;
|
|
57
|
+
type?: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
destructuringExample?: string;
|
|
60
|
+
}[];
|
|
61
|
+
}
|
|
62
|
+
interface ComponentSubComponent {
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
props?: ComponentProp[];
|
|
66
|
+
events?: ComponentEvent[];
|
|
67
|
+
slots?: ComponentSlot[];
|
|
68
|
+
methods?: ComponentMethod[];
|
|
54
69
|
}
|
|
55
70
|
interface ComponentMetadata {
|
|
56
71
|
id: string;
|
|
@@ -64,7 +79,7 @@ interface ComponentMetadata {
|
|
|
64
79
|
slots: ComponentSlot[];
|
|
65
80
|
methods?: ComponentMethod[];
|
|
66
81
|
examples?: any[];
|
|
67
|
-
subComponents?:
|
|
82
|
+
subComponents?: ComponentSubComponent[];
|
|
68
83
|
commonMistakes?: any[];
|
|
69
84
|
searchKeywords?: string[];
|
|
70
85
|
useCases?: string[];
|
|
@@ -94,4 +109,4 @@ declare function getComponentsDir(): string;
|
|
|
94
109
|
*/
|
|
95
110
|
declare function getComponentPath(componentName: string): string;
|
|
96
111
|
|
|
97
|
-
export { type ComponentActionParam, type ComponentEvent, type ComponentMetadata, type ComponentMethod, type ComponentProp, type ComponentSlot, getAllComponentsMetadata, getComponentMetadata, getComponentPath, getComponentsDir, getComponentsList };
|
|
112
|
+
export { type ComponentActionParam, type ComponentEvent, type ComponentMetadata, type ComponentMethod, type ComponentProp, type ComponentSlot, type ComponentSubComponent, getAllComponentsMetadata, getComponentMetadata, getComponentPath, getComponentsDir, getComponentsList };
|
package/dist/runtime/index.d.mts
CHANGED
package/dist/runtime/index.d.ts
CHANGED
package/dist/runtime/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkV5N65MRP_js = require('../chunk-V5N65MRP.js');
|
|
4
|
+
var chunkDHLWNT53_js = require('../chunk-DHLWNT53.js');
|
|
5
5
|
require('../chunk-JSBRDJBE.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "validateRuntimePrecheck", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkV5N65MRP_js.validateRuntimePrecheck; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "compileSFC", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkDHLWNT53_js.compileSFC; }
|
|
16
16
|
});
|
package/dist/runtime/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { validateRuntimePrecheck } from '../chunk-
|
|
2
|
-
export { compileSFC } from '../chunk-
|
|
1
|
+
export { validateRuntimePrecheck } from '../chunk-6HOIRUQB.mjs';
|
|
2
|
+
export { compileSFC } from '../chunk-4OTQAQ6J.mjs';
|
|
3
3
|
import '../chunk-UJCSKKID.mjs';
|
package/dist/static/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkJJ6AB4ZH_js = require('../chunk-JJ6AB4ZH.js');
|
|
4
|
+
var chunkDHLWNT53_js = require('../chunk-DHLWNT53.js');
|
|
5
5
|
require('../chunk-JSBRDJBE.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "validateCompilation", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkJJ6AB4ZH_js.validateCompilation; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "compileSFC", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkDHLWNT53_js.compileSFC; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "scopeStyles", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkDHLWNT53_js.scopeStyles; }
|
|
20
20
|
});
|
package/dist/static/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { validateCompilation } from '../chunk-
|
|
2
|
-
export { compileSFC, scopeStyles } from '../chunk-
|
|
1
|
+
export { validateCompilation } from '../chunk-NZL6T22V.mjs';
|
|
2
|
+
export { compileSFC, scopeStyles } from '../chunk-4OTQAQ6J.mjs';
|
|
3
3
|
import '../chunk-UJCSKKID.mjs';
|
|
@@ -20,7 +20,17 @@ import { Actions } from '@ksyun-internal/versatile';
|
|
|
20
20
|
## 插槽 (Slots)
|
|
21
21
|
| 插槽名 | 说明 | 模板写法 | 示例 |
|
|
22
22
|
| --- | --- | --- | --- |
|
|
23
|
-
| btnText | 自定义按钮文案渲染 | `<template #btnText="{ action }">...</template>` |
|
|
23
|
+
| btnText | 自定义按钮文案渲染 | `<template #btnText="{ action }">...</template>` | `<Actions>
|
|
24
|
+
<template <template #btnText="{ action }">...</template>>
|
|
25
|
+
{{ action }}
|
|
26
|
+
</template>
|
|
27
|
+
</Actions>` |
|
|
28
|
+
|
|
29
|
+
### 插槽参数说明
|
|
30
|
+
**btnText**
|
|
31
|
+
|
|
32
|
+
- 参数结构: <template #btnText="{ action }">...</template>
|
|
33
|
+
- 参数列表: `action: ActionConfig`
|
|
24
34
|
|
|
25
35
|
## 使用示例
|
|
26
36
|
### 表格操作列中的主次操作
|
|
@@ -33,7 +33,16 @@ import { AdvancedSet } from '@ksyun-internal/versatile';
|
|
|
33
33
|
## 插槽 (Slots)
|
|
34
34
|
| 插槽名 | 说明 | 模板写法 | 示例 |
|
|
35
35
|
| --- | --- | --- | --- |
|
|
36
|
-
| default | 高级设置内容区域 | `<AdvancedSet>...</AdvancedSet>` |
|
|
36
|
+
| default | 高级设置内容区域 | `<AdvancedSet>...</AdvancedSet>` | `<AdvancedSet>
|
|
37
|
+
<template <AdvancedSet>...</AdvancedSet>>
|
|
38
|
+
自定义default内容
|
|
39
|
+
</template>
|
|
40
|
+
</AdvancedSet>` |
|
|
41
|
+
|
|
42
|
+
### 插槽参数说明
|
|
43
|
+
**default**
|
|
44
|
+
|
|
45
|
+
- 参数结构: 无参数
|
|
37
46
|
|
|
38
47
|
## 使用示例
|
|
39
48
|
### 购买页中的高级设置折叠区
|
|
@@ -37,6 +37,11 @@ import { Affix } from '@king-design/vue';
|
|
|
37
37
|
| --- | --- | --- | --- |
|
|
38
38
|
| default | 需要被固定的元素 | `#default` | `<Affix><Button>Fixed Button</Button></Affix>` |
|
|
39
39
|
|
|
40
|
+
### 插槽参数说明
|
|
41
|
+
**default**
|
|
42
|
+
|
|
43
|
+
- 参数结构: 无参数
|
|
44
|
+
|
|
40
45
|
## 常见错误与正确用法 (Anti-Hallucination)
|
|
41
46
|
### 父容器滚动问题
|
|
42
47
|
> **错误用法**: `<div style="overflow: auto; height: 200px;">
|