From a70c55e585cc71f1832de7aa16e5568353bdccce Mon Sep 17 00:00:00 2001 From: undefined Date: Thu, 20 Jan 2022 22:21:56 +0800 Subject: [PATCH] ui: fix vditor getValue --- packages/ui-default/components/editor/index.ts | 4 ++-- packages/ui-default/package.json | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/ui-default/components/editor/index.ts b/packages/ui-default/components/editor/index.ts index a91c7b3bb..160dad972 100644 --- a/packages/ui-default/components/editor/index.ts +++ b/packages/ui-default/components/editor/index.ts @@ -191,8 +191,8 @@ export default class Editor extends DOMAttachedObject { */ value(val) { this.ensureValid(); - if (typeof val === 'string') return this.editor.setValue(val); - return this.editor.getValue(); + if (typeof val === 'string') return (this.editor || this.vditor).setValue(val); + return (this.editor || this.vditor).getValue(); } focus() { diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index dad0e4f41..4e8b305f7 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/ui-default", - "version": "4.30.3", + "version": "4.30.4", "author": "undefined ", "license": "AGPL-3.0", "main": "hydro.js", @@ -13,7 +13,7 @@ "@blueprintjs/core": "^3.52.0", "@hydrooj/utils": "workspace:*", "@types/gulp-if": "^0.0.34", - "@types/jquery": "^3.5.11", + "@types/jquery": "^3.5.13", "@types/json-schema": "^7.0.9", "@types/katex": "^0.11.1", "@types/qrcode": "^1.4.2", @@ -32,8 +32,8 @@ "echarts": "^5.2.2", "emojis-keywords": "2.0.0", "emojis-list": "2.1.0", - "esbuild-loader": "^2.17.0", - "eslint": "^8.6.0", + "esbuild-loader": "^2.18.0", + "eslint": "^8.7.0", "eslint-config-airbnb": "^18.2.1", "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-import": "^2.25.4", @@ -59,7 +59,7 @@ "monaco-editor-nls": "^2.0.0", "monaco-editor-webpack-plugin": "^7.0.1", "monaco-themes": "^0.4.0", - "nanoid": "^3.1.30", + "nanoid": "^3.2.0", "normalize.css": "^8.0.1", "nprogress": "^0.2.0", "pickadate": "^3.6.4", @@ -84,7 +84,7 @@ "speed-measure-webpack-plugin": "^1.5.0", "sticky-kit": "^1.1.3", "style-loader": "^2.0.0", - "stylus": "^0.55.0", + "stylus": "^0.56.0", "stylus-loader": "^3.0.2", "tether": "^1.4.7", "tether-drop": "^1.4.2", @@ -105,9 +105,9 @@ "fs-extra": "^10.0.0", "js-yaml": "^4.1.0", "jsesc": "^3.0.2", - "katex": "^0.15.1", + "katex": "^0.15.2", "lodash": "^4.17.21", - "markdown-it": "^12.3.0", + "markdown-it": "^12.3.2", "markdown-it-anchor": "^8.4.1", "markdown-it-footnote": "^3.0.3", "markdown-it-imsize": "^2.0.1", @@ -116,7 +116,7 @@ "markdown-it-table-of-contents": "^0.6.0", "mongodb": "^3.7.3", "nunjucks": "^3.2.3", - "react-query": "^3.34.7", + "react-query": "^3.34.8", "streamsaver": "^2.0.5", "xss": "^1.0.10" }