@idooel/components 0.0.1-beta.2 → 0.0.1-beta.20
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/@idooel/components.esm.css +123 -0
- package/dist/@idooel/components.esm.js +1986 -715
- package/dist/@idooel/components.umd.css +117 -0
- package/dist/@idooel/components.umd.js +1992 -721
- package/package.json +46 -45
- package/packages/alert/index.js +5 -0
- package/packages/alert/src/index.vue +46 -0
- package/packages/batch-export/index.js +4 -4
- package/packages/batch-export/src/index.vue +106 -14
- package/packages/button/index.js +4 -4
- package/packages/button/src/index.vue +54 -54
- package/packages/checkbox/index.js +4 -4
- package/packages/checkbox/src/index.vue +43 -43
- package/packages/{attachment → composite-components/attachment}/src/index.vue +14 -14
- package/packages/composite-components/button-group/index.js +4 -4
- package/packages/composite-components/button-group/src/index.vue +45 -45
- package/packages/composite-components/modal-import/index.js +5 -0
- package/packages/composite-components/modal-import/src/index.vue +28 -0
- package/packages/composite-components/search-area/index.js +4 -4
- package/packages/composite-components/search-area/src/index.vue +225 -206
- package/packages/composite-components/search-area/src/label.vue +35 -35
- package/packages/date/index.js +4 -4
- package/packages/date/src/index.vue +39 -39
- package/packages/date-range/index.js +5 -0
- package/packages/date-range/src/index.vue +42 -0
- package/packages/form/index.js +4 -4
- package/packages/form/src/index.vue +210 -118
- package/packages/form-group-model/index.js +5 -0
- package/packages/form-group-model/src/index.vue +258 -0
- package/packages/form-model/index.js +4 -4
- package/packages/form-model/src/index.vue +163 -138
- package/packages/icon/index.js +4 -4
- package/packages/icon/src/index.vue +31 -31
- package/packages/index.js +81 -73
- package/packages/input/index.js +4 -4
- package/packages/input/src/index.vue +35 -27
- package/packages/input-number/index.js +4 -4
- package/packages/input-number/src/index.vue +23 -23
- package/packages/modal/index.js +4 -4
- package/packages/modal/src/index.vue +141 -128
- package/packages/radio/index.js +4 -4
- package/packages/radio/src/index.vue +51 -47
- package/packages/select/index.js +4 -4
- package/packages/select/src/index.vue +77 -34
- package/packages/select-entity/index.js +4 -4
- package/packages/select-entity/src/index.vue +113 -113
- package/packages/step-model/index.js +5 -0
- package/packages/step-model/src/index.vue +173 -0
- package/packages/table/index.js +4 -4
- package/packages/table/src/action.vue +131 -131
- package/packages/table/src/index.vue +157 -157
- package/packages/textarea/index.js +4 -4
- package/packages/textarea/src/index.vue +57 -48
- package/packages/theme/form.scss +21 -23
- package/packages/theme/index.scss +27 -23
- package/packages/theme/variables.scss +55 -55
- package/packages/tpl/index.js +4 -4
- package/packages/tpl/src/index.vue +55 -49
- 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-table-model/index.js +4 -4
- package/packages/tree-table-model/src/index.vue +314 -314
- package/packages/upload/index.js +4 -4
- package/packages/upload/src/index.vue +348 -350
- package/packages/utils/index.js +22 -3
- package/scripts/rollup.config.js +35 -35
- package/scripts/rollup.esm.config.js +11 -11
- package/scripts/rollup.umd.config.js +14 -14
- package/packages/text/index.js +0 -5
- package/packages/text/src/index.vue +0 -15
- /package/packages/{attachment → composite-components/attachment}/index.js +0 -0
package/packages/modal/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EleModal from './src/index.vue'
|
|
2
|
-
|
|
3
|
-
EleModal.install = Vue => Vue.component(EleModal.name, EleModal)
|
|
4
|
-
|
|
1
|
+
import EleModal from './src/index.vue'
|
|
2
|
+
|
|
3
|
+
EleModal.install = Vue => Vue.component(EleModal.name, EleModal)
|
|
4
|
+
|
|
5
5
|
export default EleModal
|
|
@@ -1,129 +1,142 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-modal
|
|
3
|
-
:title="title"
|
|
4
|
-
:cancelText="cancelText"
|
|
5
|
-
:okText="okText"
|
|
6
|
-
:closable="closable"
|
|
7
|
-
v-model:visible="showModal"
|
|
8
|
-
:width="width"
|
|
9
|
-
:keyboard="false"
|
|
10
|
-
:maskClosable="maskClosable"
|
|
11
|
-
:dialogStyle="{ top: `${upDownDistance[size]}px` }"
|
|
12
|
-
:bodyStyle="{ maxHeight: maxheight, overflowY: 'auto' }"
|
|
13
|
-
:footer="showFooter ? undefined : null"
|
|
14
|
-
@cancel="handleCancel"
|
|
15
|
-
@ok="handleOk"
|
|
16
|
-
>
|
|
17
|
-
<slot></slot>
|
|
18
|
-
<template slot="footer">
|
|
19
|
-
<
|
|
20
|
-
|
|
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
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<a-modal
|
|
3
|
+
:title="title"
|
|
4
|
+
:cancelText="cancelText"
|
|
5
|
+
:okText="okText"
|
|
6
|
+
:closable="closable"
|
|
7
|
+
v-model:visible="showModal"
|
|
8
|
+
:width="width"
|
|
9
|
+
:keyboard="false"
|
|
10
|
+
:maskClosable="maskClosable"
|
|
11
|
+
:dialogStyle="{ top: `${upDownDistance[size]}px` }"
|
|
12
|
+
:bodyStyle="{ maxHeight: maxheight, overflowY: 'auto' }"
|
|
13
|
+
:footer="showFooter ? undefined : null"
|
|
14
|
+
@cancel="handleCancel"
|
|
15
|
+
@ok="handleOk"
|
|
16
|
+
>
|
|
17
|
+
<slot></slot>
|
|
18
|
+
<template slot="footer">
|
|
19
|
+
<div class="ele-modal__footer">
|
|
20
|
+
<ele-button
|
|
21
|
+
v-for="btn in buttonGroupMeta.elements"
|
|
22
|
+
:type="btn.type"
|
|
23
|
+
v-on="$listeners"
|
|
24
|
+
:event-name="btn.eventName"
|
|
25
|
+
:key="btn.key">
|
|
26
|
+
{{ btn.label }}
|
|
27
|
+
</ele-button>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
</a-modal>
|
|
31
|
+
</template>
|
|
32
|
+
<script>
|
|
33
|
+
export default {
|
|
34
|
+
name: 'ele-modal',
|
|
35
|
+
props: {
|
|
36
|
+
value: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
39
|
+
},
|
|
40
|
+
title: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: '标题'
|
|
43
|
+
},
|
|
44
|
+
cancelText: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: '关闭'
|
|
47
|
+
},
|
|
48
|
+
okText: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: '确定'
|
|
51
|
+
},
|
|
52
|
+
size: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: 'middle'
|
|
55
|
+
},
|
|
56
|
+
map: {
|
|
57
|
+
type: Object,
|
|
58
|
+
default () {
|
|
59
|
+
return {}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
closable: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: true
|
|
65
|
+
},
|
|
66
|
+
maskClosable: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false
|
|
69
|
+
},
|
|
70
|
+
showFooter: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: true
|
|
73
|
+
},
|
|
74
|
+
footer: {
|
|
75
|
+
type: Function,
|
|
76
|
+
default: null
|
|
77
|
+
},
|
|
78
|
+
onlyClose: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: false
|
|
81
|
+
},
|
|
82
|
+
buttonGroupMeta: {
|
|
83
|
+
type: Object,
|
|
84
|
+
default: () => ({})
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
watch: {
|
|
88
|
+
value (newVal) {
|
|
89
|
+
this.$nextTick(() => {
|
|
90
|
+
this.showModal = newVal
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
computed: {
|
|
95
|
+
width () {
|
|
96
|
+
return this.map[this.size]
|
|
97
|
+
},
|
|
98
|
+
maxheight () {
|
|
99
|
+
return `calc(100vh - ${this.upDownDistance[this.size] * 2 + (this.title ? 55 : 0) + (this.showFooter ? 53 : 0) }px`
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
data () {
|
|
103
|
+
return {
|
|
104
|
+
showModal: false
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
created () {
|
|
108
|
+
let defaultMap = {
|
|
109
|
+
small: 480,
|
|
110
|
+
middle: 768,
|
|
111
|
+
big: 1200
|
|
112
|
+
}
|
|
113
|
+
this.upDownDistance = {
|
|
114
|
+
small: 80,
|
|
115
|
+
middle: 80,
|
|
116
|
+
big: 40
|
|
117
|
+
}
|
|
118
|
+
this.map = Object.assign(this.map, defaultMap)
|
|
119
|
+
},
|
|
120
|
+
methods: {
|
|
121
|
+
openModal () {
|
|
122
|
+
this.showModal = true
|
|
123
|
+
this.removeHidden()
|
|
124
|
+
},
|
|
125
|
+
handleCancel () {
|
|
126
|
+
this.showModal = false
|
|
127
|
+
this.removeHidden()
|
|
128
|
+
console.log('on-cancel')
|
|
129
|
+
this.$emit('cancel')
|
|
130
|
+
this.$emit('input', this.showModal)
|
|
131
|
+
},
|
|
132
|
+
handleOk () {
|
|
133
|
+
console.log('on-ok')
|
|
134
|
+
this.$emit('ok')
|
|
135
|
+
},
|
|
136
|
+
removeHidden () {
|
|
137
|
+
let ishidden = document.body.style.overflow === 'hidden'
|
|
138
|
+
ishidden && (document.body.style.overflow = 'initial')
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
129
142
|
</script>
|
package/packages/radio/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EleRadio from './src/index.vue'
|
|
2
|
-
|
|
3
|
-
EleRadio.install = Vue => Vue.component(EleRadio.name, EleRadio)
|
|
4
|
-
|
|
1
|
+
import EleRadio from './src/index.vue'
|
|
2
|
+
|
|
3
|
+
EleRadio.install = Vue => Vue.component(EleRadio.name, EleRadio)
|
|
4
|
+
|
|
5
5
|
export default EleRadio
|
|
@@ -1,48 +1,52 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-radio-group :
|
|
3
|
-
<a-radio v-for="item in dataSource" :key="item.value" :value="item.value">
|
|
4
|
-
{{ item.label }}
|
|
5
|
-
</a-radio>
|
|
6
|
-
</a-radio-group>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
export default {
|
|
11
|
-
name: 'ele-radio',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
type:
|
|
22
|
-
default:
|
|
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
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<a-radio-group :value="value" @change="onChange" :disabled="disabled">
|
|
3
|
+
<a-radio v-for="item in dataSource" :key="item.value" :value="item.value">
|
|
4
|
+
{{ item.label }}
|
|
5
|
+
</a-radio>
|
|
6
|
+
</a-radio-group>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: 'ele-radio',
|
|
12
|
+
model: {
|
|
13
|
+
prop: 'value',
|
|
14
|
+
event: 'change'
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
value: {
|
|
18
|
+
type: [String, Array, Number]
|
|
19
|
+
},
|
|
20
|
+
dataSource: {
|
|
21
|
+
type: Array,
|
|
22
|
+
default: () => []
|
|
23
|
+
},
|
|
24
|
+
disabled: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
onChange (e) {
|
|
31
|
+
this.$emit('change', e.target.value)
|
|
32
|
+
this.$emit('input', e.target.value)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
<style lang="scss" scoped>
|
|
38
|
+
.ant-radio-group {
|
|
39
|
+
text-align: left;
|
|
40
|
+
line-height: 32px;
|
|
41
|
+
}
|
|
42
|
+
.has-error {
|
|
43
|
+
.ant-radio-group {
|
|
44
|
+
::v-deep .ant-radio-wrapper {
|
|
45
|
+
color: var(--idooel-form-border-err-color);
|
|
46
|
+
}
|
|
47
|
+
::v-deep .ant-radio-inner {
|
|
48
|
+
border-color: var(--idooel-form-border-err-color);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
48
52
|
</style>
|
package/packages/select/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EleSelect from './src/index.vue'
|
|
2
|
-
|
|
3
|
-
EleSelect.install = Vue => Vue.component(EleSelect.name, EleSelect)
|
|
4
|
-
|
|
1
|
+
import EleSelect from './src/index.vue'
|
|
2
|
+
|
|
3
|
+
EleSelect.install = Vue => Vue.component(EleSelect.name, EleSelect)
|
|
4
|
+
|
|
5
5
|
export default EleSelect
|
|
@@ -1,35 +1,78 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-select :value="value" style="width: 100%" @change="onChange">
|
|
3
|
-
<a-select-option v-for="item in
|
|
4
|
-
{{ item.label }}
|
|
5
|
-
</a-select-option>
|
|
6
|
-
</a-select>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<a-select :disabled="disabled" :value="value" style="width: 100%" @change="onChange">
|
|
3
|
+
<a-select-option v-for="item in innerDataSource" :key="item.value" :value="item.value">
|
|
4
|
+
{{ item.label }}
|
|
5
|
+
</a-select-option>
|
|
6
|
+
</a-select>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import { net, type } from '@idooel/shared'
|
|
11
|
+
export default {
|
|
12
|
+
name: 'ele-select',
|
|
13
|
+
props: {
|
|
14
|
+
disabled: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
value: {
|
|
19
|
+
type: [String, Array, Number]
|
|
20
|
+
},
|
|
21
|
+
defaultValue: {
|
|
22
|
+
type: [String, Array, Number]
|
|
23
|
+
},
|
|
24
|
+
dataSource: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: () => []
|
|
27
|
+
},
|
|
28
|
+
url: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: 'api-basic/workbench/dicttype/enum/selectList'
|
|
31
|
+
},
|
|
32
|
+
code: {
|
|
33
|
+
type: String,
|
|
34
|
+
},
|
|
35
|
+
params: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: () => ({})
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
data () {
|
|
41
|
+
return {
|
|
42
|
+
innerDataSource: []
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
watch: {
|
|
46
|
+
dataSource: {
|
|
47
|
+
handler (dataSource) {
|
|
48
|
+
this.innerDataSource = dataSource
|
|
49
|
+
},
|
|
50
|
+
immediate: true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
created () {
|
|
54
|
+
(this.code || !type.isEmpty(this.params)) && this.fetchDataSourceByUrl()
|
|
55
|
+
},
|
|
56
|
+
methods: {
|
|
57
|
+
fetchDataSourceByUrl () {
|
|
58
|
+
net.get(this.url, { code: this.code, ...this.params }).then(resp => {
|
|
59
|
+
const { data } = resp
|
|
60
|
+
this.innerDataSource = data.map(item => {
|
|
61
|
+
return {
|
|
62
|
+
label: item.name,
|
|
63
|
+
value: item.code
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
},
|
|
68
|
+
onChange (value) {
|
|
69
|
+
this.$emit('change', value)
|
|
70
|
+
this.$emit('input', value)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<style lang="scss" scoped>
|
|
77
|
+
|
|
35
78
|
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EleSelectEntity from './src/index.vue'
|
|
2
|
-
|
|
3
|
-
EleSelectEntity.install = Vue => Vue.component(EleSelectEntity.name, EleSelectEntity)
|
|
4
|
-
|
|
1
|
+
import EleSelectEntity from './src/index.vue'
|
|
2
|
+
|
|
3
|
+
EleSelectEntity.install = Vue => Vue.component(EleSelectEntity.name, EleSelectEntity)
|
|
4
|
+
|
|
5
5
|
export default EleSelectEntity
|