Skip to content

Commit

Permalink
Merge branch 'hotfix/v0.13.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
ClassicOldSong committed Aug 11, 2021
2 parents f083235 + 703069f commit bd3fb1d
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 73 deletions.
167 changes: 103 additions & 64 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ef-core",
"version": "0.13.10",
"version": "0.13.11",
"description": "Core of ef.js (without parser)",
"main": "dist/ef-core.min.js",
"module": "src/ef-core.js",
Expand Down Expand Up @@ -30,15 +30,15 @@
"homepage": "https://ef.js.org",
"devDependencies": {
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-replace": "^2.4.2",
"chalk": "^4.1.1",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@rollup/plugin-replace": "^3.0.0",
"chalk": "^4.1.2",
"chokidar": "^3.5.2",
"cross-env": "^7.0.3",
"eslint": "^7.29.0",
"eslint": "^7.32.0",
"jsdoc": "^3.6.7",
"rollup": "^2.52.2",
"rollup": "^2.56.2",
"rollup-plugin-browsersync": "^1.3.3",
"rollup-plugin-eslint": "^7.0.0",
"rollup-plugin-progress": "^1.1.2",
Expand Down
12 changes: 10 additions & 2 deletions src/lib/utils/dom-arr-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,19 @@ const DOMARR = {
exec()
return this
},
splice(...args) {
splice({ctx, key, anchor}, ...args) {
if (this.length === 0) return this
const spliced = ARR.splice(ARR.copy(this), ...args)
inform()
for (let i of spliced) i.$umount()
if (args[2]) {
const idx = args[0]
if (idx > 0) anchor = this[idx].$ctx.nodeInfo.placeholder
const insertItem = shared.toEFComponent(args[2])
insertItem.$mount({parent: ctx.state, key})
DOM.after(anchor, insertItem.$ctx.nodeInfo.placeholder)
ARR.splice(this, idx, 0, insertItem)
}
exec()
return spliced
},
Expand All @@ -101,7 +109,7 @@ const defineArr = (arr, info) => {
reverse: {value: DOMARR.reverse.bind(arr, info)},
shift: {value: DOMARR.shift},
sort: {value: DOMARR.sort.bind(arr, info)},
splice: {value: DOMARR.splice},
splice: {value: DOMARR.splice.bind(arr, info)},
unshift: {value: DOMARR.unshift.bind(arr, info)}
})
return arr
Expand Down

0 comments on commit bd3fb1d

Please sign in to comment.