Some Feeling After more than a month of work

First to introduce myself, the front end of a chicken dishes, project-based group with a vue, this sentiment is more suitable for side dishes, like chicken and I have just started working. . .

When working, compared himself to knock the code, the greatest feeling is their code is not standardized, here are some feelings about the record, by the way so that we Tucao about my chicken dish. .

  Data obtained when 1 do not request interface directly, unless you really can not ensure that he will only be used once to be used elsewhere, after winning data center transformation need to use it again later, save the data as they change request .

  2 can not function package temporary sake of convenience, a series of processes are packaged together, in case you need an intermediate suddenly found behind a step, the egg pain.

  3 page layouts using flow layout try not to use positioning, which seems easy to start, but you can imagine, suddenly demands require middle of the page to add a div, then positioning each egg pain must be recalculated.

Also strongly recommended that students work one month after re-read through the design mode (thanks to my leader asked me to look at design patterns, and worship), seriously think about why so many seniors code is written, compared to what they have handy. Students like me I think it's a lot, usually knocking code, although there are, but struck large should be relatively small or no benefit code that seniors are clearly structured, long-term vision, easy to modify later (presumably 0.0 they also stepped sentiment pit).

  In addition to everyone we met to talk about the problems and solutions, and work feel more useful points.

  1 when the data is not a show with some placeholder character to keep the aesthetic effect when you need is a table, you can {{data || '-'}} in writing so that if data is empty then displayed - more beautiful.

  2 element component select the drop-down box option requires repeated loading and initial value problem can not be selected in the future, according to Baidu and I understand this is because vue is when the page loads to confirm whether the dom is listening, that is, inserted later the vue dom node may not listen. Solution 1 drop-down box to add a @change trigger event within a function to write this. $ ForceUpdate. Solution 2 $ set this method has not been used in this dish of chicken, people need your own Baidu. Hey hey hey. .

  3 vue transtion have a label that can be used to write some of the effects of artificial needs, very convenient

  4 padStart padEnd methods and methods, may complement a corresponding length to the head or tail, may be used in the conversion time of 08:11:06 0 filled, it is convenient

  Write so it temporarily, big projects, many also are learning, just started the front side dish of chicken a career, have to learn to see the beginning of a paragraph always remember quite clearly, junior programmers: in order to be able to achieve the purpose of the demand as the goal. The average programmer: code-tidy as the goal. Senior programmer: skeleton project objectives. Probably remember this mean, there should be more senior to learn. Self-evaluation and I was a junior in urgent need of work experience and knowledge to broaden horizons. If you have any recommended book or necessary knowledge of front-end programmers, welcomed the recommendation, hoping to grow together with you, did not talk much, I wish you a fortune quickly.

Guess you like

Origin www.cnblogs.com/bhba223/p/12098026.html