mali-ui-plus 0.1.14 → 0.1.15
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/lib/mali-ui-plus.common.js +97 -8
- package/lib/mali-ui-plus.umd.js +97 -8
- package/lib/mali-ui-plus.umd.min.js +3 -3
- package/package.json +1 -1
- package/types/index.d.ts +4 -2
|
@@ -7089,7 +7089,7 @@ __webpack_require__(7658);
|
|
|
7089
7089
|
}
|
|
7090
7090
|
if (height) {
|
|
7091
7091
|
height = _removeUnit(height);
|
|
7092
|
-
editHeight = _removeUnit(height) - self.toolbar.div.height() - self.statusbar.height();
|
|
7092
|
+
var editHeight = _removeUnit(height) - self.toolbar.div.height() - self.statusbar.height();
|
|
7093
7093
|
editHeight = editHeight < self.minHeight ? self.minHeight : editHeight;
|
|
7094
7094
|
self.edit.setHeight(editHeight);
|
|
7095
7095
|
if (updateProp) {
|
|
@@ -68983,29 +68983,117 @@ const MlCard_exports_ = MlCardvue_type_script_lang_ts_setup_true;
|
|
|
68983
68983
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-41.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/ml-kindeditor/MlKindeditor.vue?vue&type=script&lang=ts&setup=true
|
|
68984
68984
|
|
|
68985
68985
|
|
|
68986
|
-
const MlKindeditorvue_type_script_lang_ts_setup_true_hoisted_1 =
|
|
68986
|
+
const MlKindeditorvue_type_script_lang_ts_setup_true_hoisted_1 = {
|
|
68987
|
+
class: "ml-kindeditor"
|
|
68988
|
+
};
|
|
68989
|
+
const MlKindeditorvue_type_script_lang_ts_setup_true_hoisted_2 = ["id"];
|
|
68987
68990
|
|
|
68988
68991
|
|
|
68989
68992
|
|
|
68990
68993
|
/* harmony default export */ var MlKindeditorvue_type_script_lang_ts_setup_true = (/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
68991
68994
|
__name: 'MlKindeditor',
|
|
68992
|
-
|
|
68995
|
+
props: {
|
|
68996
|
+
modelValue: String,
|
|
68997
|
+
width: {
|
|
68998
|
+
type: String,
|
|
68999
|
+
default: '100%'
|
|
69000
|
+
},
|
|
69001
|
+
height: {
|
|
69002
|
+
type: String,
|
|
69003
|
+
default: '300px'
|
|
69004
|
+
}
|
|
69005
|
+
},
|
|
69006
|
+
emits: ["update:modelValue", "change"],
|
|
69007
|
+
setup(__props, {
|
|
69008
|
+
expose,
|
|
69009
|
+
emit
|
|
69010
|
+
}) {
|
|
69011
|
+
const props = __props;
|
|
69012
|
+
const $xeform = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeform', null);
|
|
69013
|
+
const $xeformiteminfo = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeformiteminfo', null);
|
|
69014
|
+
const mlForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('mlForm', null);
|
|
68993
69015
|
const editId = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(xe_utils_default().uniqueId('editor'));
|
|
69016
|
+
const textareaRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
68994
69017
|
let editor;
|
|
69018
|
+
let isModelUpdate = false;
|
|
69019
|
+
const setHtml = content => {
|
|
69020
|
+
if (editor) {
|
|
69021
|
+
editor.html(content || '');
|
|
69022
|
+
}
|
|
69023
|
+
};
|
|
69024
|
+
const getHtml = () => {
|
|
69025
|
+
if (editor) {
|
|
69026
|
+
return editor.html();
|
|
69027
|
+
}
|
|
69028
|
+
return '';
|
|
69029
|
+
};
|
|
69030
|
+
const keyupEvent = e => {
|
|
69031
|
+
isModelUpdate = true;
|
|
69032
|
+
const value = getHtml();
|
|
69033
|
+
// 自动更新校验状态
|
|
69034
|
+
if ($xeform && $xeformiteminfo) {
|
|
69035
|
+
$xeform.triggerItemEvent(e, $xeformiteminfo.itemConfig.field, value);
|
|
69036
|
+
if (mlForm) {
|
|
69037
|
+
mlForm.changeItemValue($xeformiteminfo.itemConfig.field);
|
|
69038
|
+
}
|
|
69039
|
+
}
|
|
69040
|
+
emit('update:modelValue', value);
|
|
69041
|
+
emit('change', {
|
|
69042
|
+
value
|
|
69043
|
+
});
|
|
69044
|
+
};
|
|
69045
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.modelValue, val => {
|
|
69046
|
+
if (!isModelUpdate) {
|
|
69047
|
+
setHtml(val);
|
|
69048
|
+
}
|
|
69049
|
+
isModelUpdate = false;
|
|
69050
|
+
});
|
|
69051
|
+
expose({
|
|
69052
|
+
setHtml,
|
|
69053
|
+
getHtml,
|
|
69054
|
+
sync() {
|
|
69055
|
+
if (editor) {
|
|
69056
|
+
editor.sync();
|
|
69057
|
+
}
|
|
69058
|
+
},
|
|
69059
|
+
focus() {
|
|
69060
|
+
if (editor) {
|
|
69061
|
+
editor.blur();
|
|
69062
|
+
}
|
|
69063
|
+
},
|
|
69064
|
+
blur() {
|
|
69065
|
+
if (editor) {
|
|
69066
|
+
editor.blur();
|
|
69067
|
+
}
|
|
69068
|
+
}
|
|
69069
|
+
});
|
|
68995
69070
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
68996
69071
|
editor = kindeditor.create(`#${editId.value}`, {
|
|
68997
|
-
loadStyleMode: false
|
|
69072
|
+
loadStyleMode: false,
|
|
69073
|
+
resizeType: 0,
|
|
69074
|
+
items: ['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'cut', 'copy', 'paste', 'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript', 'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'insertfile', 'table', 'hr', 'pagebreak', 'link', 'unlink']
|
|
68998
69075
|
});
|
|
69076
|
+
editor.cmd.doc.onkeyup = keyupEvent;
|
|
69077
|
+
if (props.modelValue) {
|
|
69078
|
+
setHtml(props.modelValue);
|
|
69079
|
+
}
|
|
68999
69080
|
});
|
|
69000
69081
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
69001
69082
|
if (editor) {
|
|
69083
|
+
editor.cmd.doc.onkeyup = null;
|
|
69002
69084
|
editor.remove();
|
|
69003
69085
|
}
|
|
69004
69086
|
});
|
|
69005
69087
|
return (_ctx, _cache) => {
|
|
69006
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
69007
|
-
|
|
69008
|
-
|
|
69088
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", MlKindeditorvue_type_script_lang_ts_setup_true_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("textarea", {
|
|
69089
|
+
ref_key: "textareaRef",
|
|
69090
|
+
ref: textareaRef,
|
|
69091
|
+
id: editId.value,
|
|
69092
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)({
|
|
69093
|
+
width: __props.width,
|
|
69094
|
+
height: __props.height
|
|
69095
|
+
})
|
|
69096
|
+
}, null, 12, MlKindeditorvue_type_script_lang_ts_setup_true_hoisted_2)]);
|
|
69009
69097
|
};
|
|
69010
69098
|
}
|
|
69011
69099
|
}));
|
|
@@ -70678,7 +70766,8 @@ function index_config(options) {
|
|
|
70678
70766
|
return config_0;
|
|
70679
70767
|
}
|
|
70680
70768
|
const MaliUIPlus = {
|
|
70681
|
-
version: "0.1.
|
|
70769
|
+
version: "0.1.14",
|
|
70770
|
+
modal: index_esm.modal,
|
|
70682
70771
|
install: index_install,
|
|
70683
70772
|
config: index_config,
|
|
70684
70773
|
VXETable: index_esm,
|
package/lib/mali-ui-plus.umd.js
CHANGED
|
@@ -7099,7 +7099,7 @@ __webpack_require__(7658);
|
|
|
7099
7099
|
}
|
|
7100
7100
|
if (height) {
|
|
7101
7101
|
height = _removeUnit(height);
|
|
7102
|
-
editHeight = _removeUnit(height) - self.toolbar.div.height() - self.statusbar.height();
|
|
7102
|
+
var editHeight = _removeUnit(height) - self.toolbar.div.height() - self.statusbar.height();
|
|
7103
7103
|
editHeight = editHeight < self.minHeight ? self.minHeight : editHeight;
|
|
7104
7104
|
self.edit.setHeight(editHeight);
|
|
7105
7105
|
if (updateProp) {
|
|
@@ -68993,29 +68993,117 @@ const MlCard_exports_ = MlCardvue_type_script_lang_ts_setup_true;
|
|
|
68993
68993
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-86.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/ml-kindeditor/MlKindeditor.vue?vue&type=script&lang=ts&setup=true
|
|
68994
68994
|
|
|
68995
68995
|
|
|
68996
|
-
const MlKindeditorvue_type_script_lang_ts_setup_true_hoisted_1 =
|
|
68996
|
+
const MlKindeditorvue_type_script_lang_ts_setup_true_hoisted_1 = {
|
|
68997
|
+
class: "ml-kindeditor"
|
|
68998
|
+
};
|
|
68999
|
+
const MlKindeditorvue_type_script_lang_ts_setup_true_hoisted_2 = ["id"];
|
|
68997
69000
|
|
|
68998
69001
|
|
|
68999
69002
|
|
|
69000
69003
|
/* harmony default export */ var MlKindeditorvue_type_script_lang_ts_setup_true = (/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
69001
69004
|
__name: 'MlKindeditor',
|
|
69002
|
-
|
|
69005
|
+
props: {
|
|
69006
|
+
modelValue: String,
|
|
69007
|
+
width: {
|
|
69008
|
+
type: String,
|
|
69009
|
+
default: '100%'
|
|
69010
|
+
},
|
|
69011
|
+
height: {
|
|
69012
|
+
type: String,
|
|
69013
|
+
default: '300px'
|
|
69014
|
+
}
|
|
69015
|
+
},
|
|
69016
|
+
emits: ["update:modelValue", "change"],
|
|
69017
|
+
setup(__props, {
|
|
69018
|
+
expose,
|
|
69019
|
+
emit
|
|
69020
|
+
}) {
|
|
69021
|
+
const props = __props;
|
|
69022
|
+
const $xeform = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeform', null);
|
|
69023
|
+
const $xeformiteminfo = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeformiteminfo', null);
|
|
69024
|
+
const mlForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('mlForm', null);
|
|
69003
69025
|
const editId = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(xe_utils_default().uniqueId('editor'));
|
|
69026
|
+
const textareaRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
69004
69027
|
let editor;
|
|
69028
|
+
let isModelUpdate = false;
|
|
69029
|
+
const setHtml = content => {
|
|
69030
|
+
if (editor) {
|
|
69031
|
+
editor.html(content || '');
|
|
69032
|
+
}
|
|
69033
|
+
};
|
|
69034
|
+
const getHtml = () => {
|
|
69035
|
+
if (editor) {
|
|
69036
|
+
return editor.html();
|
|
69037
|
+
}
|
|
69038
|
+
return '';
|
|
69039
|
+
};
|
|
69040
|
+
const keyupEvent = e => {
|
|
69041
|
+
isModelUpdate = true;
|
|
69042
|
+
const value = getHtml();
|
|
69043
|
+
// 自动更新校验状态
|
|
69044
|
+
if ($xeform && $xeformiteminfo) {
|
|
69045
|
+
$xeform.triggerItemEvent(e, $xeformiteminfo.itemConfig.field, value);
|
|
69046
|
+
if (mlForm) {
|
|
69047
|
+
mlForm.changeItemValue($xeformiteminfo.itemConfig.field);
|
|
69048
|
+
}
|
|
69049
|
+
}
|
|
69050
|
+
emit('update:modelValue', value);
|
|
69051
|
+
emit('change', {
|
|
69052
|
+
value
|
|
69053
|
+
});
|
|
69054
|
+
};
|
|
69055
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.modelValue, val => {
|
|
69056
|
+
if (!isModelUpdate) {
|
|
69057
|
+
setHtml(val);
|
|
69058
|
+
}
|
|
69059
|
+
isModelUpdate = false;
|
|
69060
|
+
});
|
|
69061
|
+
expose({
|
|
69062
|
+
setHtml,
|
|
69063
|
+
getHtml,
|
|
69064
|
+
sync() {
|
|
69065
|
+
if (editor) {
|
|
69066
|
+
editor.sync();
|
|
69067
|
+
}
|
|
69068
|
+
},
|
|
69069
|
+
focus() {
|
|
69070
|
+
if (editor) {
|
|
69071
|
+
editor.blur();
|
|
69072
|
+
}
|
|
69073
|
+
},
|
|
69074
|
+
blur() {
|
|
69075
|
+
if (editor) {
|
|
69076
|
+
editor.blur();
|
|
69077
|
+
}
|
|
69078
|
+
}
|
|
69079
|
+
});
|
|
69005
69080
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
69006
69081
|
editor = kindeditor.create(`#${editId.value}`, {
|
|
69007
|
-
loadStyleMode: false
|
|
69082
|
+
loadStyleMode: false,
|
|
69083
|
+
resizeType: 0,
|
|
69084
|
+
items: ['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'cut', 'copy', 'paste', 'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript', 'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'insertfile', 'table', 'hr', 'pagebreak', 'link', 'unlink']
|
|
69008
69085
|
});
|
|
69086
|
+
editor.cmd.doc.onkeyup = keyupEvent;
|
|
69087
|
+
if (props.modelValue) {
|
|
69088
|
+
setHtml(props.modelValue);
|
|
69089
|
+
}
|
|
69009
69090
|
});
|
|
69010
69091
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
69011
69092
|
if (editor) {
|
|
69093
|
+
editor.cmd.doc.onkeyup = null;
|
|
69012
69094
|
editor.remove();
|
|
69013
69095
|
}
|
|
69014
69096
|
});
|
|
69015
69097
|
return (_ctx, _cache) => {
|
|
69016
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
69017
|
-
|
|
69018
|
-
|
|
69098
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", MlKindeditorvue_type_script_lang_ts_setup_true_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("textarea", {
|
|
69099
|
+
ref_key: "textareaRef",
|
|
69100
|
+
ref: textareaRef,
|
|
69101
|
+
id: editId.value,
|
|
69102
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)({
|
|
69103
|
+
width: __props.width,
|
|
69104
|
+
height: __props.height
|
|
69105
|
+
})
|
|
69106
|
+
}, null, 12, MlKindeditorvue_type_script_lang_ts_setup_true_hoisted_2)]);
|
|
69019
69107
|
};
|
|
69020
69108
|
}
|
|
69021
69109
|
}));
|
|
@@ -70688,7 +70776,8 @@ function index_config(options) {
|
|
|
70688
70776
|
return config_0;
|
|
70689
70777
|
}
|
|
70690
70778
|
const MaliUIPlus = {
|
|
70691
|
-
version: "0.1.
|
|
70779
|
+
version: "0.1.14",
|
|
70780
|
+
modal: index_esm.modal,
|
|
70692
70781
|
install: index_install,
|
|
70693
70782
|
config: index_config,
|
|
70694
70783
|
VXETable: index_esm,
|