Home  >  Q&A  >  body text

javascript - Small issues between Object and vue

Question: I extended the prototype of Object and found that it could not be extended. Is it because vue has already done underlying processing on the prototype of Object?

大家讲道理大家讲道理2672 days ago716

reply all(3)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-12 09:31:04

    Just click on it, no.

    reply
    0
  • PHP中文网

    PHP中文网2017-06-12 09:31:04

    How is it possible? The object is the constructor that comes with the browser and belongs to the scripting language. Vue is a js script development framework. Because it integrates styles and DOM, and can also be developed in a modular manner, it is very powerful, but it is also developed based on the browser interface. The bottom layer you are talking about should be the bottom layer of the framework. Object is the object of language. Vue is based on this. Listening to other people’s explanations is not as good as sitting down and trying it yourself.

    reply
    0
  • 習慣沉默

    習慣沉默2017-06-12 09:31:04

    It is not a good idea to directly extend the prototype of Object. This is a trap.

    reply
    0
  • Cancelreply