fix: merge replaced Object.assign
https://github.com/d2-projects/d2-admin/issues/342
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user