Posts by Felipe Duarte • 6,284 points
276 posts
-
2
votes2
answers179
viewsA: Should I compose every HTML that repeats?
This issue goes far beyond programming. When we think of componentization in the Front-end, we are talking about a good practice that will yes benefit you in some way, ie the ideal today is that a…
-
9
votes1
answer261
viewsQ: Button inside a clickable card
During development I saw the following situation: Where the card is clickable and leads to the user stock, but inside the card has an inactive button, that is, the user will usually click the button…
uxasked Felipe Duarte 6,284 -
2
votes2
answers61
viewsQ: Error when assigning native function context
When using the code: let _ = document.querySelector.bind(document); let __ = document.querySelectorAll.bind(document); I inform the context where querySelector and querySelectorAll will be called.…
javascriptasked Felipe Duarte 6,284 -
1
votes1
answer396
viewsQ: How do I rate a test, release or Feature?
If I create a test on something that already exists, does it enter as a release or Feature in a git-flow stream? why a test is an improvement but also something new.
-
3
votes3
answers91
viewsA: How to call a function through a button using querySelector?
Are you using the Var with the first capital letter. function alerta() { alert("Este é um alerta"); } var botão = document.querySelector(".button_menu"); botão.onclick = alerta; <button…
javascriptanswered Felipe Duarte 6,284 -
2
votes2
answers511
viewsA: margin-top has no effect on text within the div
This happens because there was a mixture of margins content with p, you can get the full explanation here. To solve just add overflow: auto; to container or use padding-top... @import…
-
1
votes1
answer70
viewsA: How to change span text when button is clicked?
Just add an event by clicking the button and when pressed changes the text. let a_btn_download = document.querySelectorAll(".a_btn_download") for( let property in a_btn_download ){…
-
0
votes1
answer205
viewsA: How to Treat 404 Image Error in Vuejs?
Use the attribute @error that will invoke a function when giving an error in the image new Vue({ el: "#app", methods: { errorImage( event ){ event.target.src =…
-
0
votes1
answer150
viewsA: How to do line breaking in a Vue tag?
I think the problem is in the component v-layout it’s probably a lib that you’re using and maybe it’s using flexbox. If the v-layout use the display: flex; it forms an infinite horizontal line, this…
-
1
votes2
answers78
viewsA: Is it correct and or indicated to merge in a 5.x Laravel project with the components developed in Vuejs 2 all within the same directory?
It depends a lot on your scenario but... Applications Laravel + Vue are excellent, you can communicate with the Laravel through the props of Vue. But as has been said it unifies front and back, what…
-
0
votes1
answer144
viewsA: Definition of props in Vue.js rendering function
You can pass the show via v-bind:show for the component... const spanCustom = { props: ['show'], template: '\ <span v-if="show">\ See me\ </span>' }; const app = new Vue({ el: '#app',…
-
2
votes1
answer357
viewsQ: How to execute a synchronous request in a looping
In the example below let arr = [ { 3 : 'teste' }, { 5 : 'teste' }, { 1 : 'teste' }, { 2 : 'teste' }, { 0 : 'teste' }, { 4 : 'teste' } ]; arr = arr.sort( ( a , b ) => { return Object.keys(b)[0] -…
-
1
votes1
answer92
viewsA: Error while passing props with literal objects via v-bind="Object"
By giving the v-bind you should point to prop you want to assign, and in the interpolation use the prop as an object... const blogPost = { props: ['post'], template: '\ <div>\ <h1>{{…
-
5
votes1
answer1497
viewsA: Need to stay using android studio to program in React
You can program in React-Activate in any IDE, Android Studio provides you with the emulator, but you can download a separate emulator, for example Genymotion and develop in another editor... If you…
-
0
votes2
answers112
viewsA: Adjust Section [Position: Absolute]
You can use the unit vh to set the container height to 100% static (can be relative as well), and use flexbox to distribute the elements at the top, middle and footer with justify-content:…
-
3
votes3
answers790
viewsA: Capture javascript array element
In your code the array is being set incorrectly, the assignment is with = and a few commas are missing. If you know the position of the object, you can easily capture with listform[1].nome, judging…
javascriptanswered Felipe Duarte 6,284 -
4
votes1
answer55
viewsQ: Is it possible to assign a native function to a variable?
A hypothetical example... let _ = document.querySelector; _(".hello").style.color = 'blue'; <div class="hello">Hello world!</div>…
javascriptasked Felipe Duarte 6,284 -
3
votes2
answers278
viewsA: Add attribute via CSS if the following element contains x element inside
Only by CSS it is not yet possible to make this check, in the new specification CSS nível 4, this would be possible, because imagine that if input[name="name_news"] exist, he could apply a…
-
1
votes2
answers1781
viewsA: Pick radio button value and check what is selected
Changes in the DOM in real time, can only be done through the javascript, follows an example from your case. let tipoPessoa = document.querySelectorAll('input[name="tipoPessoa"]'); let cpf =…
phpanswered Felipe Duarte 6,284 -
1
votes3
answers137
viewsA: Text abbreviation <td> does not work
It is possible yes, maybe it is not working alone, but accompanied by the properties white-space, overflow and a width defined in container, works... <h2>text-overflow: ellipsis:</h2>…
-
1
votes2
answers860
viewsA: Open select open value with javascript
A possible solution is to open select through a few tricks CSS, as described below, but I could not do that when open the select, focus on the item where the selected is found. Where has $(el).val()…
-
0
votes1
answer247
viewsA: Hello World in React.JS does not work!
I think the mistake is in Babel, it is a pre-processor of javascript, I don’t believe you can use it via cdn, it must be configured internally, in the snippet of jsfiddle it is possible to enable…
-
2
votes2
answers3695
viewsA: Increase the textarea size
The class swal2-input is superimposing the rows with a height, and that probably comes from lib that you are using, to resolve just add a new class and set a height for her as !important...…
-
2
votes4
answers418
viewsA: Is there a difference in using HTML5 attributes with or without true/false?
There is no problem, the HTML will identify and apply the property regardless if it is true or false. already in the attribute documentation there is a mention about this type of attribute in the…
-
1
votes1
answer505
viewsA: Component Autocomplete Vuejs
I believe that the logic of the components leads to a pattern where the v-model will coupled the definition of the child component so that the same can capture it, treat it and even send again to…
-
0
votes2
answers82
viewsA: Keep Active Script Click
To do with click just add a variable to help control the state, example... let ativo = false; $('.dimmer_area').click(function(){ if(ativo) $('.dim_area').fadeIn(200); else…
-
1
votes2
answers50
viewsA: Problems working with Flexbox
The best way is always the flexbox and/or grids, unless the end user of your system needs something compatible with older browsers... I don’t quite understand the purpose of the question, if you…
-
3
votes1
answer535
viewsA: Onclick Javascript event
The method onClick receives a function so that it is instantiated when there is a click, in your example you store the function in a variable and pass it instantiated when the correct one would pass…
-
0
votes1
answer321
viewsQ: Curl request does not work depending on JSON size
My problem is that depending on the size of the JSON sent, the request CUrl does not work, ie I send 2 photos on JSON, right, but 4 is already reason for a TimeOut. The problem is not in API for in…
-
1
votes3
answers141
viewsA: Program Interface only once
Today our technologies don’t yet supply this comprehensively, but there are already consistent ways to do this... Application lifecycle The main libs and frameworks have already adapted to a…
-
6
votes2
answers5261
viewsQ: What are the real differences in creating a project with Expo and without Expo?
Recently I saw several items that differentiated a project with or without Expo, but currently the Expo includes many things where before we needed to touch native modules: Sqlite, image…
-
1
votes2
answers79
viewsA: How to place notifications in Title?
In the case of facebook and many other sites that use this technique, the result is obtained through reactive frameworks, example React, Vue, etc.... on the tag title has the following…
-
0
votes1
answer4044
viewsA: Background Image with Vuetify
To instantiate the v-appfor the login area, this element receives a background white, which superimposes the background which was placed in the previous element, that is to take the background of…
-
2
votes1
answer343
viewsA: Control CSS dynamically via PHP
You can write dynamic CSS with PHP YES, advise? good, for beginners is a good idea but if you already have some knowledge in javascript be it intermediate/advanced, you can already use more…
-
2
votes1
answer26
viewsQ: Synchronize the animation of the elements when inserting into the DOM
It is possible to insert an animated element in the DOM synchronized? i.e., when inserting the current state is maintained and not reset as in the example below... function add() { let ctn =…
-
1
votes1
answer113
viewsQ: Convert Camelcase strings to kebab-case
I have a list of buttons... <button @click="chamaEstilo($event)" :data-el="index" class="buttonEstilo" v-for="(item, index) in filteredList" :key="index" v-if="verificaRestricao(item)" >…
-
2
votes2
answers419
viewsA: Performance types of Eventbus in Vuejs
Like the EventBus opera? Communication between components Any and all communication between components is available in the Vue and you can find them giving a console.log(this) inside the component,…
-
2
votes1
answer161
viewsA: Turn serialized inputs into JSON
I don’t think you have anything native to it, but you can use this function... function deparam(query) { var pairs, i, keyValuePair, key, value, map = {}; // remove leading question mark if its…
-
1
votes2
answers1235
viewsA: How to access a list within a list in Vuejs?
You are pointing the v-for to the whole object, the correct would be to point to bancodedados.valores.USD, example... new Vue({ el : '#app', data : { bancodedados : [] }, created () {…
-
0
votes1
answer370
viewsA: Vuejs/Quasar Ordova android generates blank app
In development environment each request is made locally, unless you Linke everything externally, for example on... <script src="/lib/ionic/js/ionic.bundle.js"></script> You take the lib…
-
5
votes4
answers158
viewsA: Javascript pass by value
To ES5 we have Object.create(), which, as far as I know, does not make an exact copy of the element but rather defines a prototype of the object to be cloned. To ES6 we have, Object.assign(), that…
javascriptanswered Felipe Duarte 6,284 -
1
votes2
answers161
viewsA: right div align
Just add a right : 0, if you want to remain absolute... div.tres { position: absolute; right: 0; justify-content: center; align-items: center; background-color: gray; border: 2px solid; /* As 4…
-
1
votes1
answer308
viewsA: Filter object array by key
allowed and key should have their seats reversed, so the query if by each letter, it is also good to add the method toLowerCase to make the search independent of upper or lower case... let estilos =…
-
0
votes1
answer308
viewsQ: Filter object array by key
At the moment it is only returning if the string to be queried is exactly equal to the key of the object let estilos = { "alignContent": [ { "ativo": false } ], "alignItems": [ { "ativo": false } ],…
-
8
votes1
answer162
viewsQ: Animations in high quality
We all know that animations on the web are a little bit eye friendly, when opening a side menu, whether in mobile or in desktop, you can only see part of your drive, giving the impression of a…
-
0
votes1
answer537
viewsA: Error when connecting with sqlite in the Laravel
Error was silly, it simply had 2 started servers, not letting the settings be reflected in the application
-
1
votes1
answer537
viewsQ: Error when connecting with sqlite in the Laravel
Internally everyone is working, migrations, tinker, sqlite3, but in the server application it always queries the mysql instead of the sqlite for all operations, ie he is using Connector.php instead…
-
0
votes2
answers130
viewsA: Get the selected item from iView’s Treeview
I did it but I’m not sure it’s the best way to do it... var Main = { data () { return { estiloFilhosTree : { color: 'white', cursor: 'pointer', background: '#424242', padding: '1px 4px',…
-
4
votes2
answers5730
viewsA: Button to copy html from page
I made a feature to copy the HTML of the current page through the button, but depending on the browser, some 'garbage' is generated in the compilation, mainly in the opera, in the chrome and in the…
-
1
votes2
answers130
viewsQ: Get the selected item from iView’s Treeview
I need to get the reference of the selected item on TreeView of iView, I’ve tried with getSelectedNodes() but it seems that the method is not being used properly, and the documentation does not help…