Releases: wxsub/element-plus-formkit
Add mention module and inputTag module
- Add a new mention module component (src/modules/mention.vue) and register it in the async modules loader (src/asyncModulesLoader.ts)
- Import the Popover component (modules/popover.vue) and add it to the named exports alongside Upload, Address, and Uploader so the Popover component is available in the library's public API.
- Manage popover visibility with a new visible ref bound via v-model:visible and add handleCascaderChange to auto-close the popover when cascader is single-select. Wire the cascader @change to that handler, update template class bindings to use CSS modules, and animate/rotate the dropdown icon when the popover is open. Also adjust the label separator from ' | ' to ' | ' and minor markup/style cleanups.
- Convert component styles to CSS Modules and update templates to use $style bindings (checkbox, select, upload, formkit). Add scoped class generation in vite config (generateScopedName: '[hash:5]'). Refactor upload component to use CSS variables for sizing and computed inline style, replace deep/global selectors with :global as needed, and move row-gap ha
- Enhance FileUploader.isValidFileType to more robustly parse and match typePatterns. Patterns are split by commas/whitespace, and an empty set of patterns allows any file. Matching now supports file extension checks ('.ext'), wildcard MIME types ('type/*'), exact MIME matches, and regex patterns (case-insensitive) with safe try/catch handling. File name/type are normalized to lowercase and missing properties are handled gracefully.
Urgent version updates and bug fixes
Performance adjustments to certain components
- Refactored the
getComponentSlotSuffixesfunction into a computed property,slotSuffixMap, to avoid redundant calculations - Replaced
conf[‘disabled’]withconf.disabledto maintain consistent property access style - Pre-calculated the slot suffix mappings for all configuration options to improve rendering performance
- Expanded the $attrs type for the radio, select, and checkbox components from a simple object to a subset corresponding to the Element Plus component properties
- Replaced repeated calls to useAttrs() in the popover component with the predefined attrs
- Pre-fetched globalConfig in the checkbox component to avoid repeated calls
- Removed redundant valueKey property definitions in the select component
- refactor: Optimizing asynchronous loading for Element Plus components
- fix(formkit): Optimized error handling for asynchronous requests and replaced the enter event with the error event
- Changed
executeRequestStackfrom sequential to parallel execution to improve performance - Added an error-handling mechanism that returns an empty array as a fallback when a request fails and triggers the
errorevent - Removed unused
ElMessageimports - Replaced the
enterevent with the more genericerrorevent for error reporting
Replace Suspense with CSS skeleton loader and simplify loading behavior
Resolve Uploader method type exports warning
Update types/element-plus-formkit.d.ts to import UploaderClass and export typings for Address and Uploader. Adds import from '@/utils/upload.class', exports Address as a Component, exposes Uploader as both a value (typeof UploaderClass) and a type alias, so consumers have proper TypeScript typings for the uploader utility and Address component.
Refactor request stack handling
- refactor how requester configs are processed in formkit.vue. Removed the reactive Stacks array and onMounted initialization; introduced a computed requesterConfigs (filters props.config for items with requester and non-standalone types) and a deep, immediate watch that calls executeRequestStack when items change. executeRequestStack now accepts an items array iterator, making request execution respond to dynamic config updates and improving reactivity handling.
- Replace the deprecated upload size prop with explicit width and height props (defaults 80). In the component, add autoCalcSize to compute icon/progress sizes, update template bindings and styles to use width/height, and adjust icon/progress sizing.
Add fileSize limit to upload module
Introduce a new fileSize prop (Number, MB, default 0 = no limit) to the upload module and enforce client-side file size checks. Files exceeding the limit are filtered out and a localized warning is shown via ElMessage; useGlobalConfig is used to determine locale.
Add events support and bump version
Add support for a config.events object so modules can attach event handlers via the config. Implemented setEvents(conf) in src/formkit.vue to normalize event keys (converting names like "mouseenter" or "on-click" to Vue's onXxx prop format) and merge them with existing props via v-bind
modified the onChange function to be asynchronous to support nextTick.
v0.3.3 modified the onChange function to be asynchronous to support nextTick.
Fixed error handling when the uploader component lacks a requester
- Added error throwing when the requester is not configured in upload.class.ts
- Removed unused type imports in upload.vue
- Updated export naming in index.ts for consistency