@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.
Files changed (113) hide show
  1. package/README.md +98 -98
  2. package/dist/@idooel/components.esm.js +3622 -1592
  3. package/dist/@idooel/components.umd.js +3676 -1647
  4. package/jsconfig.json +7 -7
  5. package/package.json +64 -50
  6. package/packages/alert/index.js +4 -4
  7. package/packages/alert/src/index.vue +45 -45
  8. package/packages/batch-export/index.js +4 -4
  9. package/packages/batch-export/src/index.vue +104 -104
  10. package/packages/business-components/modal-fsm/index.js +4 -4
  11. package/packages/business-components/modal-fsm/src/index.vue +163 -163
  12. package/packages/business-components/modal-import/index.js +4 -4
  13. package/packages/business-components/modal-import/src/index.vue +222 -139
  14. package/packages/business-components/modal-timeline/index.js +4 -4
  15. package/packages/business-components/modal-timeline/src/index.vue +77 -77
  16. package/packages/business-components/tabs-sub-center/index.js +4 -4
  17. package/packages/business-components/tabs-sub-center/src/index.vue +116 -116
  18. package/packages/button/index.js +4 -4
  19. package/packages/button/src/index.vue +65 -65
  20. package/packages/checkbox/index.js +4 -4
  21. package/packages/checkbox/src/index.vue +52 -52
  22. package/packages/composite-components/button-group/index.js +4 -4
  23. package/packages/composite-components/button-group/src/index.vue +151 -151
  24. package/packages/composite-components/form-attachment/src/index.vue +14 -14
  25. package/packages/composite-components/form-img-crop/index.js +4 -4
  26. package/packages/composite-components/form-img-crop/src/index.vue +131 -131
  27. package/packages/composite-components/modal-confirm/index.js +4 -4
  28. package/packages/composite-components/modal-confirm/src/index.vue +103 -103
  29. package/packages/composite-components/modal-form/index.js +4 -4
  30. package/packages/composite-components/modal-form/src/index.vue +230 -230
  31. package/packages/composite-components/modal-img-crop/index.js +4 -4
  32. package/packages/composite-components/modal-img-crop/src/index.vue +298 -298
  33. package/packages/composite-components/modal-table/index.js +4 -4
  34. package/packages/composite-components/modal-table/src/index.vue +155 -155
  35. package/packages/composite-components/modal-tree/index.js +4 -4
  36. package/packages/composite-components/modal-tree/src/index.vue +75 -75
  37. package/packages/composite-components/search-area/index.js +4 -4
  38. package/packages/composite-components/search-area/src/index.vue +239 -237
  39. package/packages/composite-components/search-area/src/label.vue +35 -35
  40. package/packages/composite-components/select-entity-modal-table/index.js +4 -4
  41. package/packages/composite-components/select-entity-modal-table/src/index.vue +171 -171
  42. package/packages/date/index.js +4 -4
  43. package/packages/date/src/index.vue +112 -112
  44. package/packages/date-range/index.js +4 -4
  45. package/packages/date-range/src/index.vue +47 -47
  46. package/packages/form/index.js +4 -4
  47. package/packages/form/src/index.vue +393 -319
  48. package/packages/icon/index.js +4 -4
  49. package/packages/icon/src/index.vue +31 -31
  50. package/packages/index.js +159 -153
  51. package/packages/input/index.js +4 -4
  52. package/packages/input/src/index.vue +35 -35
  53. package/packages/input-number/index.js +4 -4
  54. package/packages/input-number/src/index.vue +23 -23
  55. package/packages/loading/index.js +4 -4
  56. package/packages/loading/src/index.vue +36 -36
  57. package/packages/meta/provider.js +4 -0
  58. package/packages/modal/index.js +4 -4
  59. package/packages/modal/src/index.vue +184 -184
  60. package/packages/models/form-group-model/index.js +4 -4
  61. package/packages/models/form-group-model/src/index.vue +271 -273
  62. package/packages/models/form-model/index.js +4 -4
  63. package/packages/models/form-model/src/index.vue +236 -232
  64. package/packages/models/step-model/index.js +4 -4
  65. package/packages/models/step-model/src/index.vue +224 -224
  66. package/packages/models/tree-table-model/README.md +0 -0
  67. package/packages/models/tree-table-model/index.js +4 -4
  68. package/packages/models/tree-table-model/src/index.vue +964 -689
  69. package/packages/pagination/index.js +5 -0
  70. package/packages/pagination/src/index.vue +372 -0
  71. package/packages/radio/index.js +4 -4
  72. package/packages/radio/src/index.vue +56 -56
  73. package/packages/select/index.js +4 -4
  74. package/packages/select/src/index.vue +113 -105
  75. package/packages/select-entity/index.js +4 -4
  76. package/packages/select-entity/src/index.vue +119 -119
  77. package/packages/table/index.js +4 -4
  78. package/packages/table/src/action.vue +176 -172
  79. package/packages/table/src/index.vue +605 -319
  80. package/packages/tabs/index.js +4 -4
  81. package/packages/tabs/src/index.vue +55 -55
  82. package/packages/text/index.js +4 -4
  83. package/packages/text/src/index.vue +47 -47
  84. package/packages/text-editor/index.js +4 -4
  85. package/packages/text-editor/src/index.vue +72 -72
  86. package/packages/textarea/index.js +4 -4
  87. package/packages/textarea/src/index.vue +57 -57
  88. package/packages/theme/form.scss +21 -21
  89. package/packages/theme/index.scss +43 -43
  90. package/packages/theme/overrid.scss +7 -7
  91. package/packages/theme/styleClass.scss +2 -2
  92. package/packages/theme/variables.scss +55 -55
  93. package/packages/timeline/index.js +4 -4
  94. package/packages/timeline/src/index.vue +257 -257
  95. package/packages/tpl/index.js +4 -4
  96. package/packages/tpl/src/index.vue +55 -55
  97. package/packages/tree/index.js +4 -4
  98. package/packages/tree/src/TreeNode.vue +29 -29
  99. package/packages/tree/src/index.vue +101 -101
  100. package/packages/tree-select/index.js +4 -4
  101. package/packages/tree-select/src/index.vue +142 -142
  102. package/packages/upload/index.js +4 -4
  103. package/packages/upload/src/index.vue +998 -494
  104. package/packages/utils/README.md +172 -0
  105. package/packages/utils/index.js +66 -62
  106. package/packages/utils/runtime-context/dataPoolAPI.js +501 -0
  107. package/packages/utils/runtime-context/globalDataPool.js +279 -0
  108. package/packages/utils/runtime-context/index.js +76 -0
  109. package/packages/utils/runtime-context/modelSchema.js +174 -0
  110. package/scripts/rollup.config.js +42 -42
  111. package/scripts/rollup.esm.config.js +11 -11
  112. package/scripts/rollup.umd.config.js +17 -14
  113. package/vitest.config.js +17 -0
@@ -1,172 +1,172 @@
1
- <template>
2
- <section class="select__entity--modal-table">
3
- <ele-select-entity :multiple="multiple" :maxCount="maxCount" :value="entityValue" @close="onClosSelectEntity" @evoke="evokeSelectEntity"></ele-select-entity>
4
- <ele-modal-table
5
- @handleEntitySave="handleEntitySave"
6
- @handleEntityCancel="handleEntityCancel"
7
- :meta="buildMeta"
8
- v-model="showModalTableValue">
9
- </ele-modal-table>
10
- </section>
11
- </template>
12
-
13
- <script>
14
- import { type } from '@idooel/shared'
15
- export default {
16
- name: 'ele-select-entity-modal-table',
17
- model: {
18
- prop: 'value',
19
- event: 'change'
20
- },
21
- props: {
22
- value: {
23
- type: [Array, Object],
24
- default: () => []
25
- },
26
- title: {
27
- type: String
28
- },
29
- maxCount: {
30
- type: Number
31
- },
32
- tableMeta: {
33
- type: Object,
34
- default: () => ({})
35
- },
36
- returnValues: {
37
- type: [String, Object],
38
- default: () => ({})
39
- },
40
- replaceFields: {
41
- type: Object
42
- },
43
- multiple: {
44
- type: Boolean,
45
- default: true
46
- }
47
- },
48
- data() {
49
- return {
50
- showModalTableValue: false,
51
- entityValue: [],
52
- emitValue: void 0
53
- }
54
- },
55
- watch: {
56
- value: {
57
- handler(innerValue) {
58
- const _innerValue = type.isArray(innerValue) ? innerValue : [innerValue]
59
- const { label, value } = this.replaceFields
60
- this.entityValue = _innerValue.map(item => {
61
- return {
62
- label: item[label],
63
- value: item[value]
64
- }
65
- })
66
- },
67
- immediate: true
68
- }
69
- },
70
- computed: {
71
- buildMeta () {
72
- const { tableMeta } = this.tableMeta
73
- Object.assign(tableMeta, { multiple: this.multiple })
74
- return {
75
- ...this.tableMeta,
76
- footerMeta: {
77
- elements: (ctx) => [
78
- {
79
- label: '确定',
80
- type: 'primary',
81
- key: 'save',
82
- eventName: 'handleEntitySave'
83
- },
84
- {
85
- label: '返回',
86
- key: 'cancel',
87
- eventName: 'handleEntityCancel'
88
- }
89
- ]
90
- }
91
- }
92
- }
93
- },
94
- created () {
95
- this.emitValue = this.multiple ? [] : void 0
96
- },
97
- methods: {
98
- handleEntityCancel () {
99
- this.showModalTableValue = false
100
- },
101
- buildEntityValueForEmitObjectReturnValues (dataSource = []) {
102
- const keys = Object.keys(this.returnValues)
103
- const ret = dataSource.map(props => {
104
- const ret = {}
105
- keys.forEach(key => {
106
- ret[key] = props[this.returnValues[key]]
107
- })
108
- return ret
109
- })
110
- return this.multiple ? ret : ret[0]
111
- },
112
- emitEntityValue (dataSource = []) {
113
- this.emitValue = this.value
114
- if (this.multiple) {
115
- if (type.isStr(this.returnValues)) {
116
- const ret = dataSource.map(props => {
117
- return props[this.returnValues]
118
- })
119
- this.emitValue.push(...ret)
120
- } else if (type.isObject(this.returnValues)) {
121
- this.emitValue.push(...this.buildEntityValueForEmitObjectReturnValues(dataSource))
122
- }
123
- } else {
124
- if (type.isStr(this.returnValues)) {
125
- this.emitValue = dataSource ? dataSource[this.returnValues] : ''
126
- } else if (type.isObject(this.returnValues)) {
127
- this.emitValue = dataSource ? this.buildEntityValueForEmitObjectReturnValues([dataSource]) : ''
128
- }
129
- }
130
- this.$emit('change', this.emitValue)
131
- },
132
- onClosSelectEntity (props) {
133
- this.entityValue = this.entityValue.filter(item => item.value !== props.value)
134
- if (this.multiple) {
135
- if (type.isStr(this.returnValues)) {
136
- this.emitValue = this.emitValue.filter(item => item !== props.value)
137
- } else if (type.isObject(this.returnValues)) {
138
- const reverseReturnValues = Object.fromEntries(Object.entries(this.returnValues).map(([key, value]) => [value, key]))
139
- const primaryKey = reverseReturnValues[this.replaceFields.value]
140
- this.emitValue = this.emitValue.filter(item => item[primaryKey] !== props.value)
141
- }
142
- } else {
143
- if (type.isStr(this.returnValues)) {
144
- this.emitValue = ''
145
- } else if (type.isObject(this.returnValues)) {
146
- this.emitValue = {}
147
- }
148
- }
149
- this.$emit('change', this.emitValue)
150
- },
151
- handleEntitySave (props) {
152
- const { exposed = {} } = props
153
- const { currentTableSelection } = exposed
154
- const currentTableSelectionRet = type.isArray(currentTableSelection) ? currentTableSelection : [currentTableSelection]
155
- this.entityValue = currentTableSelectionRet.map(item => {
156
- return {
157
- label: item[this.replaceFields.label],
158
- value: item[this.replaceFields.value]
159
- }
160
- })
161
- this.emitEntityValue(currentTableSelection)
162
- this.showModalTableValue = false
163
- },
164
- showModalTable () {
165
- this.showModalTableValue = true
166
- },
167
- evokeSelectEntity () {
168
- this.showModalTable()
169
- }
170
- }
171
- }
1
+ <template>
2
+ <section class="select__entity--modal-table">
3
+ <ele-select-entity :multiple="multiple" :maxCount="maxCount" :value="entityValue" @close="onClosSelectEntity" @evoke="evokeSelectEntity"></ele-select-entity>
4
+ <ele-modal-table
5
+ @handleEntitySave="handleEntitySave"
6
+ @handleEntityCancel="handleEntityCancel"
7
+ :meta="buildMeta"
8
+ v-model="showModalTableValue">
9
+ </ele-modal-table>
10
+ </section>
11
+ </template>
12
+
13
+ <script>
14
+ import { type } from '@idooel/shared'
15
+ export default {
16
+ name: 'ele-select-entity-modal-table',
17
+ model: {
18
+ prop: 'value',
19
+ event: 'change'
20
+ },
21
+ props: {
22
+ value: {
23
+ type: [Array, Object],
24
+ default: () => []
25
+ },
26
+ title: {
27
+ type: String
28
+ },
29
+ maxCount: {
30
+ type: Number
31
+ },
32
+ tableMeta: {
33
+ type: Object,
34
+ default: () => ({})
35
+ },
36
+ returnValues: {
37
+ type: [String, Object],
38
+ default: () => ({})
39
+ },
40
+ replaceFields: {
41
+ type: Object
42
+ },
43
+ multiple: {
44
+ type: Boolean,
45
+ default: true
46
+ }
47
+ },
48
+ data() {
49
+ return {
50
+ showModalTableValue: false,
51
+ entityValue: [],
52
+ emitValue: void 0
53
+ }
54
+ },
55
+ watch: {
56
+ value: {
57
+ handler(innerValue) {
58
+ const _innerValue = type.isArray(innerValue) ? innerValue : [innerValue]
59
+ const { label, value } = this.replaceFields
60
+ this.entityValue = _innerValue.map(item => {
61
+ return {
62
+ label: item[label],
63
+ value: item[value]
64
+ }
65
+ })
66
+ },
67
+ immediate: true
68
+ }
69
+ },
70
+ computed: {
71
+ buildMeta () {
72
+ const { tableMeta } = this.tableMeta
73
+ Object.assign(tableMeta, { multiple: this.multiple })
74
+ return {
75
+ ...this.tableMeta,
76
+ footerMeta: {
77
+ elements: (ctx) => [
78
+ {
79
+ label: '确定',
80
+ type: 'primary',
81
+ key: 'save',
82
+ eventName: 'handleEntitySave'
83
+ },
84
+ {
85
+ label: '返回',
86
+ key: 'cancel',
87
+ eventName: 'handleEntityCancel'
88
+ }
89
+ ]
90
+ }
91
+ }
92
+ }
93
+ },
94
+ created () {
95
+ this.emitValue = this.multiple ? [] : void 0
96
+ },
97
+ methods: {
98
+ handleEntityCancel () {
99
+ this.showModalTableValue = false
100
+ },
101
+ buildEntityValueForEmitObjectReturnValues (dataSource = []) {
102
+ const keys = Object.keys(this.returnValues)
103
+ const ret = dataSource.map(props => {
104
+ const ret = {}
105
+ keys.forEach(key => {
106
+ ret[key] = props[this.returnValues[key]]
107
+ })
108
+ return ret
109
+ })
110
+ return this.multiple ? ret : ret[0]
111
+ },
112
+ emitEntityValue (dataSource = []) {
113
+ this.emitValue = this.value
114
+ if (this.multiple) {
115
+ if (type.isStr(this.returnValues)) {
116
+ const ret = dataSource.map(props => {
117
+ return props[this.returnValues]
118
+ })
119
+ this.emitValue.push(...ret)
120
+ } else if (type.isObject(this.returnValues)) {
121
+ this.emitValue.push(...this.buildEntityValueForEmitObjectReturnValues(dataSource))
122
+ }
123
+ } else {
124
+ if (type.isStr(this.returnValues)) {
125
+ this.emitValue = dataSource ? dataSource[this.returnValues] : ''
126
+ } else if (type.isObject(this.returnValues)) {
127
+ this.emitValue = dataSource ? this.buildEntityValueForEmitObjectReturnValues([dataSource]) : ''
128
+ }
129
+ }
130
+ this.$emit('change', this.emitValue)
131
+ },
132
+ onClosSelectEntity (props) {
133
+ this.entityValue = this.entityValue.filter(item => item.value !== props.value)
134
+ if (this.multiple) {
135
+ if (type.isStr(this.returnValues)) {
136
+ this.emitValue = this.emitValue.filter(item => item !== props.value)
137
+ } else if (type.isObject(this.returnValues)) {
138
+ // const reverseReturnValues = Object.fromEntries(Object.entries(this.returnValues).map(([key, value]) => [value, key]))
139
+ const primaryKey = this.replaceFields.value
140
+ this.emitValue = this.emitValue.filter(item => item[primaryKey] !== props.value)
141
+ }
142
+ } else {
143
+ if (type.isStr(this.returnValues)) {
144
+ this.emitValue = ''
145
+ } else if (type.isObject(this.returnValues)) {
146
+ this.emitValue = null
147
+ }
148
+ }
149
+ this.$emit('change', this.emitValue)
150
+ },
151
+ handleEntitySave (props) {
152
+ const { exposed = {} } = props
153
+ const { currentTableSelection } = exposed
154
+ const currentTableSelectionRet = type.isArray(currentTableSelection) ? currentTableSelection : [currentTableSelection]
155
+ this.entityValue = currentTableSelectionRet.map(item => {
156
+ return {
157
+ label: item[this.returnValues[this.replaceFields.label]],
158
+ value: item[this.returnValues[this.replaceFields.value]]
159
+ }
160
+ })
161
+ this.emitEntityValue(currentTableSelection)
162
+ this.showModalTableValue = false
163
+ },
164
+ showModalTable () {
165
+ this.showModalTableValue = true
166
+ },
167
+ evokeSelectEntity () {
168
+ this.showModalTable()
169
+ }
170
+ }
171
+ }
172
172
  </script>
@@ -1,5 +1,5 @@
1
- import EleDate from './src/index.vue'
2
-
3
- EleDate.install = Vue => Vue.component(EleDate.name, EleDate)
4
-
1
+ import EleDate from './src/index.vue'
2
+
3
+ EleDate.install = Vue => Vue.component(EleDate.name, EleDate)
4
+
5
5
  export default EleDate
@@ -1,113 +1,113 @@
1
- <template>
2
- <div class="ele-date__wrapper">
3
- <a-date-picker
4
- style="width: 100%;"
5
- :mode="modeValue"
6
- v-if="modeValue == 'year'"
7
- :open="open"
8
- :disabled="disabled"
9
- :value="value"
10
- :placeholder="placeholder"
11
- :show-time="showTime"
12
- :show-today="showToday"
13
- :valueFormat="innerValueFormat"
14
- @panelChange="onPanelChange"
15
- @openChange="openChange"
16
- @change="onChange"
17
- :format="format">
18
- </a-date-picker>
19
- <a-date-picker
20
- v-else
21
- style="width: 100%;"
22
- :placeholder="placeholder"
23
- :open="open"
24
- :disabled="disabled"
25
- :value="value"
26
- :show-time="showTime"
27
- :show-today="showToday"
28
- :valueFormat="innerValueFormat"
29
- @panelChange="onPanelChange"
30
- @openChange="openChange"
31
- @change="onChange"
32
- :format="format">
33
- </a-date-picker>
34
- </div>
35
- </template>
36
-
37
- <script>
38
- import moment from 'moment'
39
- export default {
40
- name: 'ele-date',
41
- model: {
42
- prop: 'value',
43
- event: 'change'
44
- },
45
- props: {
46
- value: {
47
- type: [String, Object]
48
- },
49
- disabled: {
50
- type: Boolean,
51
- default: false
52
- },
53
- format: {
54
- type: String,
55
- default: 'YYYY/MM/DD'
56
- },
57
- mode: {
58
- type: String
59
- },
60
- valueFormat: {
61
- type: String
62
- },
63
- showTime: {
64
- type: [Boolean, Object],
65
- default: true
66
- },
67
- showToday: {
68
- type: Boolean,
69
- default: true
70
- },
71
- placeholder: {
72
- type: String,
73
- default: '请选择日期'
74
- }
75
- },
76
- data () {
77
- return {
78
- open: false
79
- }
80
- },
81
- computed: {
82
- innerValueFormat () {
83
- if (this.valueFormat) return this.valueFormat
84
- return this.format
85
- },
86
- modeValue () {
87
- if (this.mode) return this.mode
88
- if (this.format === 'YYYY') return 'year'
89
- return 'date'
90
- }
91
- },
92
- methods: {
93
- onChange (_, dataString) {
94
- this.$emit('input', dataString)
95
- this.$emit('change', dataString)
96
- },
97
- onPanelChange (value, mode) {
98
- if (this.modeValue !== 'year') return
99
- this.$emit('input', moment(value).format(this.format))
100
- this.$emit('change', moment(value).format(this.format))
101
- this.open = false
102
- },
103
- openChange (open) {
104
- this.open = open
105
- }
106
- }
107
- }
108
- </script>
109
- <style lang="scss" scoped>
110
- .ele-date__wrapper {
111
- width: 100%;
112
- }
1
+ <template>
2
+ <div class="ele-date__wrapper">
3
+ <a-date-picker
4
+ style="width: 100%;"
5
+ :mode="modeValue"
6
+ v-if="modeValue == 'year'"
7
+ :open="open"
8
+ :disabled="disabled"
9
+ :value="value"
10
+ :placeholder="placeholder"
11
+ :show-time="showTime"
12
+ :show-today="showToday"
13
+ :valueFormat="innerValueFormat"
14
+ @panelChange="onPanelChange"
15
+ @openChange="openChange"
16
+ @change="onChange"
17
+ :format="format">
18
+ </a-date-picker>
19
+ <a-date-picker
20
+ v-else
21
+ style="width: 100%;"
22
+ :placeholder="placeholder"
23
+ :open="open"
24
+ :disabled="disabled"
25
+ :value="value"
26
+ :show-time="showTime"
27
+ :show-today="showToday"
28
+ :valueFormat="innerValueFormat"
29
+ @panelChange="onPanelChange"
30
+ @openChange="openChange"
31
+ @change="onChange"
32
+ :format="format">
33
+ </a-date-picker>
34
+ </div>
35
+ </template>
36
+
37
+ <script>
38
+ import moment from 'moment'
39
+ export default {
40
+ name: 'ele-date',
41
+ model: {
42
+ prop: 'value',
43
+ event: 'change'
44
+ },
45
+ props: {
46
+ value: {
47
+ type: [String, Object]
48
+ },
49
+ disabled: {
50
+ type: Boolean,
51
+ default: false
52
+ },
53
+ format: {
54
+ type: String,
55
+ default: 'YYYY/MM/DD'
56
+ },
57
+ mode: {
58
+ type: String
59
+ },
60
+ valueFormat: {
61
+ type: String
62
+ },
63
+ showTime: {
64
+ type: [Boolean, Object],
65
+ default: true
66
+ },
67
+ showToday: {
68
+ type: Boolean,
69
+ default: true
70
+ },
71
+ placeholder: {
72
+ type: String,
73
+ default: '请选择日期'
74
+ }
75
+ },
76
+ data () {
77
+ return {
78
+ open: false
79
+ }
80
+ },
81
+ computed: {
82
+ innerValueFormat () {
83
+ if (this.valueFormat) return this.valueFormat
84
+ return this.format
85
+ },
86
+ modeValue () {
87
+ if (this.mode) return this.mode
88
+ if (this.format === 'YYYY') return 'year'
89
+ return 'date'
90
+ }
91
+ },
92
+ methods: {
93
+ onChange (_, dataString) {
94
+ this.$emit('input', dataString)
95
+ this.$emit('change', dataString)
96
+ },
97
+ onPanelChange (value, mode) {
98
+ if (this.modeValue !== 'year') return
99
+ this.$emit('input', moment(value).format(this.format))
100
+ this.$emit('change', moment(value).format(this.format))
101
+ this.open = false
102
+ },
103
+ openChange (open) {
104
+ this.open = open
105
+ }
106
+ }
107
+ }
108
+ </script>
109
+ <style lang="scss" scoped>
110
+ .ele-date__wrapper {
111
+ width: 100%;
112
+ }
113
113
  </style>
@@ -1,5 +1,5 @@
1
- import EleDateRange from './src/index.vue'
2
-
3
- EleDateRange.install = Vue => Vue.component(EleDateRange.name, EleDateRange)
4
-
1
+ import EleDateRange from './src/index.vue'
2
+
3
+ EleDateRange.install = Vue => Vue.component(EleDateRange.name, EleDateRange)
4
+
5
5
  export default EleDateRange
@@ -1,47 +1,47 @@
1
- <template>
2
- <a-range-picker
3
- style="width: 100%;"
4
- :disabled="disabled"
5
- :show-time="showTime"
6
- :value="value"
7
- :format="format"
8
- @change="onChange">
9
- </a-range-picker>
10
- </template>
11
-
12
- <script>
13
- export default {
14
- name: 'ele-date-range',
15
- model: {
16
- prop: 'value',
17
- event: 'change'
18
- },
19
- props: {
20
- disabled: {
21
- type: Boolean,
22
- default: false
23
- },
24
- showTime: {
25
- type: Object
26
- },
27
- format: {
28
- type: Array,
29
- default: () => ['YYYY-MM-DD', 'YYYY-MM-DD']
30
- },
31
- value: {
32
- type: Array,
33
- default: () => []
34
- }
35
- },
36
- methods: {
37
- onChange (date, dateString) {
38
- this.$emit('change', dateString)
39
- }
40
- }
41
- }
42
- </script>
43
-
44
- <style lang="scss" scoped>
45
-
46
- </style>
47
- import { models } from '../..';
1
+ <template>
2
+ <a-range-picker
3
+ style="width: 100%;"
4
+ :disabled="disabled"
5
+ :show-time="showTime"
6
+ :value="value"
7
+ :format="format"
8
+ @change="onChange">
9
+ </a-range-picker>
10
+ </template>
11
+
12
+ <script>
13
+ export default {
14
+ name: 'ele-date-range',
15
+ model: {
16
+ prop: 'value',
17
+ event: 'change'
18
+ },
19
+ props: {
20
+ disabled: {
21
+ type: Boolean,
22
+ default: false
23
+ },
24
+ showTime: {
25
+ type: Object
26
+ },
27
+ format: {
28
+ type: Array,
29
+ default: () => ['YYYY-MM-DD', 'YYYY-MM-DD']
30
+ },
31
+ value: {
32
+ type: Array,
33
+ default: () => []
34
+ }
35
+ },
36
+ methods: {
37
+ onChange (date, dateString) {
38
+ this.$emit('change', dateString)
39
+ }
40
+ }
41
+ }
42
+ </script>
43
+
44
+ <style lang="scss" scoped>
45
+
46
+ </style>
47
+ import { models } from '../..';