Skip to content

Fixed problem of default slot and not defined optionsOrInstall, updated vulnerable dependencies, removed node-sass #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dist
lib

.DS_Store
.idea
2 changes: 1 addition & 1 deletion build/build-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Component.install = install;${
Component.use = function (optionsOrInstall, opt) {
if (typeof optionsOrInstall === 'function') {
optionsOrInstall(Component, opt);
} else {
} else if (typeof optionsOrInstall === 'object' && 'install' in optionsOrInstall && typeof optionsOrInstall.install === 'function') {
optionsOrInstall.install(Component, opt);
}

Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"test-cdn-pkg": "http-server -o ./dev/test-cdn.html",
"build:entry": "node build/build-entry.js",
"build:utils": "node build/build-utils.js",
"build:theme": "webpack --config build/webpack.theme.js",
"build:pkg": "npm run build:entry && webpack --config build/webpack.pkg.js && npm run build:theme && npm run build:utils",
"build:theme": "NODE_OPTIONS=--openssl-legacy-provider webpack --config build/webpack.theme.js",
"build:pkg": "npm run build:entry && NODE_OPTIONS=--openssl-legacy-provider webpack --config build/webpack.pkg.js && npm run build:theme && npm run build:utils",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
Expand Down Expand Up @@ -69,7 +69,7 @@
},
"devDependencies": {
"@babel/cli": "7.8.4",
"@babel/core": "7.9.0",
"@babel/core": "7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
"@babel/plugin-transform-object-assign": "^7.8.3",
"@babel/preset-env": "^7.16.4",
Expand All @@ -96,14 +96,13 @@
"inquirer": "^7.1.0",
"lint-staged": "^10.1.2",
"mini-css-extract-plugin": "^0.9.0",
"node-sass": "^4.13.1",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"postcss-loader": "^3.0.0",
"prettier": "^2.0.3",
"sass": "^1.26.3",
"sass-loader": "^8.0.2",
"semver": "^7.1.3",
"shelljs": "^0.8.3",
"shelljs": "^0.8.5",
"signale": "^1.4.0",
"style-loader": "^1.1.3",
"stylelint": "^13.3.0",
Expand Down Expand Up @@ -141,8 +140,8 @@
"markdown-it-attrs": "^4.0.0",
"markdown-it-container": "^3.0.0",
"markdown-it-emoji": "1.4.0",
"mermaid": "^8.10.1",
"prismjs": "^1.23.0",
"mermaid": "^9.1.3",
"prismjs": "^1.27.0",
"resize-observer-polyfill": "^1.5.1",
"xss": "^1.0.9"
},
Expand Down
2 changes: 1 addition & 1 deletion src/base-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Component.lang = Lang;
Component.use = function (optionsOrInstall, opt) {
if (typeof optionsOrInstall === 'function') {
optionsOrInstall(Component, opt);
} else {
} else if (typeof optionsOrInstall === 'object' && 'install' in optionsOrInstall && typeof optionsOrInstall.install === 'function') {
optionsOrInstall.install(Component, opt);
}

Expand Down
2 changes: 1 addition & 1 deletion src/codemirror-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Component.lang = Lang;
Component.use = function (optionsOrInstall, opt) {
if (typeof optionsOrInstall === 'function') {
optionsOrInstall(Component, opt);
} else {
} else if (typeof optionsOrInstall === 'object' && 'install' in optionsOrInstall && typeof optionsOrInstall.install === 'function') {
optionsOrInstall.install(Component, opt);
}

Expand Down
2 changes: 1 addition & 1 deletion src/codemirror-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const component = {
mode: 'markdown',
lineWrapping: true,
scrollbarStyle: 'overlay',
...this.codemirrorConfig
...this.codemirrorConfig,
});

this.codemirrorInstance.on('change', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/scrollbar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default {
},

render(h) {
if (this.disabled) return this.$slots.default;
if (this.disabled) return Array.isArray(this.$slots.default) ? this.$slots.default[0] : this.$slots.default;

const gutter = scrollbarWidth();
let style = this.wrapStyle;
Expand Down Expand Up @@ -132,7 +132,7 @@ export default {
style: this.viewStyle,
ref: 'resize',
},
this.$slots.default
Array.isArray(this.$slots.default) ? this.$slots.default[0] : this.$slots.default
);
const wrap = (
<div
Expand Down
2 changes: 1 addition & 1 deletion src/preview-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Component.install = install;
Component.use = function (optionsOrInstall, opt) {
if (typeof optionsOrInstall === 'function') {
optionsOrInstall(Component, opt);
} else {
} else if (typeof optionsOrInstall === 'object' && 'install' in optionsOrInstall && typeof optionsOrInstall.install === 'function') {
optionsOrInstall.install(Component, opt);
}

Expand Down
2 changes: 1 addition & 1 deletion src/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Component.lang = Lang;
Component.use = function (optionsOrInstall, opt) {
if (typeof optionsOrInstall === 'function') {
optionsOrInstall(Component, opt);
} else {
} else if (typeof optionsOrInstall === 'object' && 'install' in optionsOrInstall && typeof optionsOrInstall.install === 'function') {
optionsOrInstall.install(Component, opt);
}

Expand Down
Loading