| 130 | }, |
| 131 | |
| 132 | render(h) { |
| 133 | const slots = this.$slots.default; |
| 134 | if (slots && slots.length === 1) { |
| 135 | const child = slots[0]; |
| 136 | if ( |
| 137 | child.componentOptions && |
| 138 | ["transition-group", "TransitionGroup"].includes( |
| 139 | child.componentOptions.tag |
| 140 | ) |
| 141 | ) { |
| 142 | this.transitionMode = true; |
| 143 | } |
| 144 | } |
| 145 | let headerOffset = 0; |
| 146 | let footerOffset = 0; |
| 147 | let children = slots; |
| 148 | const { header, footer } = this.$slots; |
| 149 | if (header) { |
| 150 | headerOffset = header.length; |
| 151 | children = children ? [...header, ...children] : [...header]; |
| 152 | } |
| 153 | if (footer) { |
| 154 | footerOffset = footer.length; |
| 155 | children = children ? [...children, ...footer] : [...footer]; |
| 156 | } |
| 157 | this.headerOffset = headerOffset; |
| 158 | this.footerOffset = footerOffset; |
| 159 | var attributes = null; |
| 160 | const update = (name, value) => { |
| 161 | attributes = buildAttribute(attributes, name, value); |
| 162 | }; |
| 163 | const attrs = Object.keys(this.$attrs) |
| 164 | .filter(key => key === "id" || key.startsWith("data-")) |
| 165 | .reduce((res, key) => { |
| 166 | res[key] = this.$attrs[key]; |
| 167 | return res; |
| 168 | }, {}); |
| 169 | update("attrs", attrs); |
| 170 | |
| 171 | if (this.componentData) { |
| 172 | const { on, props } = this.componentData; |
| 173 | update("on", on); |
| 174 | update("props", props); |
| 175 | } |
| 176 | return h(this.getTag(), attributes, children); |
| 177 | }, |
| 178 | |
| 179 | created() { |
| 180 | if (this.list !== null && this.value !== null) { |