How to use the nativescript-vue.directive function in nativescript-vue

To help you get started, we’ve selected a few nativescript-vue examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nativescript-vue / nativescript-vue / samples / app / app-with-gauge.js View on Github external
gauge.scales = new observable_array.ObservableArray([scale])
    }
  }
})
Vue.directive('tkRadialScaleIndicators', {
  inserted: function(el) {
    var barIndicator = el._nativeView
    var scale = el.parentNode._nativeView
    if (scale.indicators) {
      scale.indicators.push(barIndicator)
    } else {
      scale.indicators = new observable_array.ObservableArray([barIndicator])
    }
  }
})
Vue.directive('tkRadialBarIndicatorStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.indicatorStyle = el._nativeView
  }
})
Vue.directive('tkRadialGaugeTitleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.titleStyle = el._nativeView
  }
})
Vue.directive('tkRadialGaugeSubtitleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.subtitleStyle = el._nativeView
  }
})
Vue.directive('tkRadialNeedleStyle', {
  inserted: function(el) {
github nativescript-vue / nativescript-vue / samples / app / app-with-gauge.js View on Github external
inserted: function(el) {
    var barIndicator = el._nativeView
    var scale = el.parentNode._nativeView
    if (scale.indicators) {
      scale.indicators.push(barIndicator)
    } else {
      scale.indicators = new observable_array.ObservableArray([barIndicator])
    }
  }
})
Vue.directive('tkRadialBarIndicatorStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.indicatorStyle = el._nativeView
  }
})
Vue.directive('tkRadialGaugeTitleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.titleStyle = el._nativeView
  }
})
Vue.directive('tkRadialGaugeSubtitleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.subtitleStyle = el._nativeView
  }
})
Vue.directive('tkRadialNeedleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.needleStyle = el._nativeView
  }
})
Vue.directive('tkRadialScaleStyle', {
  inserted: function(el) {
github nativescript-vue / nativescript-vue / samples / app / app-with-gauge.js View on Github external
() => require('nativescript-ui-gauge').RadialNeedle
)
Vue.registerElement(
  'TitleStyle',
  () => require('nativescript-ui-gauge').TitleStyle
)
Vue.registerElement(
  'SubtitleStyle',
  () => require('nativescript-ui-gauge').SubtitleStyle
)
Vue.registerElement(
  'NeedleStyle',
  () => require('nativescript-ui-gauge').NeedleStyle
)

Vue.directive('tkRadialGaugeScales', {
  inserted: function(el) {
    var scale = el._nativeView
    var gauge = el.parentNode._nativeView
    if (gauge.scales) {
      gauge.scales.push(scale)
    } else {
      gauge.scales = new observable_array.ObservableArray([scale])
    }
  }
})
Vue.directive('tkRadialScaleIndicators', {
  inserted: function(el) {
    var barIndicator = el._nativeView
    var scale = el.parentNode._nativeView
    if (scale.indicators) {
      scale.indicators.push(barIndicator)
github nativescript-vue / nativescript-vue / samples / app / app-with-gauge.js View on Github external
Vue.directive('tkRadialBarIndicatorStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.indicatorStyle = el._nativeView
  }
})
Vue.directive('tkRadialGaugeTitleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.titleStyle = el._nativeView
  }
})
Vue.directive('tkRadialGaugeSubtitleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.subtitleStyle = el._nativeView
  }
})
Vue.directive('tkRadialNeedleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.needleStyle = el._nativeView
  }
})
Vue.directive('tkRadialScaleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.scaleStyle = el._nativeView
  }
})

Vue.config.silent = false
Vue.config.debug = true

new Vue({
  template: `
github nativescript-vue / nativescript-vue / samples / app / app-with-gauge.js View on Github external
'NeedleStyle',
  () => require('nativescript-ui-gauge').NeedleStyle
)

Vue.directive('tkRadialGaugeScales', {
  inserted: function(el) {
    var scale = el._nativeView
    var gauge = el.parentNode._nativeView
    if (gauge.scales) {
      gauge.scales.push(scale)
    } else {
      gauge.scales = new observable_array.ObservableArray([scale])
    }
  }
})
Vue.directive('tkRadialScaleIndicators', {
  inserted: function(el) {
    var barIndicator = el._nativeView
    var scale = el.parentNode._nativeView
    if (scale.indicators) {
      scale.indicators.push(barIndicator)
    } else {
      scale.indicators = new observable_array.ObservableArray([barIndicator])
    }
  }
})
Vue.directive('tkRadialBarIndicatorStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.indicatorStyle = el._nativeView
  }
})
Vue.directive('tkRadialGaugeTitleStyle', {
github nativescript-vue / nativescript-vue / samples / app / app-with-gauge.js View on Github external
} else {
      scale.indicators = new observable_array.ObservableArray([barIndicator])
    }
  }
})
Vue.directive('tkRadialBarIndicatorStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.indicatorStyle = el._nativeView
  }
})
Vue.directive('tkRadialGaugeTitleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.titleStyle = el._nativeView
  }
})
Vue.directive('tkRadialGaugeSubtitleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.subtitleStyle = el._nativeView
  }
})
Vue.directive('tkRadialNeedleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.needleStyle = el._nativeView
  }
})
Vue.directive('tkRadialScaleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.scaleStyle = el._nativeView
  }
})

Vue.config.silent = false
github nativescript-vue / nativescript-vue / samples / app / app-with-gauge.js View on Github external
Vue.directive('tkRadialGaugeTitleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.titleStyle = el._nativeView
  }
})
Vue.directive('tkRadialGaugeSubtitleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.subtitleStyle = el._nativeView
  }
})
Vue.directive('tkRadialNeedleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.needleStyle = el._nativeView
  }
})
Vue.directive('tkRadialScaleStyle', {
  inserted: function(el) {
    el.parentNode._nativeView.scaleStyle = el._nativeView
  }
})

Vue.config.silent = false
Vue.config.debug = true

new Vue({
  template: `