@jetlinks-web/components 2.4.2 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/EditTable/EditTable.js +2 -2
- package/es/EditTable/FormItem.js +1 -1
- package/es/FullPage/FullPage.js +1 -1
- package/es/MonacoEditor/Monaco.js +27 -25
- package/es/ProLayout/Basic/BasicLayout.js +6 -1
- package/es/ProLayout/SiderMenu/SiderMenu.js +2 -1
- package/es/ProLayout/TopHeader/index.js +10 -3
- package/es/RadioButton/RadioButton.js +1 -1
- package/es/Search/Advanced/SaveHistory.js +1 -1
- package/es/Search/Item.js +1 -1
- package/es/Search/Search.js +1 -1
- package/lib/EditTable/EditTable.js +2 -2
- package/lib/EditTable/FormItem.js +1 -1
- package/lib/FullPage/FullPage.js +1 -1
- package/lib/MonacoEditor/Monaco.js +27 -25
- package/lib/ProLayout/Basic/BasicLayout.js +6 -1
- package/lib/ProLayout/SiderMenu/SiderMenu.js +2 -1
- package/lib/ProLayout/TopHeader/index.js +9 -2
- package/lib/RadioButton/RadioButton.js +1 -1
- package/lib/Search/Advanced/SaveHistory.js +1 -1
- package/lib/Search/Item.js +1 -1
- package/lib/Search/Search.js +1 -1
- package/package.json +3 -3
|
@@ -89,8 +89,8 @@ import { FULL_SCREEN, RIGHT_MENU, TABLE_DATA_SOURCE, TABLE_ERROR, TABLE_TOOL, TA
|
|
|
89
89
|
import { handleColumnsWidth } from './utils';
|
|
90
90
|
import { useResizeObserver, useValidate, useFormContext } from './hooks';
|
|
91
91
|
import { tableProps } from 'ant-design-vue/lib/table';
|
|
92
|
-
import Header from './
|
|
93
|
-
import Body from './
|
|
92
|
+
import Header from './Header.js';
|
|
93
|
+
import Body from './Body.js';
|
|
94
94
|
import { useFullscreen } from '@vueuse/core';
|
|
95
95
|
import { provide, useAttrs, useSlots, ref, reactive, computed, watch } from 'vue';
|
|
96
96
|
import { bodyProps, defaultProps } from "./props";
|
package/es/EditTable/FormItem.js
CHANGED
|
@@ -48,7 +48,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
48
48
|
"onFieldChange": "setup-const"
|
|
49
49
|
} */
|
|
50
50
|
import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
51
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
51
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180402299"), n = n(), _popScopeId(), n);
|
|
52
52
|
const _hoisted_1 = { style: { "color": "#1d2129" } };
|
|
53
53
|
const _hoisted_2 = {
|
|
54
54
|
key: 0,
|
package/es/FullPage/FullPage.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
} */
|
|
7
7
|
import { defineComponent as _defineComponent } from 'vue';
|
|
8
8
|
import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
9
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
9
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180402748"), n = n(), _popScopeId(), n);
|
|
10
10
|
const _hoisted_1 = { class: "full-page-warp-content" };
|
|
11
11
|
import { ref } from 'vue';
|
|
12
12
|
import { useElementBounding } from '@vueuse/core';
|
|
@@ -36,7 +36,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
36
36
|
"props": "setup-reactive-const",
|
|
37
37
|
"emit": "setup-const",
|
|
38
38
|
"dom": "setup-ref",
|
|
39
|
-
"instance": "setup-
|
|
39
|
+
"instance": "setup-let",
|
|
40
40
|
"monacoProviderRef": "setup-ref",
|
|
41
41
|
"monacoTypescriptProviderRef": "setup-ref",
|
|
42
42
|
"handleSuggestions": "setup-const",
|
|
@@ -48,7 +48,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
48
48
|
"insert": "setup-const"
|
|
49
49
|
} */
|
|
50
50
|
import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
51
|
-
import { ref, onMounted, watch, onUnmounted,
|
|
51
|
+
import { ref, onMounted, watch, onUnmounted, nextTick } from 'vue';
|
|
52
52
|
import * as monaco from 'monaco-editor';
|
|
53
53
|
import { omit } from 'lodash-es';
|
|
54
54
|
const __sfc_main__ = Object.assign({
|
|
@@ -77,7 +77,7 @@ const __sfc_main__ = Object.assign({
|
|
|
77
77
|
const props = __props;
|
|
78
78
|
const emit = __emit;
|
|
79
79
|
const dom = ref();
|
|
80
|
-
|
|
80
|
+
let instance;
|
|
81
81
|
const monacoProviderRef = ref();
|
|
82
82
|
const monacoTypescriptProviderRef = ref();
|
|
83
83
|
// codeTipItem.dispose() // 销毁自定义提示
|
|
@@ -130,12 +130,14 @@ const __sfc_main__ = Object.assign({
|
|
|
130
130
|
* 代码格式化
|
|
131
131
|
*/
|
|
132
132
|
const editorFormat = () => {
|
|
133
|
-
if (!instance
|
|
133
|
+
if (!instance)
|
|
134
134
|
return;
|
|
135
|
-
|
|
135
|
+
setTimeout(() => {
|
|
136
|
+
_optionalChain([instance, 'access', _11 => _11.getAction, 'call', _12 => _12('editor.action.formatDocument'), 'optionalAccess', _13 => _13.run, 'call', _14 => _14()]);
|
|
137
|
+
}, 50);
|
|
136
138
|
if (props.hasOwnProperty('readOnly')) {
|
|
137
139
|
setTimeout(() => {
|
|
138
|
-
|
|
140
|
+
instance.updateOptions({
|
|
139
141
|
readOnly: props.readOnly !== false,
|
|
140
142
|
});
|
|
141
143
|
}, 100);
|
|
@@ -147,7 +149,7 @@ const __sfc_main__ = Object.assign({
|
|
|
147
149
|
});
|
|
148
150
|
onMounted(async () => {
|
|
149
151
|
const _model = monaco.editor.createModel(props.modelValue, props.language);
|
|
150
|
-
instance
|
|
152
|
+
instance = monaco.editor.create(dom.value, {
|
|
151
153
|
model: _model,
|
|
152
154
|
tabSize: 2,
|
|
153
155
|
automaticLayout: true,
|
|
@@ -156,21 +158,21 @@ const __sfc_main__ = Object.assign({
|
|
|
156
158
|
formatOnPaste: true,
|
|
157
159
|
...(omit(props.options, ['readOnly']) || {}),
|
|
158
160
|
});
|
|
159
|
-
instance.
|
|
161
|
+
instance.onDidChangeModelContent(() => {
|
|
160
162
|
//
|
|
161
|
-
const value =
|
|
163
|
+
const value = instance.getValue();
|
|
162
164
|
nextTick(() => {
|
|
163
165
|
emit('update:modelValue', value);
|
|
164
166
|
emit('change', value);
|
|
165
167
|
});
|
|
166
168
|
});
|
|
167
|
-
instance.
|
|
169
|
+
instance.onDidBlurEditorText(() => {
|
|
168
170
|
emit('blur');
|
|
169
171
|
if (props.blurFormat) {
|
|
170
172
|
editorFormat();
|
|
171
173
|
}
|
|
172
174
|
});
|
|
173
|
-
instance.
|
|
175
|
+
instance.onDidFocusEditorText(() => {
|
|
174
176
|
emit('focus');
|
|
175
177
|
});
|
|
176
178
|
if (props.modelValue) {
|
|
@@ -178,7 +180,7 @@ const __sfc_main__ = Object.assign({
|
|
|
178
180
|
editorFormat();
|
|
179
181
|
}, 200);
|
|
180
182
|
}
|
|
181
|
-
_optionalChain([props, 'access',
|
|
183
|
+
_optionalChain([props, 'access', _15 => _15.init, 'optionalCall', _16 => _16(instance, monaco)]);
|
|
182
184
|
});
|
|
183
185
|
/**
|
|
184
186
|
* 光标位置插入内容
|
|
@@ -186,31 +188,31 @@ const __sfc_main__ = Object.assign({
|
|
|
186
188
|
* @param position
|
|
187
189
|
*/
|
|
188
190
|
const insert = (val, position) => {
|
|
189
|
-
if (!instance
|
|
191
|
+
if (!instance)
|
|
190
192
|
return;
|
|
191
|
-
const _position = position ||
|
|
192
|
-
const value =
|
|
193
|
+
const _position = position || instance.getPosition();
|
|
194
|
+
const value = instance.getValue();
|
|
193
195
|
if (position && position.lineNumber) {
|
|
194
|
-
|
|
196
|
+
instance.setPosition(position);
|
|
195
197
|
}
|
|
196
|
-
|
|
198
|
+
instance.executeEdits(value, [
|
|
197
199
|
{
|
|
198
|
-
range: new monaco.Range(_optionalChain([_position, 'optionalAccess',
|
|
200
|
+
range: new monaco.Range(_optionalChain([_position, 'optionalAccess', _17 => _17.lineNumber]), _optionalChain([_position, 'optionalAccess', _18 => _18.column]), _optionalChain([_position, 'optionalAccess', _19 => _19.lineNumber]), _optionalChain([_position, 'optionalAccess', _20 => _20.column])),
|
|
199
201
|
text: val,
|
|
200
202
|
},
|
|
201
203
|
]);
|
|
202
204
|
};
|
|
203
205
|
watch(() => props.modelValue, (val) => {
|
|
204
|
-
if (!instance
|
|
205
|
-
(instance
|
|
206
|
-
props.modelValue ===
|
|
206
|
+
if (!instance ||
|
|
207
|
+
(instance &&
|
|
208
|
+
props.modelValue === instance.getValue()))
|
|
207
209
|
return;
|
|
208
210
|
// setValue之前获取光标位置
|
|
209
|
-
const position =
|
|
211
|
+
const position = instance.getPosition();
|
|
210
212
|
// setValue之后光标位置改变
|
|
211
|
-
|
|
213
|
+
instance.setValue(val);
|
|
212
214
|
// 设置光标位置为setValue之前的位置
|
|
213
|
-
|
|
215
|
+
instance.setPosition(position);
|
|
214
216
|
editorFormat();
|
|
215
217
|
});
|
|
216
218
|
watch(() => JSON.stringify(props.registrationTips), () => {
|
|
@@ -222,7 +224,7 @@ const __sfc_main__ = Object.assign({
|
|
|
222
224
|
onUnmounted(() => {
|
|
223
225
|
disposeRegister();
|
|
224
226
|
disposeTypescript();
|
|
225
|
-
_optionalChain([
|
|
227
|
+
_optionalChain([instance, 'access', _21 => _21.editor, 'optionalAccess', _22 => _22.dispose, 'optionalCall', _23 => _23()]);
|
|
226
228
|
});
|
|
227
229
|
__expose({
|
|
228
230
|
editorFormat,
|
|
@@ -110,6 +110,9 @@ export default defineComponent({
|
|
|
110
110
|
return hasSide.value && hasSplitMenu.value;
|
|
111
111
|
});
|
|
112
112
|
var siderWidth = computed(function () {
|
|
113
|
+
if (props.layoutType === LayoutType.PAD) {
|
|
114
|
+
return props.collapsed ? 0 : props.siderWidth;
|
|
115
|
+
}
|
|
113
116
|
return props.collapsed ? props.collapsedWidth : props.siderWidth;
|
|
114
117
|
});
|
|
115
118
|
var onCollapse = function onCollapse(collapsed) {
|
|
@@ -179,7 +182,7 @@ export default defineComponent({
|
|
|
179
182
|
var layoutType = computed(function () {
|
|
180
183
|
return props.layoutType;
|
|
181
184
|
});
|
|
182
|
-
var routeContext = reactive(_objectSpread(_objectSpread(_objectSpread({}, defaultRouteContext), pick(toRefs(props), ['pure', 'locale', 'menuData', 'openKeys', 'selectedKeys', 'contentWidth', 'disableMobile', 'fixSiderbar', 'fixedHeader', 'headerHeight', 'collapsedWidth'])), {}, {
|
|
185
|
+
var routeContext = reactive(_objectSpread(_objectSpread(_objectSpread({}, defaultRouteContext), pick(toRefs(props), ['pure', 'locale', 'menuData', 'openKeys', 'selectedKeys', 'contentWidth', 'disableMobile', 'fixSiderbar', 'fixedHeader', 'headerHeight', 'collapsedWidth', 'headerLeftWidth'])), {}, {
|
|
183
186
|
siderWidth: siderWidth,
|
|
184
187
|
breadcrumb: breadcrumb,
|
|
185
188
|
flatMenuData: flatMenuData,
|
|
@@ -189,6 +192,7 @@ export default defineComponent({
|
|
|
189
192
|
flatMenu: hasFlatMenu,
|
|
190
193
|
layoutType: layoutType
|
|
191
194
|
}));
|
|
195
|
+
console.log(toRefs(props));
|
|
192
196
|
provide(routeContextInjectKey, routeContext);
|
|
193
197
|
return function () {
|
|
194
198
|
var pure = props.pure,
|
|
@@ -294,6 +298,7 @@ export default defineComponent({
|
|
|
294
298
|
default: function _default() {
|
|
295
299
|
return [_createVNode(SiderMenu, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
296
300
|
"logo": logoRender || restProps.logo,
|
|
301
|
+
"collapsedWidth": 0,
|
|
297
302
|
"headerHeight": 0,
|
|
298
303
|
"menuHeaderRender": menuHeaderRender,
|
|
299
304
|
"menuExtraRender": menuExtraRender,
|
|
@@ -263,7 +263,8 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
263
263
|
"collapsedWidth": collapsedWidth,
|
|
264
264
|
"style": {
|
|
265
265
|
overflow: 'hidden',
|
|
266
|
-
paddingTop: "".concat(props.headerHeight, "px")
|
|
266
|
+
paddingTop: "".concat(props.headerHeight, "px"),
|
|
267
|
+
zIndex: props.layoutType === LayoutType.PAD ? 200 : 1
|
|
267
268
|
},
|
|
268
269
|
"width": siderWidth,
|
|
269
270
|
"theme": theme,
|
|
@@ -8,7 +8,7 @@ import { computed, ref } from 'vue';
|
|
|
8
8
|
import { default as ResizeObserver } from 'ant-design-vue/es/vc-resize-observer';
|
|
9
9
|
import { defaultRenderLogoAndTitle, siderMenuProps } from '../SiderMenu/SiderMenu';
|
|
10
10
|
import PropTypes from 'ant-design-vue/es/_util/vue-types';
|
|
11
|
-
import { defaultSettingProps } from '../defaultSettings';
|
|
11
|
+
import { defaultSettingProps, LayoutType } from '../defaultSettings';
|
|
12
12
|
import { defaultPrefixCls, useRouteContext } from '../RouteContext';
|
|
13
13
|
import BaseMenu from '../SiderMenu/BaseMenu';
|
|
14
14
|
import { clearMenuItem } from '../util';
|
|
@@ -58,7 +58,8 @@ export var baseHeaderProps = _objectSpread(_objectSpread({}, defaultSettingProps
|
|
|
58
58
|
onMenuHeaderClick: PropTypes.func,
|
|
59
59
|
onCollapse: siderMenuProps.onCollapse,
|
|
60
60
|
onOpenKeys: siderMenuProps.onOpenKeys,
|
|
61
|
-
onSelect: siderMenuProps.onSelect
|
|
61
|
+
onSelect: siderMenuProps.onSelect,
|
|
62
|
+
headerLeftWidth: Number
|
|
62
63
|
});
|
|
63
64
|
export var topNavHeaderProps = _objectSpread(_objectSpread({}, siderMenuProps), baseHeaderProps);
|
|
64
65
|
var RightContent = function RightContent(_ref) {
|
|
@@ -122,8 +123,14 @@ export var TopNavHeader = function TopNavHeader(props) {
|
|
|
122
123
|
var className = computed(function () {
|
|
123
124
|
return _defineProperty(_defineProperty(_defineProperty({}, prefixCls, true), "light", props.theme === 'light'), "dark", props.theme === 'dark');
|
|
124
125
|
});
|
|
126
|
+
var paddingLeft = computed(function () {
|
|
127
|
+
return context.layoutType === LayoutType.PAD && props.collapsed ? context.headerLeftWidth + 'px' : 0;
|
|
128
|
+
});
|
|
125
129
|
return _createVNode("div", {
|
|
126
|
-
"class": className.value
|
|
130
|
+
"class": className.value,
|
|
131
|
+
"style": {
|
|
132
|
+
paddingLeft: paddingLeft.value
|
|
133
|
+
}
|
|
127
134
|
}, [_createVNode("div", {
|
|
128
135
|
"ref": headerRef,
|
|
129
136
|
"class": "".concat(prefixCls, "-main ").concat(contentWidth === 'Fixed' ? 'wide' : '')
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"onClick": "setup-const"
|
|
11
11
|
} */
|
|
12
12
|
import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
13
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
13
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180404597"), n = n(), _popScopeId(), n);
|
|
14
14
|
const _hoisted_1 = ["onClick"];
|
|
15
15
|
const __sfc_main__ = Object.assign({
|
|
16
16
|
name: 'JRadioButton',
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} */
|
|
22
22
|
import { defineComponent as _defineComponent } from 'vue';
|
|
23
23
|
import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
24
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
24
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180405166"), n = n(), _popScopeId(), n);
|
|
25
25
|
const _hoisted_1 = {
|
|
26
26
|
key: 0,
|
|
27
27
|
style: { "width": "240px" }
|
package/es/Search/Item.js
CHANGED
|
@@ -78,7 +78,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
78
78
|
} */
|
|
79
79
|
import { defineComponent as _defineComponent } from 'vue';
|
|
80
80
|
import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
81
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
81
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180403963"), n = n(), _popScopeId(), n);
|
|
82
82
|
const _hoisted_1 = { class: "JSearch-item" };
|
|
83
83
|
const _hoisted_2 = {
|
|
84
84
|
key: 0,
|
package/es/Search/Search.js
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
} */
|
|
44
44
|
import { defineComponent as _defineComponent } from 'vue';
|
|
45
45
|
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, unref as _unref, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
46
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
46
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180404314"), n = n(), _popScopeId(), n);
|
|
47
47
|
const _hoisted_1 = { class: "JSearch-content simple" };
|
|
48
48
|
const _hoisted_2 = { class: "JSearch-items" };
|
|
49
49
|
import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
|
|
@@ -89,8 +89,8 @@ import { FULL_SCREEN, RIGHT_MENU, TABLE_DATA_SOURCE, TABLE_ERROR, TABLE_TOOL, TA
|
|
|
89
89
|
import { handleColumnsWidth } from './utils';
|
|
90
90
|
import { useResizeObserver, useValidate, useFormContext } from './hooks';
|
|
91
91
|
import { tableProps } from 'ant-design-vue/lib/table';
|
|
92
|
-
import Header from './
|
|
93
|
-
import Body from './
|
|
92
|
+
import Header from './Header.js';
|
|
93
|
+
import Body from './Body.js';
|
|
94
94
|
import { useFullscreen } from '@vueuse/core';
|
|
95
95
|
import { provide, useAttrs, useSlots, ref, reactive, computed, watch } from 'vue';
|
|
96
96
|
import { bodyProps, defaultProps } from "./props";
|
|
@@ -48,7 +48,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
48
48
|
"onFieldChange": "setup-const"
|
|
49
49
|
} */
|
|
50
50
|
import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
51
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
51
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180402275"), n = n(), _popScopeId(), n);
|
|
52
52
|
const _hoisted_1 = { style: { "color": "#1d2129" } };
|
|
53
53
|
const _hoisted_2 = {
|
|
54
54
|
key: 0,
|
package/lib/FullPage/FullPage.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
} */
|
|
7
7
|
import { defineComponent as _defineComponent } from 'vue';
|
|
8
8
|
import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
9
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
9
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180402736"), n = n(), _popScopeId(), n);
|
|
10
10
|
const _hoisted_1 = { class: "full-page-warp-content" };
|
|
11
11
|
import { ref } from 'vue';
|
|
12
12
|
import { useElementBounding } from '@vueuse/core';
|
|
@@ -36,7 +36,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
36
36
|
"props": "setup-reactive-const",
|
|
37
37
|
"emit": "setup-const",
|
|
38
38
|
"dom": "setup-ref",
|
|
39
|
-
"instance": "setup-
|
|
39
|
+
"instance": "setup-let",
|
|
40
40
|
"monacoProviderRef": "setup-ref",
|
|
41
41
|
"monacoTypescriptProviderRef": "setup-ref",
|
|
42
42
|
"handleSuggestions": "setup-const",
|
|
@@ -48,7 +48,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
48
48
|
"insert": "setup-const"
|
|
49
49
|
} */
|
|
50
50
|
import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
51
|
-
import { ref, onMounted, watch, onUnmounted,
|
|
51
|
+
import { ref, onMounted, watch, onUnmounted, nextTick } from 'vue';
|
|
52
52
|
import * as monaco from 'monaco-editor';
|
|
53
53
|
import { omit } from 'lodash-es';
|
|
54
54
|
const __sfc_main__ = Object.assign({
|
|
@@ -77,7 +77,7 @@ const __sfc_main__ = Object.assign({
|
|
|
77
77
|
const props = __props;
|
|
78
78
|
const emit = __emit;
|
|
79
79
|
const dom = ref();
|
|
80
|
-
|
|
80
|
+
let instance;
|
|
81
81
|
const monacoProviderRef = ref();
|
|
82
82
|
const monacoTypescriptProviderRef = ref();
|
|
83
83
|
// codeTipItem.dispose() // 销毁自定义提示
|
|
@@ -130,12 +130,14 @@ const __sfc_main__ = Object.assign({
|
|
|
130
130
|
* 代码格式化
|
|
131
131
|
*/
|
|
132
132
|
const editorFormat = () => {
|
|
133
|
-
if (!instance
|
|
133
|
+
if (!instance)
|
|
134
134
|
return;
|
|
135
|
-
|
|
135
|
+
setTimeout(() => {
|
|
136
|
+
_optionalChain([instance, 'access', _11 => _11.getAction, 'call', _12 => _12('editor.action.formatDocument'), 'optionalAccess', _13 => _13.run, 'call', _14 => _14()]);
|
|
137
|
+
}, 50);
|
|
136
138
|
if (props.hasOwnProperty('readOnly')) {
|
|
137
139
|
setTimeout(() => {
|
|
138
|
-
|
|
140
|
+
instance.updateOptions({
|
|
139
141
|
readOnly: props.readOnly !== false,
|
|
140
142
|
});
|
|
141
143
|
}, 100);
|
|
@@ -147,7 +149,7 @@ const __sfc_main__ = Object.assign({
|
|
|
147
149
|
});
|
|
148
150
|
onMounted(async () => {
|
|
149
151
|
const _model = monaco.editor.createModel(props.modelValue, props.language);
|
|
150
|
-
instance
|
|
152
|
+
instance = monaco.editor.create(dom.value, {
|
|
151
153
|
model: _model,
|
|
152
154
|
tabSize: 2,
|
|
153
155
|
automaticLayout: true,
|
|
@@ -156,21 +158,21 @@ const __sfc_main__ = Object.assign({
|
|
|
156
158
|
formatOnPaste: true,
|
|
157
159
|
...(omit(props.options, ['readOnly']) || {}),
|
|
158
160
|
});
|
|
159
|
-
instance.
|
|
161
|
+
instance.onDidChangeModelContent(() => {
|
|
160
162
|
//
|
|
161
|
-
const value =
|
|
163
|
+
const value = instance.getValue();
|
|
162
164
|
nextTick(() => {
|
|
163
165
|
emit('update:modelValue', value);
|
|
164
166
|
emit('change', value);
|
|
165
167
|
});
|
|
166
168
|
});
|
|
167
|
-
instance.
|
|
169
|
+
instance.onDidBlurEditorText(() => {
|
|
168
170
|
emit('blur');
|
|
169
171
|
if (props.blurFormat) {
|
|
170
172
|
editorFormat();
|
|
171
173
|
}
|
|
172
174
|
});
|
|
173
|
-
instance.
|
|
175
|
+
instance.onDidFocusEditorText(() => {
|
|
174
176
|
emit('focus');
|
|
175
177
|
});
|
|
176
178
|
if (props.modelValue) {
|
|
@@ -178,7 +180,7 @@ const __sfc_main__ = Object.assign({
|
|
|
178
180
|
editorFormat();
|
|
179
181
|
}, 200);
|
|
180
182
|
}
|
|
181
|
-
_optionalChain([props, 'access',
|
|
183
|
+
_optionalChain([props, 'access', _15 => _15.init, 'optionalCall', _16 => _16(instance, monaco)]);
|
|
182
184
|
});
|
|
183
185
|
/**
|
|
184
186
|
* 光标位置插入内容
|
|
@@ -186,31 +188,31 @@ const __sfc_main__ = Object.assign({
|
|
|
186
188
|
* @param position
|
|
187
189
|
*/
|
|
188
190
|
const insert = (val, position) => {
|
|
189
|
-
if (!instance
|
|
191
|
+
if (!instance)
|
|
190
192
|
return;
|
|
191
|
-
const _position = position ||
|
|
192
|
-
const value =
|
|
193
|
+
const _position = position || instance.getPosition();
|
|
194
|
+
const value = instance.getValue();
|
|
193
195
|
if (position && position.lineNumber) {
|
|
194
|
-
|
|
196
|
+
instance.setPosition(position);
|
|
195
197
|
}
|
|
196
|
-
|
|
198
|
+
instance.executeEdits(value, [
|
|
197
199
|
{
|
|
198
|
-
range: new monaco.Range(_optionalChain([_position, 'optionalAccess',
|
|
200
|
+
range: new monaco.Range(_optionalChain([_position, 'optionalAccess', _17 => _17.lineNumber]), _optionalChain([_position, 'optionalAccess', _18 => _18.column]), _optionalChain([_position, 'optionalAccess', _19 => _19.lineNumber]), _optionalChain([_position, 'optionalAccess', _20 => _20.column])),
|
|
199
201
|
text: val,
|
|
200
202
|
},
|
|
201
203
|
]);
|
|
202
204
|
};
|
|
203
205
|
watch(() => props.modelValue, (val) => {
|
|
204
|
-
if (!instance
|
|
205
|
-
(instance
|
|
206
|
-
props.modelValue ===
|
|
206
|
+
if (!instance ||
|
|
207
|
+
(instance &&
|
|
208
|
+
props.modelValue === instance.getValue()))
|
|
207
209
|
return;
|
|
208
210
|
// setValue之前获取光标位置
|
|
209
|
-
const position =
|
|
211
|
+
const position = instance.getPosition();
|
|
210
212
|
// setValue之后光标位置改变
|
|
211
|
-
|
|
213
|
+
instance.setValue(val);
|
|
212
214
|
// 设置光标位置为setValue之前的位置
|
|
213
|
-
|
|
215
|
+
instance.setPosition(position);
|
|
214
216
|
editorFormat();
|
|
215
217
|
});
|
|
216
218
|
watch(() => JSON.stringify(props.registrationTips), () => {
|
|
@@ -222,7 +224,7 @@ const __sfc_main__ = Object.assign({
|
|
|
222
224
|
onUnmounted(() => {
|
|
223
225
|
disposeRegister();
|
|
224
226
|
disposeTypescript();
|
|
225
|
-
_optionalChain([
|
|
227
|
+
_optionalChain([instance, 'access', _21 => _21.editor, 'optionalAccess', _22 => _22.dispose, 'optionalCall', _23 => _23()]);
|
|
226
228
|
});
|
|
227
229
|
__expose({
|
|
228
230
|
editorFormat,
|
|
@@ -119,6 +119,9 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
119
119
|
return hasSide.value && hasSplitMenu.value;
|
|
120
120
|
});
|
|
121
121
|
var siderWidth = (0, _vue.computed)(function () {
|
|
122
|
+
if (props.layoutType === _defaultSettings.LayoutType.PAD) {
|
|
123
|
+
return props.collapsed ? 0 : props.siderWidth;
|
|
124
|
+
}
|
|
122
125
|
return props.collapsed ? props.collapsedWidth : props.siderWidth;
|
|
123
126
|
});
|
|
124
127
|
var onCollapse = function onCollapse(collapsed) {
|
|
@@ -188,7 +191,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
188
191
|
var layoutType = (0, _vue.computed)(function () {
|
|
189
192
|
return props.layoutType;
|
|
190
193
|
});
|
|
191
|
-
var routeContext = (0, _vue.reactive)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _RouteContext.defaultRouteContext), (0, _lodashEs.pick)((0, _vue.toRefs)(props), ['pure', 'locale', 'menuData', 'openKeys', 'selectedKeys', 'contentWidth', 'disableMobile', 'fixSiderbar', 'fixedHeader', 'headerHeight', 'collapsedWidth'])), {}, {
|
|
194
|
+
var routeContext = (0, _vue.reactive)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _RouteContext.defaultRouteContext), (0, _lodashEs.pick)((0, _vue.toRefs)(props), ['pure', 'locale', 'menuData', 'openKeys', 'selectedKeys', 'contentWidth', 'disableMobile', 'fixSiderbar', 'fixedHeader', 'headerHeight', 'collapsedWidth', 'headerLeftWidth'])), {}, {
|
|
192
195
|
siderWidth: siderWidth,
|
|
193
196
|
breadcrumb: breadcrumb,
|
|
194
197
|
flatMenuData: flatMenuData,
|
|
@@ -198,6 +201,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
198
201
|
flatMenu: hasFlatMenu,
|
|
199
202
|
layoutType: layoutType
|
|
200
203
|
}));
|
|
204
|
+
console.log((0, _vue.toRefs)(props));
|
|
201
205
|
(0, _vue.provide)(_RouteContext.routeContextInjectKey, routeContext);
|
|
202
206
|
return function () {
|
|
203
207
|
var pure = props.pure,
|
|
@@ -303,6 +307,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
303
307
|
default: function _default() {
|
|
304
308
|
return [(0, _vue.createVNode)(_SiderMenu.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, restProps), {}, {
|
|
305
309
|
"logo": logoRender || restProps.logo,
|
|
310
|
+
"collapsedWidth": 0,
|
|
306
311
|
"headerHeight": 0,
|
|
307
312
|
"menuHeaderRender": menuHeaderRender,
|
|
308
313
|
"menuExtraRender": menuExtraRender,
|
|
@@ -272,7 +272,8 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
272
272
|
"collapsedWidth": collapsedWidth,
|
|
273
273
|
"style": {
|
|
274
274
|
overflow: 'hidden',
|
|
275
|
-
paddingTop: "".concat(props.headerHeight, "px")
|
|
275
|
+
paddingTop: "".concat(props.headerHeight, "px"),
|
|
276
|
+
zIndex: props.layoutType === _defaultSettings.LayoutType.PAD ? 200 : 1
|
|
276
277
|
},
|
|
277
278
|
"width": siderWidth,
|
|
278
279
|
"theme": theme,
|
|
@@ -63,7 +63,8 @@ var baseHeaderProps = exports.baseHeaderProps = (0, _objectSpread2.default)((0,
|
|
|
63
63
|
onMenuHeaderClick: _vueTypes.default.func,
|
|
64
64
|
onCollapse: _SiderMenu.siderMenuProps.onCollapse,
|
|
65
65
|
onOpenKeys: _SiderMenu.siderMenuProps.onOpenKeys,
|
|
66
|
-
onSelect: _SiderMenu.siderMenuProps.onSelect
|
|
66
|
+
onSelect: _SiderMenu.siderMenuProps.onSelect,
|
|
67
|
+
headerLeftWidth: Number
|
|
67
68
|
});
|
|
68
69
|
var topNavHeaderProps = exports.topNavHeaderProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _SiderMenu.siderMenuProps), baseHeaderProps);
|
|
69
70
|
var RightContent = function RightContent(_ref) {
|
|
@@ -127,8 +128,14 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
|
|
|
127
128
|
var className = (0, _vue.computed)(function () {
|
|
128
129
|
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, prefixCls, true), "light", props.theme === 'light'), "dark", props.theme === 'dark');
|
|
129
130
|
});
|
|
131
|
+
var paddingLeft = (0, _vue.computed)(function () {
|
|
132
|
+
return context.layoutType === _defaultSettings.LayoutType.PAD && props.collapsed ? context.headerLeftWidth + 'px' : 0;
|
|
133
|
+
});
|
|
130
134
|
return (0, _vue.createVNode)("div", {
|
|
131
|
-
"class": className.value
|
|
135
|
+
"class": className.value,
|
|
136
|
+
"style": {
|
|
137
|
+
paddingLeft: paddingLeft.value
|
|
138
|
+
}
|
|
132
139
|
}, [(0, _vue.createVNode)("div", {
|
|
133
140
|
"ref": headerRef,
|
|
134
141
|
"class": "".concat(prefixCls, "-main ").concat(contentWidth === 'Fixed' ? 'wide' : '')
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"onClick": "setup-const"
|
|
11
11
|
} */
|
|
12
12
|
import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
13
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
13
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180404612"), n = n(), _popScopeId(), n);
|
|
14
14
|
const _hoisted_1 = ["onClick"];
|
|
15
15
|
const __sfc_main__ = Object.assign({
|
|
16
16
|
name: 'JRadioButton',
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} */
|
|
22
22
|
import { defineComponent as _defineComponent } from 'vue';
|
|
23
23
|
import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
24
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
24
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180405152"), n = n(), _popScopeId(), n);
|
|
25
25
|
const _hoisted_1 = {
|
|
26
26
|
key: 0,
|
|
27
27
|
style: { "width": "240px" }
|
package/lib/Search/Item.js
CHANGED
|
@@ -78,7 +78,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
78
78
|
} */
|
|
79
79
|
import { defineComponent as _defineComponent } from 'vue';
|
|
80
80
|
import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
81
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
81
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180403858"), n = n(), _popScopeId(), n);
|
|
82
82
|
const _hoisted_1 = { class: "JSearch-item" };
|
|
83
83
|
const _hoisted_2 = {
|
|
84
84
|
key: 0,
|
package/lib/Search/Search.js
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
} */
|
|
44
44
|
import { defineComponent as _defineComponent } from 'vue';
|
|
45
45
|
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, unref as _unref, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
46
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
46
|
+
const _withScopeId = n => (_pushScopeId("data-v-1730180404277"), n = n(), _popScopeId(), n);
|
|
47
47
|
const _hoisted_1 = { class: "JSearch-content simple" };
|
|
48
48
|
const _hoisted_2 = { class: "JSearch-items" };
|
|
49
49
|
import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetlinks-web/components",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -152,8 +152,8 @@
|
|
|
152
152
|
"webpack-dev-server": "^4.0.0",
|
|
153
153
|
"webpack-merge": "^5.0.0",
|
|
154
154
|
"webpackbar": "^5.0.2",
|
|
155
|
-
"@jetlinks-web/constants": "^1.0.
|
|
156
|
-
"@jetlinks-web/utils": "^1.2.
|
|
155
|
+
"@jetlinks-web/constants": "^1.0.6",
|
|
156
|
+
"@jetlinks-web/utils": "^1.2.4",
|
|
157
157
|
"@jetlinks-web/hooks": "^1.0.16"
|
|
158
158
|
},
|
|
159
159
|
"publishConfig": {
|