@bdsoft/element 1.1.14 → 1.1.15
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 +12 -12
- package/package.json +1 -1
- package/src/components/chartconfig/index.vue +1 -1
- package/src/utils/func.js +30 -0
- package/src/xm_components/HeadSearch/index.vue +1 -1
- package/vite.config.js +3 -3
package/index.js
CHANGED
|
@@ -5,10 +5,10 @@ const dayjs = dayjsModule.default || dayjsModule;
|
|
|
5
5
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
6
6
|
window.ElementPlus = ElementPlus
|
|
7
7
|
|
|
8
|
-
import '
|
|
8
|
+
import './src/assets/css/element.scss'
|
|
9
9
|
import 'splitpanes/dist/splitpanes.css'
|
|
10
|
-
import '
|
|
11
|
-
import '
|
|
10
|
+
import './src/assets/css/layout.scss'
|
|
11
|
+
import './src/assets/css/tailwind.scss'
|
|
12
12
|
|
|
13
13
|
// 添加分隔组件
|
|
14
14
|
import { Splitpanes, Pane } from 'splitpanes'
|
|
@@ -16,10 +16,10 @@ import { Splitpanes, Pane } from 'splitpanes'
|
|
|
16
16
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
17
17
|
window.ElementPlusIconVue = ElementPlusIconsVue
|
|
18
18
|
|
|
19
|
-
import LoadComponent from '
|
|
19
|
+
import LoadComponent from './src/utils/coms/load.jsx'
|
|
20
20
|
// 自定义的所有组件
|
|
21
|
-
import * as components from '
|
|
22
|
-
|
|
21
|
+
import * as components from './src/index.js'
|
|
22
|
+
debugger
|
|
23
23
|
// 定义 useElement 为 Vue 插件
|
|
24
24
|
const useElement = {
|
|
25
25
|
install(app, options = {}) {
|
|
@@ -76,11 +76,11 @@ const useElement = {
|
|
|
76
76
|
export default useElement
|
|
77
77
|
export { useElement }
|
|
78
78
|
// 功能 showwarning, showsuccess, showerror, showconfirm
|
|
79
|
-
export * from '
|
|
80
|
-
export * from '
|
|
81
|
-
export * from '
|
|
82
|
-
export * from '
|
|
83
|
-
export * from '
|
|
79
|
+
export * from './src/utils/message.js'
|
|
80
|
+
export * from './src/utils/index.js'
|
|
81
|
+
export * from './src/global/index'
|
|
82
|
+
export * from './src/utils/hookDialog.js'
|
|
83
|
+
export * from './src/utils/hookPage.js' // 分页hook函数
|
|
84
84
|
export { dayjs }
|
|
85
85
|
// 导出所有组件
|
|
86
|
-
export * from '
|
|
86
|
+
export * from './src/index.js'
|
package/package.json
CHANGED
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
</template>
|
|
85
85
|
<script setup>
|
|
86
86
|
import { ref, reactive, computed, watch, onMounted } from 'vue'
|
|
87
|
-
import { useDialog } from '
|
|
87
|
+
import { useDialog } from '../../utils/hookDialog.js'
|
|
88
88
|
|
|
89
89
|
const emits = defineEmits(['setNewChartConfig'])
|
|
90
90
|
|
package/src/utils/func.js
CHANGED
|
@@ -30,3 +30,33 @@ export const debounce = (func, delay) => {
|
|
|
30
30
|
}, delay)
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 日期格式化
|
|
36
|
+
* @param {*} time
|
|
37
|
+
* @param {*} format
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
export function parseTime(time, format) {
|
|
41
|
+
if (!time) return ''
|
|
42
|
+
let t = new Date(time)
|
|
43
|
+
let tf = function (i) {
|
|
44
|
+
return (i < 10 ? '0' : '') + i
|
|
45
|
+
}
|
|
46
|
+
return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function (a) {
|
|
47
|
+
switch (a) {
|
|
48
|
+
case 'yyyy':
|
|
49
|
+
return tf(t.getFullYear())
|
|
50
|
+
case 'MM':
|
|
51
|
+
return tf(t.getMonth() + 1)
|
|
52
|
+
case 'mm':
|
|
53
|
+
return tf(t.getMinutes())
|
|
54
|
+
case 'dd':
|
|
55
|
+
return tf(t.getDate())
|
|
56
|
+
case 'HH':
|
|
57
|
+
return tf(t.getHours())
|
|
58
|
+
case 'ss':
|
|
59
|
+
return tf(t.getSeconds())
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</template>
|
|
43
43
|
<script setup>
|
|
44
44
|
import { ref, reactive, computed, onMounted } from 'vue';
|
|
45
|
-
import { getUrlKey, debounce } from '
|
|
45
|
+
import { getUrlKey, debounce } from '../../utils/func.js';
|
|
46
46
|
|
|
47
47
|
const emits = defineEmits(['getSearchList']);
|
|
48
48
|
//
|
package/vite.config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineConfig } from 'vite'
|
|
2
2
|
import { fileURLToPath } from 'node:url'
|
|
3
|
-
import { resolve } from 'path'
|
|
3
|
+
// import { resolve } from 'path'
|
|
4
4
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
|
5
5
|
import vue from '@vitejs/plugin-vue'
|
|
6
6
|
import importToConst from 'rollup-plugin-import-to-const'
|
|
@@ -11,8 +11,8 @@ export default defineConfig({
|
|
|
11
11
|
resolve: {
|
|
12
12
|
alias: {
|
|
13
13
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
14
|
-
'utils': fileURLToPath(new URL('./utils', import.meta.url)),
|
|
15
|
-
'global': fileURLToPath(new URL('./global', import.meta.url)),
|
|
14
|
+
'@utils': fileURLToPath(new URL('./src/utils', import.meta.url)),
|
|
15
|
+
'global': fileURLToPath(new URL('./src/global', import.meta.url)),
|
|
16
16
|
'~': fileURLToPath(new URL('./src/assets', import.meta.url))
|
|
17
17
|
}
|
|
18
18
|
},
|