In our case, we want the highlight-class to be applied, if the highlight field of our component is true. This enables us to apply CSS-classes to an element based on conditions. The values we are assigning are actually methods, we will define later.Īlso, we are using the v-bind directive here. But instead of doing so with JavaScript, we are using the v-on directives. For example, we are assigning a bunch of event listeners to the "dropzone" div. This is just normal HTML with some special attributes that are meant for vue. Let's create a file called DropZone.vue inside of the src/components folder.Īs of all components, this file has the following base structure: This component will be a sub-component and be used to add files by clicking or dragging & dropping files onto it. The first component we are going to create will be the Drop-Zone component. Also, since this is just an example, I'm only linting on save (next step).įinally, we want dedicated config files for each tool.Īfterward, open the project directory with your favorite code editor. Otherwise, you may want to enable polyfills, as well.Īt the next step, you can choose whatever linter you want. If you only want to target the evergreen browsers (Chrome, Firefox, Edge) we are fine with TypeScript itself. This depends on the browsers you are targeting. We may receive a commission for purchases made through this link.Īfterward, we have to decide whether we want to use Babel alongside TypeScript.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |