How to use template tag with Vue root instance
问题 I am enhancing a page in a web application using Vue. In the past I have written single file components and I've found it convenient to define the html template at the top of the file using a <template> tag. Is there a way to use this tag when defining a Vue root instance? Or do I need to put a string in the template property of the Vue options object? 回答1: You can use the x-template syntax, like so <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width