A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/bootstrap-vue/bootstrap-vue/commit/62fb0b6 below:

only add the `nativeOn` property to componentData when r… · bootstrap-vue/bootstrap-vue@62fb0b6 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+10

-7

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+10

-7

lines changed Original file line number Diff line number Diff line change

@@ -153,10 +153,6 @@ export const BLink = /*#__PURE__*/ Vue.extend({

153 153

const href = this.computedHref

154 154

const isRouterLink = this.isRouterLink

155 155 156 -

// We want to overwrite any click handler since our callback

157 -

// will invoke the user supplied handler9s) if !props.disabled

158 -

const handlers = { ...this.$listeners, click: this.onClick }

159 - 160 156

const componentData = {

161 157

class: { active: this.active, disabled: this.disabled },

162 158

attrs: {

@@ -170,9 +166,16 @@ export const BLink = /*#__PURE__*/ Vue.extend({

170 166

: this.$attrs.tabindex,

171 167

'aria-disabled': this.disabled ? 'true' : null

172 168

},

173 -

props: this.computedProps,

174 -

on: isRouterLink ? {} : handlers,

175 -

nativeOn: isRouterLink ? handlers : {}

169 +

props: this.computedProps

170 +

}

171 +

// Add the event handlers. We must use `navtiveOn` for

172 +

// `<router-link>`/`<nuxt-link>` instead of `on`

173 +

componentData[isRouterLink ? 'nativeOn' : 'on'] = {

174 +

// Transfer all listeners (native) to the root element

175 +

...this.$listeners,

176 +

// We want to overwrite any click handler since our callback

177 +

// will invoke the user supplied handler(s) if `!this.disabled`

178 +

click: this.onClick

176 179

}

177 180 178 181

// If href attribute exists on <router-link> (even undefined or null) it fails working on

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4