Tag Archives: vue.js

Vue warn: duplicate keys detected: ‘1’. This may cause an update error

[VUE WARN]: Duplicate keys detected: ‘1’. This may cause an update error. :

/ font>

Problem description:

Reason analysis:
> Keys value binding problem
My problem is my problem when doing the project binding:

here my page rendering is based on id to apply colours to a drawing



The time of the time database displayed by the front end is inconsistent

These days I have encountered a huge pit. The time of data storage is 2 o ‘clock, but the time displayed on the front page is 16 o ‘clock, which is 14 hours short.
Describe the project background, the service is in the US, the project is a Mexican project, the database time and server time have been set to the Mexican time zone, but it is still not correct.
I have asked the project boss in the middle, and the boss gave me the opinion that the time zone was set on the URL of connecting data, but the front-end page was still not displayed correctly.
After several times of locating, the time to find it directly in the dev location will change. This is because the computer’s time zone is the Chinese time zone. But the time log is still on the server, the log time is correct. So guess the front-end is the time zone problem.
Because the last segment passes the timestamp, the timestamp has no time zone. So the front end also needs to change the time zone to correspond

  id : "crete_time",
		            renderer : function(idValue,value,record){
                        return value ?moment(value).tz("America/Guatemala").format("YYYY-MM-DD HH:mm:ss") : "---";

You can set the time zone using the Moment.tz method

Error: ~ /. Vuerc may be updated. Please delete it and re run vuercli in manual mode

Recently ready to develop an H5 sharing service, found the new version of Vue CLI4.0 is a lot of pit
First: My local @vue CLI version is 4.5.11:

Later, due to the tight schedule of the project, I directly reduced the local CLI version to 3.0, but because of my mistake, I made a mistake when creating the Vue project, but don’t worry:

Just find the local user directory C disk to find a.vuerc file deleted on the OK

uniapp e. currentTarget.dataset Pay attention

There is a problem with uniapp. When you compile to H5, you can get the data, but you can’t get the data in the WeChat applet
As shown in figure:

Then, at the prompt, add console.log to the relevant code to see the output
It turns out that there was an error adding a label to the element

Look at both sides of the console to find the reason:

WeChat applet:

The WeChat applet converts uppercase letters to lowercase
Fix: Change the data-trailerID in HBuilderX to all lowercase

Error in Babel configuration of webpack

In the configuration of Babel times wrong below

as we can see from the error prompt time configuration Babel when make a mistake, then we need to look to the specific configuration of Babel, this is my configuration

from the configuration, see can see problems in persets words are spelt wrong, this kind of error is quite common, the correct method is presets