tenghui-ui 2.2.2 → 2.2.3
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/style.css +1 -1
- package/dist/tenghui-ui.es.js +14 -7
- package/dist/tenghui-ui.es.js.map +1 -1
- package/dist/tenghui-ui.umd.js +2 -2
- package/dist/tenghui-ui.umd.js.map +1 -1
- package/package.json +1 -1
- package/packages/form-item/src/defaultAttrsConfig.js +5 -0
- package/packages/form-item/src/index.vue +2 -1
- package/packages/search/src/DefaultItem.vue +3 -1
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ const datePickerCommonAttrs = {
|
|
|
2
2
|
'range-separator': '至',
|
|
3
3
|
'start-placeholder': '开始时间',
|
|
4
4
|
'end-placeholder': '结束时间',
|
|
5
|
+
size: 'small'
|
|
5
6
|
};
|
|
6
7
|
const datetimerangeDefaultAttrs = {
|
|
7
8
|
...datePickerCommonAttrs,
|
|
@@ -9,23 +10,27 @@ const datetimerangeDefaultAttrs = {
|
|
|
9
10
|
'default-time': ['00:00:00', '23:59:59'],
|
|
10
11
|
'value-format': 'yyyy-MM-dd HH:mm:ss',
|
|
11
12
|
format: 'yyyy-MM-dd HH:mm:ss',
|
|
13
|
+
size: 'small'
|
|
12
14
|
};
|
|
13
15
|
const daterangeDefaultAttrs = {
|
|
14
16
|
...datePickerCommonAttrs,
|
|
15
17
|
type: 'daterange',
|
|
16
18
|
'value-format': 'yyyy-MM-dd',
|
|
17
19
|
format: 'yyyy-MM-dd',
|
|
20
|
+
size: 'small'
|
|
18
21
|
};
|
|
19
22
|
const datetimeDefaultAttrs = {
|
|
20
23
|
type: 'datetime',
|
|
21
24
|
'default-time': '00:00:00',
|
|
22
25
|
format: 'yyyy-MM-dd HH:mm:ss',
|
|
23
26
|
'value-format': 'yyyy-MM-dd HH:mm:ss',
|
|
27
|
+
size: 'small'
|
|
24
28
|
};
|
|
25
29
|
const dateDefaultAttrs = {
|
|
26
30
|
type: 'date',
|
|
27
31
|
format: 'yyyy-MM-dd',
|
|
28
32
|
'value-format': 'yyyy-MM-dd',
|
|
33
|
+
size: 'small'
|
|
29
34
|
};
|
|
30
35
|
export const defaultAttrsMap = {
|
|
31
36
|
input: {
|
|
@@ -142,7 +142,8 @@
|
|
|
142
142
|
<div :class="{ 'ui-item-prepend': !!$slots.prepend }">
|
|
143
143
|
<slot name="prepend"></slot>
|
|
144
144
|
</div>
|
|
145
|
-
<el-date-picker :class="{ inline_content: inlineLabel }" :ref="type"
|
|
145
|
+
<el-date-picker :class="{ inline_content: inlineLabel }" :ref="type"
|
|
146
|
+
v-model="modelForm" v-bind="setDefaultAttrs($attrs)" v-on="$listeners">
|
|
146
147
|
</el-date-picker>
|
|
147
148
|
</div>
|
|
148
149
|
</template>
|
|
@@ -13,6 +13,7 @@ export default {
|
|
|
13
13
|
const vnode = this._props.vnode;
|
|
14
14
|
const prepend = vnode.$slots.prepend;
|
|
15
15
|
const append = vnode.$slots.append;
|
|
16
|
+
const label = vnode.$slots.label;
|
|
16
17
|
return h(this._props.vnode.constructor, {
|
|
17
18
|
on: vnode.$listeners,
|
|
18
19
|
props: vnode.$options.propsData,
|
|
@@ -22,7 +23,8 @@ export default {
|
|
|
22
23
|
},
|
|
23
24
|
[
|
|
24
25
|
prepend ? [h('div', { slot: 'prepend' }, prepend)] : [],
|
|
25
|
-
append ? [h('div', { slot: 'append' }, append)] : []
|
|
26
|
+
append ? [h('div', { slot: 'append' }, append)] : [],
|
|
27
|
+
label ? [h('div', { slot: 'label', class: 'ui-item__label' }, label)] : []
|
|
26
28
|
]
|
|
27
29
|
);
|
|
28
30
|
},
|