@mooncellwiki/prts-design-vue 0.1.0
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/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/components/Accordion/AkCollapse.vue.d.ts +31 -0
- package/dist/components/Accordion/AkCollapseItem.vue.d.ts +27 -0
- package/dist/components/Accordion/context.d.ts +7 -0
- package/dist/components/Archive/AkArchive.vue.d.ts +35 -0
- package/dist/components/Archive/AkArchivePlay.vue.d.ts +18 -0
- package/dist/components/Attrs/AkAttr.vue.d.ts +26 -0
- package/dist/components/Attrs/AkAttrs.vue.d.ts +18 -0
- package/dist/components/Avatar/AkAvatar.vue.d.ts +30 -0
- package/dist/components/Avatar/AkAvatarGroup.vue.d.ts +35 -0
- package/dist/components/Avatar/context.d.ts +6 -0
- package/dist/components/Badge/AkBadge.vue.d.ts +35 -0
- package/dist/components/Breadcrumb/AkBreadcrumb.vue.d.ts +25 -0
- package/dist/components/Breadcrumb/AkBreadcrumbItem.vue.d.ts +20 -0
- package/dist/components/Button/AkButton.vue.d.ts +47 -0
- package/dist/components/Button/AkButtonGroup.vue.d.ts +21 -0
- package/dist/components/Button/context.d.ts +7 -0
- package/dist/components/Camp/AkCamp.vue.d.ts +18 -0
- package/dist/components/Card/AkCard.vue.d.ts +54 -0
- package/dist/components/Card/AkCardGrid.vue.d.ts +13 -0
- package/dist/components/Cbox/AkCbox.vue.d.ts +33 -0
- package/dist/components/Checkbox/AkCheckbox.vue.d.ts +39 -0
- package/dist/components/Checkbox/AkCheckboxGroup.vue.d.ts +43 -0
- package/dist/components/Checkbox/context.d.ts +15 -0
- package/dist/components/Chip/AkChip.vue.d.ts +35 -0
- package/dist/components/Dialog/AkDialog.vue.d.ts +57 -0
- package/dist/components/Dialogue/AkDialogue.vue.d.ts +14 -0
- package/dist/components/Dialogue/AkDialogueLine.vue.d.ts +20 -0
- package/dist/components/Divider/AkDivider.vue.d.ts +21 -0
- package/dist/components/Dossier/AkDossier.vue.d.ts +28 -0
- package/dist/components/Dossier/AkRedacted.vue.d.ts +21 -0
- package/dist/components/Dropdown/AkDropdown.vue.d.ts +47 -0
- package/dist/components/Dropdown/MenuItem.vue.d.ts +14 -0
- package/dist/components/Dropdown/types.d.ts +27 -0
- package/dist/components/Elite/AkElite.vue.d.ts +33 -0
- package/dist/components/Empty/AkEmpty.vue.d.ts +37 -0
- package/dist/components/Enemy/AkEnemy.vue.d.ts +34 -0
- package/dist/components/Event/AkCountdown.vue.d.ts +25 -0
- package/dist/components/Event/AkEvent.vue.d.ts +34 -0
- package/dist/components/Fab/AkBackTop.vue.d.ts +36 -0
- package/dist/components/Field/AkField.vue.d.ts +35 -0
- package/dist/components/Field/context.d.ts +48 -0
- package/dist/components/Heading/AkHeading.vue.d.ts +35 -0
- package/dist/components/Hero/AkHero.vue.d.ts +41 -0
- package/dist/components/Icon/AkIcon.vue.d.ts +15 -0
- package/dist/components/Input/AkInput.vue.d.ts +54 -0
- package/dist/components/Input/AkInputGroup.vue.d.ts +19 -0
- package/dist/components/Input/context.d.ts +6 -0
- package/dist/components/InputNumber/AkInputNumber.vue.d.ts +37 -0
- package/dist/components/Item/AkItem.vue.d.ts +47 -0
- package/dist/components/Item/AkItemList.vue.d.ts +19 -0
- package/dist/components/Item/context.d.ts +6 -0
- package/dist/components/Kbd/AkKbd.vue.d.ts +14 -0
- package/dist/components/Kv/AkKv.vue.d.ts +23 -0
- package/dist/components/Kv/AkKvItem.vue.d.ts +20 -0
- package/dist/components/Kv/context.d.ts +5 -0
- package/dist/components/Level/AkLevel.vue.d.ts +11 -0
- package/dist/components/Materials/AkMaterials.vue.d.ts +17 -0
- package/dist/components/Materials/AkMaterialsDivider.vue.d.ts +14 -0
- package/dist/components/Materials/AkMaterialsRow.vue.d.ts +19 -0
- package/dist/components/Message/AkMessage.vue.d.ts +52 -0
- package/dist/components/Module/AkModule.vue.d.ts +62 -0
- package/dist/components/Module/AkModuleStage.vue.d.ts +22 -0
- package/dist/components/Module/AkModuleUnlock.vue.d.ts +20 -0
- package/dist/components/News/AkNews.vue.d.ts +25 -0
- package/dist/components/OpCard/AkOpCard.vue.d.ts +52 -0
- package/dist/components/OpCard/AkOpGrid.vue.d.ts +13 -0
- package/dist/components/OpRow/AkOpRow.vue.d.ts +33 -0
- package/dist/components/Pagination/AkPagination.vue.d.ts +51 -0
- package/dist/components/Panel/AkPanel.vue.d.ts +43 -0
- package/dist/components/PhaseTabs/AkPhaseTabs.vue.d.ts +28 -0
- package/dist/components/PotList/AkPot.vue.d.ts +27 -0
- package/dist/components/PotList/AkPotList.vue.d.ts +18 -0
- package/dist/components/PotList/context.d.ts +5 -0
- package/dist/components/Potential/AkPotential.vue.d.ts +16 -0
- package/dist/components/Potential/AkSpecialization.vue.d.ts +16 -0
- package/dist/components/Profession/AkProfession.vue.d.ts +22 -0
- package/dist/components/Profession/AkProfessionLabel.vue.d.ts +28 -0
- package/dist/components/Progress/AkProgress.vue.d.ts +40 -0
- package/dist/components/Radio/AkRadio.vue.d.ts +39 -0
- package/dist/components/Radio/AkRadioButton.vue.d.ts +33 -0
- package/dist/components/Radio/AkRadioGroup.vue.d.ts +40 -0
- package/dist/components/Radio/context.d.ts +12 -0
- package/dist/components/Range/AkRange.vue.d.ts +19 -0
- package/dist/components/Rarity/AkRarity.vue.d.ts +24 -0
- package/dist/components/RichText/AkRichText.vue.d.ts +40 -0
- package/dist/components/RichText/parse.d.ts +33 -0
- package/dist/components/Scope/AkScope.vue.d.ts +27 -0
- package/dist/components/Search/AkSearch.vue.d.ts +31 -0
- package/dist/components/Select/AkSelect.vue.d.ts +46 -0
- package/dist/components/Skeleton/AkSkeleton.vue.d.ts +21 -0
- package/dist/components/Skill/AkSkill.vue.d.ts +65 -0
- package/dist/components/Skill/LevelLabel.vue.d.ts +15 -0
- package/dist/components/SkillLevels/AkSkillLevels.vue.d.ts +26 -0
- package/dist/components/SkillMatrix/AkSkillMatrix.vue.d.ts +58 -0
- package/dist/components/SkillSheet/AkSkillSheet.vue.d.ts +50 -0
- package/dist/components/Slider/AkSlider.vue.d.ts +36 -0
- package/dist/components/Sp/AkSp.vue.d.ts +23 -0
- package/dist/components/Sp/AkSpTrigger.vue.d.ts +21 -0
- package/dist/components/Sp/AkSpValue.vue.d.ts +25 -0
- package/dist/components/Sp/sp.d.ts +19 -0
- package/dist/components/Spinner/AkSpinner.vue.d.ts +33 -0
- package/dist/components/Stage/AkSanity.vue.d.ts +10 -0
- package/dist/components/Stage/AkStage.vue.d.ts +36 -0
- package/dist/components/Stage/AkStageCode.vue.d.ts +22 -0
- package/dist/components/Stat/AkStat.vue.d.ts +36 -0
- package/dist/components/Stat/AkStatRow.vue.d.ts +14 -0
- package/dist/components/Stepper/AkStep.vue.d.ts +24 -0
- package/dist/components/Stepper/AkSteps.vue.d.ts +25 -0
- package/dist/components/Switch/AkSwitch.vue.d.ts +37 -0
- package/dist/components/Table/AkDataTable.vue.d.ts +48 -0
- package/dist/components/Table/types.d.ts +21 -0
- package/dist/components/Tabs/AkTab.vue.d.ts +25 -0
- package/dist/components/Tabs/AkTabPane.vue.d.ts +29 -0
- package/dist/components/Tabs/AkTabs.vue.d.ts +36 -0
- package/dist/components/Tag/AkTag.vue.d.ts +35 -0
- package/dist/components/Talent/AkTalent.vue.d.ts +28 -0
- package/dist/components/TalentTable/AkCalc.vue.d.ts +8 -0
- package/dist/components/TalentTable/AkTalentTable.vue.d.ts +66 -0
- package/dist/components/Timeline/AkTimeline.vue.d.ts +17 -0
- package/dist/components/Timeline/AkTimelineItem.vue.d.ts +32 -0
- package/dist/components/Toast/AkToastProvider.vue.d.ts +35 -0
- package/dist/components/Toast/useToast.d.ts +39 -0
- package/dist/components/Tooltip/AkPopover.vue.d.ts +52 -0
- package/dist/components/Tooltip/AkTooltip.vue.d.ts +48 -0
- package/dist/components/Tooltip/trigger.d.ts +13 -0
- package/dist/components/Tooltip/usePopover.d.ts +25 -0
- package/dist/components/Trust/AkTrust.vue.d.ts +11 -0
- package/dist/components/Voice/AkVoice.vue.d.ts +23 -0
- package/dist/components/Voice/AkVoiceList.vue.d.ts +36 -0
- package/dist/components/Voice/context.d.ts +19 -0
- package/dist/components/Voice/player.d.ts +8 -0
- package/dist/icons.d.ts +50 -0
- package/dist/index.d.ts +135 -0
- package/dist/index.js +6455 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type CheckSize, type CheckValue } from "./context";
|
|
2
|
+
/** 一组复选框(同 Naive 的 NCheckboxGroup):v-model 是勾上的 value 数组。role="group",组名来自 AkField 的标签或 label */
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
/** 整组禁用 */
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** 最多勾几个:选满后没勾的变成禁用(公开招募最多选 3 个标签) */
|
|
7
|
+
max?: number;
|
|
8
|
+
/** 最少勾几个:到了之后勾着的不能再取消 */
|
|
9
|
+
min?: number;
|
|
10
|
+
/** 组内勾选框的尺寸 */
|
|
11
|
+
size?: CheckSize;
|
|
12
|
+
/** 竖排(默认横排、放不下换行) */
|
|
13
|
+
vertical?: boolean;
|
|
14
|
+
/** 读屏用的组名(aria-label);放在带标签的 AkField 里时不用写 */
|
|
15
|
+
label?: string;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_Slots = {
|
|
18
|
+
/** 若干 AkCheckbox(各写 value) */
|
|
19
|
+
default?: () => unknown;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_ModelProps = {
|
|
22
|
+
/** 勾上的 value 数组 */
|
|
23
|
+
modelValue?: CheckValue[];
|
|
24
|
+
};
|
|
25
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
"update:modelValue": (value: CheckValue[]) => any;
|
|
28
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
29
|
+
"onUpdate:modelValue"?: ((value: CheckValue[]) => any) | undefined;
|
|
30
|
+
}>, {
|
|
31
|
+
size: CheckSize;
|
|
32
|
+
label: string;
|
|
33
|
+
max: number;
|
|
34
|
+
min: number;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { InjectionKey } from "vue";
|
|
2
|
+
export type CheckValue = string | number;
|
|
3
|
+
export type CheckSize = "sm" | "md";
|
|
4
|
+
/** AkCheckboxGroup 给组内 AkCheckbox 的状态(同 Naive 的 NCheckboxGroup 注入);都是 getter,读的时候才取值 */
|
|
5
|
+
export interface CheckboxGroupContext {
|
|
6
|
+
readonly value: CheckValue[];
|
|
7
|
+
readonly disabled: boolean;
|
|
8
|
+
readonly size: CheckSize | undefined;
|
|
9
|
+
/** 已选满 max:没勾的不能再勾 */
|
|
10
|
+
readonly full: boolean;
|
|
11
|
+
/** 已到 min:勾着的不能再取消 */
|
|
12
|
+
readonly atMin: boolean;
|
|
13
|
+
toggle(value: CheckValue, checked: boolean): void;
|
|
14
|
+
}
|
|
15
|
+
export declare const checkboxGroupKey: InjectionKey<CheckboxGroupContext>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 可交互的筛选芯片(= Naive 的 NTag checkable):一个开关按钮,点一下选中 / 取消,aria-pressed 报状态。
|
|
3
|
+
* 选中 = 主色实底 + 左上角三角角标(同 .ak-tab / .ak-card 的选中角标)。
|
|
4
|
+
* data-no-toggle:皮肤 / 预览脚本会在 document 上把所有 .ak-chip 的 is-active / aria-pressed 翻一遍(给模板输出的纯 CSS 芯片用),
|
|
5
|
+
* 状态归 Vue 管的芯片要用它退出,否则两边各翻一次、DOM 与 v-model 对不上。
|
|
6
|
+
*/
|
|
7
|
+
import type { IconName } from "../../icons";
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
/** 文字前的图标(芯片自带 6px 间距) */
|
|
10
|
+
icon?: IconName;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_Slots = {
|
|
13
|
+
/** 芯片文字 */
|
|
14
|
+
default?: () => unknown;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_ModelProps = {
|
|
17
|
+
/** 是否选中(= Naive 的 checked);点击切换 */
|
|
18
|
+
modelValue?: boolean;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
21
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
"update:modelValue": (value: boolean) => any;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
24
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
icon: IconName;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 标题(同时作对话框的可访问名);要带格式时用 #header 插槽 */
|
|
3
|
+
title?: string;
|
|
4
|
+
/** 可访问名:没有标题时写(aria-label) */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** 宽度:sm 420 · md 640(默认)· lg 900 · full 占满 96vw × 92vh */
|
|
7
|
+
size?: "sm" | "md" | "lg" | "full";
|
|
8
|
+
/** 标题栏右侧的 ✕ 关闭按钮 */
|
|
9
|
+
closable?: boolean;
|
|
10
|
+
/** 点遮罩关闭(同 Naive 的 mask-closable) */
|
|
11
|
+
maskClosable?: boolean;
|
|
12
|
+
/** 按 Esc 关闭(同 Naive 的 close-on-esc) */
|
|
13
|
+
closeOnEsc?: boolean;
|
|
14
|
+
/** 确认按钮文字:写了就在底栏放一枚黑白反转的确认按钮,点了触发 positive-click 并关闭 */
|
|
15
|
+
positiveText?: string;
|
|
16
|
+
/** 取消按钮文字:写了就在底栏放一枚默认按钮,点了触发 negative-click 并关闭 */
|
|
17
|
+
negativeText?: string;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_Slots = {
|
|
20
|
+
/** 正文 */
|
|
21
|
+
default?: () => unknown;
|
|
22
|
+
/** 标题(代替 title) */
|
|
23
|
+
header?: () => unknown;
|
|
24
|
+
/** 底栏按钮(代替 positive-text / negative-text 那两枚),右对齐 */
|
|
25
|
+
footer?: () => unknown;
|
|
26
|
+
};
|
|
27
|
+
type __VLS_ModelProps = {
|
|
28
|
+
/** 是否打开 */
|
|
29
|
+
modelValue?: boolean;
|
|
30
|
+
};
|
|
31
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
32
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
"update:modelValue": (value: boolean) => any;
|
|
34
|
+
"positive-click": () => any;
|
|
35
|
+
"negative-click": () => any;
|
|
36
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
37
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
38
|
+
"onPositive-click"?: (() => any) | undefined;
|
|
39
|
+
"onNegative-click"?: (() => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
size: "sm" | "md" | "lg" | "full";
|
|
42
|
+
label: string;
|
|
43
|
+
title: string;
|
|
44
|
+
closable: boolean;
|
|
45
|
+
maskClosable: boolean;
|
|
46
|
+
closeOnEsc: boolean;
|
|
47
|
+
positiveText: string;
|
|
48
|
+
negativeText: string;
|
|
49
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
50
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
51
|
+
declare const _default: typeof __VLS_export;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** 剧情对话:一个 <dl>,说话人一列右对齐(主色粗体)、台词一列;里面放若干 AkDialogueLine。分段就是几个 AkDialogue 之间插小标题 */
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
/** 若干 AkDialogueLine */
|
|
4
|
+
default?: () => unknown;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** 剧情对话的一句:输出 <dt>(说话人)+ <dd>(台词)。只能放在 AkDialogue 里 */
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** 说话人;不写(也没有 #speaker 插槽)就是旁白:说话人列写「旁白」,整句灰色斜体 */
|
|
4
|
+
speaker?: string;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_Slots = {
|
|
7
|
+
/** 台词 */
|
|
8
|
+
default?: () => unknown;
|
|
9
|
+
/** 说话人(代替 speaker,比如身份要涂黑时放 AkRedacted) */
|
|
10
|
+
speaker?: () => unknown;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 外观:default 1px 线 · accent 左段 80px 主色 + 其余 1 色线(2px 高)· stripes 6px 斜纹带;带文字 / 竖线时不适用 */
|
|
3
|
+
variant?: "default" | "accent" | "stripes";
|
|
4
|
+
/** 竖线:行内 1px × 1em,隔开同一行里的几项(「编辑 | 历史」) */
|
|
5
|
+
vertical?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = {
|
|
8
|
+
/** 线中间的文字(同 Naive 的标题);竖线时不适用 */
|
|
9
|
+
default?: () => unknown;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
variant: "default" | "accent" | "stripes";
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 档案条目(= 现网 {{人员档案}} 的一段):标题行(中文 + 英文小标 + 右侧解锁条件)+ 正文。
|
|
3
|
+
* 正文里的 <p> 保留换行(white-space: pre-line),游戏文本的 \n 可以原样放进一个 <p>。
|
|
4
|
+
* 干员页 9 段档案配竖排标签页:AkTabs placement="left" 的每个 AkTabPane 里放一个 AkDossier。
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
/** 标题(客观履历) */
|
|
8
|
+
title: string;
|
|
9
|
+
/** 英文小标(Objective Record) */
|
|
10
|
+
en?: string;
|
|
11
|
+
/** 解锁条件(提升信赖至25%以查看更多信息),标题行右侧;locked 时也是遮罩上的文字 */
|
|
12
|
+
unlock?: string;
|
|
13
|
+
/** 未解锁:正文模糊、不可选,盖斜纹 + 🔒 解锁条件(文本仍在 DOM 里,可被搜索) */
|
|
14
|
+
locked?: boolean;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_Slots = {
|
|
17
|
+
/** 正文:若干 <p>,或键值表 / 属性表 */
|
|
18
|
+
default?: () => unknown;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Slots = {
|
|
2
|
+
/** 被涂黑的文字 */
|
|
3
|
+
default?: () => unknown;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
/** 是否常显(点过一次后保持显出) */
|
|
7
|
+
modelValue?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (value: boolean) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 下拉菜单(同 Naive 的 NDropdown):默认插槽放触发元素(一般是 AkButton),options 给菜单项,选中触发 select。
|
|
3
|
+
* 键盘与 ARIA 按 WAI-ARIA 菜单按钮(Menu Button):Enter / 空格 / ↓ 打开并落在第一项,↑ 落在最后一项;
|
|
4
|
+
* 菜单里 ↑ ↓ Home End 移动、首字母跳转、Enter / 空格选中、Esc 收起并把焦点还给触发元素、Tab 收起并离开;点外面收起。
|
|
5
|
+
*/
|
|
6
|
+
import { type VNode } from "vue";
|
|
7
|
+
import type { DropdownKey, DropdownMixedOption, DropdownOption } from "./types";
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
/** 菜单项:{ key, label, icon?, disabled?, danger?, href? };{ type: "divider" } 分隔线;{ type: "group", label, children } 带小标题的一组 */
|
|
10
|
+
options: DropdownMixedOption[];
|
|
11
|
+
/** 菜单对齐:bottom-start 与触发元素左对齐(默认)· bottom-end 右对齐(靠页面右边的触发元素用) */
|
|
12
|
+
placement?: "bottom-start" | "bottom-end";
|
|
13
|
+
/** 当前选中项的 key:该项高亮,菜单变成单选菜单(menuitemradio + aria-checked),打开时落在它上面 */
|
|
14
|
+
value?: DropdownKey;
|
|
15
|
+
/** 读屏用的菜单名;不写时用触发元素的文字 */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** 禁用:触发元素点了不展开 */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_Slots = {
|
|
21
|
+
/** 触发元素:取第一个元素 / 组件,自动补 aria-haspopup / aria-expanded / aria-controls 与键盘;id 它自己写了就沿用,没写才补一个(菜单的 aria-labelledby 指向它) */
|
|
22
|
+
default?: () => VNode[];
|
|
23
|
+
};
|
|
24
|
+
type __VLS_ModelProps = {
|
|
25
|
+
/** 菜单是否展开 */
|
|
26
|
+
modelValue?: boolean;
|
|
27
|
+
};
|
|
28
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
select: (key: DropdownKey, option: DropdownOption) => any;
|
|
31
|
+
"update:modelValue": (value: boolean) => any;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
33
|
+
onSelect?: ((key: DropdownKey, option: DropdownOption) => any) | undefined;
|
|
34
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
label: string;
|
|
37
|
+
placement: "bottom-start" | "bottom-end";
|
|
38
|
+
value: DropdownKey;
|
|
39
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
40
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
41
|
+
declare const _default: typeof __VLS_export;
|
|
42
|
+
export default _default;
|
|
43
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
44
|
+
new (): {
|
|
45
|
+
$slots: S;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DropdownKey, DropdownOption } from "./types";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** 菜单项 */
|
|
4
|
+
option: DropdownOption;
|
|
5
|
+
/** AkDropdown 的 value:有值时是单选菜单项 */
|
|
6
|
+
value?: DropdownKey;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
select: (e: MouseEvent) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onSelect?: ((e: MouseEvent) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IconName } from "../../icons";
|
|
2
|
+
export type DropdownKey = string | number;
|
|
3
|
+
/** 一个菜单项(同 Naive 的 DropdownOption;label 只收字符串,图标是 AkIcon 的名字) */
|
|
4
|
+
export interface DropdownOption {
|
|
5
|
+
key: DropdownKey;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: IconName;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** 破坏性动作(红字,如「删除」) */
|
|
10
|
+
danger?: boolean;
|
|
11
|
+
/** 有地址时渲染成 <a>(MW 门户链接那种),仍会触发 select */
|
|
12
|
+
href?: string;
|
|
13
|
+
type?: undefined;
|
|
14
|
+
}
|
|
15
|
+
/** 分隔线 */
|
|
16
|
+
export interface DropdownDividerOption {
|
|
17
|
+
type: "divider";
|
|
18
|
+
key?: DropdownKey;
|
|
19
|
+
}
|
|
20
|
+
/** 带小标题的一组(同 Naive 的 type: "group") */
|
|
21
|
+
export interface DropdownGroupOption {
|
|
22
|
+
type: "group";
|
|
23
|
+
key?: DropdownKey;
|
|
24
|
+
label: string;
|
|
25
|
+
children: Array<DropdownOption | DropdownDividerOption>;
|
|
26
|
+
}
|
|
27
|
+
export type DropdownMixedOption = DropdownOption | DropdownDividerOption | DropdownGroupOption;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 图标地址:elite/elite_N.png(白线稿,亮色主题下 CSS 反相为黑);lg 用 elite_N_large.png */
|
|
3
|
+
src: string;
|
|
4
|
+
/** 精英阶段 0–2:给出默认文字「精英零 / 一 / 二」 */
|
|
5
|
+
phase?: 0 | 1 | 2;
|
|
6
|
+
/** 等级:接在阶段名后面,「精英二 Lv60」 */
|
|
7
|
+
level?: number;
|
|
8
|
+
/** 文字:默认由 phase + level 拼出,可改写(「提升至精英阶段 1 等级 1」「专精 Ⅰ」);false 只显示图标 */
|
|
9
|
+
text?: string | false;
|
|
10
|
+
/** 尺寸:md 图标 16px 高(默认,配文字)· lg 28px 高(一般只放图标) */
|
|
11
|
+
size?: "md" | "lg";
|
|
12
|
+
/** 可访问名:只显示图标时作图标的 alt,默认是阶段名;有文字时图标是装饰 */
|
|
13
|
+
label?: string;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_Slots = {
|
|
16
|
+
/** 文字(代替 text),可以带链接 / 加粗 */
|
|
17
|
+
default?: () => unknown;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
20
|
+
size: "md" | "lg";
|
|
21
|
+
label: string;
|
|
22
|
+
text: string | false;
|
|
23
|
+
level: number;
|
|
24
|
+
phase: 0 | 1 | 2;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 空状态(= Naive 的 NEmpty):虚线框里居中一枚线稿图标 + 标题 + 说明 + 可选的操作。
|
|
3
|
+
* 404 / 403 这类页面级的空,用 code 换成大号状态码。
|
|
4
|
+
*/
|
|
5
|
+
import type { IconName } from "../../icons";
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
/** 标题(粗体一行);传空串不显示 */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** 说明文字(小字,标题下一行);要放链接时改用默认插槽 */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** 大号状态码(404 / 403):放在图标的位置,写了就不显示图标 */
|
|
12
|
+
code?: string;
|
|
13
|
+
/** 图标(48px 半透明线稿);false 不显示 */
|
|
14
|
+
icon?: IconName | false;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_Slots = {
|
|
17
|
+
/** 说明(代替 description) */
|
|
18
|
+
default?: () => unknown;
|
|
19
|
+
/** 自定义图标(代替 icon);自己加 class="ak-empty__icon" 得到 48px 半透明 */
|
|
20
|
+
icon?: () => unknown;
|
|
21
|
+
/** 说明下方的操作(按钮 / 链接) */
|
|
22
|
+
extra?: () => unknown;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
25
|
+
code: string;
|
|
26
|
+
title: string;
|
|
27
|
+
icon: IconName | false;
|
|
28
|
+
description: string;
|
|
29
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type EnemyRank = "normal" | "elite" | "boss";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** 敌人名 */
|
|
4
|
+
name: string;
|
|
5
|
+
/** 编号(B003 / E020 / N001),显示在级别后面:「BOSS · B003」 */
|
|
6
|
+
code?: string;
|
|
7
|
+
/** 级别(游戏 enemyLevel):normal 普通 · elite 精英(橙色条)· boss 领袖(红色条);级别字总会写出来,不只靠色条 */
|
|
8
|
+
variant?: EnemyRank;
|
|
9
|
+
/** 头像地址(方图,裁成 64px 圆);不写时是深色空圆 */
|
|
10
|
+
src?: string;
|
|
11
|
+
/** 威胁度:点亮几枚菱形 */
|
|
12
|
+
level?: number;
|
|
13
|
+
/** 菱形总数 */
|
|
14
|
+
levelMax?: number;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_Slots = {
|
|
17
|
+
/** 名字 / 威胁度下面追加的内容(属性、能力摘要) */
|
|
18
|
+
default?: () => unknown;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
code: string;
|
|
22
|
+
variant: EnemyRank;
|
|
23
|
+
level: number;
|
|
24
|
+
src: string;
|
|
25
|
+
levelMax: number;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 截止时刻(ISO 串 / 时间戳 / Date),按当前时间实时倒数——活动、卡池、周常刷新都用它 */
|
|
3
|
+
until?: string | number | Date;
|
|
4
|
+
/** 或者给剩余毫秒数,从挂载时起倒数(同 Naive 的 NCountdown);有 until 时忽略 */
|
|
5
|
+
duration?: number;
|
|
6
|
+
/** 是否走字;false 时停在当前读数(duration 模式下恢复后接着倒数) */
|
|
7
|
+
active?: boolean;
|
|
8
|
+
/** 最小单位:min 到分(默认,每分钟刷新)· sec 到秒 */
|
|
9
|
+
precision?: "min" | "sec";
|
|
10
|
+
/** 最多显示几格,从最大的单位数起:2 → 「03 days 14 hrs」/ 不足一天时「14 hrs 27 min」(首页幻灯片);不写则一直显示到 precision */
|
|
11
|
+
parts?: number;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
finish: () => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onFinish?: (() => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
duration: number;
|
|
19
|
+
active: boolean;
|
|
20
|
+
until: string | number | Date;
|
|
21
|
+
precision: "min" | "sec";
|
|
22
|
+
parts: number;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 活动名 */
|
|
3
|
+
title: string;
|
|
4
|
+
/** 标题上方的类型行(Side Story · 进行中 / 寻访 · 已结束),强调色、大写字距 */
|
|
5
|
+
kind?: string;
|
|
6
|
+
/** 起止时间(2026.08.08 16:00 — 09.07 03:59) */
|
|
7
|
+
time?: string;
|
|
8
|
+
/** 横幅图地址(21:9 裁切铺满);不写且没有 #cover 插槽时不出横幅 */
|
|
9
|
+
cover?: string;
|
|
10
|
+
/** 状态:live 进行中(类型行前闪烁红点)· ended 已结束(类型行转灰)· default 不标 */
|
|
11
|
+
status?: "default" | "live" | "ended";
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = {
|
|
14
|
+
/** 横幅(代替 cover):自己放 .ak-event__banner 元素 */
|
|
15
|
+
cover?: () => unknown;
|
|
16
|
+
/** 标题(代替 title,如包一层链接) */
|
|
17
|
+
title?: () => unknown;
|
|
18
|
+
/** 时间下面的内容:倒计时 AkCountdown、按钮 */
|
|
19
|
+
default?: () => unknown;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
22
|
+
time: string;
|
|
23
|
+
cover: string;
|
|
24
|
+
status: "default" | "live" | "ended";
|
|
25
|
+
kind: string;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { IconName } from "../../icons";
|
|
2
|
+
/**
|
|
3
|
+
* 回到顶部(= Naive 的 NBackTop;CSS 叫 FAB / .ak-fab):右下角 44px 反色方块,滚过 visibility-height 淡入,点了平滑滚回顶部。
|
|
4
|
+
* 整页那枚由皮肤输出(skin.js 同样 600px 出现),而且 < 1400 时皮肤把它收进目录浮层——Vue 版主要给「页面里某个滚动区域」用:
|
|
5
|
+
* position="absolute" + listen-to 指向那个容器。隐藏时 inert:不可点、不进 Tab 顺序、读屏读不到。
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
/** 可访问名(aria-label,同时作 title) */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** 图标 */
|
|
11
|
+
icon?: IconName;
|
|
12
|
+
/** 滚动超过多少 px 出现(同 Naive 的 visibility-height);false = 不看滚动,显隐完全由 v-model 定 */
|
|
13
|
+
visibilityHeight?: number | false;
|
|
14
|
+
/** 监听、并滚回顶部的滚动容器(元素或选择器);不写 = 整页。模板 ref 还没就绪(null)时先不监听 */
|
|
15
|
+
listenTo?: HTMLElement | string | null;
|
|
16
|
+
/** 定位:fixed 贴视口右下(默认,整页一枚)· absolute 贴最近的定位祖先右下(配合 listen-to 给页面里的滚动区域) */
|
|
17
|
+
position?: "fixed" | "absolute";
|
|
18
|
+
};
|
|
19
|
+
type __VLS_ModelProps = {
|
|
20
|
+
/** 是否显示;visibility-height 是数字时组件按滚动距离自己更新它 */
|
|
21
|
+
modelValue?: boolean;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
24
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
"update:modelValue": (value: boolean) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
label: string;
|
|
30
|
+
icon: IconName;
|
|
31
|
+
visibilityHeight: number | false;
|
|
32
|
+
listenTo: HTMLElement | string | null;
|
|
33
|
+
position: "fixed" | "absolute";
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ValidationStatus } from "./context";
|
|
2
|
+
/** 表单字段:标签 + 控件 + 说明 / 校验文案(同 Naive 的 NFormItem)。字段里的 AkInput / AkSelect … 自动拿到 id、aria-describedby、aria-invalid */
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
/** 标签文字:渲染成 <label for>,指向字段里的第一个控件(= 控件的可访问名);复选组 / 单选组改由组 aria-labelledby 指向它 */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** 必填:标签后出红色 *(读屏不念,控件自己带 required) */
|
|
7
|
+
required?: boolean;
|
|
8
|
+
/** 说明或校验文案(.ak-help),经 aria-describedby 关联到控件;validation-status="error" 时是红字 */
|
|
9
|
+
feedback?: string;
|
|
10
|
+
/** 校验状态(同 Naive 的 validation-status):error = 红边 + 红字文案 + aria-invalid · success = 绿边 */
|
|
11
|
+
validationStatus?: ValidationStatus;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = {
|
|
14
|
+
/** 控件;自己写的原生控件用插槽参数里的 id 对上标签 */
|
|
15
|
+
default?: (props: {
|
|
16
|
+
id: string;
|
|
17
|
+
}) => unknown;
|
|
18
|
+
/** 标签内容(代替 label,要放链接 / 图标时用) */
|
|
19
|
+
label?: () => unknown;
|
|
20
|
+
/** 说明 / 校验文案(代替 feedback) */
|
|
21
|
+
feedback?: () => unknown;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
|
+
label: string;
|
|
25
|
+
feedback: string;
|
|
26
|
+
validationStatus: ValidationStatus;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type InjectionKey } from "vue";
|
|
2
|
+
/** 校验状态(同 Naive 的 FormValidationStatus,只有 CSS 画得出来的两种) */
|
|
3
|
+
export type ValidationStatus = "error" | "success";
|
|
4
|
+
/** AkField 给字段里控件的状态(响应式对象) */
|
|
5
|
+
export interface FieldContext {
|
|
6
|
+
/** 控件 id:<label for> 指向它 */
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly labelId: string;
|
|
9
|
+
readonly helpId: string;
|
|
10
|
+
readonly hasLabel: boolean;
|
|
11
|
+
readonly hasHelp: boolean;
|
|
12
|
+
readonly status: ValidationStatus | undefined;
|
|
13
|
+
readonly required: boolean;
|
|
14
|
+
/** 谁占着标签:第一个挂上来的控件(label for 指向它)· 组(复选组 / 单选组:label 不写 for,组用 aria-labelledby)· null 还没有 */
|
|
15
|
+
owner: "control" | "group" | null;
|
|
16
|
+
}
|
|
17
|
+
export declare const fieldKey: InjectionKey<FieldContext | null>;
|
|
18
|
+
/**
|
|
19
|
+
* 控件接入 AkField(同 Naive 表单项与控件之间的 formItem 注入):返回要绑到原生控件上的 id / aria-labelledby / aria-describedby,
|
|
20
|
+
* 以及字段的校验状态、必填。不在字段里时 attrs 为空。
|
|
21
|
+
* 一个字段只有第一个控件拿 id;kind = "group" 的复选组 / 单选组改用 aria-labelledby,并把组里的选项与字段隔开(它们不再各自认字段)。
|
|
22
|
+
*/
|
|
23
|
+
export declare function useField(kind?: "control" | "group"): {
|
|
24
|
+
attrs: import("vue").ComputedRef<{
|
|
25
|
+
id: string | undefined;
|
|
26
|
+
"aria-labelledby": string | undefined;
|
|
27
|
+
"aria-describedby": string | undefined;
|
|
28
|
+
} | {
|
|
29
|
+
id?: undefined;
|
|
30
|
+
"aria-labelledby"?: undefined;
|
|
31
|
+
"aria-describedby"?: undefined;
|
|
32
|
+
}>;
|
|
33
|
+
status: import("vue").ComputedRef<ValidationStatus | undefined>;
|
|
34
|
+
required: import("vue").ComputedRef<boolean>;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 外面包了一层 <label> / <div> 的控件(勾选、开关、步进器、搜索框):class / style 给外层,其余属性(name、autocomplete、@focus …)给原生控件。
|
|
38
|
+
* 配合 defineOptions({ inheritAttrs: false })。
|
|
39
|
+
*/
|
|
40
|
+
export declare function useSplitAttrs(): {
|
|
41
|
+
root: import("vue").ComputedRef<{
|
|
42
|
+
class: import("vue").ClassValue;
|
|
43
|
+
style: import("vue").StyleValue;
|
|
44
|
+
}>;
|
|
45
|
+
control: import("vue").ComputedRef<{
|
|
46
|
+
[x: string]: unknown;
|
|
47
|
+
}>;
|
|
48
|
+
};
|