@yh-ui/yh-ui-skill 1.0.59 β 1.0.61
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/assets/metadata.json
CHANGED
|
@@ -1,137 +1,113 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yh-ui
|
|
3
|
-
description:
|
|
3
|
+
description: Industry-grade agent skill for YH-UI, a Vue 3.5+ enterprise-class component system. Use this skill when building or refactoring admin dashboards, interactive data tables, dynamic form schemas, visual flow editors, AI chat portals (featuring thinking chains and code execution), dark mode theme plugins, multi-language localization boundaries, and custom on-demand icon loaders. It forces 100% boundary alignment, strict anti-hallucination checks, and component-first design.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# YH-UI Agent Skill
|
|
6
|
+
# YH-UI AI Agent Skill & Coding Rules
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
You are a Senior Frontend Architect specializing in YH-UI Vue 3.5+ and Nuxt 3 development. This document defines the ultimate standards for generating, refactoring, and verifying code within the YH-UI ecosystem.
|
|
9
|
+
|
|
10
|
+
---
|
|
9
11
|
|
|
10
12
|
## When To Use
|
|
11
13
|
|
|
12
|
-
Use this skill for:
|
|
14
|
+
Use this skill for any task involving:
|
|
13
15
|
|
|
14
|
-
- Vue 3 or
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- Improving YH-UI code so it follows modern Vue 3 component-library practices.
|
|
16
|
+
- **UI Code Generation**: Building Vue 3/Nuxt views, widgets, or full pages utilizing YH-UI components.
|
|
17
|
+
- **Sub-Package Integration**: Managing asynchronous data states (`@yh-ui/request`), dynamic layouts/flows (`@yh-ui/flow`), AI features (`@yh-ui/ai-sdk`), global theme systems (`@yh-ui/theme`), or multi-language configurations (`@yh-ui/locale`).
|
|
18
|
+
- **Debugging & Code Review**: Rectifying compile-time errors, TypeScript type mismatches, hydration mismatches, memory leaks, or hallucinated component APIs.
|
|
19
|
+
- **Performance Audits**: Virtualizing lists, cleaning up active timers/observers on component unmount, and caching request resources.
|
|
19
20
|
|
|
20
21
|
Do not use this skill for:
|
|
21
22
|
|
|
22
|
-
- Non-Vue
|
|
23
|
-
-
|
|
24
|
-
|
|
23
|
+
- Non-Vue applications or vanilla JS projects.
|
|
24
|
+
- Unrelated backend operations that do not leverage YH-UI server utilities (such as `@yh-ui/ai-sdk` server tools/moderators or `@yh-ui/request` HTTP proxies).
|
|
25
|
+
|
|
26
|
+
---
|
|
25
27
|
|
|
26
28
|
## Core Rules
|
|
27
29
|
|
|
28
30
|
> [!IMPORTANT]
|
|
29
31
|
> **π« The Absolute Anti-Hallucination Standard (第δΈεε)**
|
|
30
32
|
> **DO NOT invent or guess any properties, events, slots, methods, CSS selectors, theme presets, locale files, sub-components, or package names.**
|
|
31
|
-
> All code
|
|
33
|
+
> All generated code **MUST align 100%** with the actual source code definitions in this repository (refer to `references/source-truth.md` for extracted AST data) and the official component library documentation (`https://1079161148.github.io/yh-ui/`).
|
|
32
34
|
> If a property, method, or event is not defined in the source code or documented in the official site, you **must not** guess it. Doing so will directly crash compiler or runtime systems and is strictly forbidden.
|
|
33
35
|
|
|
34
|
-
- **
|
|
36
|
+
- **Component-First & Sub-Package-First Priority**: Under no circumstances should you generate custom HTML/CSS controls (e.g., custom buttons, inputs, tables, dialogs, drawers, scrollbars, markdown cards) or manually construct network fetches/stream connections when YH-UI packages support them. You must 100% prioritize utilizing YH-UI components and utilities.
|
|
35
37
|
- **Extension & Re-encapsulation Principle**: If a YH-UI component does not fully meet a specific UI requirement, you must first try to extend it using slot customization, CSS overrides, or component composition. Writing custom elements from scratch is a last resort, and you must justify why YH-UI could not be extended.
|
|
36
|
-
- **On-Demand Loading (ζιε θ½½) by Default**:
|
|
37
|
-
-
|
|
38
|
+
- **On-Demand Loading (ζιε θ½½) by Default**: Import components and utility functions directly from their specialized sub-packages to optimize bundle size:
|
|
39
|
+
- Components & Styles:
|
|
38
40
|
```ts
|
|
39
41
|
import { YhButton, YhTable } from '@yh-ui/components'
|
|
40
42
|
import '@yh-ui/components/style.css'
|
|
41
43
|
```
|
|
42
|
-
-
|
|
44
|
+
- Icons:
|
|
43
45
|
```ts
|
|
44
46
|
import { Icon } from '@yh-ui/icons/vue'
|
|
45
47
|
```
|
|
46
|
-
- **Language Defaults (TypeScript & SCSS
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
- Use `@yh-ui/components` when the user asks for component-only usage.
|
|
50
|
-
- Use `@yh-ui/request` for request state, SSE, pagination, queues, GraphQL, WebSocket, or HTTP cache helpers.
|
|
51
|
-
- Use `@yh-ui/flow` for flow charts, node editors, BPMN sketches, or AI workflow diagrams.
|
|
52
|
-
- Use `@yh-ui/ai-sdk` with `@yh-ui/components` for AI chat, streaming, tools, and provider adapters.
|
|
53
|
-
- Use `@yh-ui/theme` tokens and CSS variables instead of hard-coded visual systems.
|
|
54
|
-
- Keep model API keys on the server. Never put provider secrets in browser code.
|
|
55
|
-
- In SSR/Nuxt, wrap browser-heavy flow editors in `<ClientOnly>`.
|
|
56
|
-
|
|
57
|
-
### Component-Level Best Practices & Source Alignment
|
|
58
|
-
|
|
59
|
-
Below are the detailed rules and best practices for core YH-UI components. Refer to `references/source-truth.md` for the complete API surface of all priority components.
|
|
48
|
+
- **Language Defaults (TypeScript & SCSS)**: By default, Vue SFC files and code snippets must declare TypeScript (`lang="ts"`) for script blocks and SCSS/Sass (`lang="scss"`) for style blocks.
|
|
49
|
+
- **SSR & Hydration Safeguards**: Wrap heavy browser-specific elements (like `@yh-ui/flow` canvases, Monaco editors, or visual charts) in `<ClientOnly>` tags in SSR environments to avoid canvas initialization/ResizeObserver crashes on server builds.
|
|
50
|
+
- **No Secrets in Frontend Code**: Never expose LLM provider API keys, server tokens, or private environment variables on the client side. Wrap them inside server-side routes or providers.
|
|
60
51
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- **Column Setup**: Bind column configurations via the `columns` property as a stable array (computed or constant). Do not write raw loop markups inside the component unless using column-slot extensions.
|
|
64
|
-
- **Feature Integration**: Use built-in properties like `pagination`, `resizable`, `loading`, `border` directly.
|
|
65
|
-
- **Exposed Methods**: Use typed refs (`InstanceType<typeof YhTable>`) to invoke functions like `exportData`, `importData`, `insertRow`, `removeRow`, `scrollTo`, and `clearSelection`. Do not guess names (e.g., do not write `.getSelectedRows()` if the source exposes `.getSelectionRows()`).
|
|
66
|
-
- **Events**: Handle events like `selection-change`, `page-change`, `row-click`, `sort-change`, `update:data` exactly as defined.
|
|
52
|
+
---
|
|
67
53
|
|
|
68
|
-
|
|
54
|
+
## Agent Workflow
|
|
69
55
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
56
|
+
To ensure high-fidelity outputs, follow this strict task execution lifecycle:
|
|
57
|
+
|
|
58
|
+
```mermaid
|
|
59
|
+
graph TD
|
|
60
|
+
A[Receive User Request] --> B{Identify Scope}
|
|
61
|
+
B -->|Vue/Nuxt View| C[Check component-map.md]
|
|
62
|
+
B -->|AI Features| D[Check references/recipes-ai.md]
|
|
63
|
+
B -->|Flow Canvas| E[Check references/recipes-flow.md]
|
|
64
|
+
B -->|Data/Requests| F[Check references/recipes-table.md]
|
|
65
|
+
C & D & E & F --> G[Verify APIs in references/source-truth.md]
|
|
66
|
+
G --> H[Apply vue-component-practices.md Rules]
|
|
67
|
+
H --> I[Generate SFC & Logic]
|
|
68
|
+
I --> J[Check Against codegen-rubric.md]
|
|
69
|
+
J --> K[Return Response]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
1. **Classify the Scope**: Categorize the task (e.g. Admin screen, AI Chatbot, Flow builder, Theme preset switcher, Custom form, Nuxt plugin).
|
|
73
|
+
2. **Consult Source Truth**: Open and inspect `references/source-truth.md` and `references/api-cheatsheet.md` to retrieve exact property lists, event signatures, and exposed methods of the target components.
|
|
74
|
+
3. **Select the Scenario Guide**: Load the specialized recipe file (e.g. `recipes-table.md` for grids, `recipes-ai.md` for chats, `recipes-flow.md` for canvas, etc.) and copy its design patterns as a starting boilerplate.
|
|
75
|
+
4. **Enforce Vue Evolved Standards**: Follow `references/vue-component-practices.md` to implement script structures, reactive prop defaults, slot options, keyboard accessibility, and scoped SCSS.
|
|
76
|
+
5. **Self-Correct & Verify**: Crosscheck your generated code against the accept/reject rules in `references/codegen-rubric.md` before returning your answer.
|
|
73
77
|
|
|
74
|
-
|
|
78
|
+
---
|
|
75
79
|
|
|
76
|
-
|
|
77
|
-
- **Sender Layout (`YhAiSender`)**: Bind `v-model` for input and listen to `@send`, `@upload`, and `@command` events. Custom action icons should be placed inside `#actions` or `#submit` slots.
|
|
78
|
-
- **Bubble Layout (`YhAiBubble`)**: Use `citations` array to display reference sources, and handle citation click logic. Ensure `role` (`'user'` or `'assistant'`), `streaming`, and `loading` are properly set.
|
|
79
|
-
- **Thought Chain (`YhAiThoughtChain`)**: Feed structured steps into the `items` property. Bind `@node-click` to let users view step details.
|
|
80
|
+
## Progressive References
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
Read only the reference files required for the task to keep the context context-efficient:
|
|
83
|
+
|
|
84
|
+
- **Source-Truth API Mapping**: [source-truth.md](references/source-truth.md) - Exact list of component exports, props, emits, and slots.
|
|
85
|
+
- **AI Task Workflow**: [agent-workflows.md](references/agent-workflows.md) - Workflow routing criteria for AI coding agents.
|
|
86
|
+
- **Vue SFC Standards**: [vue-component-practices.md](references/vue-component-practices.md) - Vue 3.5+ destructuring defaults, ref models, performance structures.
|
|
87
|
+
- **Component Selection Chart**: [component-map.md](references/component-map.md) - Scenario-to-component lookup map.
|
|
88
|
+
- **Implementation Boilerplates**: [usage-patterns.md](references/usage-patterns.md) - Baseline snippets for dialogs, forms, and custom CSS.
|
|
89
|
+
- **Cheatsheet Reference**: [api-cheatsheet.md](references/api-cheatsheet.md) - Most common props, events, and sub-package setups.
|
|
90
|
+
- **Nuxt & SSR Integration**: [nuxt.md](references/nuxt.md) - Module setup, client-only triggers, and SSR-safe variables.
|
|
91
|
+
- **Deep Recipe: Data Tables**: [recipes-table.md](references/recipes-table.md) - Advanced `YhTable` features: print, Excel export, custom cell slots.
|
|
92
|
+
- **Deep Recipe: Form Schema**: [recipes-form-schema.md](references/recipes-form-schema.md) - Configuration-driven forms, repeating sub-forms, conditional fields.
|
|
93
|
+
- **Deep Recipe: AI Portals**: [recipes-ai.md](references/recipes-ai.md) - Chat interfaces, reasoning log viewers, code executors, Mermaid diagrams.
|
|
94
|
+
- **Deep Recipe: Flow Canvas**: [recipes-flow.md](references/recipes-flow.md) - Workflow editors, resizers, custom node toolbars, undo/redo logs.
|
|
95
|
+
- **Deep Recipe: Theme Systems**: [recipes-theme.md](references/recipes-theme.md) - Custom theme plugins, WCAG contrast verification, responsive scaling.
|
|
96
|
+
- **Deep Recipe: Iconography**: [recipes-icons.md](references/recipes-icons.md) - Iconify sets, inline SVG rendering.
|
|
97
|
+
- **Code Acceptance Rubric**: [codegen-rubric.md](references/codegen-rubric.md) - Strict Accept/Reject checklist for checking code generation.
|
|
98
|
+
- **Evaluation Scenarios**: [eval-scenarios.md](references/eval-scenarios.md) - AI system prompts for verifying the skill itself.
|
|
82
99
|
|
|
83
|
-
|
|
84
|
-
- **Canvas Extensions**: Place `Minimap`, `Controls`, and `FlowBackground` inside the `Flow` template body.
|
|
85
|
-
- **Gating in SSR**: Wrap the `Flow` component inside `<ClientOnly>` in SSR environments (such as Nuxt) to avoid canvas/ResizeObserver errors during server builds.
|
|
100
|
+
---
|
|
86
101
|
|
|
87
|
-
|
|
102
|
+
## Common Failure Guards
|
|
88
103
|
|
|
89
|
-
- **
|
|
90
|
-
- **
|
|
91
|
-
- **Locale Files**: Import locale languages using lowercase paths:
|
|
104
|
+
- **No Obsolete Theme / Request APIs**: Never use legacy `createYhTheme` or `createRequestInstance`. Use `@yh-ui/theme`'s `ThemePlugin` and `@yh-ui/request`'s `createRequest`.
|
|
105
|
+
- **Locale Path Syntax**: Always load locale translations using lowercase paths:
|
|
92
106
|
```ts
|
|
93
107
|
import zhCn from '@yh-ui/locale/lang/zh-cn'
|
|
94
108
|
import en from '@yh-ui/locale/lang/en'
|
|
95
109
|
```
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
2. Read `references/source-truth.md` when component/package accuracy matters.
|
|
101
|
-
3. Read only the specialized reference needed for the classified task.
|
|
102
|
-
4. Apply `references/vue-component-practices.md` for SFC structure, TypeScript, props/emits, slots, accessibility, SSR, and performance.
|
|
103
|
-
5. Generate code with real package imports and YH-UI components.
|
|
104
|
-
6. Check the result against `references/codegen-rubric.md` before answering.
|
|
105
|
-
|
|
106
|
-
## Progressive References
|
|
107
|
-
|
|
108
|
-
Read only the file needed for the task:
|
|
109
|
-
|
|
110
|
-
- Source-aligned exports and package boundaries: `references/source-truth.md`
|
|
111
|
-
- Agent task workflows: `references/agent-workflows.md`
|
|
112
|
-
- Vue component-library practices: `references/vue-component-practices.md`
|
|
113
|
-
- Component selection: `references/component-map.md`
|
|
114
|
-
- Common implementation patterns: `references/usage-patterns.md`
|
|
115
|
-
- Frequently used props/events: `references/api-cheatsheet.md`
|
|
116
|
-
- Nuxt auto-import and SSR: `references/nuxt.md`
|
|
117
|
-
- AI components and AI SDK: `references/ai-components.md`
|
|
118
|
-
- Request hooks: `references/request.md`
|
|
119
|
-
- Flow editor: `references/flow.md`
|
|
120
|
-
- Deep table recipe: `references/recipes-table.md`
|
|
121
|
-
- Deep form schema recipe: `references/recipes-form-schema.md`
|
|
122
|
-
- Deep AI recipe: `references/recipes-ai.md`
|
|
123
|
-
- Deep Flow recipe: `references/recipes-flow.md`
|
|
124
|
-
- Deep Theme recipe: `references/recipes-theme.md`
|
|
125
|
-
- Deep Icons recipe: `references/recipes-icons.md`
|
|
126
|
-
- Code generation acceptance rubric: `references/codegen-rubric.md`
|
|
127
|
-
- Evaluation prompts for regression testing: `references/eval-scenarios.md`
|
|
128
|
-
|
|
129
|
-
## Common Failure Guards
|
|
130
|
-
|
|
131
|
-
- Do not use old or non-existing APIs such as `createYhTheme` or `createRequestInstance`.
|
|
132
|
-
- Locale files use paths like `@yh-ui/locale/lang/zh-cn`.
|
|
133
|
-
- Nuxt users should not manually import every component in ordinary pages.
|
|
134
|
-
- Flow canvases need an explicit height.
|
|
135
|
-
- Prefer `YhConfigProvider` for runtime locale/config boundaries.
|
|
136
|
-
- Prefer theme CSS variables such as `var(--yh-color-primary)` in custom styles.
|
|
137
|
-
- If unsure whether a component exists, check `references/source-truth.md` before generating code.
|
|
110
|
+
Never write `@yh-ui/yh-ui/locale/zh-CN` or `@yh-ui/yh-ui/locale/zh-cn`.
|
|
111
|
+
- **Explicit Height Constraint**: Always set an explicit height on the parent container of `Flow` or `YhScrollbar` components (e.g. `height: 600px`). Otherwise, canvas or scroll calculations collapse.
|
|
112
|
+
- **Shallow Ref for Heavy Runtimes**: Always store heavy objects like Monaco editors, ECharts instances, or Flow canvas objects in `shallowRef()` instead of `ref()` to preserve performance.
|
|
113
|
+
- **Component Expose Checks**: When calling component functions via template refs, type them as `InstanceType<typeof Component>` and use exact names (e.g. `tableRef.value.getSelectionRows()` instead of `tableRef.value.getSelected()`).
|
|
@@ -82,7 +82,7 @@ Expose: `clear`, `reset`, `run`, `stop`
|
|
|
82
82
|
|
|
83
83
|
### YhAiFileCard
|
|
84
84
|
|
|
85
|
-
Props: `audioProps`, `byte`, `description`, `icon`, `imageProps`, `loading`, `mask`, `name`, `size`, `src`, `themeOverrides`, `type`, `videoProps`
|
|
85
|
+
Props: `audioProps`, `byte`, `description`, `extension`, `icon`, `imageProps`, `items`, `loading`, `mask`, `name`, `onClick`, `onRemove`, `overflow`, `removable`, `size`, `src`, `themeOverrides`, `type`, `videoProps`
|
|
86
86
|
Emits: `click`
|
|
87
87
|
Slots: `default`
|
|
88
88
|
Expose: None detected
|
|
@@ -115,6 +115,69 @@ Emits: `node-add`, `node-click`, `node-delete`, `reorder`, `update:items`
|
|
|
115
115
|
Slots: `default`
|
|
116
116
|
Expose: None detected
|
|
117
117
|
|
|
118
|
+
### YhButton
|
|
119
|
+
|
|
120
|
+
Props: `autofocus`, `block`, `circle`, `color`, `disabled`, `icon`, `iconPosition`, `link`, `loading`, `nativeType`, `plain`, `round`, `size`, `suffixIcon`, `tag`, `text`, `themeOverrides`, `type`
|
|
121
|
+
Emits: None detected
|
|
122
|
+
Slots: `default`, `icon`, `loading`, `suffixIcon`
|
|
123
|
+
Expose: `disabled`, `ref`, `size`, `type`
|
|
124
|
+
|
|
125
|
+
### YhCategoryNav
|
|
126
|
+
|
|
127
|
+
Props: `anchor`, `categories`, `columns`, `loading`, `modelValue`, `showAll`, `sideWidth`, `subImageSize`, `subValue`, `themeOverrides`
|
|
128
|
+
Emits: `categoryClick`, `subCategoryClick`, `update:modelValue`, `update:subValue`
|
|
129
|
+
Slots: `all-icon`, `default`, `footer`, `header`, `section-footer`, `section-header`, `sub-item`
|
|
130
|
+
Expose: None detected
|
|
131
|
+
|
|
132
|
+
### YhConfigProvider
|
|
133
|
+
|
|
134
|
+
Props: `global`, `locale`, `message`, `size`, `theme`, `zIndex`
|
|
135
|
+
Emits: None detected
|
|
136
|
+
Slots: `default`
|
|
137
|
+
Expose: None detected
|
|
138
|
+
|
|
139
|
+
### YhCouponCard
|
|
140
|
+
|
|
141
|
+
Props: `actionText`, `amount`, `badge`, `badgeType`, `description`, `disabled`, `percent`, `percentText`, `ruleTitle`, `rules`, `selectable`, `selected`, `status`, `symbol`, `themeOverrides`, `threshold`, `title`, `validPeriod`, `variant`
|
|
142
|
+
Emits: `action`, `click`, `update:selected`
|
|
143
|
+
Slots: `action`, `badge`, `default`, `description`, `rules`, `seal`, `title`
|
|
144
|
+
Expose: None detected
|
|
145
|
+
|
|
146
|
+
### YhDatePicker
|
|
147
|
+
|
|
148
|
+
Props: `cellRender`, `cellShape`, `clearIcon`, `clearable`, `dateFormat`, `defaultTime`, `defaultValue`, `disabled`, `disabledDate`, `endPlaceholder`, `firstDayOfWeek`, `format`, `id`, `modelValue`, `name`, `orderOnConfirm`, `panelOnly`, `placeholder`, `popperClass`, `prefixIcon`, `presetPosition`, `presets`, `rangeSeparator`, `readonly`, `showFooter`, `size`, `startPlaceholder`, `status`, `teleported`, `themeOverrides`, `timeFormat`, `type`
|
|
149
|
+
Emits: `blur`, `change`, `clear`, `confirm`, `focus`, `panel-change`, `update:modelValue`, `visible-change`
|
|
150
|
+
Slots: `clear-icon`, `date-cell`, `default`, `extra`, `footer`, `prefix-icon`
|
|
151
|
+
Expose: None detected
|
|
152
|
+
|
|
153
|
+
### YhDialog
|
|
154
|
+
|
|
155
|
+
Props: `action`, `actionClass`, `actionStyle`, `alignCenter`, `autoFocus`, `beforeClose`, `cancelText`, `center`, `closeIcon`, `closeOnClickModal`, `closeOnPressEscape`, `confirmText`, `content`, `contentAlign`, `contentClass`, `contentStyle`, `customClass`, `destroyOnClose`, `draggable`, `footerAlign`, `footerAlignCenter`, `fullscreen`, `glass`, `headerAlign`, `headerAlignCenter`, `loading`, `lockScroll`, `modal`, `modalClass`, `modelValue`, `overflow`, `showClose`
|
|
156
|
+
Emits: `cancel`, `close`, `closed`, `confirm`, `dragEnd`, `dragMove`, `dragStart`, `open`, `opened`, `update:modelValue`
|
|
157
|
+
Slots: `default`, `footer`, `header`, `title`
|
|
158
|
+
Expose: `dialogRef`, `handleCancel`, `handleClose`, `handleConfirm`, `visible`
|
|
159
|
+
|
|
160
|
+
### YhDrawer
|
|
161
|
+
|
|
162
|
+
Props: `beforeClose`, `closeIcon`, `closeOnClickModal`, `closeOnPressEscape`, `contentStyle`, `customClass`, `destroyOnClose`, `drawerStyle`, `footerStyle`, `glass`, `inner`, `lockScroll`, `maxSize`, `minSize`, `modal`, `modalClass`, `modelValue`, `placement`, `resizable`, `round`, `showClose`, `showFooter`, `showHeader`, `size`, `teleportTo`, `themeOverrides`, `title`, `titleStyle`, `zIndex`
|
|
163
|
+
Emits: `close`, `closed`, `open`, `opened`, `resize`, `update:modelValue`
|
|
164
|
+
Slots: `close-icon`, `default`, `footer`, `header`, `title`
|
|
165
|
+
Expose: `drawerRef`, `handleClose`
|
|
166
|
+
|
|
167
|
+
### YhFilterBar
|
|
168
|
+
|
|
169
|
+
Props: `filterInPanel`, `filterValue`, `filters`, `showAll`, `showGlobalFilter`, `showViewToggle`, `sort`, `sorts`, `sticky`, `stickyOffset`, `teleported`, `themeOverrides`, `viewType`
|
|
170
|
+
Emits: `confirm`, `filterChange`, `openFilter`, `reset`, `resetPanel`, `sortChange`, `update:filterValue`, `update:sort`, `update:viewType`, `viewChange`
|
|
171
|
+
Slots: `default`, `extra`, `filter`, `filter-icon`, `view-icon`
|
|
172
|
+
Expose: None detected
|
|
173
|
+
|
|
174
|
+
### YhForm
|
|
175
|
+
|
|
176
|
+
Props: `disabled`, `hideRequiredAsterisk`, `labelPosition`, `labelSuffix`, `labelWidth`, `layout`, `model`, `rules`, `scrollIntoViewOptions`, `scrollToError`, `scrollToErrorOffset`, `showMessage`, `size`, `statusIcon`, `themeOverrides`
|
|
177
|
+
Emits: `validate`
|
|
178
|
+
Slots: `default`
|
|
179
|
+
Expose: `clearValidate`, `resetFields`, `scrollToField`, `validate`
|
|
180
|
+
|
|
118
181
|
### YhFormSchema
|
|
119
182
|
|
|
120
183
|
Props: `formProps`, `gutter`, `modelValue`, `schema`
|
|
@@ -122,6 +185,83 @@ Emits: `change`, `submit`, `update:modelValue`, `validate`
|
|
|
122
185
|
Slots: `default`
|
|
123
186
|
Expose: `clearValidate`, `formRef`, `getModel`, `resetFields`, `scrollToField`, `setFieldValue`, `validate`
|
|
124
187
|
|
|
188
|
+
### YhGanttChart
|
|
189
|
+
|
|
190
|
+
Props: None detected
|
|
191
|
+
Emits: None detected
|
|
192
|
+
Slots: `default`, `table-cell`, `task-content`, `tooltip`
|
|
193
|
+
Expose: None detected
|
|
194
|
+
|
|
195
|
+
### YhInput
|
|
196
|
+
|
|
197
|
+
Props: `ariaLabel`, `autocomplete`, `autofocus`, `autosize`, `clearIcon`, `clearOnEscape`, `clearable`, `countConfig`, `disabled`, `form`, `formatter`, `id`, `inputStyle`, `inputmode`, `label`, `list`, `loading`, `maxlength`, `minlength`, `modelModifiers`, `modelValue`, `name`, `parser`, `placeholder`, `prefix`, `prefixIcon`, `readonly`, `resize`, `rows`, `selectOnFocus`, `showPassword`, `showWordLimit`
|
|
198
|
+
Emits: None detected
|
|
199
|
+
Slots: `append`, `clearIcon`, `default`, `loadingIcon`, `prefix`, `prepend`, `suffix`
|
|
200
|
+
Expose: `blur`, `clear`, `focus`, `ref`, `select`, `textLength`, `wrapperRef`
|
|
201
|
+
|
|
202
|
+
### YhLuckyDraw
|
|
203
|
+
|
|
204
|
+
Props: `actionText`, `duration`, `hideBtn`, `loading`, `prizes`, `rounds`, `size`, `targetId`, `themeOverrides`, `type`
|
|
205
|
+
Emits: `click`, `finish`, `start`
|
|
206
|
+
Slots: `action`, `default`, `prize`
|
|
207
|
+
Expose: None detected
|
|
208
|
+
|
|
209
|
+
### YhOption
|
|
210
|
+
|
|
211
|
+
Props: `allowCreate`, `clearable`, `collapseTags`, `collapseTagsTooltip`, `disabled`, `filterMethod`, `filterable`, `fitInputWidth`, `height`, `itemHeight`, `label`, `labelKey`, `loading`, `loadingText`, `maxCollapseTags`, `modelValue`, `multiple`, `multipleLimit`, `noDataText`, `noMatchText`, `options`, `placeholder`, `popperClass`, `remote`, `remoteMethod`, `size`, `tagType`, `teleported`, `themeOverrides`, `validateEvent`, `value`, `valueKey`
|
|
212
|
+
Emits: None detected
|
|
213
|
+
Slots: `default`, `empty`, `prefix`, `tag`
|
|
214
|
+
Expose: `blur`, `focus`, `inputRef`
|
|
215
|
+
|
|
216
|
+
### YhPagination
|
|
217
|
+
|
|
218
|
+
Props: `background`, `circle`, `currentPage`, `disabled`, `hideOnSinglePage`, `layout`, `nextText`, `pageSize`, `pageSizes`, `pagerCount`, `prevText`, `small`, `themeOverrides`, `total`
|
|
219
|
+
Emits: None detected
|
|
220
|
+
Slots: `default`, `next-icon`, `prev-icon`
|
|
221
|
+
Expose: `currentPage`, `pageCount`, `pageSize`
|
|
222
|
+
|
|
223
|
+
### YhPrice
|
|
224
|
+
|
|
225
|
+
Props: `animated`, `approx`, `bold`, `decimalScale`, `deleteLabel`, `deleteValue`, `gradient`, `lineThrough`, `maxValue`, `precision`, `prefix`, `size`, `split`, `suffix`, `symbol`, `symbolPosition`, `tag`, `tagType`, `themeOverrides`, `thousandth`, `unit`, `value`
|
|
226
|
+
Emits: None detected
|
|
227
|
+
Slots: `default`, `prefix`, `suffix`, `symbol`, `tag`, `unit`
|
|
228
|
+
Expose: None detected
|
|
229
|
+
|
|
230
|
+
### YhProductCard
|
|
231
|
+
|
|
232
|
+
Props: `actionLoading`, `actionText`, `badgePosition`, `badges`, `border`, `currency`, `description`, `descriptionLines`, `exposure`, `exposureOnce`, `exposureThreshold`, `hoverImage`, `image`, `layout`, `lazy`, `marketPrice`, `price`, `readonly`, `ribbon`, `ribbonColor`, `shadow`, `soldOut`, `stockColor`, `stockProgress`, `stockText`, `tag`, `tagType`, `themeOverrides`, `title`, `titleLines`, `unit`, `videoSrc`
|
|
233
|
+
Emits: `action`, `click`, `expose`
|
|
234
|
+
Slots: `description`, `footer`, `title`
|
|
235
|
+
Expose: None detected
|
|
236
|
+
|
|
237
|
+
### YhSelect
|
|
238
|
+
|
|
239
|
+
Props: `allowCreate`, `clearable`, `collapseTags`, `collapseTagsTooltip`, `disabled`, `filterMethod`, `filterable`, `fitInputWidth`, `height`, `itemHeight`, `label`, `labelKey`, `loading`, `loadingText`, `maxCollapseTags`, `modelValue`, `multiple`, `multipleLimit`, `noDataText`, `noMatchText`, `options`, `placeholder`, `popperClass`, `remote`, `remoteMethod`, `size`, `tagType`, `teleported`, `themeOverrides`, `validateEvent`, `value`, `valueKey`
|
|
240
|
+
Emits: None detected
|
|
241
|
+
Slots: `default`, `empty`, `option`, `prefix`, `tag`
|
|
242
|
+
Expose: `blur`, `focus`, `inputRef`
|
|
243
|
+
|
|
244
|
+
### YhSkuSelector
|
|
245
|
+
|
|
246
|
+
Props: `allowUnselect`, `checkStock`, `disabled`, `imageSize`, `modelValue`, `placeholder`, `showSelectedSummary`, `size`, `skus`, `specs`, `summaryPrefix`, `themeOverrides`
|
|
247
|
+
Emits: `change`, `select`, `update:modelValue`
|
|
248
|
+
Slots: `default`, `label`, `summary`, `value`
|
|
249
|
+
Expose: None detected
|
|
250
|
+
|
|
251
|
+
### YhSmartAddress
|
|
252
|
+
|
|
253
|
+
Props: `childrenField`, `detailPlaceholder`, `disabled`, `labelField`, `labelPlacement`, `modelValue`, `namePlaceholder`, `parseButtonText`, `parsePlaceholder`, `parser`, `phonePlaceholder`, `placeholder`, `regionOptions`, `regionType`, `required`, `showName`, `showParser`, `showPhone`, `showStreet`, `streetPlaceholder`, `themeOverrides`, `valueField`
|
|
254
|
+
Emits: `change`, `parsed`, `update:modelValue`
|
|
255
|
+
Slots: `default`, `extra`, `parse-icon`, `region`
|
|
256
|
+
Expose: None detected
|
|
257
|
+
|
|
258
|
+
### YhSubmitBar
|
|
259
|
+
|
|
260
|
+
Props: `buttonText`, `buttonType`, `centUnit`, `checked`, `currency`, `decimalLength`, `disabled`, `indeterminate`, `label`, `loading`, `price`, `safeAreaInsetBottom`, `selectedCount`, `showCheckbox`, `themeOverrides`, `tip`
|
|
261
|
+
Emits: `check-change`, `submit`, `update:checked`
|
|
262
|
+
Slots: `button`, `default`, `left`, `price`, `right`, `tip`
|
|
263
|
+
Expose: None detected
|
|
264
|
+
|
|
125
265
|
### YhTable
|
|
126
266
|
|
|
127
267
|
Props: `autoHeight`, `border`, `cellClassName`, `cellStyle`, `columns`, `contextMenuConfig`, `currentRowKey`, `data`, `dragConfig`, `emptyConfig`, `emptyText`, `expandConfig`, `filterConfig`, `fit`, `headerCellClassName`, `headerCellStyle`, `headerConfig`, `headerRowClassName`, `headerRowStyle`, `height`, `highlightCurrentRow`, `indexConfig`, `keepScroll`, `lazy`, `loadMethod`, `loading`, `maxHeight`, `pagination`, `resizable`, `rowClassName`, `rowConfig`, `rowKey`
|
|
@@ -129,6 +269,13 @@ Emits: `cell-click`, `cell-dblclick`, `column-resize`, `column-visible-change`,
|
|
|
129
269
|
Slots: `default`, `toolbar`, `toolbar-left`, `toolbar-left-prefix`, `toolbar-left-suffix`, `toolbar-right`, `toolbar-right-prefix`, `toolbar-right-suffix`
|
|
130
270
|
Expose: `clearFilter`, `clearSelection`, `clearSort`, `doLayout`, `exportData`, `filter`, `getColumns`, `getExpandedRowKeys`, `getSelectionRowKeys`, `getSelectionRows`, `getTableData`, `importData`, `importFile`, `insertRow`, `openImport`, `print`, `printMultiple`, `printTemplate`, `refresh`, `removeRow`, `resetColumns`, `scrollTo`, `setColumnVisible`, `setCurrentRow`
|
|
131
271
|
|
|
272
|
+
### YhUpload
|
|
273
|
+
|
|
274
|
+
Props: `accept`, `action`, `autoUpload`, `beforeRemove`, `beforeUpload`, `crossorigin`, `data`, `directory`, `disabled`, `drag`, `fileIcon`, `fileList`, `headers`, `httpRequest`, `limit`, `listType`, `maxSize`, `method`, `multiple`, `name`, `showDownload`, `showFileList`, `themeOverrides`, `thumbnailRequest`, `triggerPosition`, `withCredentials`
|
|
275
|
+
Emits: `change`, `download`, `error`, `exceed`, `preview`, `progress`, `remove`, `success`, `update:fileList`
|
|
276
|
+
Slots: `default`, `file`, `file-icon`, `tip`, `trigger`
|
|
277
|
+
Expose: `handleDownload`, `handleFiles`, `handlePreview`, `handleRemove`, `submit`, `triggerInput`
|
|
278
|
+
|
|
132
279
|
### Flow
|
|
133
280
|
|
|
134
281
|
Props: `nodes`, `edges`, `modelValue`, `minZoom`, `maxZoom`, `zoomStep`, `panZoomSpeed`, `defaultNodeType`, `defaultEdgeType`, `nodesDraggable`, `edgesConnectable`, `selectable`, `multiSelectKey`, `background`, `backgroundColor`, `gridSize`, `snapToGrid`, `snapGrid`, `readonly`, `keyboardShortcuts`, `showControls`, `showMinimap`, `minimapNodeColor`, `showAlignmentGuides`, `history`, `maxHistory`, `virtualized`, `virtualizationThreshold`, `isValidConnection`, `themeOverrides`
|
|
@@ -98,7 +98,7 @@ Expose: `clear`, `reset`, `run`, `stop`
|
|
|
98
98
|
|
|
99
99
|
### YhAiFileCard
|
|
100
100
|
|
|
101
|
-
Props: `audioProps`, `byte`, `description`, `icon`, `imageProps`, `loading`, `mask`, `name`, `size`, `src`, `themeOverrides`, `type`, `videoProps`
|
|
101
|
+
Props: `audioProps`, `byte`, `description`, `extension`, `icon`, `imageProps`, `items`, `loading`, `mask`, `name`, `onClick`, `onRemove`, `overflow`, `removable`, `size`, `src`, `themeOverrides`, `type`, `videoProps`
|
|
102
102
|
Emits: `click`
|
|
103
103
|
Slots: `default`
|
|
104
104
|
Expose: None detected
|
|
@@ -131,6 +131,69 @@ Emits: `node-add`, `node-click`, `node-delete`, `reorder`, `update:items`
|
|
|
131
131
|
Slots: `default`
|
|
132
132
|
Expose: None detected
|
|
133
133
|
|
|
134
|
+
### YhButton
|
|
135
|
+
|
|
136
|
+
Props: `autofocus`, `block`, `circle`, `color`, `disabled`, `icon`, `iconPosition`, `link`, `loading`, `nativeType`, `plain`, `round`, `size`, `suffixIcon`, `tag`, `text`, `themeOverrides`, `type`
|
|
137
|
+
Emits: None detected
|
|
138
|
+
Slots: `default`, `icon`, `loading`, `suffixIcon`
|
|
139
|
+
Expose: `disabled`, `ref`, `size`, `type`
|
|
140
|
+
|
|
141
|
+
### YhCategoryNav
|
|
142
|
+
|
|
143
|
+
Props: `anchor`, `categories`, `columns`, `loading`, `modelValue`, `showAll`, `sideWidth`, `subImageSize`, `subValue`, `themeOverrides`
|
|
144
|
+
Emits: `categoryClick`, `subCategoryClick`, `update:modelValue`, `update:subValue`
|
|
145
|
+
Slots: `all-icon`, `default`, `footer`, `header`, `section-footer`, `section-header`, `sub-item`
|
|
146
|
+
Expose: None detected
|
|
147
|
+
|
|
148
|
+
### YhConfigProvider
|
|
149
|
+
|
|
150
|
+
Props: `global`, `locale`, `message`, `size`, `theme`, `zIndex`
|
|
151
|
+
Emits: None detected
|
|
152
|
+
Slots: `default`
|
|
153
|
+
Expose: None detected
|
|
154
|
+
|
|
155
|
+
### YhCouponCard
|
|
156
|
+
|
|
157
|
+
Props: `actionText`, `amount`, `badge`, `badgeType`, `description`, `disabled`, `percent`, `percentText`, `ruleTitle`, `rules`, `selectable`, `selected`, `status`, `symbol`, `themeOverrides`, `threshold`, `title`, `validPeriod`, `variant`
|
|
158
|
+
Emits: `action`, `click`, `update:selected`
|
|
159
|
+
Slots: `action`, `badge`, `default`, `description`, `rules`, `seal`, `title`
|
|
160
|
+
Expose: None detected
|
|
161
|
+
|
|
162
|
+
### YhDatePicker
|
|
163
|
+
|
|
164
|
+
Props: `cellRender`, `cellShape`, `clearIcon`, `clearable`, `dateFormat`, `defaultTime`, `defaultValue`, `disabled`, `disabledDate`, `endPlaceholder`, `firstDayOfWeek`, `format`, `id`, `modelValue`, `name`, `orderOnConfirm`, `panelOnly`, `placeholder`, `popperClass`, `prefixIcon`, `presetPosition`, `presets`, `rangeSeparator`, `readonly`, `showFooter`, `size`, `startPlaceholder`, `status`, `teleported`, `themeOverrides`, `timeFormat`, `type`
|
|
165
|
+
Emits: `blur`, `change`, `clear`, `confirm`, `focus`, `panel-change`, `update:modelValue`, `visible-change`
|
|
166
|
+
Slots: `clear-icon`, `date-cell`, `default`, `extra`, `footer`, `prefix-icon`
|
|
167
|
+
Expose: None detected
|
|
168
|
+
|
|
169
|
+
### YhDialog
|
|
170
|
+
|
|
171
|
+
Props: `action`, `actionClass`, `actionStyle`, `alignCenter`, `autoFocus`, `beforeClose`, `cancelText`, `center`, `closeIcon`, `closeOnClickModal`, `closeOnPressEscape`, `confirmText`, `content`, `contentAlign`, `contentClass`, `contentStyle`, `customClass`, `destroyOnClose`, `draggable`, `footerAlign`, `footerAlignCenter`, `fullscreen`, `glass`, `headerAlign`, `headerAlignCenter`, `loading`, `lockScroll`, `modal`, `modalClass`, `modelValue`, `overflow`, `showClose`
|
|
172
|
+
Emits: `cancel`, `close`, `closed`, `confirm`, `dragEnd`, `dragMove`, `dragStart`, `open`, `opened`, `update:modelValue`
|
|
173
|
+
Slots: `default`, `footer`, `header`, `title`
|
|
174
|
+
Expose: `dialogRef`, `handleCancel`, `handleClose`, `handleConfirm`, `visible`
|
|
175
|
+
|
|
176
|
+
### YhDrawer
|
|
177
|
+
|
|
178
|
+
Props: `beforeClose`, `closeIcon`, `closeOnClickModal`, `closeOnPressEscape`, `contentStyle`, `customClass`, `destroyOnClose`, `drawerStyle`, `footerStyle`, `glass`, `inner`, `lockScroll`, `maxSize`, `minSize`, `modal`, `modalClass`, `modelValue`, `placement`, `resizable`, `round`, `showClose`, `showFooter`, `showHeader`, `size`, `teleportTo`, `themeOverrides`, `title`, `titleStyle`, `zIndex`
|
|
179
|
+
Emits: `close`, `closed`, `open`, `opened`, `resize`, `update:modelValue`
|
|
180
|
+
Slots: `close-icon`, `default`, `footer`, `header`, `title`
|
|
181
|
+
Expose: `drawerRef`, `handleClose`
|
|
182
|
+
|
|
183
|
+
### YhFilterBar
|
|
184
|
+
|
|
185
|
+
Props: `filterInPanel`, `filterValue`, `filters`, `showAll`, `showGlobalFilter`, `showViewToggle`, `sort`, `sorts`, `sticky`, `stickyOffset`, `teleported`, `themeOverrides`, `viewType`
|
|
186
|
+
Emits: `confirm`, `filterChange`, `openFilter`, `reset`, `resetPanel`, `sortChange`, `update:filterValue`, `update:sort`, `update:viewType`, `viewChange`
|
|
187
|
+
Slots: `default`, `extra`, `filter`, `filter-icon`, `view-icon`
|
|
188
|
+
Expose: None detected
|
|
189
|
+
|
|
190
|
+
### YhForm
|
|
191
|
+
|
|
192
|
+
Props: `disabled`, `hideRequiredAsterisk`, `labelPosition`, `labelSuffix`, `labelWidth`, `layout`, `model`, `rules`, `scrollIntoViewOptions`, `scrollToError`, `scrollToErrorOffset`, `showMessage`, `size`, `statusIcon`, `themeOverrides`
|
|
193
|
+
Emits: `validate`
|
|
194
|
+
Slots: `default`
|
|
195
|
+
Expose: `clearValidate`, `resetFields`, `scrollToField`, `validate`
|
|
196
|
+
|
|
134
197
|
### YhFormSchema
|
|
135
198
|
|
|
136
199
|
Props: `formProps`, `gutter`, `modelValue`, `schema`
|
|
@@ -138,6 +201,83 @@ Emits: `change`, `submit`, `update:modelValue`, `validate`
|
|
|
138
201
|
Slots: `default`
|
|
139
202
|
Expose: `clearValidate`, `formRef`, `getModel`, `resetFields`, `scrollToField`, `setFieldValue`, `validate`
|
|
140
203
|
|
|
204
|
+
### YhGanttChart
|
|
205
|
+
|
|
206
|
+
Props: None detected
|
|
207
|
+
Emits: None detected
|
|
208
|
+
Slots: `default`, `table-cell`, `task-content`, `tooltip`
|
|
209
|
+
Expose: None detected
|
|
210
|
+
|
|
211
|
+
### YhInput
|
|
212
|
+
|
|
213
|
+
Props: `ariaLabel`, `autocomplete`, `autofocus`, `autosize`, `clearIcon`, `clearOnEscape`, `clearable`, `countConfig`, `disabled`, `form`, `formatter`, `id`, `inputStyle`, `inputmode`, `label`, `list`, `loading`, `maxlength`, `minlength`, `modelModifiers`, `modelValue`, `name`, `parser`, `placeholder`, `prefix`, `prefixIcon`, `readonly`, `resize`, `rows`, `selectOnFocus`, `showPassword`, `showWordLimit`
|
|
214
|
+
Emits: None detected
|
|
215
|
+
Slots: `append`, `clearIcon`, `default`, `loadingIcon`, `prefix`, `prepend`, `suffix`
|
|
216
|
+
Expose: `blur`, `clear`, `focus`, `ref`, `select`, `textLength`, `wrapperRef`
|
|
217
|
+
|
|
218
|
+
### YhLuckyDraw
|
|
219
|
+
|
|
220
|
+
Props: `actionText`, `duration`, `hideBtn`, `loading`, `prizes`, `rounds`, `size`, `targetId`, `themeOverrides`, `type`
|
|
221
|
+
Emits: `click`, `finish`, `start`
|
|
222
|
+
Slots: `action`, `default`, `prize`
|
|
223
|
+
Expose: None detected
|
|
224
|
+
|
|
225
|
+
### YhOption
|
|
226
|
+
|
|
227
|
+
Props: `allowCreate`, `clearable`, `collapseTags`, `collapseTagsTooltip`, `disabled`, `filterMethod`, `filterable`, `fitInputWidth`, `height`, `itemHeight`, `label`, `labelKey`, `loading`, `loadingText`, `maxCollapseTags`, `modelValue`, `multiple`, `multipleLimit`, `noDataText`, `noMatchText`, `options`, `placeholder`, `popperClass`, `remote`, `remoteMethod`, `size`, `tagType`, `teleported`, `themeOverrides`, `validateEvent`, `value`, `valueKey`
|
|
228
|
+
Emits: None detected
|
|
229
|
+
Slots: `default`, `empty`, `prefix`, `tag`
|
|
230
|
+
Expose: `blur`, `focus`, `inputRef`
|
|
231
|
+
|
|
232
|
+
### YhPagination
|
|
233
|
+
|
|
234
|
+
Props: `background`, `circle`, `currentPage`, `disabled`, `hideOnSinglePage`, `layout`, `nextText`, `pageSize`, `pageSizes`, `pagerCount`, `prevText`, `small`, `themeOverrides`, `total`
|
|
235
|
+
Emits: None detected
|
|
236
|
+
Slots: `default`, `next-icon`, `prev-icon`
|
|
237
|
+
Expose: `currentPage`, `pageCount`, `pageSize`
|
|
238
|
+
|
|
239
|
+
### YhPrice
|
|
240
|
+
|
|
241
|
+
Props: `animated`, `approx`, `bold`, `decimalScale`, `deleteLabel`, `deleteValue`, `gradient`, `lineThrough`, `maxValue`, `precision`, `prefix`, `size`, `split`, `suffix`, `symbol`, `symbolPosition`, `tag`, `tagType`, `themeOverrides`, `thousandth`, `unit`, `value`
|
|
242
|
+
Emits: None detected
|
|
243
|
+
Slots: `default`, `prefix`, `suffix`, `symbol`, `tag`, `unit`
|
|
244
|
+
Expose: None detected
|
|
245
|
+
|
|
246
|
+
### YhProductCard
|
|
247
|
+
|
|
248
|
+
Props: `actionLoading`, `actionText`, `badgePosition`, `badges`, `border`, `currency`, `description`, `descriptionLines`, `exposure`, `exposureOnce`, `exposureThreshold`, `hoverImage`, `image`, `layout`, `lazy`, `marketPrice`, `price`, `readonly`, `ribbon`, `ribbonColor`, `shadow`, `soldOut`, `stockColor`, `stockProgress`, `stockText`, `tag`, `tagType`, `themeOverrides`, `title`, `titleLines`, `unit`, `videoSrc`
|
|
249
|
+
Emits: `action`, `click`, `expose`
|
|
250
|
+
Slots: `description`, `footer`, `title`
|
|
251
|
+
Expose: None detected
|
|
252
|
+
|
|
253
|
+
### YhSelect
|
|
254
|
+
|
|
255
|
+
Props: `allowCreate`, `clearable`, `collapseTags`, `collapseTagsTooltip`, `disabled`, `filterMethod`, `filterable`, `fitInputWidth`, `height`, `itemHeight`, `label`, `labelKey`, `loading`, `loadingText`, `maxCollapseTags`, `modelValue`, `multiple`, `multipleLimit`, `noDataText`, `noMatchText`, `options`, `placeholder`, `popperClass`, `remote`, `remoteMethod`, `size`, `tagType`, `teleported`, `themeOverrides`, `validateEvent`, `value`, `valueKey`
|
|
256
|
+
Emits: None detected
|
|
257
|
+
Slots: `default`, `empty`, `option`, `prefix`, `tag`
|
|
258
|
+
Expose: `blur`, `focus`, `inputRef`
|
|
259
|
+
|
|
260
|
+
### YhSkuSelector
|
|
261
|
+
|
|
262
|
+
Props: `allowUnselect`, `checkStock`, `disabled`, `imageSize`, `modelValue`, `placeholder`, `showSelectedSummary`, `size`, `skus`, `specs`, `summaryPrefix`, `themeOverrides`
|
|
263
|
+
Emits: `change`, `select`, `update:modelValue`
|
|
264
|
+
Slots: `default`, `label`, `summary`, `value`
|
|
265
|
+
Expose: None detected
|
|
266
|
+
|
|
267
|
+
### YhSmartAddress
|
|
268
|
+
|
|
269
|
+
Props: `childrenField`, `detailPlaceholder`, `disabled`, `labelField`, `labelPlacement`, `modelValue`, `namePlaceholder`, `parseButtonText`, `parsePlaceholder`, `parser`, `phonePlaceholder`, `placeholder`, `regionOptions`, `regionType`, `required`, `showName`, `showParser`, `showPhone`, `showStreet`, `streetPlaceholder`, `themeOverrides`, `valueField`
|
|
270
|
+
Emits: `change`, `parsed`, `update:modelValue`
|
|
271
|
+
Slots: `default`, `extra`, `parse-icon`, `region`
|
|
272
|
+
Expose: None detected
|
|
273
|
+
|
|
274
|
+
### YhSubmitBar
|
|
275
|
+
|
|
276
|
+
Props: `buttonText`, `buttonType`, `centUnit`, `checked`, `currency`, `decimalLength`, `disabled`, `indeterminate`, `label`, `loading`, `price`, `safeAreaInsetBottom`, `selectedCount`, `showCheckbox`, `themeOverrides`, `tip`
|
|
277
|
+
Emits: `check-change`, `submit`, `update:checked`
|
|
278
|
+
Slots: `button`, `default`, `left`, `price`, `right`, `tip`
|
|
279
|
+
Expose: None detected
|
|
280
|
+
|
|
141
281
|
### YhTable
|
|
142
282
|
|
|
143
283
|
Props: `autoHeight`, `border`, `cellClassName`, `cellStyle`, `columns`, `contextMenuConfig`, `currentRowKey`, `data`, `dragConfig`, `emptyConfig`, `emptyText`, `expandConfig`, `filterConfig`, `fit`, `headerCellClassName`, `headerCellStyle`, `headerConfig`, `headerRowClassName`, `headerRowStyle`, `height`, `highlightCurrentRow`, `indexConfig`, `keepScroll`, `lazy`, `loadMethod`, `loading`, `maxHeight`, `pagination`, `resizable`, `rowClassName`, `rowConfig`, `rowKey`
|
|
@@ -145,6 +285,13 @@ Emits: `cell-click`, `cell-dblclick`, `column-resize`, `column-visible-change`,
|
|
|
145
285
|
Slots: `default`, `toolbar`, `toolbar-left`, `toolbar-left-prefix`, `toolbar-left-suffix`, `toolbar-right`, `toolbar-right-prefix`, `toolbar-right-suffix`
|
|
146
286
|
Expose: `clearFilter`, `clearSelection`, `clearSort`, `doLayout`, `exportData`, `filter`, `getColumns`, `getExpandedRowKeys`, `getSelectionRowKeys`, `getSelectionRows`, `getTableData`, `importData`, `importFile`, `insertRow`, `openImport`, `print`, `printMultiple`, `printTemplate`, `refresh`, `removeRow`, `resetColumns`, `scrollTo`, `setColumnVisible`, `setCurrentRow`
|
|
147
287
|
|
|
288
|
+
### YhUpload
|
|
289
|
+
|
|
290
|
+
Props: `accept`, `action`, `autoUpload`, `beforeRemove`, `beforeUpload`, `crossorigin`, `data`, `directory`, `disabled`, `drag`, `fileIcon`, `fileList`, `headers`, `httpRequest`, `limit`, `listType`, `maxSize`, `method`, `multiple`, `name`, `showDownload`, `showFileList`, `themeOverrides`, `thumbnailRequest`, `triggerPosition`, `withCredentials`
|
|
291
|
+
Emits: `change`, `download`, `error`, `exceed`, `preview`, `progress`, `remove`, `success`, `update:fileList`
|
|
292
|
+
Slots: `default`, `file`, `file-icon`, `tip`, `trigger`
|
|
293
|
+
Expose: `handleDownload`, `handleFiles`, `handlePreview`, `handleRemove`, `submit`, `triggerInput`
|
|
294
|
+
|
|
148
295
|
## `@yh-ui/hooks` Exports
|
|
149
296
|
|
|
150
297
|
Use hooks from these source modules:
|
package/dist/install.mjs
CHANGED
|
@@ -33,31 +33,49 @@ export async function installSkill(options) {
|
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
if (!options.dryRun && options.force) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
const pathsToRemove = [plan.skillDir, plan.llmsPath, plan.llmsFullPath, plan.manifestPath];
|
|
37
|
+
if (plan.target === "cursor") {
|
|
38
|
+
pathsToRemove.push(join(plan.baseDir, "rules", "yh-ui.mdc"));
|
|
39
|
+
pathsToRemove.push(join(options.cwd, ".cursorrules"));
|
|
40
|
+
}
|
|
41
|
+
await Promise.all(pathsToRemove.map((p) => removePath(p)));
|
|
42
42
|
}
|
|
43
43
|
if (!options.dryRun) {
|
|
44
44
|
await ensureParentDir(plan.skillDir);
|
|
45
45
|
await copyDirectory(SKILL_ASSET_DIR, plan.skillDir);
|
|
46
46
|
await copyFile(LLMS_ASSET_PATH, plan.llmsPath);
|
|
47
47
|
await copyFile(LLMS_FULL_ASSET_PATH, plan.llmsFullPath);
|
|
48
|
+
const manifestFiles = [
|
|
49
|
+
"skills/yh-ui",
|
|
50
|
+
"skills/yh-ui/SKILL.md",
|
|
51
|
+
"llms.txt",
|
|
52
|
+
"llms-full.txt",
|
|
53
|
+
"yh-ui-skill.manifest.json"
|
|
54
|
+
];
|
|
55
|
+
if (plan.target === "cursor") {
|
|
56
|
+
const rawSkillContent = await readFile(join(SKILL_ASSET_DIR, "SKILL.md"), "utf8");
|
|
57
|
+
const bodyContent = rawSkillContent.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n/, "");
|
|
58
|
+
const mdcPath = join(plan.baseDir, "rules", "yh-ui.mdc");
|
|
59
|
+
const mdcFrontmatter = `---
|
|
60
|
+
description: Guidelines for Vue, Nuxt, and TypeScript files using YH-UI components, hooks, request, theme, locale, flow, and AI SDK.
|
|
61
|
+
globs: **/*.vue, **/*.ts, **/*.tsx, **/*.js, **/*.jsx
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
`;
|
|
65
|
+
await ensureParentDir(mdcPath);
|
|
66
|
+
await writeFile(mdcPath, mdcFrontmatter + bodyContent, "utf8");
|
|
67
|
+
manifestFiles.push("rules/yh-ui.mdc");
|
|
68
|
+
const cursorrulesPath = join(options.cwd, ".cursorrules");
|
|
69
|
+
await writeFile(cursorrulesPath, rawSkillContent, "utf8");
|
|
70
|
+
manifestFiles.push("../.cursorrules");
|
|
71
|
+
}
|
|
48
72
|
const manifest = {
|
|
49
73
|
packageName: "@yh-ui/yh-ui-skill",
|
|
50
74
|
version,
|
|
51
75
|
target: plan.target,
|
|
52
76
|
baseDir: plan.baseDir,
|
|
53
77
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
54
|
-
files:
|
|
55
|
-
"skills/yh-ui",
|
|
56
|
-
"skills/yh-ui/SKILL.md",
|
|
57
|
-
"llms.txt",
|
|
58
|
-
"llms-full.txt",
|
|
59
|
-
"yh-ui-skill.manifest.json"
|
|
60
|
-
]
|
|
78
|
+
files: manifestFiles
|
|
61
79
|
};
|
|
62
80
|
await ensureParentDir(plan.manifestPath);
|
|
63
81
|
await writeFile(plan.manifestPath, `${JSON.stringify(manifest, null, 2)}
|
|
@@ -96,9 +114,23 @@ export async function inspectInstallation(options) {
|
|
|
96
114
|
exists: await pathExists(plan.manifestPath)
|
|
97
115
|
}
|
|
98
116
|
];
|
|
117
|
+
if (plan.target === "cursor") {
|
|
118
|
+
checks.push(
|
|
119
|
+
{
|
|
120
|
+
label: "Cursor MDC rule",
|
|
121
|
+
path: join(plan.baseDir, "rules", "yh-ui.mdc"),
|
|
122
|
+
exists: await pathExists(join(plan.baseDir, "rules", "yh-ui.mdc"))
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: ".cursorrules",
|
|
126
|
+
path: join(options.cwd, ".cursorrules"),
|
|
127
|
+
exists: await pathExists(join(options.cwd, ".cursorrules"))
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
99
131
|
checks.filter((check) => !check.exists).forEach((check) => missingItems.push(relative(plan.baseDir, check.path).replace(/\\/g, "/")));
|
|
100
132
|
let version = null;
|
|
101
|
-
if (checks.
|
|
133
|
+
if (checks.find((c) => c.label === "Install manifest")?.exists) {
|
|
102
134
|
const manifest = JSON.parse(await readFile(plan.manifestPath, "utf8"));
|
|
103
135
|
version = manifest.version;
|
|
104
136
|
}
|