我们的内部git-lab wiki与Markdown合作.我做了几篇文章的摘要,并希望在我们的wiki中发布它们,这样如果我点击标题,它应该展开,文本应该变得可见,基本上就像在这个例子中
Markdown有这种扩展/折叠/折叠功能吗?
如何TextArea获取父窗格的完整宽度和高度.
我试过这个:
TextArea textArea = new TextArea();
textArea.setScaleX( 100 );
textArea.setScaleY( 100 );
Run Code Online (Sandbox Code Playgroud)
但parent.setTop(...)覆盖了顶部通道中定义的元素.
减少scaleY没有影响.
我还需要做些什么才能做到这一点?
谢谢
与Material Component Web的示例一样,我希望能够从我node_modules这样导入SCSS :
@import '@material/elevation/mdc-elevation';
Run Code Online (Sandbox Code Playgroud)
但是,我在尝试运行webpack构建时收到此错误消息:
File to import not found or unreadable: @material/elevation/mdc-elevation.
Run Code Online (Sandbox Code Playgroud)
@import './~/@material/elevation/mdc-elevation.scss'; 也不起作用.
我很确定问题出在我的webpack配置中,但我无法弄清楚在哪里.
他们在Material Components Web的Vue.js示例中做了什么才能使其工作?
这是我的npm-debug.log以备不时之需.这里是相应的Git存储库:sk22/spg-tinf-sem03/proj01
提前致谢!
编辑:我希望能够导入scss文件,而不是编译的css.
以下问题:
我有一个依赖于其父级 DOM 的 Vue.js 组件。但是在 prop 被传递的那一刻,它 ( this.$el) 是未定义的,可能是因为它当时还没有安装。
我的组件的 vue 模板文件如下所示:
<template>
<md-card>
<md-card-content>
<ol>
<li v-for="item in headings(content)">
<a :href="`#${item.id}`">{{ item.name }}</a>
</li>
</ol>
</md-card-content>
</md-card>
</template>
<script>
export default {
props: ['content'],
methods: {
headings(content) {
// DOM element is used
// At this moment, `content` is undefined
},
},
};
</script>
Run Code Online (Sandbox Code Playgroud)
使用上述组件的组件包括这段代码:
<article-index :content="this.$el"></article-index>
Run Code Online (Sandbox Code Playgroud)
我想过等待父组件被挂载,但这样我似乎无法像上面那样保留模板,因为它总是会尝试立即访问方法(或变量)。
我该如何解决这个问题?
编辑:
<template>
<div class="content">
<div class="left"><article-index :content="this.$el"></article-index></div>
<div class="article"><slot></slot></div>
<div class="right"><slot name="aside"></slot></div>
</div>
</template>
Run Code Online (Sandbox Code Playgroud)
这是父组件的模板。我唯一真正需要的是.articlediv …