Skip to content

Fast.Element.Plus runtime contract

Runtime and package contract

  • Runtime platforms: ES2022 modern browsers and WebViews running Vue ^3.5.11 and Element Plus ^2.14.5.
  • Package format: one public named-export ESM entry for package managers and one separately minified IIFE entry for CDN use; CommonJS and UMD are not shipped.
  • Public paths: fast-element-plus, fast-element-plus/global, and fast-element-plus/style.css are the complete public export list.
  • Dependency boundary: Vue, Element Plus, Element Plus Icons, and Fast.Element.Plus.Icons remain application-provided peers. Declared runtime dependencies remain external in ESM and are installed by the package manager; the CDN IIFE bundles them for direct browser use. Component-only utilities are bundled and are not public package dependencies.
  • Publishing: the repository root is the only package, dist/ is the only build output, and package.json#exports is the complete public path whitelist.
  • Styles: Fast.Element.Plus styles are explicit and side-effectful. Applications import them once; Element Plus styles remain separate. Dark mode follows Element Plus html.dark and requires its official dark CSS Variables.
  • Browser APIs: directives and hooks that use DOM, Clipboard, Fullscreen, timers, or global UI state may only be called in a browser document.

Importing the package does not itself show overlays, start fullscreen operations, copy data, upload files, or access application credentials. It does apply the documented Fast Element Plus default Props and enhance the three ElMessageBox shortcut singleton methods. Calling app.use(FastElementPlus) additionally registers Element Plus, both icon sets, Fast.Element.Plus components, and directives.

Fast.Element.Plus is a Fast business SDK rather than a drop-in Element Plus replacement. Element Plus minor-version upgrades require the audit in ELEMENT_PLUS_COMPATIBILITY.md.

The desktop layout is the default. Fast styles provide phone rules below 768px and tablet rules from 768px through 1199px. Responsive behavior may intentionally change component width, column count, control arrangement, pagination detail, and touch-target size without changing business data semantics.

Fast Element Plus defaults

ComponentIntentional defaults
ElDialogdraggable: true
ElFormlabelWidth: "auto", labelSuffix: ":", scrollToError: true
ElInputshowWordLimit: true
ElInputNumbercontrols: false
ElSelectChinese loading/empty text, collapseTags: true, collapseTagsTooltip: true
ElTableborder: true, highlightCurrentRow: true, rowKey: "id"
ElTreedefaultExpandAll: true, checkOnClickNode: true, highlightCurrent: true
ElTreeSelectSelect and Tree defaults above, plus expandOnClickNode: false

The three MessageBox shortcuts default to the title 温馨提示, Chinese action labels, draggable behavior, and no modal-click or Escape close. Confirm and prompt show Cancel, prompt shows the input, and a supplied beforeClose uses the Fast loading overlay while the confirm branch is pending. The box closes by default after the callback settles.

Public API policy

  • The default export and named install export provide complete application installation.
  • Components, directives, hooks, constants, Decimal, instance types, props, emits, slots, exposed methods, and supporting public types use named exports from the root.
  • Open-ended application data uses generic models with an any fallback when the SDK cannot know the schema; untrusted runtime values remain unknown until validated.
  • Internal component implementation modules are not public paths.
  • Global component and directive declarations are isolated to the global type entry.
  • Internal files, generated chunks, Source Maps, and CSS internals under dist/ are implementation details.

State and lifecycle

  • Component state is instance-local unless an API explicitly documents shared page state.
  • FaDialog and FaDrawer emit open after the Fast asynchronous opening hook resolves, and emit close after the Fast asynchronous closing hook resolves but before committing the close. Native opened, closed, and focus lifecycle events remain forwarded from Element Plus.
  • useLoading and useOverlay own one page-global DOM element and mirror visibility on window.loading and window.overlay.
  • useScreenFull mirrors the browser fullscreen state, provides idempotent initialization and disposal, and reports unsupported environments through Element Plus messages.
  • Directive event listeners and third-party instances must be released during Vue unmount.
  • Installing the complete plugin twice into the same Vue application is a no-op.