结束
一次完整的面试流程就是这样啦,小编综合了腾讯的面试题做了一份前端面试题PDF文档,里面有面试题的详细解析,分享给小伙伴们,有没有需要的小伙伴们都去领取!
开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】
💖 渲染选项
vue-markdown提供的参数详情
Prop | Type | Default | Describe |
---|---|---|---|
watches | Array | ["source", "show", "toc"] | HTML refresh automatically when the prop in this array changed |
source | String | null | the markdown source code |
show | Boolean | true | enable render to the default slot automatically |
html | Boolean | true | enable HTML syntax in source |
xhtml-out | Boolean | true | <br></br> => <br /> |
breaks | Boolean | true | \n => <br> |
linkify | Boolean | true | autoconvert URL-like text to link |
emoji | Boolean | true | :) => 😃 |
typographer | Boolean | true | enable some language-neutral replacement and quotes beautification |
lang-prefix | String | language- | CSS language prefix for fenced blocks |
quotes | String | “”‘’ | use “”‘’ for Chinese, „“‚‘ for German, «»„“ for Russian |
table-class | String | table | customize html class of the <table> |
task-lists | Boolean | true | enable GFM task list |
toc | Boolean | false | enable automatic table of contents |
toc-id | String | undefined | the HTML id to render TOC |
toc-class | String | table | customize html class of the <ul> wrapping the TOC |
toc-first-level | Number | 2 | use 2 if you want to skip <h1> from the TOC |
toc-last-level | Number | 'toc-first-level' + 1 | use 5 if you want to skip <h6> from the TOC |
toc-anchor-link | Boolean | true | enable the automatic anchor link in the headings |
toc-anchor-class | String | toc-anchor | customize the anchor class name |
toc-anchor-link-symbol | String | # | customize the anchor link symbol |
toc-anchor-link-space | Boolean | true | enable inserting a space between the anchor link and heading |
toc-anchor-link-class | String | toc-anchor-link | customize the anchor link symbol class name |
anchorAttributes | Object | {} | anchor tag attributes such as target: '_blank' or rel: 'nofollow' |
prerender | Function (String) String | null | filter function before markdown parse |
postrender | Function (String) String | null | filter function after markdown parse |
组件配置: |
<template>
<div style="width: 100%">
<MarkDirTree :dirContent="dirContent"/>
<VueMarkdown
:source="content"
:toc="true"
v-highlight
style="width: 100%; text-align: left"
></VueMarkdown>
</div>
</template>
<script>
import MarkDirTree from './MarkDirTree'
export default {
components: {MarkDirTree},
name: 'DesignMarkdown',
props: {
contentSource: undefined
},
data () {
return {
content: '',
dirContent: []
}
},
watch: {
contentSource: {
handler (newVal) {
this.content = newVal || ''
this.getDirContent(newVal)
},
deep: true,
immediate: true
}
},
mounted () {
console.log('design vuemarkdown')
},
methods: {
// 树状目录获取
getDirContent (mdContent) {
if (!mdContent) {
return []
}
const lineT = mdContent.split('\n')
const titleArray = lineT.filter(item => item && item[0] === '#')
console.log('titleArray', titleArray)
const dirArray = titleArray.map(item => {
return item.replace(/\r/g, '')
})
console.log('dirArray', dirArray)
const dirLevelArray = dirArray.map(item => {
let level = 0
for (let loc in item) {
if (item[loc] === '#') {
++level
}
}
const itemBack = item
const value = itemBack.replace(/#/g, '').trim()
return {
level,
value
}
})
console.log('dirLevelArray', dirLevelArray)
this.dirContent = dirLevelArray
}
}
}
</script>
渲染样式效果如下:
注意:
toc是markdown渲染的id显示
渲染内容如下图:
💖 取出markdown的标题层级
字符串处理识别#
标记层级,拿出数据内容
应为markdown本身有序,所以无需排序
渲染目录逻辑
- 根据层级渲染缩进
- 渲染标题内容
- 标题加上锚点跳转事件
渲染目录代码如下:
<template>
<div class="markdown-link">
<div v-for="(item,index) in content" :key="index">
<div>
<template v-for="levelItem in item.level">
</template>
<span @click="jumpText(item)" class="link-title">{{item.value}}</span>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
dirContent: undefined
},
data () {
return {
content: ''
}
},
watch: {
dirContent: {
handler (newVal) {
console.log('newVal', newVal)
this.content = newVal || ''
},
deep: true,
immediate: true
}
**ES6**
* 列举常用的ES6特性:
* 箭头函数需要注意哪些地方?
* let、const、var
* 拓展:var方式定义的变量有什么样的bug?
* Set数据结构
* 拓展:数组去重的方法
* 箭头函数this的指向。
* 手写ES6 class继承。
**[开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】](https://bbs.csdn.net/forums/4304bb5a486d4c3ab8389e65ecb71ac0)**
![](https://img-blog.csdnimg.cn/img_convert/aac1740e50faadb9a6a7a5b97f9ccba8.png)
**微信小程序**
* 简单描述一下微信小程序的相关文件类型?
* 你是怎么封装微信小程序的数据请求?
* 有哪些参数传值的方法?
* 你使用过哪些方法,来提高微信小程序的应用速度?
* 小程序和原生App哪个好?
* 简述微信小程序原理?
* 分析微信小程序的优劣势
* 怎么解决小程序的异步请求问题?
![](https://img-blog.csdnimg.cn/img_convert/60b1dbe5c76e264468aa993416a9a031.png)
**其他知识点面试**
* webpack的原理
* webpack的loader和plugin的区别?
* 怎么使用webpack对项目进行优化?
* 防抖、节流
* 浏览器的缓存机制
* 描述一下二叉树, 并说明二叉树的几种遍历方式?
* 项目类问题
* 笔试编程题:
![](https://img-blog.csdnimg.cn/img_convert/aec12fc95e5722b9f2f1f22eeb5e67bd.png)
#### 最后
技术栈比较搭,基本用过的东西都是一模一样的。快手终面喜欢问智力题,校招也是终面问智力题,大家要准备一下一些经典智力题。如果排列组合、概率论这些基础忘了,建议回去补一下。