From 30cad9b80eaad41b5f9f15e6223308df72a09285 Mon Sep 17 00:00:00 2001 From: undefined Date: Wed, 12 May 2021 23:14:07 +0800 Subject: [PATCH] ui: allow direct edit file --- .../ui-default/components/dialog/index.js | 7 +- .../components/editor/cmeditor.page.js | 3 + .../ui-default/components/editor/index.js | 65 +++++++++++-------- packages/ui-default/package.json | 2 +- .../ui-default/pages/problem_files.page.js | 50 +++++++++++++- .../ui-default/templates/problem_files.html | 4 +- packages/ui-default/utils/request.js | 2 +- 7 files changed, 100 insertions(+), 33 deletions(-) diff --git a/packages/ui-default/components/dialog/index.js b/packages/ui-default/components/dialog/index.js index ea9d84581..889dbbe9d 100644 --- a/packages/ui-default/components/dialog/index.js +++ b/packages/ui-default/components/dialog/index.js @@ -10,10 +10,13 @@ export default class Dialog { $action: null, ...options, }; + let box = ''; + if (options.width) box += `width:${options.width};max-width:${options.width};`; + if (options.height) box += `height:${options.height};max-height:${options.height};`; this.$dom = $(tpl`