Creating a simple VUE.JS application

前端 未结 2 1194
深忆病人
深忆病人 2021-01-27 12:30

I am trying to use a simple polygon cropper from Vue within an application by following the steps in this article.

I created my app using:

vue init webpack         


        
2条回答
  •  灰色年华
    2021-01-27 12:51

    "Global" vs "Local"

    The "global" and "local" comments refer to global component registration and local component registration. The article shows both ways of registering the vue-polygon-cropper component probably to make it easier to copy-paste into your own code.

    Global component registration

    You can register a component globally so that it could be used in another component without the consuming component having to register it locally. This is normally used for commonly used components that are frequently found in several components (e.g., a button).

    Below is an example of global component registration that allows MyButton to be used in MyForm. Notice how MyForm's