Socket
Book a DemoInstallSign in
Socket

@telekom/scale-components-vue-neutral

Package Overview
Dependencies
Maintainers
4
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@telekom/scale-components-vue-neutral

Vue specific wrapper for @telekom/scale-components

latest
Source
npmnpm
Version
3.0.0-beta.56
Version published
Maintainers
4
Created
Source

Scale and Vue

Vue works well with custom elements, but has some minor limitations.

To work around this problems we provide custom element wrappers for better developer experience.

Please note that you will need to install both, the telekom/scale-components-neutral as well as the @telekom/scale-components-vue-neutral packages.

Once you have installed both packages and defined the custom elements, Scale components behave mostly the way you would expect a Vue component to behave!

src/main.ts

import Vue from "vue";
import App from "./App.vue";
import { applyPolyfills, defineCustomElements } from "@telekom/scale-components-neutral/loader";
import "@telekom/scale-components-neutral/dist/scale-components/scale-components.css";

Vue.config.productionTip = false;
Vue.config.ignoredElements = [/scale-\w*/];

applyPolyfills().then(() => {
  defineCustomElements(window);
});

new Vue({
  render: h => h(App)
}).$mount("#app");

src/App.vue

<template>
  <div>
    <scale-button>Click!</scale-button>
  </div>
</template>

<script>
import Vue from 'vue'
import { ScaleButton } from "@telekom/scale-components-vue-neutral";

export default Vue.extend({
  name: "app",
  components: { ScaleButton },
});
</script>

Events in Vue

In order to prevent collisions with standard events and compatibility with other libraries and frameworks, some components of Scale are using custom event names. You can find documentation for the custom events on the respective component pages in the docs section.

Events in Vue are prefixed with: scale-{event-name}

Find Telekom Scale on GitHub.

FAQs

Package last updated on 23 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts