fix: merge replaced Object.assign

https://github.com/d2-projects/d2-admin/issues/342
This commit is contained in:
FairyEver
2021-07-23 11:17:33 +08:00
parent 10223f7aef
commit 37f63bf20c
5 changed files with 13 additions and 8 deletions

View File

@@ -1,4 +1,6 @@
import { merge } from 'lodash'
import BScroll from 'better-scroll'
export default {
props: {
// 滚动优化的选项
@@ -22,7 +24,7 @@ export default {
methods: {
scrollInit () {
// 初始化 bs
this.BS = new BScroll(this.$refs.wrapper, Object.assign({
this.BS = new BScroll(this.$refs.wrapper, merge({
mouseWheel: true,
click: true,
scrollbar: {

View File

@@ -3,8 +3,10 @@
</template>
<script>
import { merge } from 'lodash'
import SimpleMDE from 'simplemde'
import 'simplemde/dist/simplemde.min.css'
export default {
name: 'd2-mde',
props: {
@@ -44,7 +46,7 @@ export default {
// 初始化
init () {
// 合并参数
const config = Object.assign({}, this.defaultConfig, this.config)
const config = merge({}, this.defaultConfig, this.config)
// 初始化
this.mde = new SimpleMDE({
...config,