@bdsoft/element 1.1.5 → 1.1.7

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as ElementPlus from 'element-plus'
2
- import * as dayjsModule from 'dayjs'
3
- const dayjs = dayjsModule.default || dayjsModule;
2
+ import { dayjs } from 'element-plus'
3
+ // const dayjs = dayjsModule.default || dayjsModule;
4
4
 
5
5
  import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
6
6
  window.ElementPlus = ElementPlus
@@ -10,7 +10,7 @@ import 'splitpanes/dist/splitpanes.css'
10
10
  import './src/assets/css/layout.scss'
11
11
  import './src/assets/css/tailwind.scss'
12
12
 
13
- // 添加分隔组件
13
+ // 添加分隔组件
14
14
  import { Splitpanes, Pane } from 'splitpanes'
15
15
 
16
16
  import * as ElementPlusIconsVue from '@element-plus/icons-vue'
@@ -20,22 +20,21 @@ import LoadComponent from './utils/coms/load.jsx'
20
20
  // 自定义的所有组件
21
21
  import * as components from './src/index.js'
22
22
 
23
-
24
23
  // 定义 useElement 为 Vue 插件
25
24
  const useElement = {
26
25
  install(app, options = {}) {
27
26
  let bdsdk = options?.bdsdk
28
27
 
29
28
  if (!bdsdk) {
30
- console.warn("[main.js]useElement函数升级!改写方式:app.use(useElement, { bdsdk }); 如果不检测异常可忽略")
29
+ console.warn('[main.js]useElement函数升级!改写方式:app.use(useElement, { bdsdk }); 如果不检测异常可忽略')
31
30
  }
32
-
31
+
33
32
  // 安装 ElementPlus
34
33
  app.use(ElementPlus, {
35
34
  locale: zhCn,
36
35
  zIndex: 3000
37
36
  })
38
-
37
+
39
38
  // 注册所有图标
40
39
  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
41
40
  app.component(key, component)
@@ -45,42 +44,43 @@ const useElement = {
45
44
  // console.info('key:'+key)
46
45
  app.component(key, component)
47
46
  }
48
-
47
+
49
48
  // 注册自定义组件
50
49
  app.component('loadsvg', LoadComponent)
51
50
  app.component('Splitpanes', Splitpanes)
52
51
  app.component('Pane', Pane)
53
-
52
+
54
53
  // 添加全局方法
55
- app.config.globalProperties.$myMethod = function() {
54
+ app.config.globalProperties.$myMethod = function () {
56
55
  console.log('这是我的全局方法')
57
56
  }
58
-
57
+
59
58
  // 全局错误处理
60
59
  app.config.errorHandler = (err, vm, info) => {
61
60
  console.info(err)
62
-
63
- bdsdk && bdsdk.addLogs({
64
- logtype: 'jserror',
65
- logtitle: `[脚本错误]${err.name}`,
66
- user_id: 'dbadmin',
67
- logdetail: `[错误信息]:${err.message},[错误堆栈]:${err.stack},[脚本信息]:${info}`,
68
- objid: bdsdk?.code,
69
- showtype: '',
70
- sysid: ''
71
- })
61
+
62
+ bdsdk &&
63
+ bdsdk.addLogs({
64
+ logtype: 'jserror',
65
+ logtitle: `[脚本错误]${err.name}`,
66
+ user_id: 'dbadmin',
67
+ logdetail: `[错误信息]:${err.message},[错误堆栈]:${err.stack},[脚本信息]:${info}`,
68
+ objid: bdsdk?.code,
69
+ showtype: '',
70
+ sysid: ''
71
+ })
72
72
  }
73
73
  }
74
74
  }
75
75
 
76
76
  export default useElement
77
- export {useElement}
77
+ export { useElement }
78
78
  // 功能 showwarning, showsuccess, showerror, showconfirm
79
79
  export * from './utils/message.js'
80
80
  export * from './utils/index.js'
81
81
  export * from './global/index'
82
82
  export * from './utils/hookDialog.js'
83
83
  export * from './utils/hookPage.js' // 分页hook函数
84
- export {dayjs}
84
+ export { dayjs }
85
85
  // 导出所有组件
86
- export * from './src/index.js'
86
+ export * from './src/index.js'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bdsoft/element",
3
3
  "description": "内部UI组件",
4
- "version": "1.1.5",
4
+ "version": "1.1.7",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "scripts": {
@@ -11,7 +11,6 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@element-plus/icons-vue": "^2.3.2",
14
- "dayjs": "^1.11.19",
15
14
  "element-plus": "2.13.1",
16
15
  "splitpanes": "4.0.4"
17
16
  }
@@ -17,7 +17,7 @@
17
17
  <template v-if="index % 2 === 0">
18
18
  <!-- 信息面板 -->
19
19
  <div class="milestone-info">
20
- <div class="milestone-date">{{ dayjs(item.rq).format('YYYY-MM-DD') }}</div>
20
+ <!-- <div class="milestone-date">{{ dayjs(item.rq).format('YYYY-MM-DD') }}</div> -->
21
21
  <div class="milestone-name">{{ item.name }}</div>
22
22
  </div>
23
23
  <!-- 竖线连接 -->
@@ -48,8 +48,7 @@
48
48
 
49
49
  <script setup>
50
50
  import { ref, computed } from 'vue';
51
- import * as dayjsModule from 'dayjs'
52
- const dayjs = dayjsModule.default || dayjsModule;
51
+ // import { dayjs } from '../../../index.js'
53
52
  import BdEmpty from '../../components/empty/empty.vue'
54
53
  // 接收父组件传递的里程碑数据 const bgColor = ref('#0ea5e9') // 0ea5e9
55
54
  const props = defineProps({
@@ -106,6 +105,7 @@ $bgColor: v-bind(bgColor);
106
105
  padding-right: 16px;
107
106
  margin-right: calc(50px - 16px);
108
107
  margin-top: 100px;
108
+
109
109
  .with-arrow {
110
110
  position: absolute;
111
111
  right: -16px; // 定位到轨道最右侧