problem description
use vue"s extends,mixins to make page templates.
how can I inherit template, or have a better template?
the environmental background of the problems and what methods you have tried
is using vue (vue-cli) to create a web page app with a large number of subpages. These subpages usually come in several fixed forms, such as the details on the right side of the list on the left, with four add / delete / cancel / confirm buttons. Therefore, it is very useful to make some general-purpose templates.
then came the idea of using extends to create and inherit templates: in
extends, options such as data/methods are easy to understand and use.
is mainly the content of template. The test found that template will be covered, and the inheritor must be fully compatible with the template content of the inherited component to achieve the effect. Or if the inheritor"s template is empty, the inherited component"s template, is used, but it doesn"t work.
related codes
// App.vue
...
<script>
import ExtendsSample from "./components/ExtendsSample.vue"
export default {
name: "App",
extends: ExtendsSample,
data () {
...
what result do you expect? What is the error message actually seen?
hope to find a template with partial template inheritance