bri-components 1.5.22 → 1.6.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/README.md +83 -83
- package/lib/styles/bundle.css +12 -12
- package/lib/styles/font/fontello.svg +31 -31
- package/package.json +127 -125
- package/src/components/Error/Error403.vue +42 -42
- package/src/components/Error/Error404.vue +40 -40
- package/src/components/Error/Error500.vue +51 -51
- package/src/components/Error/error.less +162 -162
- package/src/components/Error/errorBack.vue +40 -40
- package/src/components/controls/DshControlInput.vue +195 -195
- package/src/components/controls/base/BriUpload/BriUpload.vue +435 -434
- package/src/components/controls/base/BriUpload/BriUploadImage.vue +430 -377
- package/src/components/controls/base/BriUpload/uploadList.vue +738 -727
- package/src/components/controls/base/BriUpload/uploadMixin.js +453 -446
- package/src/components/controls/base/DshCascader/DshCascader.vue +215 -215
- package/src/components/controls/base/DshCascader/components/cascaderModal.vue +366 -366
- package/src/components/controls/base/DshCascader/components/cascaderPicker.vue +416 -416
- package/src/components/controls/base/DshCascader/components/cascaderSimple.vue +141 -141
- package/src/components/controls/base/DshCascader/components/cascaderTree.vue +151 -151
- package/src/components/controls/base/DshCoordinates.vue +587 -585
- package/src/components/controls/base/DshDate/DshDate.vue +191 -191
- package/src/components/controls/base/DshDate/DshDaterange.vue +186 -186
- package/src/components/controls/base/DshDivider.vue +201 -201
- package/src/components/controls/base/DshEditor.vue +274 -274
- package/src/components/controls/base/DshInput/BriInputs.vue +166 -166
- package/src/components/controls/base/DshInput/DshInput.vue +260 -260
- package/src/components/controls/base/DshNumber/BriInputNumber/BriInputNumber.vue +435 -435
- package/src/components/controls/base/DshNumber/BriInputNumber/mixins/emitter.js +34 -34
- package/src/components/controls/base/DshNumber/BriInputNumber/mixins/form.js +14 -14
- package/src/components/controls/base/DshNumber/BriInputNumber/utils/assist.js +322 -322
- package/src/components/controls/base/DshNumber/DshNumber.vue +143 -143
- package/src/components/controls/base/DshNumber/DshNumberange.vue +109 -109
- package/src/components/controls/base/DshSelect/DshCheckbox.vue +168 -168
- package/src/components/controls/base/DshSelect/DshSelect.vue +180 -180
- package/src/components/controls/base/DshSelect/DshSelectAll.vue +269 -269
- package/src/components/controls/base/DshSwitch/DshSwitch.vue +115 -115
- package/src/components/controls/control.less +324 -324
- package/src/components/controls/controlMap.js +117 -117
- package/src/components/controls/extra/DshColor.vue +81 -81
- package/src/components/controls/extra/DshThemeColor.vue +100 -100
- package/src/components/controls/extra/DshThemeIcon.vue +122 -122
- package/src/components/controls/mixins/cascaderMixin.js +325 -325
- package/src/components/controls/mixins/cascaderPickerMixin.js +227 -227
- package/src/components/controls/mixins/cascaderTableMixin.js +130 -130
- package/src/components/controls/mixins/controlMixin.js +393 -393
- package/src/components/controls/mixins/dateMixin.js +149 -149
- package/src/components/controls/mixins/flatTableMixin.js +111 -111
- package/src/components/controls/mixins/numberMixin.js +112 -112
- package/src/components/controls/mixins/selectMixin.js +233 -233
- package/src/components/controls/mixins/switchMixin.js +87 -87
- package/src/components/controls/mixins/userAndDepartMixin.js +260 -260
- package/src/components/controls/senior/DshLabels.vue +333 -333
- package/src/components/controls/senior/DshPackage.vue +57 -57
- package/src/components/controls/senior/cascaderTable.vue +213 -213
- package/src/components/controls/senior/correlation.vue +135 -135
- package/src/components/controls/senior/flatTable.vue +138 -138
- package/src/components/controls/senior/selectDepartments.vue +397 -399
- package/src/components/controls/senior/selectUsers/departMenu.vue +296 -293
- package/src/components/controls/senior/selectUsers/selectUsers.vue +712 -712
- package/src/components/controls/special/DshBack.vue +42 -42
- package/src/components/controls/special/DshUndeveloped.vue +41 -41
- package/src/components/form/DshAdvSearch.vue +510 -510
- package/src/components/form/DshDefaultSearch.vue +260 -260
- package/src/components/form/DshForm.vue +494 -494
- package/src/components/form/searchMixin.js +376 -376
- package/src/components/list/BriCard.vue +95 -95
- package/src/components/list/BriTable.vue +205 -205
- package/src/components/list/BriTree.vue +529 -529
- package/src/components/list/BriTreeItem.vue +163 -163
- package/src/components/list/DshBox/DshBox.vue +219 -219
- package/src/components/list/DshBox/DshCard.vue +446 -446
- package/src/components/list/DshBox/DshCrossTable.vue +827 -827
- package/src/components/list/DshBox/DshList.vue +404 -404
- package/src/components/list/DshBox/DshPanel.vue +669 -669
- package/src/components/list/DshBox/DshSingleData.vue +119 -119
- package/src/components/list/DshBox/DshTable.vue +239 -239
- package/src/components/list/DshCascaderTable.vue +115 -115
- package/src/components/list/DshFlatTable.vue +334 -337
- package/src/components/list/DshPage.vue +194 -194
- package/src/components/list/DshTreeTable.vue +113 -113
- package/src/components/list/common/importModal.vue +243 -243
- package/src/components/list/common/quoteListModal.vue +206 -206
- package/src/components/list/mixins/DshCascaderTableMixin.js +278 -278
- package/src/components/list/mixins/DshFlatTableMixin.js +509 -509
- package/src/components/list/mixins/DshTreeTableMixin.js +286 -286
- package/src/components/list/mixins/tableBaseMixin.js +1653 -1653
- package/src/components/list/mixins/treeTableBaseMixin.js +145 -145
- package/src/components/other/BriAvatar.vue +166 -166
- package/src/components/other/BriCode.vue +125 -125
- package/src/components/other/BriCollapseTree.vue +207 -207
- package/src/components/other/BriGantt.vue +1087 -1087
- package/src/components/other/BriIframe.vue +116 -116
- package/src/components/other/BriLoading.vue +171 -171
- package/src/components/other/BriSvg.vue +27 -27
- package/src/components/other/DshColorPanel.vue +128 -128
- package/src/components/other/DshMenuNav.vue +188 -188
- package/src/components/other/DshVideoPlayer.vue +184 -0
- package/src/components/small/BriButton.vue +71 -71
- package/src/components/small/BriDrawer.vue +169 -169
- package/src/components/small/BriTooltip.vue +87 -87
- package/src/components/small/DshBtnModal.vue +68 -68
- package/src/components/small/DshButtons.vue +324 -324
- package/src/components/small/DshDropdown.vue +225 -225
- package/src/components/small/DshIcons.vue +59 -59
- package/src/components/small/DshListRender.js +21 -21
- package/src/components/small/DshModal.vue +160 -160
- package/src/components/small/DshSteps.vue +141 -141
- package/src/components/small/DshTabs.vue +598 -598
- package/src/components/small/DshTabsSet.vue +309 -309
- package/src/components/small/DshTags.vue +251 -251
- package/src/components/small/DshTitle.vue +50 -50
- package/src/components/small/render.js +20 -20
- package/src/components/unit/DshFormUnit.vue +398 -398
- package/src/components/unit/DshListUnit.vue +115 -115
- package/src/components/unit/unitMixin.js +86 -86
- package/src/data/index.js +4 -4
- package/src/index.js +287 -285
- package/src/styles/bundle.css +12 -12
- package/src/styles/components/BriButton.less +307 -307
- package/src/styles/components/BriTable.less +344 -344
- package/src/styles/components/DshModal.less +257 -257
- package/src/styles/components/index.less +3 -3
- package/src/styles/global/animate.less +11 -11
- package/src/styles/global/base.less +45 -45
- package/src/styles/global/box.less +186 -186
- package/src/styles/global/control.less +122 -122
- package/src/styles/global/flex.less +282 -282
- package/src/styles/global/global.less +8 -8
- package/src/styles/global/text.less +59 -59
- package/src/styles/global/variables.less +85 -85
- package/src/styles/iconfont/iconfont.css +254 -254
- package/src/styles/iconfont/iconfont.json +422 -422
- package/src/styles/iconfont/iconfont.svg +137 -137
- package/src/styles/index.less +26 -26
- package/src/styles/reset-easytable.less +21 -21
- package/src/styles/reset-iview-controls.less +145 -145
- package/src/styles/reset-iview-other.less +49 -49
- package/src/styles/reset-iview-variables.less +43 -43
- package/src/styles/reset.less +45 -45
- package/src/utils/index.js +3 -5
- package/lib/0.bri-components.min.js +0 -1
- package/lib/1.bri-components.min.js +0 -1
- package/lib/10.bri-components.min.js +0 -1
- package/lib/11.bri-components.min.js +0 -1
- package/lib/2.bri-components.min.js +0 -1
- package/lib/3.bri-components.min.js +0 -1
- package/lib/4.bri-components.min.js +0 -1
- package/lib/5.bri-components.min.js +0 -1
- package/lib/6.bri-components.min.js +0 -1
- package/lib/7.bri-components.min.js +0 -1
- package/lib/8.bri-components.min.js +0 -1
- package/lib/9.bri-components.min.js +0 -1
- package/lib/bri-components.min.js +0 -18
- package/src/utils/table.js +0 -175
|
@@ -1,160 +1,160 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Modal
|
|
3
|
-
:class="selfPropsObj.class"
|
|
4
|
-
:value="showModal"
|
|
5
|
-
:title="selfPropsObj.title"
|
|
6
|
-
:closable="selfPropsObj.closable"
|
|
7
|
-
:mask-closable="selfPropsObj.maskClosable"
|
|
8
|
-
:loading="selfPropsObj.loading"
|
|
9
|
-
:scrollable="selfPropsObj.scrollable"
|
|
10
|
-
:fullscreen="selfPropsObj.fullscreen"
|
|
11
|
-
:draggable="selfPropsObj.draggable"
|
|
12
|
-
:sticky="selfPropsObj.sticky"
|
|
13
|
-
:sticky-distance="selfPropsObj.stickyDistance"
|
|
14
|
-
:mask="selfPropsObj.mask"
|
|
15
|
-
:ok-text="selfPropsObj.okText"
|
|
16
|
-
:cancel-text="selfPropsObj.cancelText"
|
|
17
|
-
:footer-hide="selfPropsObj.footerHide"
|
|
18
|
-
:styles="selfPropsObj.styles"
|
|
19
|
-
:class-name="selfPropsObj.className"
|
|
20
|
-
:z-index="selfPropsObj.zIndex"
|
|
21
|
-
:width="modalWidth"
|
|
22
|
-
:transfer="selfPropsObj.transfer"
|
|
23
|
-
@on-visible-change="visibleChange"
|
|
24
|
-
@on-ok="ok"
|
|
25
|
-
@on-cancel="cancel"
|
|
26
|
-
>
|
|
27
|
-
<div
|
|
28
|
-
slot="header"
|
|
29
|
-
class="DshModal-header"
|
|
30
|
-
>
|
|
31
|
-
<slot name="header">
|
|
32
|
-
<div class="ivu-modal-header-inner">
|
|
33
|
-
{{ selfPropsObj.title }}
|
|
34
|
-
</div>
|
|
35
|
-
</slot>
|
|
36
|
-
|
|
37
|
-
<slot name="header-right"></slot>
|
|
38
|
-
|
|
39
|
-
<!-- 关闭按图标 -这是定位上去的 -->
|
|
40
|
-
<Icon
|
|
41
|
-
v-if="mode === 'fullscreen'"
|
|
42
|
-
class="DshModal-close"
|
|
43
|
-
type="md-close"
|
|
44
|
-
size="20"
|
|
45
|
-
@click.native.stop="visibleChange(false)"
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<!-- 关闭按图标 -这是定位上去的 -->
|
|
50
|
-
<Icon
|
|
51
|
-
v-if="mode !== 'fullscreen' && selfPropsObj.showSlotClose"
|
|
52
|
-
class="DshModal-close"
|
|
53
|
-
type="md-close"
|
|
54
|
-
size="20"
|
|
55
|
-
@click.native.stop="visibleChange(false)"
|
|
56
|
-
/>
|
|
57
|
-
|
|
58
|
-
<slot v-if="showSlot"></slot>
|
|
59
|
-
|
|
60
|
-
<slot
|
|
61
|
-
slot="footer"
|
|
62
|
-
name="footer"
|
|
63
|
-
></slot>
|
|
64
|
-
</Modal>
|
|
65
|
-
</template>
|
|
66
|
-
|
|
67
|
-
<script>
|
|
68
|
-
export default {
|
|
69
|
-
name: "DshModal",
|
|
70
|
-
props: {
|
|
71
|
-
value: {
|
|
72
|
-
type: Boolean,
|
|
73
|
-
default: false
|
|
74
|
-
},
|
|
75
|
-
mode: {
|
|
76
|
-
type: String,
|
|
77
|
-
default: "default",
|
|
78
|
-
validator (val) {
|
|
79
|
-
return ["small", "default", "middle", "large", "custom", "auto", "fullscreen"].includes(val);
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
propsObj: {
|
|
83
|
-
type: Object,
|
|
84
|
-
default () {
|
|
85
|
-
return {};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
data () {
|
|
90
|
-
return {
|
|
91
|
-
showSlot: false
|
|
92
|
-
};
|
|
93
|
-
},
|
|
94
|
-
computed: {
|
|
95
|
-
showModal () {
|
|
96
|
-
this.changeShowSlot(this.value);
|
|
97
|
-
return this.value;
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
selfPropsObj () {
|
|
101
|
-
return {
|
|
102
|
-
title: "标题",
|
|
103
|
-
closable: false,
|
|
104
|
-
maskClosable: false,
|
|
105
|
-
okText: "确定",
|
|
106
|
-
cancelText: "取消",
|
|
107
|
-
footerHide: true,
|
|
108
|
-
// sticky: true, // 拖拽时,是否吸附屏幕边缘
|
|
109
|
-
// stickyDistance: 30, // 拖拽时,自动吸附屏幕边缘的临界距离
|
|
110
|
-
// resetDragPosition: false, // Modal 再次打开时,是否重置拖拽的位置
|
|
111
|
-
transfer: true,
|
|
112
|
-
showSlotClose: true, // 显示删除
|
|
113
|
-
fullscreen: this.mode === "fullscreen",
|
|
114
|
-
...this.propsObj,
|
|
115
|
-
|
|
116
|
-
class: [
|
|
117
|
-
"DshModal",
|
|
118
|
-
`DshModal-${this.mode}`,
|
|
119
|
-
...(
|
|
120
|
-
Array.isArray(this.propsObj.class)
|
|
121
|
-
? this.propsObj.class
|
|
122
|
-
: [this.propsObj.class]
|
|
123
|
-
)
|
|
124
|
-
]
|
|
125
|
-
};
|
|
126
|
-
},
|
|
127
|
-
modalWidth () {
|
|
128
|
-
// 初始化ivu-modal宽度
|
|
129
|
-
const widthOBj = {
|
|
130
|
-
default: "750",
|
|
131
|
-
small: "500",
|
|
132
|
-
middle: "60%",
|
|
133
|
-
large: this.propsObj.draggable ? "100%" : "80%",
|
|
134
|
-
auto: "auto"
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
return this.selfPropsObj.width ? this.selfPropsObj.width : widthOBj[this.mode];
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
created () {},
|
|
141
|
-
methods: {
|
|
142
|
-
changeShowSlot (bool) {
|
|
143
|
-
setTimeout(() => {
|
|
144
|
-
bool === true && (this.showSlot = bool);
|
|
145
|
-
}, 0);
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
ok (...parmas) {
|
|
149
|
-
this.$emit("ok", ...parmas);
|
|
150
|
-
},
|
|
151
|
-
cancel (...parmas) {
|
|
152
|
-
this.$emit("cancel", ...parmas);
|
|
153
|
-
},
|
|
154
|
-
visibleChange (bool = false) {
|
|
155
|
-
this.$emit("on-visible-change", bool);
|
|
156
|
-
this.$emit("input", bool);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<Modal
|
|
3
|
+
:class="selfPropsObj.class"
|
|
4
|
+
:value="showModal"
|
|
5
|
+
:title="selfPropsObj.title"
|
|
6
|
+
:closable="selfPropsObj.closable"
|
|
7
|
+
:mask-closable="selfPropsObj.maskClosable"
|
|
8
|
+
:loading="selfPropsObj.loading"
|
|
9
|
+
:scrollable="selfPropsObj.scrollable"
|
|
10
|
+
:fullscreen="selfPropsObj.fullscreen"
|
|
11
|
+
:draggable="selfPropsObj.draggable"
|
|
12
|
+
:sticky="selfPropsObj.sticky"
|
|
13
|
+
:sticky-distance="selfPropsObj.stickyDistance"
|
|
14
|
+
:mask="selfPropsObj.mask"
|
|
15
|
+
:ok-text="selfPropsObj.okText"
|
|
16
|
+
:cancel-text="selfPropsObj.cancelText"
|
|
17
|
+
:footer-hide="selfPropsObj.footerHide"
|
|
18
|
+
:styles="selfPropsObj.styles"
|
|
19
|
+
:class-name="selfPropsObj.className"
|
|
20
|
+
:z-index="selfPropsObj.zIndex"
|
|
21
|
+
:width="modalWidth"
|
|
22
|
+
:transfer="selfPropsObj.transfer"
|
|
23
|
+
@on-visible-change="visibleChange"
|
|
24
|
+
@on-ok="ok"
|
|
25
|
+
@on-cancel="cancel"
|
|
26
|
+
>
|
|
27
|
+
<div
|
|
28
|
+
slot="header"
|
|
29
|
+
class="DshModal-header"
|
|
30
|
+
>
|
|
31
|
+
<slot name="header">
|
|
32
|
+
<div class="ivu-modal-header-inner">
|
|
33
|
+
{{ selfPropsObj.title }}
|
|
34
|
+
</div>
|
|
35
|
+
</slot>
|
|
36
|
+
|
|
37
|
+
<slot name="header-right"></slot>
|
|
38
|
+
|
|
39
|
+
<!-- 关闭按图标 -这是定位上去的 -->
|
|
40
|
+
<Icon
|
|
41
|
+
v-if="mode === 'fullscreen'"
|
|
42
|
+
class="DshModal-close"
|
|
43
|
+
type="md-close"
|
|
44
|
+
size="20"
|
|
45
|
+
@click.native.stop="visibleChange(false)"
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<!-- 关闭按图标 -这是定位上去的 -->
|
|
50
|
+
<Icon
|
|
51
|
+
v-if="mode !== 'fullscreen' && selfPropsObj.showSlotClose"
|
|
52
|
+
class="DshModal-close"
|
|
53
|
+
type="md-close"
|
|
54
|
+
size="20"
|
|
55
|
+
@click.native.stop="visibleChange(false)"
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<slot v-if="showSlot"></slot>
|
|
59
|
+
|
|
60
|
+
<slot
|
|
61
|
+
slot="footer"
|
|
62
|
+
name="footer"
|
|
63
|
+
></slot>
|
|
64
|
+
</Modal>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script>
|
|
68
|
+
export default {
|
|
69
|
+
name: "DshModal",
|
|
70
|
+
props: {
|
|
71
|
+
value: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: false
|
|
74
|
+
},
|
|
75
|
+
mode: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: "default",
|
|
78
|
+
validator (val) {
|
|
79
|
+
return ["small", "default", "middle", "large", "custom", "auto", "fullscreen"].includes(val);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
propsObj: {
|
|
83
|
+
type: Object,
|
|
84
|
+
default () {
|
|
85
|
+
return {};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
data () {
|
|
90
|
+
return {
|
|
91
|
+
showSlot: false
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
computed: {
|
|
95
|
+
showModal () {
|
|
96
|
+
this.changeShowSlot(this.value);
|
|
97
|
+
return this.value;
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
selfPropsObj () {
|
|
101
|
+
return {
|
|
102
|
+
title: "标题",
|
|
103
|
+
closable: false,
|
|
104
|
+
maskClosable: false,
|
|
105
|
+
okText: "确定",
|
|
106
|
+
cancelText: "取消",
|
|
107
|
+
footerHide: true,
|
|
108
|
+
// sticky: true, // 拖拽时,是否吸附屏幕边缘
|
|
109
|
+
// stickyDistance: 30, // 拖拽时,自动吸附屏幕边缘的临界距离
|
|
110
|
+
// resetDragPosition: false, // Modal 再次打开时,是否重置拖拽的位置
|
|
111
|
+
transfer: true,
|
|
112
|
+
showSlotClose: true, // 显示删除
|
|
113
|
+
fullscreen: this.mode === "fullscreen",
|
|
114
|
+
...this.propsObj,
|
|
115
|
+
|
|
116
|
+
class: [
|
|
117
|
+
"DshModal",
|
|
118
|
+
`DshModal-${this.mode}`,
|
|
119
|
+
...(
|
|
120
|
+
Array.isArray(this.propsObj.class)
|
|
121
|
+
? this.propsObj.class
|
|
122
|
+
: [this.propsObj.class]
|
|
123
|
+
)
|
|
124
|
+
]
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
modalWidth () {
|
|
128
|
+
// 初始化ivu-modal宽度
|
|
129
|
+
const widthOBj = {
|
|
130
|
+
default: "750",
|
|
131
|
+
small: "500",
|
|
132
|
+
middle: "60%",
|
|
133
|
+
large: this.propsObj.draggable ? "100%" : "80%",
|
|
134
|
+
auto: "auto"
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
return this.selfPropsObj.width ? this.selfPropsObj.width : widthOBj[this.mode];
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
created () {},
|
|
141
|
+
methods: {
|
|
142
|
+
changeShowSlot (bool) {
|
|
143
|
+
setTimeout(() => {
|
|
144
|
+
bool === true && (this.showSlot = bool);
|
|
145
|
+
}, 0);
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
ok (...parmas) {
|
|
149
|
+
this.$emit("ok", ...parmas);
|
|
150
|
+
},
|
|
151
|
+
cancel (...parmas) {
|
|
152
|
+
this.$emit("cancel", ...parmas);
|
|
153
|
+
},
|
|
154
|
+
visibleChange (bool = false) {
|
|
155
|
+
this.$emit("on-visible-change", bool);
|
|
156
|
+
this.$emit("input", bool);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
</script>
|
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="DshSteps">
|
|
3
|
-
<Steps
|
|
4
|
-
:current="current"
|
|
5
|
-
:direction="selfPropsObj._direction"
|
|
6
|
-
:status="selfPropsObj._status"
|
|
7
|
-
:size="selfPropsObj._size"
|
|
8
|
-
>
|
|
9
|
-
<Step
|
|
10
|
-
v-for="(stepItem, stepIndex) in list"
|
|
11
|
-
:key="stepItem._key || stepItem._id || tepItem.type || stepIndex"
|
|
12
|
-
class="DshSteps-item"
|
|
13
|
-
:status="stepItem.status"
|
|
14
|
-
:title="stepItem.name || stepItem._name"
|
|
15
|
-
:content="stepItem.description"
|
|
16
|
-
:icon="stepItem.icon"
|
|
17
|
-
@click.native="clickStepItem(stepItem, stepIndex)"
|
|
18
|
-
></Step>
|
|
19
|
-
</Steps>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script>
|
|
24
|
-
export default {
|
|
25
|
-
name: "DshSteps",
|
|
26
|
-
props: {
|
|
27
|
-
value: Number,
|
|
28
|
-
list: {
|
|
29
|
-
type: Array,
|
|
30
|
-
default () {
|
|
31
|
-
return [];
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
stepShowFunc: Function,
|
|
35
|
-
propsObj: {
|
|
36
|
-
type: Object,
|
|
37
|
-
default () {
|
|
38
|
-
return {};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
data () {
|
|
43
|
-
return {
|
|
44
|
-
current: 0 // 当前步骤,从 0 开始计数
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
computed: {
|
|
48
|
-
selfPropsObj () {
|
|
49
|
-
return {
|
|
50
|
-
_status: "process", // 当前步骤的状态,可选值为wait、process、finish、error
|
|
51
|
-
_size: undefined, // 步骤条的尺寸,可选值为small或者不写
|
|
52
|
-
_direction: "vertical", // 步骤条的方向,可选值为horizontal(水平)或vertical(垂直)
|
|
53
|
-
...this.propsObj
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
watch: {
|
|
58
|
-
value (newVal, oldVal) {
|
|
59
|
-
if (newVal !== oldVal) {
|
|
60
|
-
this.current = this.value;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
created () {
|
|
65
|
-
if (this.value != null) {
|
|
66
|
-
this.current = this.value;
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
methods: {
|
|
70
|
-
clickStepItem (stepItem, stepIndex) {
|
|
71
|
-
if (!this.stepShowFunc || this.stepShowFunc(stepItem, stepIndex)) {
|
|
72
|
-
if (this.current !== stepIndex) {
|
|
73
|
-
this.current = stepIndex;
|
|
74
|
-
this.$emit("change", stepItem, stepIndex);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
</script>
|
|
81
|
-
|
|
82
|
-
<style lang="less" scoped>
|
|
83
|
-
.DshSteps {
|
|
84
|
-
&-item {
|
|
85
|
-
cursor: pointer;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
</style>
|
|
89
|
-
<style lang="less">
|
|
90
|
-
.DshSteps {
|
|
91
|
-
.ivu-steps-vertical {
|
|
92
|
-
.ivu-steps-item {
|
|
93
|
-
padding-bottom: 30px;
|
|
94
|
-
&:last-child {
|
|
95
|
-
margin-bottom: 0px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.ivu-steps-tail {
|
|
99
|
-
position: absolute;
|
|
100
|
-
left: 13px;
|
|
101
|
-
top: 0;
|
|
102
|
-
height: 100%;
|
|
103
|
-
width: 1px;
|
|
104
|
-
padding: 35px 0 5px 0;
|
|
105
|
-
& > i {
|
|
106
|
-
background-color: #e8eaec;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&.ivu-steps-status-process,
|
|
111
|
-
&.ivu-steps-status-finish {
|
|
112
|
-
.ivu-steps-head-inner {
|
|
113
|
-
background-color: @themeColor;
|
|
114
|
-
border-color: @themeColor;
|
|
115
|
-
span,
|
|
116
|
-
& > .ivu-steps-icon {
|
|
117
|
-
color: #ffffff;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&.ivu-steps-status-finish {
|
|
123
|
-
.ivu-steps-head-inner {
|
|
124
|
-
background-color: #ffffff;
|
|
125
|
-
border-color: @themeColor;
|
|
126
|
-
span,
|
|
127
|
-
& > .ivu-steps-icon {
|
|
128
|
-
color: @themeColor;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.ivu-steps-tail {
|
|
133
|
-
& > i:after {
|
|
134
|
-
background: @themeColor;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="DshSteps">
|
|
3
|
+
<Steps
|
|
4
|
+
:current="current"
|
|
5
|
+
:direction="selfPropsObj._direction"
|
|
6
|
+
:status="selfPropsObj._status"
|
|
7
|
+
:size="selfPropsObj._size"
|
|
8
|
+
>
|
|
9
|
+
<Step
|
|
10
|
+
v-for="(stepItem, stepIndex) in list"
|
|
11
|
+
:key="stepItem._key || stepItem._id || tepItem.type || stepIndex"
|
|
12
|
+
class="DshSteps-item"
|
|
13
|
+
:status="stepItem.status"
|
|
14
|
+
:title="stepItem.name || stepItem._name"
|
|
15
|
+
:content="stepItem.description"
|
|
16
|
+
:icon="stepItem.icon"
|
|
17
|
+
@click.native="clickStepItem(stepItem, stepIndex)"
|
|
18
|
+
></Step>
|
|
19
|
+
</Steps>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
export default {
|
|
25
|
+
name: "DshSteps",
|
|
26
|
+
props: {
|
|
27
|
+
value: Number,
|
|
28
|
+
list: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default () {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
stepShowFunc: Function,
|
|
35
|
+
propsObj: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default () {
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
data () {
|
|
43
|
+
return {
|
|
44
|
+
current: 0 // 当前步骤,从 0 开始计数
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
computed: {
|
|
48
|
+
selfPropsObj () {
|
|
49
|
+
return {
|
|
50
|
+
_status: "process", // 当前步骤的状态,可选值为wait、process、finish、error
|
|
51
|
+
_size: undefined, // 步骤条的尺寸,可选值为small或者不写
|
|
52
|
+
_direction: "vertical", // 步骤条的方向,可选值为horizontal(水平)或vertical(垂直)
|
|
53
|
+
...this.propsObj
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
watch: {
|
|
58
|
+
value (newVal, oldVal) {
|
|
59
|
+
if (newVal !== oldVal) {
|
|
60
|
+
this.current = this.value;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
created () {
|
|
65
|
+
if (this.value != null) {
|
|
66
|
+
this.current = this.value;
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
clickStepItem (stepItem, stepIndex) {
|
|
71
|
+
if (!this.stepShowFunc || this.stepShowFunc(stepItem, stepIndex)) {
|
|
72
|
+
if (this.current !== stepIndex) {
|
|
73
|
+
this.current = stepIndex;
|
|
74
|
+
this.$emit("change", stepItem, stepIndex);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<style lang="less" scoped>
|
|
83
|
+
.DshSteps {
|
|
84
|
+
&-item {
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</style>
|
|
89
|
+
<style lang="less">
|
|
90
|
+
.DshSteps {
|
|
91
|
+
.ivu-steps-vertical {
|
|
92
|
+
.ivu-steps-item {
|
|
93
|
+
padding-bottom: 30px;
|
|
94
|
+
&:last-child {
|
|
95
|
+
margin-bottom: 0px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ivu-steps-tail {
|
|
99
|
+
position: absolute;
|
|
100
|
+
left: 13px;
|
|
101
|
+
top: 0;
|
|
102
|
+
height: 100%;
|
|
103
|
+
width: 1px;
|
|
104
|
+
padding: 35px 0 5px 0;
|
|
105
|
+
& > i {
|
|
106
|
+
background-color: #e8eaec;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&.ivu-steps-status-process,
|
|
111
|
+
&.ivu-steps-status-finish {
|
|
112
|
+
.ivu-steps-head-inner {
|
|
113
|
+
background-color: @themeColor;
|
|
114
|
+
border-color: @themeColor;
|
|
115
|
+
span,
|
|
116
|
+
& > .ivu-steps-icon {
|
|
117
|
+
color: #ffffff;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&.ivu-steps-status-finish {
|
|
123
|
+
.ivu-steps-head-inner {
|
|
124
|
+
background-color: #ffffff;
|
|
125
|
+
border-color: @themeColor;
|
|
126
|
+
span,
|
|
127
|
+
& > .ivu-steps-icon {
|
|
128
|
+
color: @themeColor;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.ivu-steps-tail {
|
|
133
|
+
& > i:after {
|
|
134
|
+
background: @themeColor;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
</style>
|