2.6. Vue3 start

发布时间 :2025-10-25 12:21:07 UTC      

At the beginning of learning Vue, we do not recommend using the vue-cli command-line tool to create projects. A simpler way is to directly introduce the vue.global.js file on the page to test the learning process.

The application in Vue3 is created by using the createApp function, with the following syntax format:

const app = Vue.createApp({ /* option */ })

The options passed to createApp are used to configure the root component. When using mount() to mount an application, this component is used as the starting point for rendering.

A simple example:

Vue.createApp(HelloVueApp).mount('#hello-vue')

createApp is the root component (HelloVueApp), which is the starting point for rendering when the application is mounted.

An application needs to be mounted into a DOM element. The above code uses mount (’# hello-vue’) to apply the Vue HelloVueApp mount to < div id= “hello-vue” > < / div >.

Next, let’s start with Hello Vue!! start learning the code.

2.6.1. Vue 3.0 instance

<divid="hello-vue"class="demo">{{ message }}</div>​<script>const
HelloVueApp = { data() { return { message: 'Hello Vue!!' } } } ​
Vue.createApp(HelloVueApp).mount('#hello-vue')</script>

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.