@oinone/kunlun-vue-admin-base 6.2.0 → 6.2.1
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/dist/oinone-kunlun-vue-admin-base.css +1 -1
- package/dist/oinone-kunlun-vue-admin-base.esm.js +76 -35
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/field/form/html/expressionRichtext/ExpressionRichText.vue.d.ts +53 -97
- package/dist/types/src/field/form/html/richtext/FormHtmlRichTextFieldWidget.d.ts +7 -0
- package/dist/types/src/field/form/html/richtext/RichText.vue.d.ts +4 -1
- package/package.json +9 -9
- package/src/field/form/html/expressionRichtext/ExpressionRichText.vue +39 -17
- package/src/field/form/html/richtext/FormHtmlRichTextFieldWidget.ts +16 -0
- package/src/field/form/html/richtext/RichText.vue +13 -8
|
@@ -57875,7 +57875,8 @@ var script$2j = defineComponent({
|
|
|
57875
57875
|
'disabled',
|
|
57876
57876
|
'maxLength',
|
|
57877
57877
|
'encode',
|
|
57878
|
-
'height'
|
|
57878
|
+
'height',
|
|
57879
|
+
'richTextToolbarExcludeKeys'
|
|
57879
57880
|
],
|
|
57880
57881
|
setup(props) {
|
|
57881
57882
|
const editorId = `${DEFAULT_PREFIX}-richtext-${Math.random().toString().slice(-5)}`; // 【注意】编辑器 id ,要全局唯一
|
|
@@ -57891,13 +57892,16 @@ var script$2j = defineComponent({
|
|
|
57891
57892
|
const className = computed(() => {
|
|
57892
57893
|
return { 'form-rich-text-disabled': innerDisabled.value, 'form-rich-text-readonly': innerReadonly.value };
|
|
57893
57894
|
});
|
|
57894
|
-
const toolbarConfig = {
|
|
57895
|
-
|
|
57896
|
-
|
|
57897
|
-
|
|
57898
|
-
|
|
57899
|
-
|
|
57900
|
-
|
|
57895
|
+
const toolbarConfig = computed(() => {
|
|
57896
|
+
return {
|
|
57897
|
+
// 插入哪些菜单
|
|
57898
|
+
insertKeys: {
|
|
57899
|
+
index: 0,
|
|
57900
|
+
keys: ['uploadAttachment'] // “上传附件”菜单
|
|
57901
|
+
},
|
|
57902
|
+
excludeKeys: props.richTextToolbarExcludeKeys
|
|
57903
|
+
};
|
|
57904
|
+
});
|
|
57901
57905
|
const editorConfig = computed(() => {
|
|
57902
57906
|
return {
|
|
57903
57907
|
placeholder: props.placeholder || `${translateValueByKey('请输入内容')}...`,
|
|
@@ -58109,6 +58113,19 @@ let FormHtmlRichTextFieldWidget = class FormHtmlRichTextFieldWidget extends Form
|
|
|
58109
58113
|
this.setComponent(script$2j);
|
|
58110
58114
|
return this;
|
|
58111
58115
|
}
|
|
58116
|
+
/**
|
|
58117
|
+
* 富文本工具栏排除的key
|
|
58118
|
+
*
|
|
58119
|
+
* @example
|
|
58120
|
+
* richTextToolbarExcludeKeys="fullScreen,uploadImage"
|
|
58121
|
+
*/
|
|
58122
|
+
get richTextToolbarExcludeKeys() {
|
|
58123
|
+
const { richTextToolbarExcludeKeys } = this.getDsl();
|
|
58124
|
+
if (!richTextToolbarExcludeKeys) {
|
|
58125
|
+
return null;
|
|
58126
|
+
}
|
|
58127
|
+
return richTextToolbarExcludeKeys.split(',').map((v) => v.trim());
|
|
58128
|
+
}
|
|
58112
58129
|
get encode() {
|
|
58113
58130
|
const _encode = this.getDsl().encode;
|
|
58114
58131
|
if (_encode) {
|
|
@@ -58141,6 +58158,11 @@ let FormHtmlRichTextFieldWidget = class FormHtmlRichTextFieldWidget extends Form
|
|
|
58141
58158
|
}
|
|
58142
58159
|
}
|
|
58143
58160
|
};
|
|
58161
|
+
__decorate([
|
|
58162
|
+
Widget.Reactive(),
|
|
58163
|
+
__metadata("design:type", Object),
|
|
58164
|
+
__metadata("design:paramtypes", [])
|
|
58165
|
+
], FormHtmlRichTextFieldWidget.prototype, "richTextToolbarExcludeKeys", null);
|
|
58144
58166
|
__decorate([
|
|
58145
58167
|
Widget.Reactive(),
|
|
58146
58168
|
__metadata("design:type", Object),
|
|
@@ -58167,12 +58189,23 @@ const FormHTMLRichTextFieldWidget = FormHtmlRichTextFieldWidget;
|
|
|
58167
58189
|
|
|
58168
58190
|
const EDITOR_DEFAULT_HTML = '<p><br></p>';
|
|
58169
58191
|
const EDITOR_EXP_MODAL_CLASS = 'exp-modal-in-body';
|
|
58170
|
-
var script$2i = {
|
|
58192
|
+
var script$2i = defineComponent({
|
|
58171
58193
|
components: { Editor, Toolbar },
|
|
58172
58194
|
props: {
|
|
58173
58195
|
contextItems: Array,
|
|
58174
|
-
change:
|
|
58175
|
-
|
|
58196
|
+
change: {
|
|
58197
|
+
type: Function
|
|
58198
|
+
},
|
|
58199
|
+
value: {
|
|
58200
|
+
type: String
|
|
58201
|
+
},
|
|
58202
|
+
height: {
|
|
58203
|
+
type: String
|
|
58204
|
+
},
|
|
58205
|
+
richTextToolbarExcludeKeys: {
|
|
58206
|
+
type: Array,
|
|
58207
|
+
default: () => []
|
|
58208
|
+
}
|
|
58176
58209
|
},
|
|
58177
58210
|
setup(props) {
|
|
58178
58211
|
const editorId = `${ExpressionElementClass}-${Math.random().toString().slice(-5)}`; //【注意】编辑器 id ,要全局唯一
|
|
@@ -58183,21 +58216,28 @@ var script$2i = {
|
|
|
58183
58216
|
if (lang !== ZH_CN_CODE) {
|
|
58184
58217
|
i18nChangeLanguage('en');
|
|
58185
58218
|
}
|
|
58186
|
-
const toolbarConfig = {
|
|
58187
|
-
|
|
58188
|
-
|
|
58189
|
-
|
|
58190
|
-
|
|
58191
|
-
|
|
58192
|
-
|
|
58193
|
-
|
|
58194
|
-
|
|
58219
|
+
const toolbarConfig = computed(() => {
|
|
58220
|
+
return {
|
|
58221
|
+
insertKeys: {
|
|
58222
|
+
index: 28,
|
|
58223
|
+
keys: [OioWangEditExpressionModalMenuConf.key]
|
|
58224
|
+
},
|
|
58225
|
+
excludeKeys: [...(props.richTextToolbarExcludeKeys || []), 'fullScreen', 'uploadImage', 'insertVideo'],
|
|
58226
|
+
modalAppendToBody: true
|
|
58227
|
+
};
|
|
58228
|
+
});
|
|
58195
58229
|
const editorConfig = computed(() => {
|
|
58196
58230
|
return {
|
|
58197
58231
|
placeholder: `${translateValueByKey('请输入内容')}...`,
|
|
58198
58232
|
EXTEND_CONF: { contextItems: props.contextItems }
|
|
58199
58233
|
};
|
|
58200
58234
|
});
|
|
58235
|
+
const editorStyle = computed(() => {
|
|
58236
|
+
const style = {};
|
|
58237
|
+
style.height = props.height || '400px';
|
|
58238
|
+
style.overflowY = 'hidden';
|
|
58239
|
+
return style;
|
|
58240
|
+
});
|
|
58201
58241
|
watch(() => props.contextItems, (newVal) => {
|
|
58202
58242
|
if (!newVal)
|
|
58203
58243
|
return;
|
|
@@ -58259,6 +58299,7 @@ var script$2i = {
|
|
|
58259
58299
|
(_c = props.change) === null || _c === void 0 ? void 0 : _c.call(props, html);
|
|
58260
58300
|
};
|
|
58261
58301
|
return {
|
|
58302
|
+
editorStyle,
|
|
58262
58303
|
editorId,
|
|
58263
58304
|
mode: 'simple',
|
|
58264
58305
|
defaultHtml,
|
|
@@ -58270,7 +58311,7 @@ var script$2i = {
|
|
|
58270
58311
|
handleChange
|
|
58271
58312
|
};
|
|
58272
58313
|
}
|
|
58273
|
-
};
|
|
58314
|
+
});
|
|
58274
58315
|
|
|
58275
58316
|
const _hoisted_1$1l = { class: "form-rich-text form-expression-rich-text" };
|
|
58276
58317
|
|
|
@@ -58280,22 +58321,22 @@ function render$1w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
58280
58321
|
|
|
58281
58322
|
return (openBlock(), createElementBlock("div", _hoisted_1$1l, [
|
|
58282
58323
|
createVNode(_component_Toolbar, {
|
|
58283
|
-
"editor-id":
|
|
58284
|
-
editor:
|
|
58285
|
-
"default-config":
|
|
58286
|
-
mode:
|
|
58324
|
+
"editor-id": _ctx.editorId,
|
|
58325
|
+
editor: _ctx.editorRef,
|
|
58326
|
+
"default-config": _ctx.toolbarConfig,
|
|
58327
|
+
mode: _ctx.mode
|
|
58287
58328
|
}, null, 8 /* PROPS */, ["editor-id", "editor", "default-config", "mode"]),
|
|
58288
58329
|
createVNode(_component_Editor, {
|
|
58289
|
-
"editor-id":
|
|
58290
|
-
"default-config":
|
|
58291
|
-
mode:
|
|
58292
|
-
modelValue:
|
|
58293
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((
|
|
58294
|
-
onOnCreated:
|
|
58295
|
-
onOnDestroyed:
|
|
58296
|
-
onOnChange:
|
|
58297
|
-
style:
|
|
58298
|
-
}, null, 8 /* PROPS */, ["editor-id", "default-config", "mode", "modelValue", "onOnCreated", "onOnDestroyed", "onOnChange"])
|
|
58330
|
+
"editor-id": _ctx.editorId,
|
|
58331
|
+
"default-config": _ctx.editorConfig,
|
|
58332
|
+
mode: _ctx.mode,
|
|
58333
|
+
modelValue: _ctx.defaultHtml,
|
|
58334
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.defaultHtml) = $event)),
|
|
58335
|
+
onOnCreated: _ctx.handleCreated,
|
|
58336
|
+
onOnDestroyed: _ctx.handleDestroyed,
|
|
58337
|
+
onOnChange: _ctx.handleChange,
|
|
58338
|
+
style: normalizeStyle(_ctx.editorStyle)
|
|
58339
|
+
}, null, 8 /* PROPS */, ["editor-id", "default-config", "mode", "modelValue", "onOnCreated", "onOnDestroyed", "onOnChange", "style"])
|
|
58299
58340
|
]))
|
|
58300
58341
|
}
|
|
58301
58342
|
|