@bsgoal/common 2.5.7 → 2.7.0
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/dist/index.mjs +1478 -1385
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +13 -13
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/bsgoal-base-alert/demo.vue +6 -6
- package/src/components/bsgoal-base-alert/index.vue +6 -7
- package/src/components/bsgoal-base-button/demo.vue +8 -10
- package/src/components/bsgoal-base-button/index.vue +6 -7
- package/src/components/bsgoal-base-cascader/demo.vue +5 -6
- package/src/components/bsgoal-base-cascader/index.vue +6 -7
- package/src/components/bsgoal-base-dialog/demo.vue +4 -6
- package/src/components/bsgoal-base-dialog/index.vue +11 -7
- package/src/components/bsgoal-base-form/demo.vue +5 -6
- package/src/components/bsgoal-base-form/index.vue +5 -6
- package/src/components/bsgoal-base-frame/demo.vue +5 -5
- package/src/components/bsgoal-base-frame/index.vue +4 -5
- package/src/components/bsgoal-base-input/demo.vue +38 -0
- package/src/components/bsgoal-base-input/index.vue +109 -0
- package/src/components/bsgoal-base-item/demo.vue +4 -5
- package/src/components/bsgoal-base-item/index.vue +5 -5
- package/src/components/bsgoal-base-layout/demo.vue +5 -6
- package/src/components/bsgoal-base-layout/index.vue +4 -6
- package/src/components/bsgoal-base-line/demo.vue +5 -6
- package/src/components/bsgoal-base-line/index.vue +6 -7
- package/src/components/bsgoal-base-link/demo.vue +8 -14
- package/src/components/bsgoal-base-link/index.vue +5 -6
- package/src/components/bsgoal-base-search/demo.vue +6 -9
- package/src/components/bsgoal-base-search/index.vue +4 -6
- package/src/components/bsgoal-base-search-operation/index.vue +6 -7
- package/src/components/bsgoal-base-search-table/demo.vue +4 -7
- package/src/components/bsgoal-base-search-table/index.vue +5 -6
- package/src/components/bsgoal-base-select/demo.vue +4 -5
- package/src/components/bsgoal-base-select/index.vue +5 -5
- package/src/components/bsgoal-base-switch/demo.vue +5 -5
- package/src/components/bsgoal-base-switch/index.vue +5 -5
- package/src/components/bsgoal-base-table/demo.vue +6 -7
- package/src/components/bsgoal-base-table/index.vue +4 -5
- package/src/components/bsgoal-base-table-content/index.vue +5 -6
- package/src/components/bsgoal-base-table-empty/demo.vue +5 -6
- package/src/components/bsgoal-base-table-empty/index.vue +3 -3
- package/src/components/bsgoal-base-table-pagination/index.vue +5 -6
- package/src/components/bsgoal-base-tabs/demo.vue +5 -6
- package/src/components/bsgoal-base-tabs/index.vue +5 -5
- package/src/components/bsgoal-base-time/demo.vue +6 -6
- package/src/components/bsgoal-base-time/index.vue +5 -5
- package/src/components/bsgoal-base-time-range/demo.vue +5 -5
- package/src/components/bsgoal-base-time-range/index.vue +5 -5
- package/src/components/bsgoal-base-tooltip/demo.vue +5 -7
- package/src/components/bsgoal-base-tooltip/index.vue +5 -6
- package/src/components/bsgoal-base-tree/demo.vue +5 -6
- package/src/components/bsgoal-base-tree/index.vue +5 -6
- package/src/components/bsgoal-base-tree-fold/index.vue +5 -6
- package/src/components/layout/layout-home.vue +16 -16
- package/src/components/layout/layout-left-menu.vue +22 -16
- package/src/components/layout/layout-right-container.vue +12 -11
- package/src/components/layout/layout-top-header.vue +11 -13
- package/src/entry.js +14 -0
- package/src/router/index.js +6 -1
- package/src/components/bsgoal-base-search-table/demo-table.vue +0 -52
|
@@ -7,11 +7,6 @@
|
|
|
7
7
|
* @Description: 虚拟化树型结构 公共组件
|
|
8
8
|
*
|
|
9
9
|
-->
|
|
10
|
-
<script>
|
|
11
|
-
export default {
|
|
12
|
-
name: 'BsgoalBaseTree'
|
|
13
|
-
}
|
|
14
|
-
</script>
|
|
15
10
|
<script setup>
|
|
16
11
|
/* setup模板
|
|
17
12
|
---------------------------------------------------------------- */
|
|
@@ -19,7 +14,11 @@ import { ref, watch } from 'vue'
|
|
|
19
14
|
import directiveBase from '../../directives/directiveBase.js'
|
|
20
15
|
import BsgoalBaseLine from '../bsgoal-base-line/index.vue'
|
|
21
16
|
import BsgoalBaseTreeFold from '../bsgoal-base-tree-fold/index.vue'
|
|
22
|
-
|
|
17
|
+
|
|
18
|
+
defineOptions({
|
|
19
|
+
name: 'BsgoalBaseTree'
|
|
20
|
+
})
|
|
21
|
+
|
|
23
22
|
const props = defineProps({
|
|
24
23
|
/**
|
|
25
24
|
* 树结构 的下边距
|
|
@@ -2,23 +2,22 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-21 14:30:43
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-
|
|
5
|
+
* @LastEditTime: 2023-05-26 16:09:24
|
|
6
6
|
* @FilePath: \common\src\components\bsgoal-base-tree-fold\index.vue
|
|
7
7
|
* @Description: 树结构折叠按钮
|
|
8
8
|
*
|
|
9
9
|
-->
|
|
10
10
|
|
|
11
|
-
<script>
|
|
12
|
-
export default {
|
|
13
|
-
name: 'BsgoalBaseTreeFold'
|
|
14
|
-
}
|
|
15
|
-
</script>
|
|
16
11
|
<script setup>
|
|
17
12
|
/* setup模板
|
|
18
13
|
---------------------------------------------------------------- */
|
|
19
14
|
import { ref } from 'vue'
|
|
20
15
|
import { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'
|
|
21
16
|
|
|
17
|
+
defineOptions({
|
|
18
|
+
name: 'BsgoalBaseTreeFold'
|
|
19
|
+
})
|
|
20
|
+
|
|
22
21
|
defineProps(['modelValue'])
|
|
23
22
|
const emits = defineEmits(['update:modelValue'])
|
|
24
23
|
|
|
@@ -2,12 +2,24 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 13:41:13
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-
|
|
5
|
+
* @LastEditTime: 2023-05-26 16:09:56
|
|
6
6
|
* @FilePath: \common\src\components\layout\layout-home.vue
|
|
7
7
|
* @Description: 首页
|
|
8
8
|
*
|
|
9
9
|
-->
|
|
10
10
|
|
|
11
|
+
<script setup>
|
|
12
|
+
/* setup模板
|
|
13
|
+
---------------------------------------------------------------- */
|
|
14
|
+
import LayoutLeftMenu from '@/components/layout/layout-left-menu.vue'
|
|
15
|
+
import LayoutTopHeader from '@/components/layout/layout-top-header.vue'
|
|
16
|
+
import LayoutRightContainer from '@/components/layout/layout-right-container.vue'
|
|
17
|
+
|
|
18
|
+
defineOptions({
|
|
19
|
+
name: 'LayoutHome'
|
|
20
|
+
})
|
|
21
|
+
</script>
|
|
22
|
+
|
|
11
23
|
<template>
|
|
12
24
|
<div class="layout-home">
|
|
13
25
|
<el-container>
|
|
@@ -18,8 +30,8 @@
|
|
|
18
30
|
<el-aside width="200px">
|
|
19
31
|
<LayoutLeftMenu />
|
|
20
32
|
</el-aside>
|
|
21
|
-
<el-main style="padding:10px; background-color
|
|
22
|
-
<LayoutRightContainer
|
|
33
|
+
<el-main style="padding: 10px; background-color: #f0f2f5">
|
|
34
|
+
<LayoutRightContainer style="background-color: #fff">
|
|
23
35
|
<router-view />
|
|
24
36
|
</LayoutRightContainer>
|
|
25
37
|
</el-main>
|
|
@@ -27,18 +39,6 @@
|
|
|
27
39
|
</el-container>
|
|
28
40
|
</div>
|
|
29
41
|
</template>
|
|
30
|
-
<script>
|
|
31
|
-
export default {
|
|
32
|
-
name: 'LayoutHome'
|
|
33
|
-
}
|
|
34
|
-
</script>
|
|
35
|
-
<script setup>
|
|
36
|
-
/* setup模板
|
|
37
|
-
---------------------------------------------------------------- */
|
|
38
|
-
import LayoutLeftMenu from '@/components/layout/layout-left-menu.vue'
|
|
39
|
-
import LayoutTopHeader from '@/components/layout/layout-top-header.vue'
|
|
40
|
-
import LayoutRightContainer from '@/components/layout/layout-right-container.vue'
|
|
41
|
-
</script>
|
|
42
42
|
<style lang="scss" scoped>
|
|
43
43
|
/* 自定义样式
|
|
44
44
|
---------------------------------------------------------------- */
|
|
@@ -57,4 +57,4 @@ import LayoutRightContainer from '@/components/layout/layout-right-container.vue
|
|
|
57
57
|
<style lang="scss">
|
|
58
58
|
/* 覆盖样式
|
|
59
59
|
---------------------------------------------------------------- */
|
|
60
|
-
</style>
|
|
60
|
+
</style>
|
|
@@ -8,6 +8,28 @@
|
|
|
8
8
|
*
|
|
9
9
|
-->
|
|
10
10
|
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
/* setup模板
|
|
14
|
+
---------------------------------------------------------------- */
|
|
15
|
+
import { Menu as IconMenu } from '@element-plus/icons-vue'
|
|
16
|
+
import { ref, computed, toRefs, watch, unref } from 'vue'
|
|
17
|
+
import { useRouter } from 'vue-router'
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
defineOptions({
|
|
21
|
+
name: 'LayoutLeftMenu'
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const router = useRouter()
|
|
25
|
+
const routes = router.getRoutes()
|
|
26
|
+
const { children = [] } = routes.find((fi) => fi.name === 'home') || {}
|
|
27
|
+
const menuList = ref(children)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
</script>
|
|
32
|
+
|
|
11
33
|
<template>
|
|
12
34
|
<div class="layout-left-menu">
|
|
13
35
|
<el-menu default-active="0" style="height: calc(100vh - 60px) ;">
|
|
@@ -22,22 +44,6 @@
|
|
|
22
44
|
</el-menu>
|
|
23
45
|
</div>
|
|
24
46
|
</template>
|
|
25
|
-
<script>
|
|
26
|
-
export default {
|
|
27
|
-
name: 'LayoutLeftMenu'
|
|
28
|
-
}
|
|
29
|
-
</script>
|
|
30
|
-
<script setup>
|
|
31
|
-
/* setup模板
|
|
32
|
-
---------------------------------------------------------------- */
|
|
33
|
-
import { Menu as IconMenu } from '@element-plus/icons-vue'
|
|
34
|
-
import { ref, computed, toRefs, watch, unref } from 'vue'
|
|
35
|
-
import { useRouter } from 'vue-router'
|
|
36
|
-
const router = useRouter()
|
|
37
|
-
const routes = router.getRoutes()
|
|
38
|
-
const { children = [] } = routes.find((fi) => fi.name === 'home') || {}
|
|
39
|
-
const menuList = ref(children)
|
|
40
|
-
</script>
|
|
41
47
|
<style lang="scss" scoped>
|
|
42
48
|
/* 自定义样式
|
|
43
49
|
---------------------------------------------------------------- */
|
|
@@ -2,27 +2,28 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 14:12:09
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-05-
|
|
5
|
+
* @LastEditTime: 2023-05-26 16:10:56
|
|
6
6
|
* @FilePath: \common\src\components\layout\layout-right-container.vue
|
|
7
7
|
* @Description: 主体内容容器
|
|
8
8
|
*
|
|
9
9
|
-->
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
<div class="layout-right-container">
|
|
13
|
-
<slot></slot>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
<script>
|
|
17
|
-
export default {
|
|
18
|
-
name: 'LayoutRightContainer'
|
|
19
|
-
}
|
|
20
|
-
</script>
|
|
11
|
+
|
|
21
12
|
<script setup>
|
|
22
13
|
/* setup模板
|
|
23
14
|
---------------------------------------------------------------- */
|
|
24
15
|
import { ref, computed, toRefs, watch, unref } from 'vue'
|
|
16
|
+
|
|
17
|
+
defineOptions({
|
|
18
|
+
name: 'LayoutRightContainer'
|
|
19
|
+
})
|
|
20
|
+
|
|
25
21
|
</script>
|
|
22
|
+
<template>
|
|
23
|
+
<div class="layout-right-container">
|
|
24
|
+
<slot></slot>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
26
27
|
<style lang="scss" scoped>
|
|
27
28
|
/* 自定义样式
|
|
28
29
|
---------------------------------------------------------------- */
|
|
@@ -2,28 +2,26 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 14:09:54
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-
|
|
5
|
+
* @LastEditTime: 2023-05-26 16:11:29
|
|
6
6
|
* @FilePath: \common\src\components\layout\layout-top-header.vue
|
|
7
7
|
* @Description: 头部
|
|
8
8
|
*
|
|
9
9
|
-->
|
|
10
10
|
|
|
11
|
+
<script setup>
|
|
12
|
+
/* setup模板
|
|
13
|
+
---------------------------------------------------------------- */
|
|
14
|
+
import { ref, computed, toRefs, watch, unref } from 'vue'
|
|
15
|
+
|
|
16
|
+
defineOptions({
|
|
17
|
+
name: 'LayoutTopHeader'
|
|
18
|
+
})
|
|
19
|
+
</script>
|
|
11
20
|
<template>
|
|
12
21
|
<div class="layout-top-header">
|
|
13
22
|
<h1>公共组件演示</h1>
|
|
14
23
|
</div>
|
|
15
24
|
</template>
|
|
16
|
-
<script>
|
|
17
|
-
export default {
|
|
18
|
-
name: "LayoutTopHeader",
|
|
19
|
-
};
|
|
20
|
-
</script>
|
|
21
|
-
<script setup>
|
|
22
|
-
/* setup模板
|
|
23
|
-
---------------------------------------------------------------- */
|
|
24
|
-
import { ref, computed, toRefs, watch, unref
|
|
25
|
-
} from 'vue';
|
|
26
|
-
</script>
|
|
27
25
|
<style lang="scss" scoped>
|
|
28
26
|
/* 自定义样式
|
|
29
27
|
---------------------------------------------------------------- */
|
|
@@ -37,4 +35,4 @@ import { ref, computed, toRefs, watch, unref
|
|
|
37
35
|
<style lang="scss">
|
|
38
36
|
/* 覆盖样式
|
|
39
37
|
---------------------------------------------------------------- */
|
|
40
|
-
</style>
|
|
38
|
+
</style>
|
package/src/entry.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-05-11 18:31:55
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-05-29 09:58:19
|
|
6
|
+
* @FilePath: \common\src\entry.js
|
|
7
|
+
* @Description: 打包 入口文件
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
1
13
|
import BsgoalBaseForm from '@/components/bsgoal-base-form/index.vue'
|
|
2
14
|
import BsgoalBaseTable from '@/components/bsgoal-base-table/index.vue'
|
|
3
15
|
import BsgoalBaseLine from '@/components/bsgoal-base-line/index.vue'
|
|
@@ -14,6 +26,7 @@ import BsgoalBaseTime from '@/components/bsgoal-base-time/index.vue'
|
|
|
14
26
|
import BsgoalBaseTimeRange from '@/components/bsgoal-base-time-range/index.vue'
|
|
15
27
|
import BsgoalBaseSwitch from '@/components/bsgoal-base-switch/index.vue'
|
|
16
28
|
import BsgoalBaseItem from '@/components/bsgoal-base-item/index.vue'
|
|
29
|
+
import BsgoalBaseInput from '@/components/bsgoal-base-input/index.vue'
|
|
17
30
|
import componentTypeEnums from '@/enums/componentTypeEnums.js'
|
|
18
31
|
import { useFetch } from '@/combines/useFetchs.js'
|
|
19
32
|
|
|
@@ -42,6 +55,7 @@ export default {
|
|
|
42
55
|
BsgoalBaseTimeRange,
|
|
43
56
|
BsgoalBaseSwitch,
|
|
44
57
|
BsgoalBaseItem,
|
|
58
|
+
BsgoalBaseInput,
|
|
45
59
|
}
|
|
46
60
|
|
|
47
61
|
for (const [name, component] of Object.entries(componentsMap)) {
|
package/src/router/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: canlong.shen
|
|
3
3
|
* @Date: 2023-04-10 10:41:52
|
|
4
4
|
* @LastEditors: canlong.shen
|
|
5
|
-
* @LastEditTime: 2023-05-
|
|
5
|
+
* @LastEditTime: 2023-05-29 09:57:18
|
|
6
6
|
* @FilePath: \common\src\router\index.js
|
|
7
7
|
* @Description: 路由配置
|
|
8
8
|
*
|
|
@@ -18,6 +18,11 @@ const router = createRouter({
|
|
|
18
18
|
name: 'home',
|
|
19
19
|
component: LayoutHome,
|
|
20
20
|
children: [
|
|
21
|
+
{
|
|
22
|
+
path: '/bsgoal-base-input-demo',
|
|
23
|
+
name: '输入框',
|
|
24
|
+
component: import('@/components/bsgoal-base-input/demo.vue')
|
|
25
|
+
},
|
|
21
26
|
{
|
|
22
27
|
path: '/bsgoal-base-table-demo',
|
|
23
28
|
name: '表格',
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-table :data="tableData" style="width: 100%">
|
|
3
|
-
<el-table-column type="index" :index="indexMethod" />
|
|
4
|
-
<el-table-column prop="date" label="Date" width="180" />
|
|
5
|
-
<el-table-column prop="name" label="Name" width="180" />
|
|
6
|
-
<el-table-column prop="address" label="Address" />
|
|
7
|
-
</el-table>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script setup>
|
|
11
|
-
const indexMethod = (index) => {
|
|
12
|
-
return index * 2
|
|
13
|
-
}
|
|
14
|
-
const tableData = [
|
|
15
|
-
{
|
|
16
|
-
date: '2016-05-03',
|
|
17
|
-
name: 'Tom',
|
|
18
|
-
state: 'California',
|
|
19
|
-
city: 'Los Angeles',
|
|
20
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
21
|
-
zip: 'CA 90036',
|
|
22
|
-
tag: 'Home',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
date: '2016-05-02',
|
|
26
|
-
name: 'Tom',
|
|
27
|
-
state: 'California',
|
|
28
|
-
city: 'Los Angeles',
|
|
29
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
30
|
-
zip: 'CA 90036',
|
|
31
|
-
tag: 'Office',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
date: '2016-05-04',
|
|
35
|
-
name: 'Tom',
|
|
36
|
-
state: 'California',
|
|
37
|
-
city: 'Los Angeles',
|
|
38
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
39
|
-
zip: 'CA 90036',
|
|
40
|
-
tag: 'Home',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
date: '2016-05-01',
|
|
44
|
-
name: 'Tom',
|
|
45
|
-
state: 'California',
|
|
46
|
-
city: 'Los Angeles',
|
|
47
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
48
|
-
zip: 'CA 90036',
|
|
49
|
-
tag: 'Office',
|
|
50
|
-
},
|
|
51
|
-
]
|
|
52
|
-
</script>
|