@bdsoft/element 1.1.21 → 1.1.23

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/README.md CHANGED
@@ -87,4 +87,18 @@ import { BdBar } from '@bdsoft/element'
87
87
  <span>{{ 100 - paneSize }}%</span>
88
88
  </pane>
89
89
  </splitpanes>
90
+ ```
91
+
92
+ ## 重大变更
93
+ * 1.1.21(20260114)之后写法变了,将element-plus的引用放到项目中去进行注入
94
+ ```
95
+ -- 首先项目安装element-plus pnpm install element-plus
96
+
97
+ import { useElement } from '@bdsoft/element'
98
+ // 1. 导入 Element Plus 核心和样式
99
+ import ElementPlus from 'element-plus'
100
+ import 'element-plus/dist/index.css' // 全局引入样式,组件包无需再导入
101
+ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
102
+
103
+ app.use(useElement,{ElementPlus: ElementPlus ,zhCn:zhCn})
90
104
  ```
package/index.js CHANGED
@@ -32,7 +32,7 @@ const useElement = {
32
32
  console.warn('[main.js]useElement函数升级!改写方式:app.use(useElement, { ElementPlus:ElementPlus });')
33
33
  }
34
34
  if (!options?.zhCn) {
35
- console.warn('[main.js]useElement函数升级!改写方式:app.use(useElement, { ElementPlus:ElementPlus });')
35
+ console.warn('[main.js]useElement函数升级!改写方式:app.use(useElement, { zhCn:zhCn });')
36
36
  }
37
37
  // 安装 ElementPlus
38
38
  app.use(options.ElementPlus, {
@@ -83,7 +83,7 @@ export { useElement }
83
83
  // 功能 showwarning, showsuccess, showerror, showconfirm
84
84
  export * from './src/utils/message.js'
85
85
  export * from './src/utils/index.js'
86
- export * from './src/global/index'
86
+ // export * from './src/global/index.ts'
87
87
  export * from './src/utils/hookDialog.js'
88
88
  export * from './src/utils/hookPage.js' // 分页hook函数
89
89
  // export { dayjs }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bdsoft/element",
3
3
  "description": "内部UI组件",
4
- "version": "1.1.21",
4
+ "version": "1.1.23",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "peerDependencies": {
@@ -1,6 +0,0 @@
1
- import { App } from 'vue'
2
- import registerProperties from './register-properties'
3
-
4
- export function globalRegister(app: App): void {
5
- app.use(registerProperties)
6
- }
@@ -1,10 +0,0 @@
1
- import { App } from 'vue'
2
-
3
- import { showsuccess, showerror, showwarning, showinfo } from '../utils/message.js'
4
- // App是用来确定类型
5
- export default function registerProperties(app: App) {
6
- app.config.globalProperties.showsuccess = showsuccess
7
- app.config.globalProperties.showerror = showerror
8
- app.config.globalProperties.showwarning = showwarning
9
- app.config.globalProperties.showinfo = showinfo
10
- }