fast-element-plus 2.0.21 → 2.0.22

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.
Files changed (118) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/component.d.ts +15 -15
  3. package/dist/components/avatar/index.d.ts +3 -3
  4. package/dist/components/avatar/index.mjs.map +1 -1
  5. package/dist/components/button/index.d.ts +3 -3
  6. package/dist/components/button/index.mjs.map +1 -1
  7. package/dist/components/button/src/button.d.ts +1 -1
  8. package/dist/components/carNumber/index.d.ts +1 -1
  9. package/dist/components/carNumber/index.mjs.map +1 -1
  10. package/dist/components/contextMenu/index.d.ts +1 -1
  11. package/dist/components/contextMenu/index.mjs.map +1 -1
  12. package/dist/components/contextMenu/src/contextMenu.type.d.ts +1 -1
  13. package/dist/components/dialog/index.d.ts +3 -3
  14. package/dist/components/dialog/index.mjs.map +1 -1
  15. package/dist/components/dialog/src/dialog.d.ts +3 -3
  16. package/dist/components/drawer/index.d.ts +3 -3
  17. package/dist/components/drawer/index.mjs.map +1 -1
  18. package/dist/components/drawer/src/drawer.d.ts +3 -3
  19. package/dist/components/form/index.d.ts +4 -4
  20. package/dist/components/form/index.mjs.map +1 -1
  21. package/dist/components/form/utils/form.d.ts +2 -2
  22. package/dist/components/form/utils/form.mjs +2 -2
  23. package/dist/components/form/utils/form.mjs.map +1 -1
  24. package/dist/components/formItemTip/index.d.ts +2 -2
  25. package/dist/components/formItemTip/index.mjs.map +1 -1
  26. package/dist/components/icon/index.d.ts +2 -2
  27. package/dist/components/icon/index.mjs.map +1 -1
  28. package/dist/components/iconSelector/index.d.ts +1 -1
  29. package/dist/components/iconSelector/index.mjs.map +1 -1
  30. package/dist/components/image/index.d.ts +2 -2
  31. package/dist/components/image/index.mjs.map +1 -1
  32. package/dist/components/image/src/image.d.ts +1 -1
  33. package/dist/components/inputDialogPage/index.d.ts +3 -3
  34. package/dist/components/inputDialogPage/index.mjs.map +1 -1
  35. package/dist/components/layoutGrid/index.d.ts +2 -2
  36. package/dist/components/layoutGrid/index.mjs.map +1 -1
  37. package/dist/components/select/index.d.ts +4 -4
  38. package/dist/components/select/index.mjs.map +1 -1
  39. package/dist/components/select/src/select.d.ts +1 -1
  40. package/dist/components/select/src/select.type.d.ts +2 -2
  41. package/dist/components/selectPage/index.d.ts +3 -3
  42. package/dist/components/selectPage/index.mjs.map +1 -1
  43. package/dist/components/selectPage/src/selectPage.d.ts +1 -1
  44. package/dist/components/selectV2/index.d.ts +3 -3
  45. package/dist/components/selectV2/index.mjs.map +1 -1
  46. package/dist/components/selectV2/src/selectV2.d.ts +1 -1
  47. package/dist/components/table/index.d.ts +4 -4
  48. package/dist/components/table/index.mjs.map +1 -1
  49. package/dist/components/table/src/page.type.d.ts +2 -2
  50. package/dist/components/table/src/table.type.d.ts +5 -5
  51. package/dist/components/table/src/table.type.mjs.map +1 -1
  52. package/dist/components/table/src/tableColumn.d.ts +2 -2
  53. package/dist/components/table/src/tableColumn.mjs.map +1 -1
  54. package/dist/components/table/utils/table.d.ts +18 -15
  55. package/dist/components/table/utils/table.mjs +18 -15
  56. package/dist/components/table/utils/table.mjs.map +1 -1
  57. package/dist/components/tree/index.d.ts +3 -3
  58. package/dist/components/tree/index.mjs.map +1 -1
  59. package/dist/components/tree/src/tree.props.d.ts +2 -2
  60. package/dist/components/tree/src/tree.type.d.ts +2 -2
  61. package/dist/components/treeSelect/index.d.ts +3 -3
  62. package/dist/components/treeSelect/index.mjs.map +1 -1
  63. package/dist/components/treeSelect/src/treeSelect.d.ts +1 -1
  64. package/dist/components/upload/index.d.ts +3 -3
  65. package/dist/components/upload/index.mjs.map +1 -1
  66. package/dist/components/upload/utils/upload.d.ts +15 -10
  67. package/dist/components/upload/utils/upload.mjs +15 -10
  68. package/dist/components/upload/utils/upload.mjs.map +1 -1
  69. package/dist/components/uploadImage/index.d.ts +3 -3
  70. package/dist/components/uploadImage/index.mjs.map +1 -1
  71. package/dist/components/uploadImages/index.d.ts +3 -3
  72. package/dist/components/uploadImages/index.mjs.map +1 -1
  73. package/dist/index.global.min.js +4 -4
  74. package/dist/index.global.min.js.map +1 -1
  75. package/dist/internal/props.d.ts +1 -1
  76. package/dist/internal/props.mjs.map +1 -1
  77. package/dist/utils/async/index.d.ts +4 -4
  78. package/dist/utils/async/index.mjs +9 -9
  79. package/dist/utils/async/index.mjs.map +1 -1
  80. package/dist/utils/date/index.d.ts +8 -8
  81. package/dist/utils/date/index.mjs +16 -16
  82. package/dist/utils/date/index.mjs.map +1 -1
  83. package/dist/utils/dom/index.d.ts +1 -1
  84. package/dist/utils/dom/index.mjs +4 -4
  85. package/dist/utils/dom/index.mjs.map +1 -1
  86. package/dist/utils/object/index.d.ts +10 -10
  87. package/dist/utils/object/index.mjs +6 -6
  88. package/dist/utils/object/index.mjs.map +1 -1
  89. package/dist/utils/string/index.d.ts +4 -4
  90. package/dist/utils/string/index.mjs +14 -40
  91. package/dist/utils/string/index.mjs.map +1 -1
  92. package/dist/utils/vue/emits.d.ts +8 -8
  93. package/dist/utils/vue/emits.mjs +7 -7
  94. package/dist/utils/vue/emits.mjs.map +1 -1
  95. package/dist/utils/vue/expose.d.ts +3 -3
  96. package/dist/utils/vue/expose.mjs +3 -3
  97. package/dist/utils/vue/expose.mjs.map +1 -1
  98. package/dist/utils/vue/func.d.ts +2 -2
  99. package/dist/utils/vue/func.mjs +2 -2
  100. package/dist/utils/vue/func.mjs.map +1 -1
  101. package/dist/utils/vue/install.d.ts +9 -9
  102. package/dist/utils/vue/install.mjs +24 -24
  103. package/dist/utils/vue/install.mjs.map +1 -1
  104. package/dist/utils/vue/props.d.ts +4 -4
  105. package/dist/utils/vue/props.mjs +5 -5
  106. package/dist/utils/vue/props.mjs.map +1 -1
  107. package/dist/utils/vue/render.d.ts +1 -1
  108. package/dist/utils/vue/render.mjs +2 -2
  109. package/dist/utils/vue/render.mjs.map +1 -1
  110. package/dist/utils/vue/slots.d.ts +4 -4
  111. package/dist/utils/vue/slots.mjs.map +1 -1
  112. package/dist/utils/vue/with.d.ts +1 -1
  113. package/dist/utils/vue/with.mjs +1 -1
  114. package/dist/utils/vue/with.mjs.map +1 -1
  115. package/dist/version.d.ts +1 -1
  116. package/dist/version.mjs +1 -1
  117. package/dist/version.mjs.map +1 -1
  118. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"install.mjs","names":[],"sources":["../../../src/utils/vue/install.ts"],"sourcesContent":["import type { App } from \"vue\";\n\n/** Vue 组件对象、函数组件或指令对象可接受的最小结构类型。 */\nexport type VueInstallValue = object | ((...arguments_: never[]) => unknown);\n\n/** 为 Vue 组件或指令附加供 Vue 3 `app.use()` 调用的安装能力。 */\nexport type Installable<Value> = Value & {\n\t/**\n\t * 把当前组件或指令安装到 Vue 3 App。\n\t * @param app - Vue 3 App 实例。\n\t */\n\tinstall: (app: App) => void;\n};\n\n/** TSX 组件安装类型;与 {@link Installable} 保持同一运行时契约。 */\nexport type TSXWithInstall<Value> = Installable<Value>;\n\n/** 组件、指令注册所需的 Vue 3 App 能力。 */\ninterface VueAppRegistrationTarget {\n\t/**\n\t * 读取或注册全局组件。\n\t *\n\t * @param name - 全局组件名。\n\t * @param component - 注册时传入的组件;省略时读取现有组件。\n\t * @returns Vue App 返回的现有组件、注册结果或 App 自身。\n\t */\n\tcomponent: (name: string, component?: unknown) => unknown;\n\t/**\n\t * 读取或注册全局指令。\n\t *\n\t * @param name - 不带 `v-` 的全局指令名。\n\t * @param directive - 注册时传入的指令;省略时读取现有指令。\n\t * @returns Vue App 返回的现有指令、注册结果或 App 自身。\n\t */\n\tdirective: (name: string, directive?: unknown) => unknown;\n}\n\n/**\n * 校验 Vue 3 插件安装目标。\n *\n * @param value - Vue 3 App 实例。\n * @returns 只包含组件和指令注册能力的 App。\n * @throws `TypeError` 当目标不是对象或缺少 `component`、`directive` 方法。\n */\nconst assertApp = (value: unknown): VueAppRegistrationTarget => {\n\tif (typeof value !== \"object\" || value === null) {\n\t\tthrow new TypeError(\"安装 Vue 插件需要 Vue 3 App 实例。\");\n\t}\n\tconst app = value as Partial<VueAppRegistrationTarget>;\n\tif (typeof app.component !== \"function\" || typeof app.directive !== \"function\") {\n\t\tthrow new TypeError(\"安装 Vue 插件需要 `component()` 和 `directive()` 注册方法。\");\n\t}\n\treturn app as VueAppRegistrationTarget;\n};\n\n/**\n * 提取组件的全局注册名称。\n *\n * @param component - 待注册组件。\n * @returns 经过校验的显式名称。\n * @throws `TypeError` 当组件没有非空字符串名称,或名称包含空白。\n */\nconst getComponentName = (component: VueInstallValue): string => {\n\tconst name = (component as { name?: unknown }).name;\n\tif (typeof name !== \"string\" || name.length === 0 || /\\s/u.test(name)) {\n\t\tthrow new TypeError(\"可安装的 Vue 组件必须公开不含空白的非空名称。\");\n\t}\n\treturn name;\n};\n\n/**\n * 预检单个组件注册。\n *\n * @remarks 先读取同名组件并完成冲突判断,再返回延迟执行动作;调用方可以在所有组件预检通过后统一提交。\n * @param app - 已校验的 Vue 3 App 注册目标。\n * @param component - 待注册组件。\n * @returns 已校验的组件引用、名称和目标中是否已经存在同一引用。\n * @throws `Error` 当同名位置已由其他组件占用。\n */\nconst prepareComponentRegistration = (app: VueAppRegistrationTarget, component: VueInstallValue) => {\n\tconst name = getComponentName(component);\n\tconst existing = app.component(name);\n\tif (existing !== undefined && existing !== component) {\n\t\tthrow new Error(`Vue 组件名称“${name}”已被其他组件注册。`);\n\t}\n\treturn { component, name, registered: existing === component };\n};\n\n/**\n * 为主组件附加 Vue 3 `app.use()` 安装能力。\n *\n * @remarks 函数会直接为 `main` 定义附属组件属性和 `install`。所有组件名称、附属属性\n * 冲突会在修改 `main` 前完成校验;安装到 App 时也会先预检全部全局名称,再统一注册。\n * @param main - 具有非空 `name` 的组件。\n * @param extras - 同时注册并以可枚举属性挂到主组件的附属组件映射。\n * @returns 原始 `main` 引用,并附加类型化的 `install` 与 `extras` 属性。\n * @throws `TypeError` 当组件缺少合法名称、已有 `install`、附属键或名称发生冲突。\n * @throws `Error` 当 App 中同名位置已经注册其他组件。\n */\nexport function withInstall<Main extends VueInstallValue, Extras extends Record<string, VueInstallValue> = Record<never, never>>(\n\tmain: Main,\n\textras?: Extras\n): Installable<Main> & Extras {\n\tconst componentNames = new Set([getComponentName(main)]);\n\tif (\"install\" in Object(main)) throw new TypeError(\"Vue 组件已定义 `install` 属性。\");\n\tconst extraEntries = Object.entries(extras ?? {});\n\tif (extras !== undefined && Object.getOwnPropertySymbols(extras).some((key) => Object.prototype.propertyIsEnumerable.call(extras, key))) {\n\t\tthrow new TypeError(\"Vue 组件附属项必须使用字符串属性名。\");\n\t}\n\tfor (const [key, component] of extraEntries) {\n\t\tconst componentName = getComponentName(component);\n\t\tif (componentNames.has(componentName)) throw new TypeError(`Vue 组件名称“${componentName}”被重复注册。`);\n\t\tcomponentNames.add(componentName);\n\t\tif (key === \"install\" || key in Object(main)) {\n\t\t\tthrow new TypeError(`Vue 组件附属项“${key}”会覆盖主组件上的属性。`);\n\t\t}\n\t}\n\tconst installable = main as Installable<Main> & Extras;\n\tfor (const [key, component] of extraEntries) {\n\t\tObject.defineProperty(installable, key, { configurable: true, enumerable: true, value: component, writable: true });\n\t}\n\tinstallable.install = (value: App) => {\n\t\tconst app = assertApp(value);\n\t\t// 先完成全部冲突检查,再统一注册,避免安装到一半留下部分全局组件。\n\t\tconst registrations = [main, ...extraEntries.map(([, component]) => component)].map((component) =>\n\t\t\tprepareComponentRegistration(app, component)\n\t\t);\n\t\tfor (const registration of registrations) {\n\t\t\tif (!registration.registered) app.component(registration.name, registration.component);\n\t\t}\n\t};\n\treturn installable;\n}\n\n/**\n * 为不需要单独注册的附属组件附加空安装函数。\n *\n * @remarks 适用于只能作为主组件附属属性使用、但仍需满足 Vue Plugin 类型的组件。\n * 函数直接修改并返回传入组件,不会向 Vue 3 App 注册内容。\n * @param component - 尚未定义或继承 `install` 属性的组件。\n * @returns 原组件引用及无副作用的 `install` 方法。\n * @throws `TypeError` 当组件自身或原型链已经存在 `install`。\n */\nexport function withNoopInstall<Value extends VueInstallValue>(component: Value): TSXWithInstall<Value> {\n\tif (\"install\" in Object(component)) throw new TypeError(\"Vue 组件已定义 `install` 属性。\");\n\tconst installable = component as TSXWithInstall<Value>;\n\tinstallable.install = () => undefined;\n\treturn installable;\n}\n\n/**\n * 为 Vue 3 指令附加插件安装能力。\n *\n * @remarks 函数直接修改并返回指令。安装时重复注册同一引用保持幂等,不会覆盖同名的\n * 其他指令。名称只传给 `directive()`,不得包含 `v-` 前缀。\n * @param directive - 尚未定义或继承 `install` 属性的 Vue 指令对象。\n * @param name - 非空、无空白且不以 `v-` 开头的全局指令名。\n * @returns 原指令引用及 Vue Plugin `install` 方法。\n * @throws `TypeError` 当名称非法、指令已有 `install`,或安装目标无效。\n * @throws `Error` 当 App 中同名位置已经注册其他指令。\n */\nexport function withInstallDirective<Value extends VueInstallValue>(directive: Value, name: string): Installable<Value> {\n\tif (name.length === 0 || /\\s/u.test(name) || name.startsWith(\"v-\")) {\n\t\tthrow new TypeError(\"可安装的 Vue 指令名称不能包含空白或 `v-` 前缀。\");\n\t}\n\tif (\"install\" in Object(directive)) throw new TypeError(\"Vue 指令已定义 `install` 属性。\");\n\tconst installable = directive as Installable<Value>;\n\tinstallable.install = (value: App) => {\n\t\tconst app = assertApp(value);\n\t\tconst existing = app.directive(name);\n\t\tif (existing !== undefined && existing !== directive) {\n\t\t\tthrow new Error(`Vue 指令名称“${name}”已被其他指令注册。`);\n\t\t}\n\t\tif (existing !== directive) app.directive(name, directive);\n\t};\n\treturn installable;\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"install.mjs","names":[],"sources":["../../../src/utils/vue/install.ts"],"sourcesContent":["import type { App } from \"vue\";\n\n/** Vue 组件对象、函数组件或指令对象可接受的最小结构类型 */\nexport type VueInstallValue = object | ((...arguments_: never[]) => unknown);\n\n/** 为 Vue 组件或指令附加供 Vue 3 `app.use()` 调用的安装能力 */\nexport type Installable<Value> = Value & {\n\t/**\n\t * 把当前组件或指令安装到 Vue 3 App。\n\t * @param app - Vue 3 App 实例\n\t */\n\tinstall: (app: App) => void;\n};\n\n/** TSX 组件安装类型;与 {@link Installable} 保持同一运行时契约。 */\nexport type TSXWithInstall<Value> = Installable<Value>;\n\n/** 组件、指令注册所需的 Vue 3 App 能力 */\ninterface VueAppRegistrationTarget {\n\t/**\n\t * 读取或注册全局组件。\n\t *\n\t * @param name - 全局组件名\n\t * @param component - 注册时传入的组件;省略时读取现有组件。\n\t * @returns Vue App 返回的现有组件、注册结果或 App 自身。\n\t */\n\tcomponent: (name: string, component?: unknown) => unknown;\n\t/**\n\t * 读取或注册全局指令。\n\t *\n\t * @param name - 不带 `v-` 的全局指令名\n\t * @param directive - 注册时传入的指令;省略时读取现有指令。\n\t * @returns Vue App 返回的现有指令、注册结果或 App 自身。\n\t */\n\tdirective: (name: string, directive?: unknown) => unknown;\n}\n\n/**\n * 校验 Vue 3 插件安装目标。\n *\n * @param value - Vue 3 App 实例\n * @returns 只包含组件和指令注册能力的 App\n * @throws `TypeError` 当目标不是对象或缺少 `component`、`directive` 方法。\n */\nconst assertApp = (value: unknown): VueAppRegistrationTarget => {\n\tif (typeof value !== \"object\" || value === null) {\n\t\tthrow new TypeError(\"Installing a Vue plugin requires a Vue 3 App instance.\");\n\t}\n\tconst app = value as Partial<VueAppRegistrationTarget>;\n\tif (typeof app.component !== \"function\" || typeof app.directive !== \"function\") {\n\t\tthrow new TypeError(\"Installing a Vue plugin requires `component()` and `directive()` registration methods.\");\n\t}\n\treturn app as VueAppRegistrationTarget;\n};\n\n/**\n * 提取组件的全局注册名称。\n *\n * @param component - 待注册组件\n * @returns 经过校验的显式名称\n * @throws `TypeError` 当组件没有非空字符串名称,或名称包含空白。\n */\nconst getComponentName = (component: VueInstallValue): string => {\n\tconst name = (component as { name?: unknown }).name;\n\tif (typeof name !== \"string\" || name.length === 0 || /\\s/u.test(name)) {\n\t\tthrow new TypeError(\"An installable Vue component must expose a nonempty name without whitespace.\");\n\t}\n\treturn name;\n};\n\n/**\n * 预检单个组件注册。\n *\n * @remarks 先读取同名组件并完成冲突判断,再返回延迟执行动作;调用方可以在所有组件预检通过后统一提交。\n * @param app - 已校验的 Vue 3 App 注册目标\n * @param component - 待注册组件\n * @returns 已校验的组件引用、名称和目标中是否已经存在同一引用。\n * @throws `Error` 当同名位置已由其他组件占用。\n */\nconst prepareComponentRegistration = (app: VueAppRegistrationTarget, component: VueInstallValue) => {\n\tconst name = getComponentName(component);\n\tconst existing = app.component(name);\n\tif (existing !== undefined && existing !== component) {\n\t\tthrow new Error(`The Vue component name \"${name}\" is already registered to another component.`);\n\t}\n\treturn { component, name, registered: existing === component };\n};\n\n/**\n * 为主组件附加 Vue 3 `app.use()` 安装能力。\n *\n * @remarks 函数会直接为 `main` 定义附属组件属性和 `install`。所有组件名称、附属属性\n * 冲突会在修改 `main` 前完成校验;安装到 App 时也会先预检全部全局名称,再统一注册。\n * @param main - 具有非空 `name` 的组件\n * @param extras - 同时注册并以可枚举属性挂到主组件的附属组件映射\n * @returns 原始 `main` 引用,并附加类型化的 `install` 与 `extras` 属性。\n * @throws `TypeError` 当组件缺少合法名称、已有 `install`、附属键或名称发生冲突。\n * @throws `Error` 当 App 中同名位置已经注册其他组件。\n */\nexport function withInstall<Main extends VueInstallValue, Extras extends Record<string, VueInstallValue> = Record<never, never>>(\n\tmain: Main,\n\textras?: Extras\n): Installable<Main> & Extras {\n\tconst componentNames = new Set([getComponentName(main)]);\n\tif (\"install\" in Object(main)) throw new TypeError(\"The Vue component already defines an `install` property.\");\n\tconst extraEntries = Object.entries(extras ?? {});\n\tif (extras !== undefined && Object.getOwnPropertySymbols(extras).some((key) => Object.prototype.propertyIsEnumerable.call(extras, key))) {\n\t\tthrow new TypeError(\"Vue component extras must use string property names.\");\n\t}\n\tfor (const [key, component] of extraEntries) {\n\t\tconst componentName = getComponentName(component);\n\t\tif (componentNames.has(componentName)) throw new TypeError(`The Vue component name \"${componentName}\" is registered more than once.`);\n\t\tcomponentNames.add(componentName);\n\t\tif (key === \"install\" || key in Object(main)) {\n\t\t\tthrow new TypeError(`The Vue component extra \"${key}\" would overwrite a property on the main component.`);\n\t\t}\n\t}\n\tconst installable = main as Installable<Main> & Extras;\n\tfor (const [key, component] of extraEntries) {\n\t\tObject.defineProperty(installable, key, { configurable: true, enumerable: true, value: component, writable: true });\n\t}\n\tinstallable.install = (value: App) => {\n\t\tconst app = assertApp(value);\n\t\t// 先完成全部冲突检查,再统一注册,避免安装到一半留下部分全局组件。\n\t\tconst registrations = [main, ...extraEntries.map(([, component]) => component)].map((component) =>\n\t\t\tprepareComponentRegistration(app, component)\n\t\t);\n\t\tfor (const registration of registrations) {\n\t\t\tif (!registration.registered) app.component(registration.name, registration.component);\n\t\t}\n\t};\n\treturn installable;\n}\n\n/**\n * 为不需要单独注册的附属组件附加空安装函数。\n *\n * @remarks 适用于只能作为主组件附属属性使用、但仍需满足 Vue Plugin 类型的组件。\n * 函数直接修改并返回传入组件,不会向 Vue 3 App 注册内容。\n * @param component - 尚未定义或继承 `install` 属性的组件\n * @returns 原组件引用及无副作用的 `install` 方法\n * @throws `TypeError` 当组件自身或原型链已经存在 `install`。\n */\nexport function withNoopInstall<Value extends VueInstallValue>(component: Value): TSXWithInstall<Value> {\n\tif (\"install\" in Object(component)) throw new TypeError(\"The Vue component already defines an `install` property.\");\n\tconst installable = component as TSXWithInstall<Value>;\n\tinstallable.install = () => undefined;\n\treturn installable;\n}\n\n/**\n * 为 Vue 3 指令附加插件安装能力。\n *\n * @remarks 函数直接修改并返回指令。安装时重复注册同一引用保持幂等,不会覆盖同名的\n * 其他指令。名称只传给 `directive()`,不得包含 `v-` 前缀。\n * @param directive - 尚未定义或继承 `install` 属性的 Vue 指令对象\n * @param name - 非空、无空白且不以 `v-` 开头的全局指令名\n * @returns 原指令引用及 Vue Plugin `install` 方法。\n * @throws `TypeError` 当名称非法、指令已有 `install`,或安装目标无效。\n * @throws `Error` 当 App 中同名位置已经注册其他指令。\n */\nexport function withInstallDirective<Value extends VueInstallValue>(directive: Value, name: string): Installable<Value> {\n\tif (name.length === 0 || /\\s/u.test(name) || name.startsWith(\"v-\")) {\n\t\tthrow new TypeError(\"An installable Vue directive name must not contain whitespace or the `v-` prefix.\");\n\t}\n\tif (\"install\" in Object(directive)) throw new TypeError(\"The Vue directive already defines an `install` property.\");\n\tconst installable = directive as Installable<Value>;\n\tinstallable.install = (value: App) => {\n\t\tconst app = assertApp(value);\n\t\tconst existing = app.directive(name);\n\t\tif (existing !== undefined && existing !== directive) {\n\t\t\tthrow new Error(`The Vue directive name \"${name}\" is already registered to another directive.`);\n\t\t}\n\t\tif (existing !== directive) app.directive(name, directive);\n\t};\n\treturn installable;\n}\n"],"mappings":"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"}
@@ -4,16 +4,16 @@ import type { ComputedRef, PropType } from "vue";
4
4
  *
5
5
  * @remarks 该函数只帮助 TypeScript 建模,不验证运行时值与 `Value` 一致;调用方仍应
6
6
  * 传入 Vue 支持的构造器或构造器数组。
7
- * @param runtimeType - Vue 支持的运行时构造器或构造器数组。
7
+ * @param runtimeType - Vue 支持的运行时构造器或构造器数组
8
8
  * @returns 同一引用,仅在类型层收窄为 `PropType<Value>`。
9
9
  */
10
10
  export declare function definePropType<Value>(runtimeType: unknown): PropType<Value>;
11
11
  /**
12
12
  * 构建需要透传给子组件的响应式 Props。
13
13
  *
14
- * @param props - Vue `setup` 接收的只读响应式 Props 对象。
15
- * @param rawProps - 子组件的运行时 Props 配置。
16
- * @param ignoredProps - 不需要透传的 Props 名称。
14
+ * @param props - Vue `setup` 接收的只读响应式 Props 对象
15
+ * @param rawProps - 子组件的运行时 Props 配置
16
+ * @param ignoredProps - 不需要透传的 Props 名称
17
17
  * @returns 只包含 `rawProps` 声明键且随 Props 更新的 ComputedRef。
18
18
  */
19
19
  export declare function useProps<Props extends object, RawProps extends object, IgnoredProp extends keyof RawProps = never>(props: Props, rawProps: RawProps, ignoredProps?: readonly IgnoredProp[]): ComputedRef<Omit<Pick<Props, Extract<keyof Props, keyof RawProps>>, Extract<IgnoredProp, keyof Props>>>;
@@ -5,7 +5,7 @@ import { computed } from "vue";
5
5
  *
6
6
  * @remarks 该函数只帮助 TypeScript 建模,不验证运行时值与 `Value` 一致;调用方仍应
7
7
  * 传入 Vue 支持的构造器或构造器数组。
8
- * @param runtimeType - Vue 支持的运行时构造器或构造器数组。
8
+ * @param runtimeType - Vue 支持的运行时构造器或构造器数组
9
9
  * @returns 同一引用,仅在类型层收窄为 `PropType<Value>`。
10
10
  */
11
11
  function definePropType(runtimeType) {
@@ -14,9 +14,9 @@ function definePropType(runtimeType) {
14
14
  /**
15
15
  * 构建需要透传给子组件的响应式 Props。
16
16
  *
17
- * @param props - Vue `setup` 接收的只读响应式 Props 对象。
18
- * @param rawProps - 子组件的运行时 Props 配置。
19
- * @param ignoredProps - 不需要透传的 Props 名称。
17
+ * @param props - Vue `setup` 接收的只读响应式 Props 对象
18
+ * @param rawProps - 子组件的运行时 Props 配置
19
+ * @param ignoredProps - 不需要透传的 Props 名称
20
20
  * @returns 只包含 `rawProps` 声明键且随 Props 更新的 ComputedRef。
21
21
  */
22
22
  function useProps(props, rawProps, ignoredProps = []) {
@@ -24,7 +24,7 @@ function useProps(props, rawProps, ignoredProps = []) {
24
24
  return computed(() => {
25
25
  const result = {};
26
26
  for (const key of Reflect.ownKeys(rawProps)) {
27
- if (ignored.has(key) || !Object.hasOwn(props, key)) continue;
27
+ if (ignored.has(key) || !Object.prototype.hasOwnProperty.call(props, key)) continue;
28
28
  Object.defineProperty(result, key, {
29
29
  configurable: true,
30
30
  enumerable: true,
@@ -1 +1 @@
1
- {"version":3,"file":"props.mjs","names":[],"sources":["../../../src/utils/vue/props.ts"],"sourcesContent":["import { computed } from \"vue\";\nimport type { ComputedRef, PropType } from \"vue\";\n\n/**\n * 为 Vue 运行时 Props 构造器附加泛型类型。\n *\n * @remarks 该函数只帮助 TypeScript 建模,不验证运行时值与 `Value` 一致;调用方仍应\n * 传入 Vue 支持的构造器或构造器数组。\n * @param runtimeType - Vue 支持的运行时构造器或构造器数组。\n * @returns 同一引用,仅在类型层收窄为 `PropType<Value>`。\n */\nexport function definePropType<Value>(runtimeType: unknown): PropType<Value> {\n\treturn runtimeType as PropType<Value>;\n}\n\n/**\n * 构建需要透传给子组件的响应式 Props。\n *\n * @param props - Vue `setup` 接收的只读响应式 Props 对象。\n * @param rawProps - 子组件的运行时 Props 配置。\n * @param ignoredProps - 不需要透传的 Props 名称。\n * @returns 只包含 `rawProps` 声明键且随 Props 更新的 ComputedRef。\n */\nexport function useProps<Props extends object, RawProps extends object, IgnoredProp extends keyof RawProps = never>(\n\tprops: Props,\n\trawProps: RawProps,\n\tignoredProps: readonly IgnoredProp[] = []\n): ComputedRef<Omit<Pick<Props, Extract<keyof Props, keyof RawProps>>, Extract<IgnoredProp, keyof Props>>> {\n\tconst ignored = new Set<PropertyKey>(ignoredProps);\n\ttype Result = Omit<Pick<Props, Extract<keyof Props, keyof RawProps>>, Extract<IgnoredProp, keyof Props>>;\n\treturn computed<Result>(() => {\n\t\tconst result = {} as Result;\n\t\tfor (const key of Reflect.ownKeys(rawProps)) {\n\t\t\tif (ignored.has(key) || !Object.hasOwn(props, key)) continue;\n\t\t\tObject.defineProperty(result, key, { configurable: true, enumerable: true, value: Reflect.get(props, key), writable: true });\n\t\t}\n\t\treturn result;\n\t});\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,eAAsB,aAAuC;CAC5E,OAAO;AACR;;;;;;;;;AAUA,SAAgB,SACf,OACA,UACA,eAAuC,CAAC,GACkE;CAC1G,MAAM,UAAU,IAAI,IAAiB,YAAY;CAEjD,OAAO,eAAuB;EAC7B,MAAM,SAAS,CAAC;EAChB,KAAK,MAAM,OAAO,QAAQ,QAAQ,QAAQ,GAAG;GAC5C,IAAI,QAAQ,IAAI,GAAG,KAAK,CAAC,OAAO,OAAO,OAAO,GAAG,GAAG;GACpD,OAAO,eAAe,QAAQ,KAAK;IAAE,cAAc;IAAM,YAAY;IAAM,OAAO,QAAQ,IAAI,OAAO,GAAG;IAAG,UAAU;GAAK,CAAC;EAC5H;EACA,OAAO;CACR,CAAC;AACF"}
1
+ {"version":3,"file":"props.mjs","names":[],"sources":["../../../src/utils/vue/props.ts"],"sourcesContent":["import { computed } from \"vue\";\nimport type { ComputedRef, PropType } from \"vue\";\n\n/**\n * 为 Vue 运行时 Props 构造器附加泛型类型。\n *\n * @remarks 该函数只帮助 TypeScript 建模,不验证运行时值与 `Value` 一致;调用方仍应\n * 传入 Vue 支持的构造器或构造器数组。\n * @param runtimeType - Vue 支持的运行时构造器或构造器数组\n * @returns 同一引用,仅在类型层收窄为 `PropType<Value>`。\n */\nexport function definePropType<Value>(runtimeType: unknown): PropType<Value> {\n\treturn runtimeType as PropType<Value>;\n}\n\n/**\n * 构建需要透传给子组件的响应式 Props。\n *\n * @param props - Vue `setup` 接收的只读响应式 Props 对象\n * @param rawProps - 子组件的运行时 Props 配置\n * @param ignoredProps - 不需要透传的 Props 名称\n * @returns 只包含 `rawProps` 声明键且随 Props 更新的 ComputedRef。\n */\nexport function useProps<Props extends object, RawProps extends object, IgnoredProp extends keyof RawProps = never>(\n\tprops: Props,\n\trawProps: RawProps,\n\tignoredProps: readonly IgnoredProp[] = []\n): ComputedRef<Omit<Pick<Props, Extract<keyof Props, keyof RawProps>>, Extract<IgnoredProp, keyof Props>>> {\n\tconst ignored = new Set<PropertyKey>(ignoredProps);\n\ttype Result = Omit<Pick<Props, Extract<keyof Props, keyof RawProps>>, Extract<IgnoredProp, keyof Props>>;\n\treturn computed<Result>(() => {\n\t\tconst result = {} as Result;\n\t\tfor (const key of Reflect.ownKeys(rawProps)) {\n\t\t\tif (ignored.has(key) || !Object.prototype.hasOwnProperty.call(props, key)) continue;\n\t\t\tObject.defineProperty(result, key, { configurable: true, enumerable: true, value: Reflect.get(props, key), writable: true });\n\t\t}\n\t\treturn result;\n\t});\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,eAAsB,aAAuC;CAC5E,OAAO;AACR;;;;;;;;;AAUA,SAAgB,SACf,OACA,UACA,eAAuC,CAAC,GACkE;CAC1G,MAAM,UAAU,IAAI,IAAiB,YAAY;CAEjD,OAAO,eAAuB;EAC7B,MAAM,SAAS,CAAC;EAChB,KAAK,MAAM,OAAO,QAAQ,QAAQ,QAAQ,GAAG;GAC5C,IAAI,QAAQ,IAAI,GAAG,KAAK,CAAC,OAAO,UAAU,eAAe,KAAK,OAAO,GAAG,GAAG;GAC3E,OAAO,eAAe,QAAQ,KAAK;IAAE,cAAc;IAAM,YAAY;IAAM,OAAO,QAAQ,IAAI,OAAO,GAAG;IAAG,UAAU;GAAK,CAAC;EAC5H;EACA,OAAO;CACR,CAAC;AACF"}
@@ -2,7 +2,7 @@ import type { VNode } from "vue";
2
2
  /**
3
3
  * 在当前 Vue 3 组件实例上安装 TSX 渲染函数。
4
4
  * @remarks `setup` 仍可返回状态对象,因此状态能够显示在 Vue Devtools 中。
5
- * @param render - 当前组件的渲染函数。
5
+ * @param render - 当前组件的渲染函数
6
6
  * @throws 不在组件 `setup` 调用栈中使用时抛出 `Error`。
7
7
  */
8
8
  export declare function useRender(render: () => VNode): void;
@@ -3,12 +3,12 @@ import { getCurrentInstance } from "vue";
3
3
  /**
4
4
  * 在当前 Vue 3 组件实例上安装 TSX 渲染函数。
5
5
  * @remarks `setup` 仍可返回状态对象,因此状态能够显示在 Vue Devtools 中。
6
- * @param render - 当前组件的渲染函数。
6
+ * @param render - 当前组件的渲染函数
7
7
  * @throws 不在组件 `setup` 调用栈中使用时抛出 `Error`。
8
8
  */
9
9
  function useRender(render) {
10
10
  const instance = getCurrentInstance();
11
- if (instance === null) throw new Error("`useRender` 必须在 `setup` 函数内部调用。");
11
+ if (instance === null) throw new Error("`useRender` must be called inside `setup`.");
12
12
  instance.render = render;
13
13
  }
14
14
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"render.mjs","names":[],"sources":["../../../src/utils/vue/render.ts"],"sourcesContent":["import { getCurrentInstance } from \"vue\";\nimport type { VNode } from \"vue\";\n\n/** `useRender` 需要写入的 Vue 3 内部组件实例字段。 */\ninterface MutableVueComponentInstance {\n\trender?: () => VNode;\n}\n\n/**\n * 在当前 Vue 3 组件实例上安装 TSX 渲染函数。\n * @remarks `setup` 仍可返回状态对象,因此状态能够显示在 Vue Devtools 中。\n * @param render - 当前组件的渲染函数。\n * @throws 不在组件 `setup` 调用栈中使用时抛出 `Error`。\n */\nexport function useRender(render: () => VNode): void {\n\tconst instance = getCurrentInstance();\n\tif (instance === null) throw new Error(\"`useRender` 必须在 `setup` 函数内部调用。\");\n\t(instance as MutableVueComponentInstance).render = render;\n}\n"],"mappings":";;;;;;;;AAcA,SAAgB,UAAU,QAA2B;CACpD,MAAM,WAAW,mBAAmB;CACpC,IAAI,aAAa,MAAM,MAAM,IAAI,MAAM,iCAAiC;CACxE,SAA0C,SAAS;AACpD"}
1
+ {"version":3,"file":"render.mjs","names":[],"sources":["../../../src/utils/vue/render.ts"],"sourcesContent":["import { getCurrentInstance } from \"vue\";\nimport type { VNode } from \"vue\";\n\n/** `useRender` 需要写入的 Vue 3 内部组件实例字段 */\ninterface MutableVueComponentInstance {\n\trender?: () => VNode;\n}\n\n/**\n * 在当前 Vue 3 组件实例上安装 TSX 渲染函数。\n * @remarks `setup` 仍可返回状态对象,因此状态能够显示在 Vue Devtools 中。\n * @param render - 当前组件的渲染函数\n * @throws 不在组件 `setup` 调用栈中使用时抛出 `Error`。\n */\nexport function useRender(render: () => VNode): void {\n\tconst instance = getCurrentInstance();\n\tif (instance === null) throw new Error(\"`useRender` must be called inside `setup`.\");\n\t(instance as MutableVueComponentInstance).render = render;\n}\n"],"mappings":";;;;;;;;AAcA,SAAgB,UAAU,QAA2B;CACpD,MAAM,WAAW,mBAAmB;CACpC,IAAI,aAAa,MAAM,MAAM,IAAI,MAAM,4CAA4C;CACnF,SAA0C,SAAS;AACpD"}
@@ -1,13 +1,13 @@
1
1
  import type { SlotsType, VNode } from "vue";
2
- /** Slot 名到 Props 类型的内部声明映射。 */
2
+ /** Slot 名到 Props 类型的内部声明映射 */
3
3
  type RawSlots = Record<string, unknown>;
4
- /** 根据 Slot Props 是否为 never 生成无参数或有参数的 Slot 签名。 */
4
+ /** 根据 Slot Props 是否为 never 生成无参数或有参数的 Slot 签名 */
5
5
  type VueSlot<Properties> = [Properties] extends [never] ? () => VNode[] : (properties: Properties) => VNode[];
6
- /** 把 Slot 名称与作用域参数映射为 Vue 3 Slot 函数。 */
6
+ /** 把 Slot 名称与作用域参数映射为 Vue 3 Slot 函数 */
7
7
  export type TypedSlots<Slots extends RawSlots> = {
8
8
  [Name in keyof Slots]: VueSlot<Slots[Name]>;
9
9
  };
10
- /** Vue 3 `slots` 选项接受的运行时声明与官方静态类型标记。 */
10
+ /** Vue 3 `slots` 选项接受的运行时声明与官方静态类型标记 */
11
11
  export type TypedSlotsDeclaration<Slots extends RawSlots> = SlotsType<Partial<TypedSlots<Slots>>>;
12
12
  /**
13
13
  * 为 Options API 的 `slots` 选项创建带作用域参数的类型声明。
@@ -1 +1 @@
1
- {"version":3,"file":"slots.mjs","names":[],"sources":["../../../src/utils/vue/slots.ts"],"sourcesContent":["import type { SlotsType, VNode } from \"vue\";\n\n/** Slot 名到 Props 类型的内部声明映射。 */\ntype RawSlots = Record<string, unknown>;\n/** 根据 Slot Props 是否为 never 生成无参数或有参数的 Slot 签名。 */\ntype VueSlot<Properties> = [Properties] extends [never] ? () => VNode[] : (properties: Properties) => VNode[];\n\n/** 把 Slot 名称与作用域参数映射为 Vue 3 Slot 函数。 */\nexport type TypedSlots<Slots extends RawSlots> = {\n\t[Name in keyof Slots]: VueSlot<Slots[Name]>;\n};\n\n/** Vue 3 `slots` 选项接受的运行时声明与官方静态类型标记。 */\nexport type TypedSlotsDeclaration<Slots extends RawSlots> = SlotsType<Partial<TypedSlots<Slots>>>;\n\n/**\n * 为 Options API 的 `slots` 选项创建带作用域参数的类型声明。\n *\n * @returns 运行时 `Object` 构造器,并携带仅供 TypeScript 使用的 Slot 类型标记。\n */\nexport function makeSlots<Slots extends RawSlots>(): TypedSlotsDeclaration<Slots> {\n\treturn Object as TypedSlotsDeclaration<Slots>;\n}\n"],"mappings":";;;;;;AAoBA,SAAgB,YAAkE;CACjF,OAAO;AACR"}
1
+ {"version":3,"file":"slots.mjs","names":[],"sources":["../../../src/utils/vue/slots.ts"],"sourcesContent":["import type { SlotsType, VNode } from \"vue\";\n\n/** Slot 名到 Props 类型的内部声明映射 */\ntype RawSlots = Record<string, unknown>;\n/** 根据 Slot Props 是否为 never 生成无参数或有参数的 Slot 签名 */\ntype VueSlot<Properties> = [Properties] extends [never] ? () => VNode[] : (properties: Properties) => VNode[];\n\n/** 把 Slot 名称与作用域参数映射为 Vue 3 Slot 函数 */\nexport type TypedSlots<Slots extends RawSlots> = {\n\t[Name in keyof Slots]: VueSlot<Slots[Name]>;\n};\n\n/** Vue 3 `slots` 选项接受的运行时声明与官方静态类型标记 */\nexport type TypedSlotsDeclaration<Slots extends RawSlots> = SlotsType<Partial<TypedSlots<Slots>>>;\n\n/**\n * 为 Options API 的 `slots` 选项创建带作用域参数的类型声明。\n *\n * @returns 运行时 `Object` 构造器,并携带仅供 TypeScript 使用的 Slot 类型标记。\n */\nexport function makeSlots<Slots extends RawSlots>(): TypedSlotsDeclaration<Slots> {\n\treturn Object as TypedSlotsDeclaration<Slots>;\n}\n"],"mappings":";;;;;;AAoBA,SAAgB,YAAkE;CACjF,OAAO;AACR"}
@@ -2,7 +2,7 @@
2
2
  * 保留传入值并显式指定其 TypeScript 类型。
3
3
  *
4
4
  * @remarks 未传值时运行时结果为 `undefined`,仅适合为 reactive 对象的初始字段提供类型。
5
- * @param data - 可选的原始值。
5
+ * @param data - 可选的原始值
6
6
  * @returns 传入值本身;省略时返回类型化的 `undefined`。
7
7
  */
8
8
  export declare function withDefineType<Value>(data?: Value): Value;
@@ -3,7 +3,7 @@
3
3
  * 保留传入值并显式指定其 TypeScript 类型。
4
4
  *
5
5
  * @remarks 未传值时运行时结果为 `undefined`,仅适合为 reactive 对象的初始字段提供类型。
6
- * @param data - 可选的原始值。
6
+ * @param data - 可选的原始值
7
7
  * @returns 传入值本身;省略时返回类型化的 `undefined`。
8
8
  */
9
9
  function withDefineType(data) {
@@ -1 +1 @@
1
- {"version":3,"file":"with.mjs","names":[],"sources":["../../../src/utils/vue/with.ts"],"sourcesContent":["/**\n * 保留传入值并显式指定其 TypeScript 类型。\n *\n * @remarks 未传值时运行时结果为 `undefined`,仅适合为 reactive 对象的初始字段提供类型。\n * @param data - 可选的原始值。\n * @returns 传入值本身;省略时返回类型化的 `undefined`。\n */\nexport function withDefineType<Value>(data?: Value): Value {\n\treturn data as Value;\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,eAAsB,MAAqB;CAC1D,OAAO;AACR"}
1
+ {"version":3,"file":"with.mjs","names":[],"sources":["../../../src/utils/vue/with.ts"],"sourcesContent":["/**\n * 保留传入值并显式指定其 TypeScript 类型。\n *\n * @remarks 未传值时运行时结果为 `undefined`,仅适合为 reactive 对象的初始字段提供类型。\n * @param data - 可选的原始值\n * @returns 传入值本身;省略时返回类型化的 `undefined`。\n */\nexport function withDefineType<Value>(data?: Value): Value {\n\treturn data as Value;\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,eAAsB,MAAqB;CAC1D,OAAO;AACR"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** 当前 Fast.Element.Plus 包版本,发布时必须与 package.json 保持一致。 */
2
- export declare const version = "2.0.21";
2
+ export declare const version = "2.0.22";
package/dist/version.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  //#region src/version.ts
2
2
  /** 当前 Fast.Element.Plus 包版本,发布时必须与 package.json 保持一致。 */
3
- const version = "2.0.21";
3
+ const version = "2.0.22";
4
4
  //#endregion
5
5
  export { version };
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["/** 当前 Fast.Element.Plus 包版本,发布时必须与 package.json 保持一致。 */\nexport const version = \"2.0.21\";\n"],"mappings":";;AACA,MAAa,UAAU"}
1
+ {"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["/** 当前 Fast.Element.Plus 包版本,发布时必须与 package.json 保持一致。 */\nexport const version = \"2.0.22\";\n"],"mappings":";;AACA,MAAa,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-element-plus",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "Typed Vue 3 components, directives, and hooks built on Element Plus.",
5
5
  "type": "module",
6
6
  "keywords": [