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
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="video-container">
|
|
3
|
+
<video
|
|
4
|
+
ref="videoPlayer"
|
|
5
|
+
id="videoPlayer"
|
|
6
|
+
class="video-js vjs-big-play-centered"
|
|
7
|
+
controls
|
|
8
|
+
preload="auto"
|
|
9
|
+
width="100%"
|
|
10
|
+
height="100%"
|
|
11
|
+
>
|
|
12
|
+
<!-- <source
|
|
13
|
+
:src="src"
|
|
14
|
+
type="application/x-mpegURL"
|
|
15
|
+
/> -->
|
|
16
|
+
</video>
|
|
17
|
+
|
|
18
|
+
<!-- <div v-else>
|
|
19
|
+
<video
|
|
20
|
+
id="video"
|
|
21
|
+
width="640"
|
|
22
|
+
height="360"
|
|
23
|
+
poster="/video/cover.png"
|
|
24
|
+
controls
|
|
25
|
+
autoplay
|
|
26
|
+
loop
|
|
27
|
+
preload="auto"
|
|
28
|
+
playsinline="true"
|
|
29
|
+
webkit-playsinline="true"
|
|
30
|
+
x5-video-player-type="h5"
|
|
31
|
+
x5-video-player-fullscreen="true"
|
|
32
|
+
x5-video-orientation="portraint"
|
|
33
|
+
οnclick="play()"
|
|
34
|
+
>
|
|
35
|
+
<source
|
|
36
|
+
:src="attachmentLink"
|
|
37
|
+
type="video/mp4"
|
|
38
|
+
>
|
|
39
|
+
<source
|
|
40
|
+
src="/video/text.ogg"
|
|
41
|
+
type="video/ogg; codecs=dirac, speex"
|
|
42
|
+
>
|
|
43
|
+
|
|
44
|
+
<div class="fallback">
|
|
45
|
+
<p>You must have an HTML5 capable browser.</p>
|
|
46
|
+
</div>
|
|
47
|
+
</video>
|
|
48
|
+
</div> -->
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script>
|
|
53
|
+
import videojs from "video.js"; // 视频播放器插件
|
|
54
|
+
import "video.js/dist/video-js.css";
|
|
55
|
+
import "videojs-contrib-hls"; // 播放hls流插件
|
|
56
|
+
|
|
57
|
+
export default {
|
|
58
|
+
name: "DshVideoPlayer",
|
|
59
|
+
props: {
|
|
60
|
+
// 默认mp4
|
|
61
|
+
videoType: {
|
|
62
|
+
type: String
|
|
63
|
+
},
|
|
64
|
+
src: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: true
|
|
67
|
+
},
|
|
68
|
+
options: {
|
|
69
|
+
type: Object,
|
|
70
|
+
default: () => ({})
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
data () {
|
|
74
|
+
return {
|
|
75
|
+
player: null
|
|
76
|
+
// attachmentLink: "https://e-sign.dms.t.cn-np.com/files/m3u8_file/c4b94118-3c8d-4410-9987-985c2b44c278/c4b94118-3c8d-4410-9987-985c2b44c278.m3u8"
|
|
77
|
+
// attachmentLink: "http://10.233.0.231:801/gs/66322263001320007102.m3u8" // 十二师治超站门口
|
|
78
|
+
// attachmentLink: "http://10.233.0.231:801/gs/66322263001320007101.m3u8" // 十二师治超站称重位
|
|
79
|
+
// attachmentLink: "http://10.233.0.231:801/gs/66322263001320007128.m3u8" // 石火山隧道
|
|
80
|
+
// attachmentLink: "http://staging.bridata.com:6203/api/ossfile/apaas-local/56a2725229d6e59440f77ce47dbd67ab.mp4"
|
|
81
|
+
// attachmentLink: "http://staging.bridata.com:6203/api/ossfile/apaas-local/6f9f0f4a42be671a47cc31343aef9a20.mp4"
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
computed: {
|
|
85
|
+
sourceType () {
|
|
86
|
+
return this.videoType === "m3u8"
|
|
87
|
+
? "application/x-mpegURL" // 告诉videojs,这是一个hls流
|
|
88
|
+
: "video/mp4";
|
|
89
|
+
},
|
|
90
|
+
finalOptions () {
|
|
91
|
+
return {
|
|
92
|
+
autoplay: false, // 设置自动播放
|
|
93
|
+
// controls: true, // 显示播放的控件
|
|
94
|
+
sources: [
|
|
95
|
+
{
|
|
96
|
+
// src: this.src || this.attachmentLink, // 地址
|
|
97
|
+
src: this.src, // 地址
|
|
98
|
+
type: this.sourceType
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
fluid: true,
|
|
102
|
+
liveui: true,
|
|
103
|
+
html5: {
|
|
104
|
+
hls: {
|
|
105
|
+
overrideNative: true,
|
|
106
|
+
debug: true
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度
|
|
110
|
+
aspectRatio: "16:9",
|
|
111
|
+
notSupportedMessage: "此视频暂无法播放,请稍后再试", // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
|
|
112
|
+
preload: "auto", // 预加载
|
|
113
|
+
muted: true, // 是否静音,设置了它为true,才可实现自动播放,同时视频也被静音(Chrome66及以上版本,禁止音视频的自动播放)
|
|
114
|
+
volume: 0.5, // 初始音量 (0-1)
|
|
115
|
+
// audioOnlyMode: false, // 是否仅音频模式
|
|
116
|
+
// audioPosterMode: false, // 音频海报模式
|
|
117
|
+
// breakpoints: {
|
|
118
|
+
// audio: {
|
|
119
|
+
// width: 300 // 音频模式下的播放器宽度
|
|
120
|
+
// }
|
|
121
|
+
// },
|
|
122
|
+
|
|
123
|
+
...this.options
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
watch: {
|
|
128
|
+
src (newSrc) {
|
|
129
|
+
if (this.player) {
|
|
130
|
+
this.player.src({
|
|
131
|
+
src: newSrc,
|
|
132
|
+
type: this.sourceType
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
mounted () {
|
|
138
|
+
this.initPlayer();
|
|
139
|
+
// // 使用 $nextTick 解决vedio报错 The element or ID supplied is not valid. (videojs)
|
|
140
|
+
// this.$nextTick(() => {
|
|
141
|
+
// this.initPlayer();
|
|
142
|
+
// });
|
|
143
|
+
},
|
|
144
|
+
beforeDestroy () {
|
|
145
|
+
if (this.player) {
|
|
146
|
+
this.player.dispose();
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
methods: {
|
|
150
|
+
initPlayer () {
|
|
151
|
+
this.player = videojs(this.$refs.videoPlayer, this.finalOptions, this.onPlayerReady);
|
|
152
|
+
// this.player = videojs("videoPlayer", this.finalOptions, this.onPlayerReady);
|
|
153
|
+
},
|
|
154
|
+
onPlayerReady () {
|
|
155
|
+
// console.log("Player ready", this.finalOptions);
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
playVideo () {
|
|
159
|
+
let video = document.getElementById("video");
|
|
160
|
+
video.play();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
</script>
|
|
165
|
+
|
|
166
|
+
<style lang="less" scoped>
|
|
167
|
+
.video-container {
|
|
168
|
+
width: 100%;
|
|
169
|
+
height: 100%;
|
|
170
|
+
background-color: #000;
|
|
171
|
+
}
|
|
172
|
+
</style>
|
|
173
|
+
<style lang="less">
|
|
174
|
+
.video-js {
|
|
175
|
+
width: 100%;
|
|
176
|
+
// height: 100%!important; // 放开也不管用
|
|
177
|
+
}
|
|
178
|
+
// 暂停播放按钮居中
|
|
179
|
+
::v-deep .video-js .vjs-big-play-button {
|
|
180
|
+
top: 50%;
|
|
181
|
+
left: 50%;
|
|
182
|
+
transform: translate(-50%, -50%);
|
|
183
|
+
}
|
|
184
|
+
</style>
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Button
|
|
3
|
-
class="BriButton"
|
|
4
|
-
:class="selfPropsObj.class"
|
|
5
|
-
:type="selfPropsObj.btnType"
|
|
6
|
-
:shape="selfPropsObj.shape || shape"
|
|
7
|
-
:size="selfPropsObj.size || size"
|
|
8
|
-
:loading="selfPropsObj.loading"
|
|
9
|
-
:disabled="selfPropsObj.disabled"
|
|
10
|
-
:htmlType="selfPropsObj.htmlType"
|
|
11
|
-
:icon="(selfPropsObj.customIcon || customIcon) ? undefined : (selfPropsObj.icon || icon)"
|
|
12
|
-
:customIcon="selfPropsObj.customIcon || customIcon"
|
|
13
|
-
:long="selfPropsObj.long"
|
|
14
|
-
:ghost="selfPropsObj.ghost"
|
|
15
|
-
@click="dispatchEvent"
|
|
16
|
-
>
|
|
17
|
-
<slot></slot>
|
|
18
|
-
</Button>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script>
|
|
22
|
-
export default {
|
|
23
|
-
name: "BriButton",
|
|
24
|
-
props: {
|
|
25
|
-
type: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: "primary"
|
|
28
|
-
},
|
|
29
|
-
icon: String,
|
|
30
|
-
shape: String,
|
|
31
|
-
size: String,
|
|
32
|
-
customIcon: String,
|
|
33
|
-
|
|
34
|
-
propsObj: {
|
|
35
|
-
type: Object,
|
|
36
|
-
default () {
|
|
37
|
-
return {};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
data () {
|
|
42
|
-
return {};
|
|
43
|
-
},
|
|
44
|
-
computed: {
|
|
45
|
-
selfPropsObj () {
|
|
46
|
-
const originBtnType = this.propsObj.btnType || this.type;
|
|
47
|
-
let btnType = originBtnType;
|
|
48
|
-
if (["cancel"].includes(originBtnType)) {
|
|
49
|
-
btnType = "primary";
|
|
50
|
-
} else if (["errorLine", "primaryLine"].includes(originBtnType)) {
|
|
51
|
-
btnType = "default";
|
|
52
|
-
} else if (["linkText", "primaryText", "errorText", "successText"].includes(originBtnType)) {
|
|
53
|
-
btnType = "text";
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
class: ["cancel", "errorLine", "primaryLine", "linkText", "primaryText", "errorText", "successText"].includes(originBtnType) ? `ivu-btn-${originBtnType}` : "",
|
|
58
|
-
...this.propsObj,
|
|
59
|
-
btnType: btnType,
|
|
60
|
-
customIcon: this.propsObj.customIcon ? `bico-font ${this.propsObj.customIcon}` : undefined
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
created () {},
|
|
65
|
-
methods: {
|
|
66
|
-
dispatchEvent () {
|
|
67
|
-
this.$emit("click", this.selfPropsObj);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<Button
|
|
3
|
+
class="BriButton"
|
|
4
|
+
:class="selfPropsObj.class"
|
|
5
|
+
:type="selfPropsObj.btnType"
|
|
6
|
+
:shape="selfPropsObj.shape || shape"
|
|
7
|
+
:size="selfPropsObj.size || size"
|
|
8
|
+
:loading="selfPropsObj.loading"
|
|
9
|
+
:disabled="selfPropsObj.disabled"
|
|
10
|
+
:htmlType="selfPropsObj.htmlType"
|
|
11
|
+
:icon="(selfPropsObj.customIcon || customIcon) ? undefined : (selfPropsObj.icon || icon)"
|
|
12
|
+
:customIcon="selfPropsObj.customIcon || customIcon"
|
|
13
|
+
:long="selfPropsObj.long"
|
|
14
|
+
:ghost="selfPropsObj.ghost"
|
|
15
|
+
@click="dispatchEvent"
|
|
16
|
+
>
|
|
17
|
+
<slot></slot>
|
|
18
|
+
</Button>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
export default {
|
|
23
|
+
name: "BriButton",
|
|
24
|
+
props: {
|
|
25
|
+
type: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "primary"
|
|
28
|
+
},
|
|
29
|
+
icon: String,
|
|
30
|
+
shape: String,
|
|
31
|
+
size: String,
|
|
32
|
+
customIcon: String,
|
|
33
|
+
|
|
34
|
+
propsObj: {
|
|
35
|
+
type: Object,
|
|
36
|
+
default () {
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
data () {
|
|
42
|
+
return {};
|
|
43
|
+
},
|
|
44
|
+
computed: {
|
|
45
|
+
selfPropsObj () {
|
|
46
|
+
const originBtnType = this.propsObj.btnType || this.type;
|
|
47
|
+
let btnType = originBtnType;
|
|
48
|
+
if (["cancel"].includes(originBtnType)) {
|
|
49
|
+
btnType = "primary";
|
|
50
|
+
} else if (["errorLine", "primaryLine"].includes(originBtnType)) {
|
|
51
|
+
btnType = "default";
|
|
52
|
+
} else if (["linkText", "primaryText", "errorText", "successText"].includes(originBtnType)) {
|
|
53
|
+
btnType = "text";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
class: ["cancel", "errorLine", "primaryLine", "linkText", "primaryText", "errorText", "successText"].includes(originBtnType) ? `ivu-btn-${originBtnType}` : "",
|
|
58
|
+
...this.propsObj,
|
|
59
|
+
btnType: btnType,
|
|
60
|
+
customIcon: this.propsObj.customIcon ? `bico-font ${this.propsObj.customIcon}` : undefined
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
created () {},
|
|
65
|
+
methods: {
|
|
66
|
+
dispatchEvent () {
|
|
67
|
+
this.$emit("click", this.selfPropsObj);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
</script>
|
|
@@ -1,169 +1,169 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Drawer
|
|
3
|
-
class="BriDrawer"
|
|
4
|
-
v-model="showModal"
|
|
5
|
-
:title="selfPropsObj.title"
|
|
6
|
-
:width="selfPropsObj.width"
|
|
7
|
-
:height="selfPropsObj.height"
|
|
8
|
-
:closable="selfPropsObj.closable"
|
|
9
|
-
:mask-closable="selfPropsObj.maskClosable"
|
|
10
|
-
:mask="selfPropsObj.mask"
|
|
11
|
-
:mask-style="selfPropsObj.maskStyle"
|
|
12
|
-
:styles="selfPropsObj.styles"
|
|
13
|
-
:scrollable="selfPropsObj.scrollable"
|
|
14
|
-
:placement="selfPropsObj.placement"
|
|
15
|
-
:transfer="selfPropsObj.transfer"
|
|
16
|
-
:class-name="selfPropsObj.className"
|
|
17
|
-
:inner="selfPropsObj.inner"
|
|
18
|
-
:draggable="selfPropsObj.draggable"
|
|
19
|
-
:before-close="selfPropsObj.beforeClose"
|
|
20
|
-
:lock-scroll="selfPropsObj.lockScroll"
|
|
21
|
-
@on-close="close"
|
|
22
|
-
@on-visible-change="visibleChange"
|
|
23
|
-
@on-resize-width="resizeChange"
|
|
24
|
-
>
|
|
25
|
-
<div
|
|
26
|
-
slot="header"
|
|
27
|
-
class="BriDrawer-header"
|
|
28
|
-
>
|
|
29
|
-
<slot name="header">
|
|
30
|
-
{{ selfPropsObj.title }}
|
|
31
|
-
</slot>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<!-- 删除按钮 -->
|
|
35
|
-
<Icon
|
|
36
|
-
v-if="selfPropsObj.closable"
|
|
37
|
-
slot="close"
|
|
38
|
-
class="BriDrawer-close"
|
|
39
|
-
type="md-close"
|
|
40
|
-
size="20"
|
|
41
|
-
@click.stop="clickClose"
|
|
42
|
-
/>
|
|
43
|
-
|
|
44
|
-
<slot
|
|
45
|
-
slot="trigger"
|
|
46
|
-
name="trigger"
|
|
47
|
-
></slot>
|
|
48
|
-
|
|
49
|
-
<div class="BriDrawer-main">
|
|
50
|
-
<div class="BriDrawer-body">
|
|
51
|
-
<slot></slot>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<div
|
|
55
|
-
v-if="selfPropsObj.footer"
|
|
56
|
-
class="BriDrawer-footer"
|
|
57
|
-
>
|
|
58
|
-
<slot name="footer">
|
|
59
|
-
<dsh-buttons
|
|
60
|
-
:list="list"
|
|
61
|
-
@click="$dshEmit($event)"
|
|
62
|
-
></dsh-buttons>
|
|
63
|
-
</slot>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</Drawer>
|
|
67
|
-
</template>
|
|
68
|
-
|
|
69
|
-
<script>
|
|
70
|
-
export default {
|
|
71
|
-
name: "BriDrawer",
|
|
72
|
-
props: {
|
|
73
|
-
value: Boolean,
|
|
74
|
-
propsObj: {
|
|
75
|
-
type: Object,
|
|
76
|
-
default () {
|
|
77
|
-
return {};
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
list: {
|
|
81
|
-
type: Array,
|
|
82
|
-
default () {
|
|
83
|
-
return [];
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
data () {
|
|
88
|
-
return {};
|
|
89
|
-
},
|
|
90
|
-
computed: {
|
|
91
|
-
showModal: {
|
|
92
|
-
get () {
|
|
93
|
-
return this.value;
|
|
94
|
-
},
|
|
95
|
-
set (bool) {
|
|
96
|
-
this.$emit("input", bool);
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
selfPropsObj () {
|
|
100
|
-
return {
|
|
101
|
-
width: 320,
|
|
102
|
-
closable: true,
|
|
103
|
-
transfer: true,
|
|
104
|
-
footer: true,
|
|
105
|
-
maskClosable: false,
|
|
106
|
-
draggable: true,
|
|
107
|
-
...this.propsObj
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
created () {},
|
|
112
|
-
methods: {
|
|
113
|
-
clickClose () {
|
|
114
|
-
this.showModal = false;
|
|
115
|
-
},
|
|
116
|
-
close (...parmas) {
|
|
117
|
-
this.$emit("on-close", ...parmas);
|
|
118
|
-
},
|
|
119
|
-
resizeChange (...parmas) {
|
|
120
|
-
this.$emit("on-resize-change", ...parmas);
|
|
121
|
-
},
|
|
122
|
-
visibleChange (bool = false) {
|
|
123
|
-
this.$emit("on-visible-change", bool);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
</script>
|
|
128
|
-
|
|
129
|
-
<style lang="less">
|
|
130
|
-
.BriDrawer {
|
|
131
|
-
&-header {
|
|
132
|
-
color: @textColor;
|
|
133
|
-
font-weight: 500;
|
|
134
|
-
font-size: @smallTitleSize;
|
|
135
|
-
line-height: @smallTitleHeight;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&-close {
|
|
139
|
-
color: @contentColor;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
&-main {
|
|
143
|
-
height: 100%;
|
|
144
|
-
display: flex;
|
|
145
|
-
flex-direction: column;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
&-body {
|
|
149
|
-
flex: 1;
|
|
150
|
-
overflow: auto;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
&-footer {
|
|
154
|
-
border-top: 1px solid @borderColor;
|
|
155
|
-
padding: 11px 16px 12px;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.ivu-drawer-header {
|
|
159
|
-
padding: 16px 16px 15px;
|
|
160
|
-
}
|
|
161
|
-
.ivu-drawer-body {
|
|
162
|
-
padding: 0px;
|
|
163
|
-
}
|
|
164
|
-
.ivu-drawer-close {
|
|
165
|
-
top: 18px;
|
|
166
|
-
right: 18px
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<Drawer
|
|
3
|
+
class="BriDrawer"
|
|
4
|
+
v-model="showModal"
|
|
5
|
+
:title="selfPropsObj.title"
|
|
6
|
+
:width="selfPropsObj.width"
|
|
7
|
+
:height="selfPropsObj.height"
|
|
8
|
+
:closable="selfPropsObj.closable"
|
|
9
|
+
:mask-closable="selfPropsObj.maskClosable"
|
|
10
|
+
:mask="selfPropsObj.mask"
|
|
11
|
+
:mask-style="selfPropsObj.maskStyle"
|
|
12
|
+
:styles="selfPropsObj.styles"
|
|
13
|
+
:scrollable="selfPropsObj.scrollable"
|
|
14
|
+
:placement="selfPropsObj.placement"
|
|
15
|
+
:transfer="selfPropsObj.transfer"
|
|
16
|
+
:class-name="selfPropsObj.className"
|
|
17
|
+
:inner="selfPropsObj.inner"
|
|
18
|
+
:draggable="selfPropsObj.draggable"
|
|
19
|
+
:before-close="selfPropsObj.beforeClose"
|
|
20
|
+
:lock-scroll="selfPropsObj.lockScroll"
|
|
21
|
+
@on-close="close"
|
|
22
|
+
@on-visible-change="visibleChange"
|
|
23
|
+
@on-resize-width="resizeChange"
|
|
24
|
+
>
|
|
25
|
+
<div
|
|
26
|
+
slot="header"
|
|
27
|
+
class="BriDrawer-header"
|
|
28
|
+
>
|
|
29
|
+
<slot name="header">
|
|
30
|
+
{{ selfPropsObj.title }}
|
|
31
|
+
</slot>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- 删除按钮 -->
|
|
35
|
+
<Icon
|
|
36
|
+
v-if="selfPropsObj.closable"
|
|
37
|
+
slot="close"
|
|
38
|
+
class="BriDrawer-close"
|
|
39
|
+
type="md-close"
|
|
40
|
+
size="20"
|
|
41
|
+
@click.stop="clickClose"
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<slot
|
|
45
|
+
slot="trigger"
|
|
46
|
+
name="trigger"
|
|
47
|
+
></slot>
|
|
48
|
+
|
|
49
|
+
<div class="BriDrawer-main">
|
|
50
|
+
<div class="BriDrawer-body">
|
|
51
|
+
<slot></slot>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div
|
|
55
|
+
v-if="selfPropsObj.footer"
|
|
56
|
+
class="BriDrawer-footer"
|
|
57
|
+
>
|
|
58
|
+
<slot name="footer">
|
|
59
|
+
<dsh-buttons
|
|
60
|
+
:list="list"
|
|
61
|
+
@click="$dshEmit($event)"
|
|
62
|
+
></dsh-buttons>
|
|
63
|
+
</slot>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</Drawer>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script>
|
|
70
|
+
export default {
|
|
71
|
+
name: "BriDrawer",
|
|
72
|
+
props: {
|
|
73
|
+
value: Boolean,
|
|
74
|
+
propsObj: {
|
|
75
|
+
type: Object,
|
|
76
|
+
default () {
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
list: {
|
|
81
|
+
type: Array,
|
|
82
|
+
default () {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
data () {
|
|
88
|
+
return {};
|
|
89
|
+
},
|
|
90
|
+
computed: {
|
|
91
|
+
showModal: {
|
|
92
|
+
get () {
|
|
93
|
+
return this.value;
|
|
94
|
+
},
|
|
95
|
+
set (bool) {
|
|
96
|
+
this.$emit("input", bool);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
selfPropsObj () {
|
|
100
|
+
return {
|
|
101
|
+
width: 320,
|
|
102
|
+
closable: true,
|
|
103
|
+
transfer: true,
|
|
104
|
+
footer: true,
|
|
105
|
+
maskClosable: false,
|
|
106
|
+
draggable: true,
|
|
107
|
+
...this.propsObj
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
created () {},
|
|
112
|
+
methods: {
|
|
113
|
+
clickClose () {
|
|
114
|
+
this.showModal = false;
|
|
115
|
+
},
|
|
116
|
+
close (...parmas) {
|
|
117
|
+
this.$emit("on-close", ...parmas);
|
|
118
|
+
},
|
|
119
|
+
resizeChange (...parmas) {
|
|
120
|
+
this.$emit("on-resize-change", ...parmas);
|
|
121
|
+
},
|
|
122
|
+
visibleChange (bool = false) {
|
|
123
|
+
this.$emit("on-visible-change", bool);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
</script>
|
|
128
|
+
|
|
129
|
+
<style lang="less">
|
|
130
|
+
.BriDrawer {
|
|
131
|
+
&-header {
|
|
132
|
+
color: @textColor;
|
|
133
|
+
font-weight: 500;
|
|
134
|
+
font-size: @smallTitleSize;
|
|
135
|
+
line-height: @smallTitleHeight;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&-close {
|
|
139
|
+
color: @contentColor;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&-main {
|
|
143
|
+
height: 100%;
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&-body {
|
|
149
|
+
flex: 1;
|
|
150
|
+
overflow: auto;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&-footer {
|
|
154
|
+
border-top: 1px solid @borderColor;
|
|
155
|
+
padding: 11px 16px 12px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.ivu-drawer-header {
|
|
159
|
+
padding: 16px 16px 15px;
|
|
160
|
+
}
|
|
161
|
+
.ivu-drawer-body {
|
|
162
|
+
padding: 0px;
|
|
163
|
+
}
|
|
164
|
+
.ivu-drawer-close {
|
|
165
|
+
top: 18px;
|
|
166
|
+
right: 18px
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
</style>
|