vsyswin-ui 0.2.80 → 0.2.82
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/lib/vsyswin-ui.common.js +164 -11
- package/lib/vsyswin-ui.common.js.map +1 -1
- package/lib/vsyswin-ui.umd.js +164 -11
- package/lib/vsyswin-ui.umd.js.map +1 -1
- package/lib/vsyswin-ui.umd.min.js +5 -5
- package/lib/vsyswin-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/packages/base-dialog/index.js +10 -0
- package/packages/base-dialog/src/base-dialog.vue +107 -0
- package/packages/button-ellipsis/src/button-list.vue +1 -1
- package/packages/index.js +4 -2
- package/packages/styles/common.scss +15 -0
package/package.json
CHANGED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 封装弹框 -->
|
|
3
|
+
<div class="popup">
|
|
4
|
+
<el-dialog :title="dialogTitle" appendToBody custom-class="syswin-dialog-center-footer" :visible.sync="dialogVisible" :width="width" :before-close="handleClose" :close-on-click-modal="closeOnClickModal">
|
|
5
|
+
<slot>
|
|
6
|
+
<p>弹框自定义的内容</p>
|
|
7
|
+
</slot>
|
|
8
|
+
<span v-if="!$slots.footer" slot="footer" class="dialog-footer">
|
|
9
|
+
<el-button type="primary" @click="Save" size="small" :loading="loading">确 定</el-button>
|
|
10
|
+
<el-button @click="Cancel" size="small">取 消</el-button>
|
|
11
|
+
</span>
|
|
12
|
+
<div v-else class="my-footer">
|
|
13
|
+
<slot name="footer" />
|
|
14
|
+
</div>
|
|
15
|
+
</el-dialog>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
export default {
|
|
21
|
+
name: 'SyBaseDialog',
|
|
22
|
+
props: {
|
|
23
|
+
dialogTitle: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: '标题'
|
|
26
|
+
},
|
|
27
|
+
visible: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
},
|
|
31
|
+
width: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: '550px'
|
|
34
|
+
},
|
|
35
|
+
closeOnClickModal: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false
|
|
38
|
+
},
|
|
39
|
+
loading: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
computed: {
|
|
45
|
+
dialogVisible: {
|
|
46
|
+
get() {
|
|
47
|
+
return this.visible
|
|
48
|
+
},
|
|
49
|
+
set(val) {
|
|
50
|
+
// 当visible改变的时候,触发父组件的 updateVisible方法,在该方法中更改传入子组件的 centerDialogVisible的值
|
|
51
|
+
this.$emit('update:visible', val)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
methods: {
|
|
56
|
+
Cancel() {
|
|
57
|
+
this.$emit('update:visible', false)
|
|
58
|
+
},
|
|
59
|
+
Save() {
|
|
60
|
+
this.$emit('confirm')
|
|
61
|
+
},
|
|
62
|
+
handleClose() {
|
|
63
|
+
this.$emit('update:visible', false)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<style lang="scss" scoped>
|
|
70
|
+
.popup {
|
|
71
|
+
.el-dialog {
|
|
72
|
+
background-color: #ffffff;
|
|
73
|
+
box-shadow: 0px 0px 10px 0px rgba(17, 130, 251, 0.5);
|
|
74
|
+
border-radius: 5px;
|
|
75
|
+
margin-top: 10% !important;
|
|
76
|
+
}
|
|
77
|
+
.el-dialog__header {
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 40px;
|
|
80
|
+
line-height: 38px;
|
|
81
|
+
border-bottom: 1px solid #f6f7f9;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
padding: 0 20px;
|
|
84
|
+
font-size: 16px;
|
|
85
|
+
}
|
|
86
|
+
.el-dialog__close.el-icon.el-icon-close {
|
|
87
|
+
font-size: 20px;
|
|
88
|
+
width: 17px;
|
|
89
|
+
height: 17px;
|
|
90
|
+
}
|
|
91
|
+
.el-button.el-button--default {
|
|
92
|
+
// width: 88px;
|
|
93
|
+
color: var(--primary-color);
|
|
94
|
+
border: 1px solid var(--primary-color);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.el-dialog__headerbtn {
|
|
98
|
+
top: 4px;
|
|
99
|
+
}
|
|
100
|
+
.el-dialog__title {
|
|
101
|
+
color: #3c4354;
|
|
102
|
+
font-family: PingFangSC-Regular;
|
|
103
|
+
font-size: 16px;
|
|
104
|
+
line-height: 16px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
</style>
|
package/packages/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import SearchBar from './search-bar' // 搜索工具栏
|
|
|
10
10
|
import simpleSearchBar from './simple-search-bar' // 简单搜索栏组件
|
|
11
11
|
import inputMore from './input-more' // 简单搜索栏组件
|
|
12
12
|
import paging from './paging'
|
|
13
|
+
import baseDialog from './base-dialog'
|
|
13
14
|
import newSearchBar from './newSearchBar' // 高级筛选
|
|
14
15
|
import table from './table' // 表格组件
|
|
15
16
|
import dragSet from './drag-set'
|
|
@@ -19,7 +20,7 @@ export { default as Progress } from './progress';
|
|
|
19
20
|
const { buttonList, buttonItem } = buttonEllipsis
|
|
20
21
|
|
|
21
22
|
// 存储组件列表
|
|
22
|
-
const components = [layout, searchTree, selectProject, selectTree, buttonItem, buttonList, SearchBar, simpleSearchBar, inputMore, paging, newSearchBar, table, dragSet, topTabs]
|
|
23
|
+
const components = [layout, searchTree, selectProject, selectTree, buttonItem, buttonList, SearchBar, simpleSearchBar, inputMore, paging, newSearchBar, table, dragSet, topTabs, baseDialog]
|
|
23
24
|
|
|
24
25
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
25
26
|
const install = function (Vue) {
|
|
@@ -51,5 +52,6 @@ export default {
|
|
|
51
52
|
newSearchBar,
|
|
52
53
|
table,
|
|
53
54
|
topTabs,
|
|
54
|
-
dragSet
|
|
55
|
+
dragSet,
|
|
56
|
+
baseDialog
|
|
55
57
|
}
|
|
@@ -411,6 +411,21 @@ $alien: left, center, right;
|
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
+
|
|
415
|
+
/*
|
|
416
|
+
BaseDialog组件使用到的样式,使底部按钮居中
|
|
417
|
+
*/
|
|
418
|
+
.syswin-dialog-center-footer {
|
|
419
|
+
.el-dialog__body {
|
|
420
|
+
padding: 10px;
|
|
421
|
+
box-sizing: border-box;
|
|
422
|
+
}
|
|
423
|
+
.el-dialog__footer,
|
|
424
|
+
.my-footer {
|
|
425
|
+
text-align: center;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
414
429
|
// 侧滑窗(使用el-drawer, direction=rtl 添加 class=syswin-drawer)
|
|
415
430
|
// 例:
|
|
416
431
|
// <el-drawer title="我是标题" :visible.sync="drawer" :direction="rtl" class="syswin-drawer">
|