@idooel/components 0.0.2-beta.3 → 0.0.2-beta.30
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 +98 -98
- package/dist/@idooel/components.esm.js +3622 -1592
- package/dist/@idooel/components.umd.js +3676 -1647
- package/jsconfig.json +7 -7
- package/package.json +64 -50
- package/packages/alert/index.js +4 -4
- package/packages/alert/src/index.vue +45 -45
- package/packages/batch-export/index.js +4 -4
- package/packages/batch-export/src/index.vue +104 -104
- package/packages/business-components/modal-fsm/index.js +4 -4
- package/packages/business-components/modal-fsm/src/index.vue +163 -163
- package/packages/business-components/modal-import/index.js +4 -4
- package/packages/business-components/modal-import/src/index.vue +222 -139
- package/packages/business-components/modal-timeline/index.js +4 -4
- package/packages/business-components/modal-timeline/src/index.vue +77 -77
- package/packages/business-components/tabs-sub-center/index.js +4 -4
- package/packages/business-components/tabs-sub-center/src/index.vue +116 -116
- package/packages/button/index.js +4 -4
- package/packages/button/src/index.vue +65 -65
- package/packages/checkbox/index.js +4 -4
- package/packages/checkbox/src/index.vue +52 -52
- package/packages/composite-components/button-group/index.js +4 -4
- package/packages/composite-components/button-group/src/index.vue +151 -151
- package/packages/composite-components/form-attachment/src/index.vue +14 -14
- package/packages/composite-components/form-img-crop/index.js +4 -4
- package/packages/composite-components/form-img-crop/src/index.vue +131 -131
- package/packages/composite-components/modal-confirm/index.js +4 -4
- package/packages/composite-components/modal-confirm/src/index.vue +103 -103
- package/packages/composite-components/modal-form/index.js +4 -4
- package/packages/composite-components/modal-form/src/index.vue +230 -230
- package/packages/composite-components/modal-img-crop/index.js +4 -4
- package/packages/composite-components/modal-img-crop/src/index.vue +298 -298
- package/packages/composite-components/modal-table/index.js +4 -4
- package/packages/composite-components/modal-table/src/index.vue +155 -155
- package/packages/composite-components/modal-tree/index.js +4 -4
- package/packages/composite-components/modal-tree/src/index.vue +75 -75
- package/packages/composite-components/search-area/index.js +4 -4
- package/packages/composite-components/search-area/src/index.vue +239 -237
- package/packages/composite-components/search-area/src/label.vue +35 -35
- package/packages/composite-components/select-entity-modal-table/index.js +4 -4
- package/packages/composite-components/select-entity-modal-table/src/index.vue +171 -171
- package/packages/date/index.js +4 -4
- package/packages/date/src/index.vue +112 -112
- package/packages/date-range/index.js +4 -4
- package/packages/date-range/src/index.vue +47 -47
- package/packages/form/index.js +4 -4
- package/packages/form/src/index.vue +393 -319
- package/packages/icon/index.js +4 -4
- package/packages/icon/src/index.vue +31 -31
- package/packages/index.js +159 -153
- package/packages/input/index.js +4 -4
- package/packages/input/src/index.vue +35 -35
- package/packages/input-number/index.js +4 -4
- package/packages/input-number/src/index.vue +23 -23
- package/packages/loading/index.js +4 -4
- package/packages/loading/src/index.vue +36 -36
- package/packages/meta/provider.js +4 -0
- package/packages/modal/index.js +4 -4
- package/packages/modal/src/index.vue +184 -184
- package/packages/models/form-group-model/index.js +4 -4
- package/packages/models/form-group-model/src/index.vue +271 -273
- package/packages/models/form-model/index.js +4 -4
- package/packages/models/form-model/src/index.vue +236 -232
- package/packages/models/step-model/index.js +4 -4
- package/packages/models/step-model/src/index.vue +224 -224
- package/packages/models/tree-table-model/README.md +0 -0
- package/packages/models/tree-table-model/index.js +4 -4
- package/packages/models/tree-table-model/src/index.vue +964 -689
- package/packages/pagination/index.js +5 -0
- package/packages/pagination/src/index.vue +372 -0
- package/packages/radio/index.js +4 -4
- package/packages/radio/src/index.vue +56 -56
- package/packages/select/index.js +4 -4
- package/packages/select/src/index.vue +113 -105
- package/packages/select-entity/index.js +4 -4
- package/packages/select-entity/src/index.vue +119 -119
- package/packages/table/index.js +4 -4
- package/packages/table/src/action.vue +176 -172
- package/packages/table/src/index.vue +605 -319
- package/packages/tabs/index.js +4 -4
- package/packages/tabs/src/index.vue +55 -55
- package/packages/text/index.js +4 -4
- package/packages/text/src/index.vue +47 -47
- package/packages/text-editor/index.js +4 -4
- package/packages/text-editor/src/index.vue +72 -72
- package/packages/textarea/index.js +4 -4
- package/packages/textarea/src/index.vue +57 -57
- package/packages/theme/form.scss +21 -21
- package/packages/theme/index.scss +43 -43
- package/packages/theme/overrid.scss +7 -7
- package/packages/theme/styleClass.scss +2 -2
- package/packages/theme/variables.scss +55 -55
- package/packages/timeline/index.js +4 -4
- package/packages/timeline/src/index.vue +257 -257
- package/packages/tpl/index.js +4 -4
- package/packages/tpl/src/index.vue +55 -55
- package/packages/tree/index.js +4 -4
- package/packages/tree/src/TreeNode.vue +29 -29
- package/packages/tree/src/index.vue +101 -101
- package/packages/tree-select/index.js +4 -4
- package/packages/tree-select/src/index.vue +142 -142
- package/packages/upload/index.js +4 -4
- package/packages/upload/src/index.vue +998 -494
- package/packages/utils/README.md +172 -0
- package/packages/utils/index.js +66 -62
- package/packages/utils/runtime-context/dataPoolAPI.js +501 -0
- package/packages/utils/runtime-context/globalDataPool.js +279 -0
- package/packages/utils/runtime-context/index.js +76 -0
- package/packages/utils/runtime-context/modelSchema.js +174 -0
- package/scripts/rollup.config.js +42 -42
- package/scripts/rollup.esm.config.js +11 -11
- package/scripts/rollup.umd.config.js +17 -14
- package/vitest.config.js +17 -0
|
@@ -1,140 +1,223 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ele-modal :value="innerValue" :buttonGroupMeta="buttonGroupMeta" @cancel="onCancel" @handleClose="handleClose" title="
|
|
3
|
-
<div class="ele-modal-import__upload" v-if="isFileEmpty">
|
|
4
|
-
<div class="import-download__link" @click="handleClickDownloadTpl">点击此链接下载导入模板</div>
|
|
5
|
-
<ele-upload v-model="file" @on-success="uploadFileSuccess"></ele-upload>
|
|
6
|
-
</div>
|
|
7
|
-
<div v-
|
|
8
|
-
<div class="import-hint__content">
|
|
9
|
-
<div class="import-hint__left">
|
|
10
|
-
<ele-icon></ele-icon>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="import-hint__right">
|
|
13
|
-
<div class="hint-right__title" @click="handleClickJump">文件上传成功,任务处理中..... 请点击此按钮跳转到“批处理管理”菜单查看任务进度</div>
|
|
14
|
-
<div class="hint-right__sub-title">批处理任务的准备工作会在后台运行</div>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="import-footer__hint--text">
|
|
18
|
-
您可以请点击上方按钮查看任务进度或关闭弹框
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<ele-modal :value="innerValue" :buttonGroupMeta="buttonGroupMeta" @cancel="onCancel" @handleClose="handleClose" :title="title">
|
|
3
|
+
<div class="ele-modal-import__upload" v-if="isFileEmpty">
|
|
4
|
+
<div class="import-download__link" @click="handleClickDownloadTpl">点击此链接下载导入模板</div>
|
|
5
|
+
<ele-upload v-model="file" @on-success="uploadFileSuccess"></ele-upload>
|
|
6
|
+
</div>
|
|
7
|
+
<div v-if="(!isFileEmpty && mode === 'async')" class="ele-modal-import__hint">
|
|
8
|
+
<div class="import-hint__content">
|
|
9
|
+
<div class="import-hint__left">
|
|
10
|
+
<ele-icon></ele-icon>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="import-hint__right">
|
|
13
|
+
<div class="hint-right__title" @click="handleClickJump">文件上传成功,任务处理中..... 请点击此按钮跳转到“批处理管理”菜单查看任务进度</div>
|
|
14
|
+
<div class="hint-right__sub-title">批处理任务的准备工作会在后台运行</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="import-footer__hint--text">
|
|
18
|
+
您可以请点击上方按钮查看任务进度或关闭弹框
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div v-if="!isFileEmpty && mode === 'sync'" class="ele-modal-import__errors">
|
|
22
|
+
<template v-if="statusList.length > 0">
|
|
23
|
+
<div v-for="(value, idx) in statusList" :key="idx">
|
|
24
|
+
{{ value.message }}
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
<template v-else>
|
|
28
|
+
<ele-alert :type="hooks.uploaded.messages.type" :message="hooks.uploaded.messages.message"></ele-alert>
|
|
29
|
+
</template>
|
|
30
|
+
</div>
|
|
31
|
+
</ele-modal>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import { type, net } from '@idooel/shared'
|
|
36
|
+
import { parseFieldMap } from '../../../utils'
|
|
37
|
+
export default {
|
|
38
|
+
name: 'ele-modal-import',
|
|
39
|
+
model: {
|
|
40
|
+
prop: 'value',
|
|
41
|
+
event: 'change'
|
|
42
|
+
},
|
|
43
|
+
props: {
|
|
44
|
+
title: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: '导入'
|
|
47
|
+
},
|
|
48
|
+
mode: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: 'async'
|
|
51
|
+
},
|
|
52
|
+
value: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false
|
|
55
|
+
},
|
|
56
|
+
hooks: {
|
|
57
|
+
type: Object,
|
|
58
|
+
default: () => ({
|
|
59
|
+
download: {},
|
|
60
|
+
uploaded: {
|
|
61
|
+
url: '',
|
|
62
|
+
requestType: 'POST',
|
|
63
|
+
params: {},
|
|
64
|
+
fieldMap: {},
|
|
65
|
+
messages: {
|
|
66
|
+
type: 'success',
|
|
67
|
+
message: '文件上传成功'
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
},
|
|
72
|
+
errorList: {
|
|
73
|
+
type: Array,
|
|
74
|
+
default: () => []
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
data() {
|
|
78
|
+
return {
|
|
79
|
+
innerValue: false,
|
|
80
|
+
file: [],
|
|
81
|
+
buttonGroupMeta: {
|
|
82
|
+
elements: [
|
|
83
|
+
{
|
|
84
|
+
label: '关闭',
|
|
85
|
+
key: 'close',
|
|
86
|
+
type: 'default',
|
|
87
|
+
eventName: 'handleClose'
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
innerErrorList: []
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
computed: {
|
|
95
|
+
isFileEmpty () {
|
|
96
|
+
return type.isEmpty(this.file)
|
|
97
|
+
},
|
|
98
|
+
statusList () {
|
|
99
|
+
// 0 default
|
|
100
|
+
if (this.errorList.length > 0) {
|
|
101
|
+
return this.buildErrorList(this.errorList)
|
|
102
|
+
}
|
|
103
|
+
return this.innerErrorList
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
watch: {
|
|
107
|
+
value: {
|
|
108
|
+
handler (value) {
|
|
109
|
+
this.innerValue = value
|
|
110
|
+
},
|
|
111
|
+
immediate: true
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
methods: {
|
|
115
|
+
emitEvent (props = {}) {
|
|
116
|
+
this.$emit('on-actions', { ...props })
|
|
117
|
+
},
|
|
118
|
+
onCancel () {
|
|
119
|
+
this.innerValue = false
|
|
120
|
+
this.$emit('change', false)
|
|
121
|
+
},
|
|
122
|
+
handleClickJump () {
|
|
123
|
+
this.emitEvent({ action: 'jump' })
|
|
124
|
+
},
|
|
125
|
+
execFieldMap (fieldMap = {}, payloads = {}) {
|
|
126
|
+
const ctx = { _route: this.$route.query, route: this.$route, ...payloads }
|
|
127
|
+
return parseFieldMap(fieldMap, ctx)
|
|
128
|
+
},
|
|
129
|
+
buildErrorList (dataSource = []) {
|
|
130
|
+
const ret = dataSource.map(item => {
|
|
131
|
+
if (type.isStr(item)) {
|
|
132
|
+
return {
|
|
133
|
+
statusCode: '0',
|
|
134
|
+
message: item
|
|
135
|
+
}
|
|
136
|
+
} else {
|
|
137
|
+
// TODO
|
|
138
|
+
console.warn('not support error list type', item)
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
return ret
|
|
142
|
+
},
|
|
143
|
+
uploadFileSuccess (props) {
|
|
144
|
+
const { uploaded } = this.hooks
|
|
145
|
+
const { url, requestType = 'POST', params = {}, fieldMap = {} } = uploaded
|
|
146
|
+
if (!url) {
|
|
147
|
+
return this.emitEvent({ action: 'uploaded', file: props })
|
|
148
|
+
}
|
|
149
|
+
const payloads = this.execFieldMap(fieldMap, { file: props.file })
|
|
150
|
+
const formData = new FormData()
|
|
151
|
+
Object.keys(payloads).forEach(key => {
|
|
152
|
+
formData.append(key, payloads[key])
|
|
153
|
+
})
|
|
154
|
+
net[requestType.toLowerCase()](url, formData , { headers: { 'Content-Type': 'multipart/form-data' } }).then(resp => {
|
|
155
|
+
const { code, data } = resp
|
|
156
|
+
if (code !== '2000') {
|
|
157
|
+
this.innerErrorList = this.buildErrorList(data || [])
|
|
158
|
+
} else {
|
|
159
|
+
this.innerErrorList = []
|
|
160
|
+
}
|
|
161
|
+
})
|
|
162
|
+
this.emitEvent({ action: 'uploaded', file: props })
|
|
163
|
+
},
|
|
164
|
+
handleClickDownloadTpl () {
|
|
165
|
+
this.emitEvent({ action: 'download' })
|
|
166
|
+
},
|
|
167
|
+
cleanFile () {
|
|
168
|
+
this.file = []
|
|
169
|
+
},
|
|
170
|
+
handleClose () {
|
|
171
|
+
this.cleanFile()
|
|
172
|
+
this.innerValue = false
|
|
173
|
+
this.$emit('change', false)
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
</script>
|
|
178
|
+
<style lang="scss">
|
|
179
|
+
@import '../../../theme/index';
|
|
180
|
+
</style>
|
|
181
|
+
<style lang="scss" scoped>
|
|
182
|
+
.import-download__link {
|
|
183
|
+
color: var(--idooel-link-06);
|
|
184
|
+
font-size: 14px;
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
line-height: 22px;
|
|
187
|
+
}
|
|
188
|
+
.ele-modal-import__hint {
|
|
189
|
+
.import-hint__content {
|
|
190
|
+
padding: 16px;
|
|
191
|
+
border-radius: 2px;
|
|
192
|
+
height: 82px;
|
|
193
|
+
border: 1px dashed var(--idooel-link-06);
|
|
194
|
+
background: var(--idoole-black-02);
|
|
195
|
+
display: flex;
|
|
196
|
+
flex-direction: row;
|
|
197
|
+
align-items: center;
|
|
198
|
+
.import-hint__left {
|
|
199
|
+
.anticon-upload {
|
|
200
|
+
font-size: 48px;
|
|
201
|
+
color: var(--idooel-link-06);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
.import-hint__right {
|
|
205
|
+
margin-left: 16px;
|
|
206
|
+
.hint-right__title {
|
|
207
|
+
font-size: 16px;
|
|
208
|
+
color: var(--idooel-link-06);
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
}
|
|
211
|
+
.hint-right__sub-title {
|
|
212
|
+
font-size: 14px;
|
|
213
|
+
color: var(--idooel-link-03);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
.import-footer__hint--text {
|
|
218
|
+
font-size: 14px;
|
|
219
|
+
color: var(--idooel-link-06);
|
|
220
|
+
line-height: 22px;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
140
223
|
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EleModalTimeline from './src/index.vue'
|
|
2
|
-
|
|
3
|
-
EleModalTimeline.install = Vue => Vue.component(EleModalTimeline.name, EleModalTimeline)
|
|
4
|
-
|
|
1
|
+
import EleModalTimeline from './src/index.vue'
|
|
2
|
+
|
|
3
|
+
EleModalTimeline.install = Vue => Vue.component(EleModalTimeline.name, EleModalTimeline)
|
|
4
|
+
|
|
5
5
|
export default EleModalTimeline
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ele-modal v-on="$listeners" :value="value" :title="title" :buttonGroupMeta="buttonGroupMeta">
|
|
3
|
-
<slot name="alert"></slot>
|
|
4
|
-
<ele-timeline v-bind="meta"></ele-timeline>
|
|
5
|
-
<template v-if="showTextSlot" #footer-text>
|
|
6
|
-
<ele-text v-bind="textAttrs"></ele-text>
|
|
7
|
-
</template>
|
|
8
|
-
</ele-modal>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
// import { CONTEXT } from '@/utils'
|
|
13
|
-
import { CONTEXT } from '../../../utils'
|
|
14
|
-
import { type } from '@idooel/shared'
|
|
15
|
-
export default {
|
|
16
|
-
name: 'ele-modal-timeline',
|
|
17
|
-
model: {
|
|
18
|
-
prop: 'value',
|
|
19
|
-
event: 'change'
|
|
20
|
-
},
|
|
21
|
-
props: {
|
|
22
|
-
value: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
},
|
|
26
|
-
title: {
|
|
27
|
-
type: String
|
|
28
|
-
},
|
|
29
|
-
meta: {
|
|
30
|
-
type: Object,
|
|
31
|
-
default: () => ({})
|
|
32
|
-
},
|
|
33
|
-
buttonGroupMeta: {
|
|
34
|
-
type: Object,
|
|
35
|
-
default: () => {
|
|
36
|
-
return {
|
|
37
|
-
elements: [
|
|
38
|
-
{
|
|
39
|
-
label: '关闭',
|
|
40
|
-
key: 'cancel',
|
|
41
|
-
type: 'default',
|
|
42
|
-
eventName: 'cancel'
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
contextProp: {
|
|
49
|
-
type: Object,
|
|
50
|
-
default: () => ({})
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
provide() {
|
|
54
|
-
return {
|
|
55
|
-
[CONTEXT]: () => {
|
|
56
|
-
return {
|
|
57
|
-
_route: this.$route.query,
|
|
58
|
-
_routeMeta: this.$route.meta,
|
|
59
|
-
...this.contextProp
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
computed: {
|
|
65
|
-
showTextSlot () {
|
|
66
|
-
return !type.isEmpty(this.textAttrs)
|
|
67
|
-
},
|
|
68
|
-
textAttrs() {
|
|
69
|
-
const { text = {} } = this.buttonGroupMeta
|
|
70
|
-
return text
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
</script>
|
|
75
|
-
|
|
76
|
-
<style lang="scss" scoped>
|
|
77
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<ele-modal v-on="$listeners" :value="value" :title="title" :buttonGroupMeta="buttonGroupMeta">
|
|
3
|
+
<slot name="alert"></slot>
|
|
4
|
+
<ele-timeline v-bind="meta"></ele-timeline>
|
|
5
|
+
<template v-if="showTextSlot" #footer-text>
|
|
6
|
+
<ele-text v-bind="textAttrs"></ele-text>
|
|
7
|
+
</template>
|
|
8
|
+
</ele-modal>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
// import { CONTEXT } from '@/utils'
|
|
13
|
+
import { CONTEXT } from '../../../utils'
|
|
14
|
+
import { type } from '@idooel/shared'
|
|
15
|
+
export default {
|
|
16
|
+
name: 'ele-modal-timeline',
|
|
17
|
+
model: {
|
|
18
|
+
prop: 'value',
|
|
19
|
+
event: 'change'
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
value: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
title: {
|
|
27
|
+
type: String
|
|
28
|
+
},
|
|
29
|
+
meta: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default: () => ({})
|
|
32
|
+
},
|
|
33
|
+
buttonGroupMeta: {
|
|
34
|
+
type: Object,
|
|
35
|
+
default: () => {
|
|
36
|
+
return {
|
|
37
|
+
elements: [
|
|
38
|
+
{
|
|
39
|
+
label: '关闭',
|
|
40
|
+
key: 'cancel',
|
|
41
|
+
type: 'default',
|
|
42
|
+
eventName: 'cancel'
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
contextProp: {
|
|
49
|
+
type: Object,
|
|
50
|
+
default: () => ({})
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
provide() {
|
|
54
|
+
return {
|
|
55
|
+
[CONTEXT]: () => {
|
|
56
|
+
return {
|
|
57
|
+
_route: this.$route.query,
|
|
58
|
+
_routeMeta: this.$route.meta,
|
|
59
|
+
...this.contextProp
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
computed: {
|
|
65
|
+
showTextSlot () {
|
|
66
|
+
return !type.isEmpty(this.textAttrs)
|
|
67
|
+
},
|
|
68
|
+
textAttrs() {
|
|
69
|
+
const { text = {} } = this.buttonGroupMeta
|
|
70
|
+
return text
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<style lang="scss" scoped>
|
|
77
|
+
|
|
78
78
|
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EleTabsSubCenter from './src/index.vue'
|
|
2
|
-
|
|
3
|
-
EleTabsSubCenter.install = Vue => Vue.component(EleTabsSubCenter.name, EleTabsSubCenter)
|
|
4
|
-
|
|
1
|
+
import EleTabsSubCenter from './src/index.vue'
|
|
2
|
+
|
|
3
|
+
EleTabsSubCenter.install = Vue => Vue.component(EleTabsSubCenter.name, EleTabsSubCenter)
|
|
4
|
+
|
|
5
5
|
export default EleTabsSubCenter
|