tenghui-ui 2.2.2 → 2.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tenghui-ui",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "description": "vue 2x, tenghui-ui",
5
5
  "files": [
6
6
  "dist",
@@ -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" v-model="modelForm" v-bind="setDefaultAttrs($attrs)" v-on="$listeners">
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
  },
@@ -229,7 +229,7 @@ export default {
229
229
  waitRenderItem() {
230
230
  return new Promise((resolve) => {
231
231
  clearTimeout(this.waitTimeout);
232
- const itemEls = this.$refs.Search.querySelectorAll('.ui-form__item:not([class*=prepend] .ui-form__item)');
232
+ const itemEls = this.$refs.Search.parentElement.querySelectorAll('.ui-search > .ui-form__item:not([class*=prepend] .ui-form__item)');
233
233
  for (let i = 0; i < itemEls.length; i++) {
234
234
  const el = itemEls[i];
235
235
  if (el.getBoundingClientRect().right > 0) {