@bsgoal/common 0.0.10 → 0.1.1
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 +208 -193
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -2
- package/src/App.vue +9 -0
- package/src/combines/useComs.js +32 -0
- package/src/combines/useFetchs.js +48 -0
- package/src/components/bsgoal-base-dialog/demo.vue +50 -0
- package/src/components/bsgoal-base-dialog/index.vue +133 -0
- package/src/components/bsgoal-base-form/demo.vue +187 -0
- package/src/components/bsgoal-base-form/index.vue +499 -0
- package/src/components/bsgoal-base-frame/demo.vue +35 -0
- package/src/components/bsgoal-base-frame/index.vue +29 -0
- package/src/components/bsgoal-base-line/demo.vue +42 -0
- package/src/components/bsgoal-base-line/index.vue +54 -0
- package/src/components/bsgoal-base-search/demo.vue +197 -0
- package/src/components/bsgoal-base-search/index.vue +486 -0
- package/src/components/bsgoal-base-search-operation/index.vue +76 -0
- package/src/components/bsgoal-base-search-table/demo-table.vue +52 -0
- package/src/components/bsgoal-base-search-table/demo.vue +664 -0
- package/src/components/bsgoal-base-search-table/index.vue +159 -0
- package/src/components/bsgoal-base-table/demo.vue +270 -0
- package/src/components/bsgoal-base-table/index.vue +278 -0
- package/src/components/bsgoal-base-table-content/index.vue +42 -0
- package/src/components/bsgoal-base-table-pagination/index.vue +109 -0
- package/src/components/bsgoal-base-tree/demo.vue +113 -0
- package/src/components/bsgoal-base-tree/index.vue +213 -0
- package/src/components/bsgoal-base-tree-fold/index.vue +65 -0
- package/src/components/layout/layout-home.vue +60 -0
- package/src/components/layout/layout-left-menu.vue +48 -0
- package/src/components/layout/layout-right-container.vue +36 -0
- package/src/components/layout/layout-top-header.vue +40 -0
- package/src/directives/directiveBase.js +94 -0
- package/src/entry.js +35 -0
- package/src/enums/enumType.js +31 -0
- package/src/main.js +11 -0
- package/src/router/index.js +66 -0
- package/src/styles/index.css +14 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: canlong.shen
|
|
3
|
+
* @Date: 2023-04-13 18:09:43
|
|
4
|
+
* @LastEditors: canlong.shen
|
|
5
|
+
* @LastEditTime: 2023-04-15 11:04:58
|
|
6
|
+
* @FilePath: \common\src\components\bsgoal-base-search-operation\index.vue
|
|
7
|
+
* @Description: 表格查询操作项 组件
|
|
8
|
+
*
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: "BsgoalBaseSearchOperation",
|
|
14
|
+
};
|
|
15
|
+
</script>
|
|
16
|
+
<script setup>
|
|
17
|
+
/* setup模板
|
|
18
|
+
---------------------------------------------------------------- */
|
|
19
|
+
import { Delete, Search, ArrowDown, ArrowUp } from '@element-plus/icons-vue'
|
|
20
|
+
import { ref, unref } from 'vue'
|
|
21
|
+
defineProps({
|
|
22
|
+
/**
|
|
23
|
+
* 是否显示折叠按钮
|
|
24
|
+
*/
|
|
25
|
+
fold: {
|
|
26
|
+
type: [Boolean],
|
|
27
|
+
default: false
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const emit = defineEmits(['on-fold'])
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
const foldStatus = ref(false); // 折叠的状态
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @Author: canlong.shen
|
|
39
|
+
* @description: 折叠事件
|
|
40
|
+
* @default:
|
|
41
|
+
* @return {}
|
|
42
|
+
*/
|
|
43
|
+
const handleFold = () => {
|
|
44
|
+
foldStatus.value = !unref(foldStatus)
|
|
45
|
+
emit('on-fold', foldStatus.value)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
</script>
|
|
50
|
+
<template>
|
|
51
|
+
<div class="bsgoal-base-search-operation">
|
|
52
|
+
<el-button type="primary" :icon="Search" @click="$emit('on-search')">搜索</el-button>
|
|
53
|
+
<el-button :icon="Delete" @click="$emit('on-clear')">清空</el-button>
|
|
54
|
+
<div v-if="fold" class="operation_fold" style="color:var(--el-color-primary);" @click="handleFold"> {{ foldStatus ? '收起' : '展开' }}<el-icon color="#409EFC">
|
|
55
|
+
<ArrowUp v-show="foldStatus" />
|
|
56
|
+
<ArrowDown v-show="!foldStatus" />
|
|
57
|
+
</el-icon> </div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
<style lang="scss" scoped>
|
|
61
|
+
/* 自定义样式
|
|
62
|
+
---------------------------------------------------------------- */
|
|
63
|
+
.bsgoal-base-search-operation {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
}
|
|
67
|
+
.operation_fold {
|
|
68
|
+
margin-left: 12px;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
min-width: 3em;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
73
|
+
<style lang="scss">
|
|
74
|
+
/* 覆盖样式
|
|
75
|
+
---------------------------------------------------------------- */
|
|
76
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
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>
|