eoss 0.1.0-alpha.30 → 0.1.0-alpha.32
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/eoss.common.js +503 -324
- package/lib/index.js +1 -1
- package/lib/lowcode-view.js +194 -113
- package/lib/lowcode.js +155 -104
- package/lib/main.js +104 -47
- package/lib/process-config.js +14 -18
- package/lib/process-module.js +9 -12
- package/lib/process-rule.js +2 -5
- package/lib/tabs.js +4 -0
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/lowcode-view.css +1 -1
- package/lib/theme-chalk/tabs.css +1 -1
- package/lib/wujie.js +2 -3
- package/package.json +1 -1
- package/packages/lowcode/src/attribute/javascript.vue +2 -0
- package/packages/lowcode/src/attribute/property.vue +38 -56
- package/packages/lowcode/src/attribute.vue +3 -1
- package/packages/lowcode/src/lowcode.vue +8 -2
- package/packages/lowcode/src/pages.vue +0 -1
- package/packages/lowcode/src/render.vue +15 -1
- package/packages/lowcode/src/util/source-generator.js +29 -15
- package/packages/lowcode/src/util/source-parser.js +35 -3
- package/packages/lowcode-view/src/{Modulels.vue → Modules.vue} +63 -74
- package/packages/lowcode-view/src/view.vue +54 -14
- package/packages/main/src/components/pages.vue +4 -1
- package/packages/main/src/components/router-page.vue +29 -1
- package/packages/main/src/components/sub-menu.vue +2 -0
- package/packages/main/src/early.vue +1 -0
- package/packages/main/src/gzw.vue +1 -0
- package/packages/main/src/minxs.js +13 -1
- package/packages/process-config/src/NodeConfig.vue +0 -1
- package/packages/process-config/src/NodeForm.vue +0 -1
- package/packages/process-module/src/FormList.vue +0 -1
- package/packages/process-module/src/main.vue +0 -2
- package/packages/process-rule/src/main.vue +0 -3
- package/packages/tabs/src/tabs.vue +5 -1
- package/packages/theme-chalk/src/lowcode-view.scss +1 -0
- package/packages/theme-chalk/src/tabs.scss +2 -1
- package/packages/wujie/src/wujie.vue +0 -1
- package/src/index.js +1 -1
package/lib/lowcode.js
CHANGED
|
@@ -4323,7 +4323,7 @@ module.exports = require("lodash/get");
|
|
|
4323
4323
|
// ESM COMPAT FLAG
|
|
4324
4324
|
__webpack_require__.r(__webpack_exports__);
|
|
4325
4325
|
|
|
4326
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/lowcode.vue?vue&type=template&id=
|
|
4326
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/lowcode.vue?vue&type=template&id=ac68474e&
|
|
4327
4327
|
var render = function () {
|
|
4328
4328
|
var _vm = this
|
|
4329
4329
|
var _h = _vm.$createElement
|
|
@@ -4408,7 +4408,7 @@ var render = function () {
|
|
|
4408
4408
|
attrs: {
|
|
4409
4409
|
title: "信息完善",
|
|
4410
4410
|
width: "600px",
|
|
4411
|
-
height: "
|
|
4411
|
+
height: "442px",
|
|
4412
4412
|
visible: _vm.visible,
|
|
4413
4413
|
"close-on-click-modal": false,
|
|
4414
4414
|
},
|
|
@@ -4447,6 +4447,23 @@ var render = function () {
|
|
|
4447
4447
|
],
|
|
4448
4448
|
1
|
|
4449
4449
|
),
|
|
4450
|
+
_c(
|
|
4451
|
+
"es-form-item",
|
|
4452
|
+
{ attrs: { label: "编码", prop: "code" } },
|
|
4453
|
+
[
|
|
4454
|
+
_c("es-input", {
|
|
4455
|
+
attrs: { placeholder: "请输入编码" },
|
|
4456
|
+
model: {
|
|
4457
|
+
value: _vm.form.code,
|
|
4458
|
+
callback: function ($$v) {
|
|
4459
|
+
_vm.$set(_vm.form, "code", $$v)
|
|
4460
|
+
},
|
|
4461
|
+
expression: "form.code",
|
|
4462
|
+
},
|
|
4463
|
+
}),
|
|
4464
|
+
],
|
|
4465
|
+
1
|
|
4466
|
+
),
|
|
4450
4467
|
_c(
|
|
4451
4468
|
"es-form-item",
|
|
4452
4469
|
{ attrs: { label: "描述", prop: "description" } },
|
|
@@ -4795,7 +4812,7 @@ var staticRenderFns = []
|
|
|
4795
4812
|
render._withStripped = true
|
|
4796
4813
|
|
|
4797
4814
|
|
|
4798
|
-
// CONCATENATED MODULE: ./packages/lowcode/src/lowcode.vue?vue&type=template&id=
|
|
4815
|
+
// CONCATENATED MODULE: ./packages/lowcode/src/lowcode.vue?vue&type=template&id=ac68474e&
|
|
4799
4816
|
|
|
4800
4817
|
// EXTERNAL MODULE: external "vue"
|
|
4801
4818
|
var external_vue_ = __webpack_require__(2);
|
|
@@ -5579,8 +5596,8 @@ asidevue_type_template_id_c91dd452_render._withStripped = true
|
|
|
5579
5596
|
|
|
5580
5597
|
// CONCATENATED MODULE: ./packages/lowcode/src/aside.vue?vue&type=template&id=c91dd452&
|
|
5581
5598
|
|
|
5582
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/pages.vue?vue&type=template&id=
|
|
5583
|
-
var
|
|
5599
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/pages.vue?vue&type=template&id=efc766e8&
|
|
5600
|
+
var pagesvue_type_template_id_efc766e8_render = function () {
|
|
5584
5601
|
var _vm = this
|
|
5585
5602
|
var _h = _vm.$createElement
|
|
5586
5603
|
var _c = _vm._self._c || _h
|
|
@@ -5718,11 +5735,11 @@ var pagesvue_type_template_id_238a2346_render = function () {
|
|
|
5718
5735
|
1
|
|
5719
5736
|
)
|
|
5720
5737
|
}
|
|
5721
|
-
var
|
|
5722
|
-
|
|
5738
|
+
var pagesvue_type_template_id_efc766e8_staticRenderFns = []
|
|
5739
|
+
pagesvue_type_template_id_efc766e8_render._withStripped = true
|
|
5723
5740
|
|
|
5724
5741
|
|
|
5725
|
-
// CONCATENATED MODULE: ./packages/lowcode/src/pages.vue?vue&type=template&id=
|
|
5742
|
+
// CONCATENATED MODULE: ./packages/lowcode/src/pages.vue?vue&type=template&id=efc766e8&
|
|
5726
5743
|
|
|
5727
5744
|
// EXTERNAL MODULE: external "eoss/lib/tree"
|
|
5728
5745
|
var tree_ = __webpack_require__(49);
|
|
@@ -5890,7 +5907,6 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
5890
5907
|
* @param page 页面对象
|
|
5891
5908
|
*/
|
|
5892
5909
|
handleSelect: function handleSelect(data) {
|
|
5893
|
-
console.log('handleSelect', data);
|
|
5894
5910
|
if (data.childrens && data.childrens.length) {
|
|
5895
5911
|
return;
|
|
5896
5912
|
}
|
|
@@ -5968,8 +5984,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
5968
5984
|
|
|
5969
5985
|
var pages_component = Object(componentNormalizer["a" /* default */])(
|
|
5970
5986
|
src_pagesvue_type_script_lang_js_,
|
|
5971
|
-
|
|
5972
|
-
|
|
5987
|
+
pagesvue_type_template_id_efc766e8_render,
|
|
5988
|
+
pagesvue_type_template_id_efc766e8_staticRenderFns,
|
|
5973
5989
|
false,
|
|
5974
5990
|
null,
|
|
5975
5991
|
null,
|
|
@@ -6754,8 +6770,8 @@ canvasvue_type_template_id_3f236c3d_render._withStripped = true
|
|
|
6754
6770
|
|
|
6755
6771
|
// CONCATENATED MODULE: ./packages/lowcode/src/canvas.vue?vue&type=template&id=3f236c3d&
|
|
6756
6772
|
|
|
6757
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/render.vue?vue&type=template&id=
|
|
6758
|
-
var
|
|
6773
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/render.vue?vue&type=template&id=12ff94c0&
|
|
6774
|
+
var rendervue_type_template_id_12ff94c0_render = function () {
|
|
6759
6775
|
var _vm = this
|
|
6760
6776
|
var _h = _vm.$createElement
|
|
6761
6777
|
var _c = _vm._self._c || _h
|
|
@@ -6803,7 +6819,7 @@ var rendervue_type_template_id_35e81d00_render = function () {
|
|
|
6803
6819
|
"\n newNode.directives['show'] !== undefined\n ? newNode.directives['show']\n : true\n ",
|
|
6804
6820
|
},
|
|
6805
6821
|
],
|
|
6806
|
-
key: _vm.
|
|
6822
|
+
key: _vm.instanceKey,
|
|
6807
6823
|
tag: "component",
|
|
6808
6824
|
style: _vm.innerLayoutStyle,
|
|
6809
6825
|
},
|
|
@@ -7058,11 +7074,11 @@ var rendervue_type_template_id_35e81d00_render = function () {
|
|
|
7058
7074
|
2
|
|
7059
7075
|
)
|
|
7060
7076
|
}
|
|
7061
|
-
var
|
|
7062
|
-
|
|
7077
|
+
var rendervue_type_template_id_12ff94c0_staticRenderFns = []
|
|
7078
|
+
rendervue_type_template_id_12ff94c0_render._withStripped = true
|
|
7063
7079
|
|
|
7064
7080
|
|
|
7065
|
-
// CONCATENATED MODULE: ./packages/lowcode/src/render.vue?vue&type=template&id=
|
|
7081
|
+
// CONCATENATED MODULE: ./packages/lowcode/src/render.vue?vue&type=template&id=12ff94c0&
|
|
7066
7082
|
|
|
7067
7083
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/iframe.vue?vue&type=template&id=ceca7cf4&scoped=true&
|
|
7068
7084
|
var iframevue_type_template_id_ceca7cf4_scoped_true_render = function () {
|
|
@@ -7425,6 +7441,21 @@ var LAYOUT_PROPS = ['display', 'gap', 'grid-gap', 'grid-template-columns', 'flex
|
|
|
7425
7441
|
return result;
|
|
7426
7442
|
},
|
|
7427
7443
|
|
|
7444
|
+
/**
|
|
7445
|
+
* 组件实例 key:节点 id + props 签名。
|
|
7446
|
+
* 业务组件(如 backlog)在 created 里按 props 拉数据、不 watch prop 变化,
|
|
7447
|
+
* 源码视图改完 props 后必须换 key 强制重挂载,画布才会刷新
|
|
7448
|
+
*/
|
|
7449
|
+
instanceKey: function instanceKey() {
|
|
7450
|
+
var sig = '';
|
|
7451
|
+
try {
|
|
7452
|
+
sig = JSON.stringify(this.cleanProps);
|
|
7453
|
+
} catch (e) {
|
|
7454
|
+
sig = '';
|
|
7455
|
+
}
|
|
7456
|
+
return (this.newNode ? this.newNode.id : '') + ':' + sig;
|
|
7457
|
+
},
|
|
7458
|
+
|
|
7428
7459
|
/**
|
|
7429
7460
|
* 根据父容器布局类型调整子元素样式
|
|
7430
7461
|
* grid 模式下通过 grid-column: span N 控制跨列
|
|
@@ -7808,8 +7839,8 @@ var LAYOUT_PROPS = ['display', 'gap', 'grid-gap', 'grid-template-columns', 'flex
|
|
|
7808
7839
|
|
|
7809
7840
|
var render_component = Object(componentNormalizer["a" /* default */])(
|
|
7810
7841
|
src_rendervue_type_script_lang_js_,
|
|
7811
|
-
|
|
7812
|
-
|
|
7842
|
+
rendervue_type_template_id_12ff94c0_render,
|
|
7843
|
+
rendervue_type_template_id_12ff94c0_staticRenderFns,
|
|
7813
7844
|
false,
|
|
7814
7845
|
null,
|
|
7815
7846
|
null,
|
|
@@ -8490,8 +8521,8 @@ var canvas_component = Object(componentNormalizer["a" /* default */])(
|
|
|
8490
8521
|
)
|
|
8491
8522
|
|
|
8492
8523
|
/* harmony default export */ var canvas = (canvas_component.exports);
|
|
8493
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/attribute.vue?vue&type=template&id=
|
|
8494
|
-
var
|
|
8524
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/attribute.vue?vue&type=template&id=4827c20a&
|
|
8525
|
+
var attributevue_type_template_id_4827c20a_render = function () {
|
|
8495
8526
|
var _vm = this
|
|
8496
8527
|
var _h = _vm.$createElement
|
|
8497
8528
|
var _c = _vm._self._c || _h
|
|
@@ -8618,14 +8649,14 @@ var attributevue_type_template_id_47cd7152_render = function () {
|
|
|
8618
8649
|
1
|
|
8619
8650
|
)
|
|
8620
8651
|
}
|
|
8621
|
-
var
|
|
8622
|
-
|
|
8652
|
+
var attributevue_type_template_id_4827c20a_staticRenderFns = []
|
|
8653
|
+
attributevue_type_template_id_4827c20a_render._withStripped = true
|
|
8623
8654
|
|
|
8624
8655
|
|
|
8625
|
-
// CONCATENATED MODULE: ./packages/lowcode/src/attribute.vue?vue&type=template&id=
|
|
8656
|
+
// CONCATENATED MODULE: ./packages/lowcode/src/attribute.vue?vue&type=template&id=4827c20a&
|
|
8626
8657
|
|
|
8627
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/attribute/property.vue?vue&type=template&id=
|
|
8628
|
-
var
|
|
8658
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/attribute/property.vue?vue&type=template&id=69269d78&
|
|
8659
|
+
var propertyvue_type_template_id_69269d78_render = function () {
|
|
8629
8660
|
var _vm = this
|
|
8630
8661
|
var _h = _vm.$createElement
|
|
8631
8662
|
var _c = _vm._self._c || _h
|
|
@@ -8685,11 +8716,11 @@ var propertyvue_type_template_id_8e130472_render = function () {
|
|
|
8685
8716
|
1
|
|
8686
8717
|
)
|
|
8687
8718
|
}
|
|
8688
|
-
var
|
|
8689
|
-
|
|
8719
|
+
var propertyvue_type_template_id_69269d78_staticRenderFns = []
|
|
8720
|
+
propertyvue_type_template_id_69269d78_render._withStripped = true
|
|
8690
8721
|
|
|
8691
8722
|
|
|
8692
|
-
// CONCATENATED MODULE: ./packages/lowcode/src/attribute/property.vue?vue&type=template&id=
|
|
8723
|
+
// CONCATENATED MODULE: ./packages/lowcode/src/attribute/property.vue?vue&type=template&id=69269d78&
|
|
8693
8724
|
|
|
8694
8725
|
// CONCATENATED MODULE: ./packages/lowcode/src/util/source-generator.js
|
|
8695
8726
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
@@ -8769,6 +8800,11 @@ function genStyle(node) {
|
|
|
8769
8800
|
return " :style='{ " + parts.join(', ') + " }'";
|
|
8770
8801
|
}
|
|
8771
8802
|
|
|
8803
|
+
/** 属性值转义:& 与 " 转实体,解析端统一解码 */
|
|
8804
|
+
function escapeAttr(val) {
|
|
8805
|
+
return String(val).replace(/&/g, '&').replace(/"/g, '"');
|
|
8806
|
+
}
|
|
8807
|
+
|
|
8772
8808
|
/** 生成节点的 props 属性串 */
|
|
8773
8809
|
function genProps(node) {
|
|
8774
8810
|
var props = node.props;
|
|
@@ -8802,8 +8838,9 @@ function genProps(node) {
|
|
|
8802
8838
|
if (typeof val === 'number') {
|
|
8803
8839
|
return attrs + ' :' + key + '="' + val + '"';
|
|
8804
8840
|
}
|
|
8805
|
-
//
|
|
8806
|
-
|
|
8841
|
+
// 复杂值用绑定语法输出:单引号属性 + 紧凑 JSON(不转实体、不换行),
|
|
8842
|
+
// 解析端据此还原为真实数组/对象;值内单引号转 ' 避免截断属性
|
|
8843
|
+
return attrs + ' :' + key + "='" + JSON.stringify(val).replace(/'/g, ''') + "'";
|
|
8807
8844
|
}, '');
|
|
8808
8845
|
}
|
|
8809
8846
|
|
|
@@ -8914,15 +8951,18 @@ function genNode(node, indent) {
|
|
|
8914
8951
|
|
|
8915
8952
|
// 节点 id 以 data-id 输出,源码编辑后能原样解析回来
|
|
8916
8953
|
var idAttr = node.id ? ' data-id="' + node.id + '"' : '';
|
|
8954
|
+
// description 是编辑器标签(元信息),以属性承载,不作为插槽文本渲染;
|
|
8955
|
+
// 解析端对 description 属性单独识别,旧源码的文本写法仍兼容
|
|
8956
|
+
var descAttr = node.description ? ' description="' + escapeAttr(node.description) + '"' : '';
|
|
8917
8957
|
// 输出顺序:HTML 属性 + 组件 props + 指令 + 事件 + 样式
|
|
8918
|
-
var attrStr = idAttr + genAttrs(node) + genProps(node) + genDirectives(node) + genEvents(node) + genStyle(node);
|
|
8958
|
+
var attrStr = idAttr + descAttr + genAttrs(node) + genProps(node) + genDirectives(node) + genEvents(node) + genStyle(node);
|
|
8919
8959
|
var children = getChildren(node);
|
|
8920
8960
|
var lines = [];
|
|
8921
8961
|
|
|
8922
8962
|
// 检查是否有 text 指令
|
|
8923
8963
|
var vText = node.directives && node.directives['text'];
|
|
8924
8964
|
|
|
8925
|
-
if (!children.length && !
|
|
8965
|
+
if (!children.length && !vText) {
|
|
8926
8966
|
lines.push(pad + '<' + name + attrStr + '></' + name + '>');
|
|
8927
8967
|
return lines.join('\n');
|
|
8928
8968
|
}
|
|
@@ -8930,17 +8970,11 @@ function genNode(node, indent) {
|
|
|
8930
8970
|
if (vText) {
|
|
8931
8971
|
// v-text 属性转换为 {{xxx}} 形式
|
|
8932
8972
|
lines.push(pad + INDENT + '{{' + vText + '}}');
|
|
8933
|
-
} else {
|
|
8934
|
-
//
|
|
8935
|
-
|
|
8936
|
-
lines.push(
|
|
8937
|
-
}
|
|
8938
|
-
if (children.length) {
|
|
8939
|
-
// 子节点继续递归下钻
|
|
8940
|
-
children.forEach(function (child) {
|
|
8941
|
-
lines.push(genNode(child, indent + 1));
|
|
8942
|
-
});
|
|
8943
|
-
}
|
|
8973
|
+
} else if (children.length) {
|
|
8974
|
+
// 子节点继续递归下钻
|
|
8975
|
+
children.forEach(function (child) {
|
|
8976
|
+
lines.push(genNode(child, indent + 1));
|
|
8977
|
+
});
|
|
8944
8978
|
}
|
|
8945
8979
|
lines.push(pad + '</' + name + '>');
|
|
8946
8980
|
return lines.join('\n');
|
|
@@ -9424,6 +9458,27 @@ var propertyvue_type_script_lang_js_typeof = typeof Symbol === "function" && typ
|
|
|
9424
9458
|
this.$emit('edit', { name: item.name, label: item.label, cursorField: item.name }, scriptContent);
|
|
9425
9459
|
},
|
|
9426
9460
|
|
|
9461
|
+
/**
|
|
9462
|
+
* 字段值统一格式化为源码输出:对象或可解析的 JSON 字符串换行展开
|
|
9463
|
+
* (与整体源码编辑器的 serialize 缩进对齐);不可解析的字符串原样输出
|
|
9464
|
+
*/
|
|
9465
|
+
prettyJson: function prettyJson(val) {
|
|
9466
|
+
if (val === null || val === undefined || val === '') {
|
|
9467
|
+
return '';
|
|
9468
|
+
}
|
|
9469
|
+
if ((typeof val === 'undefined' ? 'undefined' : propertyvue_type_script_lang_js_typeof(val)) === 'object') {
|
|
9470
|
+
return JSON.stringify(val, null, 2);
|
|
9471
|
+
}
|
|
9472
|
+
if (typeof val === 'string') {
|
|
9473
|
+
try {
|
|
9474
|
+
return JSON.stringify(JSON.parse(val), null, 2);
|
|
9475
|
+
} catch (e) {
|
|
9476
|
+
return val;
|
|
9477
|
+
}
|
|
9478
|
+
}
|
|
9479
|
+
return String(val);
|
|
9480
|
+
},
|
|
9481
|
+
|
|
9427
9482
|
/**
|
|
9428
9483
|
* 构造完整的 Vue 组件源码(template + script + style)
|
|
9429
9484
|
* @returns {String} 完整的 Vue 组件源码
|
|
@@ -9434,33 +9489,13 @@ var propertyvue_type_script_lang_js_typeof = typeof Symbol === "function" && typ
|
|
|
9434
9489
|
var scriptParts = [];
|
|
9435
9490
|
|
|
9436
9491
|
// inject(始终输出,确保源码编辑器中可见)
|
|
9437
|
-
|
|
9438
|
-
if (injectValue && (typeof injectValue === 'undefined' ? 'undefined' : propertyvue_type_script_lang_js_typeof(injectValue)) === 'object') {
|
|
9439
|
-
scriptParts.push(' inject: ' + JSON.stringify(injectValue, null, 2));
|
|
9440
|
-
} else if (injectValue && injectValue !== '{}') {
|
|
9441
|
-
scriptParts.push(' inject: ' + injectValue);
|
|
9442
|
-
} else {
|
|
9443
|
-
scriptParts.push(' inject: {}');
|
|
9444
|
-
}
|
|
9492
|
+
scriptParts.push(' inject: ' + (this.prettyJson(this.models.inject) || '{}'));
|
|
9445
9493
|
|
|
9446
9494
|
// provide(始终输出)
|
|
9447
|
-
|
|
9448
|
-
if (provideValue && (typeof provideValue === 'undefined' ? 'undefined' : propertyvue_type_script_lang_js_typeof(provideValue)) === 'object') {
|
|
9449
|
-
scriptParts.push(' provide: ' + JSON.stringify(provideValue, null, 2));
|
|
9450
|
-
} else if (provideValue && provideValue !== '{}') {
|
|
9451
|
-
scriptParts.push(' provide: ' + provideValue);
|
|
9452
|
-
} else {
|
|
9453
|
-
scriptParts.push(' provide: {}');
|
|
9454
|
-
}
|
|
9495
|
+
scriptParts.push(' provide: ' + (this.prettyJson(this.models.provide) || '{}'));
|
|
9455
9496
|
|
|
9456
9497
|
// props
|
|
9457
|
-
|
|
9458
|
-
if (propsValue && Object.keys(propsValue).length > 0) {
|
|
9459
|
-
var propsStr = (typeof propsValue === 'undefined' ? 'undefined' : propertyvue_type_script_lang_js_typeof(propsValue)) === 'object' ? JSON.stringify(propsValue, null, 2) : propsValue;
|
|
9460
|
-
scriptParts.push(' props: ' + propsStr);
|
|
9461
|
-
} else {
|
|
9462
|
-
scriptParts.push(' props: {}');
|
|
9463
|
-
}
|
|
9498
|
+
scriptParts.push(' props: ' + (this.prettyJson(this.models.props) || '{}'));
|
|
9464
9499
|
|
|
9465
9500
|
// data
|
|
9466
9501
|
var dataValue = this.models.data;
|
|
@@ -9482,31 +9517,13 @@ var propertyvue_type_script_lang_js_typeof = typeof Symbol === "function" && typ
|
|
|
9482
9517
|
}
|
|
9483
9518
|
|
|
9484
9519
|
// computed
|
|
9485
|
-
|
|
9486
|
-
if (computedValue && Object.keys(computedValue).length > 0) {
|
|
9487
|
-
var computedStr = (typeof computedValue === 'undefined' ? 'undefined' : propertyvue_type_script_lang_js_typeof(computedValue)) === 'object' ? JSON.stringify(computedValue, null, 2) : computedValue;
|
|
9488
|
-
scriptParts.push(' computed: ' + computedStr);
|
|
9489
|
-
} else {
|
|
9490
|
-
scriptParts.push(' computed: {}');
|
|
9491
|
-
}
|
|
9520
|
+
scriptParts.push(' computed: ' + (this.prettyJson(this.models.computed) || '{}'));
|
|
9492
9521
|
|
|
9493
9522
|
// watch
|
|
9494
|
-
|
|
9495
|
-
if (watchValue && Object.keys(watchValue).length > 0) {
|
|
9496
|
-
var watchStr = (typeof watchValue === 'undefined' ? 'undefined' : propertyvue_type_script_lang_js_typeof(watchValue)) === 'object' ? JSON.stringify(watchValue, null, 2) : watchValue;
|
|
9497
|
-
scriptParts.push(' watch: ' + watchStr);
|
|
9498
|
-
} else {
|
|
9499
|
-
scriptParts.push(' watch: {}');
|
|
9500
|
-
}
|
|
9523
|
+
scriptParts.push(' watch: ' + (this.prettyJson(this.models.watch) || '{}'));
|
|
9501
9524
|
|
|
9502
9525
|
// methods
|
|
9503
|
-
|
|
9504
|
-
if (methodsValue && Object.keys(methodsValue).length > 0) {
|
|
9505
|
-
var methodsStr = (typeof methodsValue === 'undefined' ? 'undefined' : propertyvue_type_script_lang_js_typeof(methodsValue)) === 'object' ? JSON.stringify(methodsValue, null, 2) : methodsValue;
|
|
9506
|
-
scriptParts.push(' methods: ' + methodsStr);
|
|
9507
|
-
} else {
|
|
9508
|
-
scriptParts.push(' methods: {}');
|
|
9509
|
-
}
|
|
9526
|
+
scriptParts.push(' methods: ' + (this.prettyJson(this.models.methods) || '{}'));
|
|
9510
9527
|
|
|
9511
9528
|
// 生命周期钩子
|
|
9512
9529
|
var hooks = ['beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUpdate', 'updated', 'beforeDestroy', 'destroyed'];
|
|
@@ -9579,8 +9596,8 @@ var propertyvue_type_script_lang_js_typeof = typeof Symbol === "function" && typ
|
|
|
9579
9596
|
|
|
9580
9597
|
var property_component = Object(componentNormalizer["a" /* default */])(
|
|
9581
9598
|
attribute_propertyvue_type_script_lang_js_,
|
|
9582
|
-
|
|
9583
|
-
|
|
9599
|
+
propertyvue_type_template_id_69269d78_render,
|
|
9600
|
+
propertyvue_type_template_id_69269d78_staticRenderFns,
|
|
9584
9601
|
false,
|
|
9585
9602
|
null,
|
|
9586
9603
|
null,
|
|
@@ -12989,8 +13006,8 @@ var dependency_component = Object(componentNormalizer["a" /* default */])(
|
|
|
12989
13006
|
)
|
|
12990
13007
|
|
|
12991
13008
|
/* harmony default export */ var dependency = (dependency_component.exports);
|
|
12992
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/attribute/javascript.vue?vue&type=template&id=
|
|
12993
|
-
var
|
|
13009
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/attribute/javascript.vue?vue&type=template&id=35a5cdd5&
|
|
13010
|
+
var javascriptvue_type_template_id_35a5cdd5_render = function () {
|
|
12994
13011
|
var _vm = this
|
|
12995
13012
|
var _h = _vm.$createElement
|
|
12996
13013
|
var _c = _vm._self._c || _h
|
|
@@ -13008,11 +13025,11 @@ var javascriptvue_type_template_id_1a4c1312_render = function () {
|
|
|
13008
13025
|
},
|
|
13009
13026
|
})
|
|
13010
13027
|
}
|
|
13011
|
-
var
|
|
13012
|
-
|
|
13028
|
+
var javascriptvue_type_template_id_35a5cdd5_staticRenderFns = []
|
|
13029
|
+
javascriptvue_type_template_id_35a5cdd5_render._withStripped = true
|
|
13013
13030
|
|
|
13014
13031
|
|
|
13015
|
-
// CONCATENATED MODULE: ./packages/lowcode/src/attribute/javascript.vue?vue&type=template&id=
|
|
13032
|
+
// CONCATENATED MODULE: ./packages/lowcode/src/attribute/javascript.vue?vue&type=template&id=35a5cdd5&
|
|
13016
13033
|
|
|
13017
13034
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/lowcode/src/editor.vue?vue&type=template&id=32ebd7e1&
|
|
13018
13035
|
var editorvue_type_template_id_32ebd7e1_render = function () {
|
|
@@ -14185,6 +14202,8 @@ var editor_component = Object(componentNormalizer["a" /* default */])(
|
|
|
14185
14202
|
if (errors.length) {
|
|
14186
14203
|
// 修不了的错误展示在底部状态栏,拦截保存
|
|
14187
14204
|
this.$refs.editorRef.setErrors(errors);
|
|
14205
|
+
// 拦截时给出明确提示,避免「按了保存却没有任何反应」的错觉
|
|
14206
|
+
this.$message.warning('校验未通过,保存已拦截:' + errors[0].message);
|
|
14188
14207
|
return;
|
|
14189
14208
|
}
|
|
14190
14209
|
this.$emit('save', value);
|
|
@@ -14215,8 +14234,8 @@ var editor_component = Object(componentNormalizer["a" /* default */])(
|
|
|
14215
14234
|
|
|
14216
14235
|
var javascript_component = Object(componentNormalizer["a" /* default */])(
|
|
14217
14236
|
attribute_javascriptvue_type_script_lang_js_,
|
|
14218
|
-
|
|
14219
|
-
|
|
14237
|
+
javascriptvue_type_template_id_35a5cdd5_render,
|
|
14238
|
+
javascriptvue_type_template_id_35a5cdd5_staticRenderFns,
|
|
14220
14239
|
false,
|
|
14221
14240
|
null,
|
|
14222
14241
|
null,
|
|
@@ -14272,7 +14291,15 @@ function findBalanced(text, openIndex) {
|
|
|
14272
14291
|
return -1;
|
|
14273
14292
|
}
|
|
14274
14293
|
|
|
14275
|
-
/**
|
|
14294
|
+
/** 属性值实体解码:与生成端的 escapeAttr / ' 转义对应 */
|
|
14295
|
+
function decodeEntities(val) {
|
|
14296
|
+
if (typeof val !== 'string') {
|
|
14297
|
+
return val;
|
|
14298
|
+
}
|
|
14299
|
+
return val.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&');
|
|
14300
|
+
}
|
|
14301
|
+
|
|
14302
|
+
/** 解析标签属性:支持单/双引号,返回 { name, value, quote } 列表 */
|
|
14276
14303
|
function parseAttrs(str) {
|
|
14277
14304
|
var attrs = [];
|
|
14278
14305
|
var re = /([^\s=/>]+)(?:\s*=\s*("([^"]*)"|'([^']*)'))?/g;
|
|
@@ -14281,8 +14308,12 @@ function parseAttrs(str) {
|
|
|
14281
14308
|
if (!match[1]) {
|
|
14282
14309
|
continue;
|
|
14283
14310
|
}
|
|
14284
|
-
var
|
|
14285
|
-
attrs.push({
|
|
14311
|
+
var raw = match[3] !== undefined ? match[3] : match[4] !== undefined ? match[4] : null;
|
|
14312
|
+
attrs.push({
|
|
14313
|
+
name: match[1],
|
|
14314
|
+
value: raw === null ? null : decodeEntities(raw),
|
|
14315
|
+
quote: match[3] !== undefined ? '"' : "'"
|
|
14316
|
+
});
|
|
14286
14317
|
}
|
|
14287
14318
|
return attrs;
|
|
14288
14319
|
}
|
|
@@ -14297,6 +14328,11 @@ function applyAttrs(node, attrs) {
|
|
|
14297
14328
|
node.id = String(value);
|
|
14298
14329
|
return;
|
|
14299
14330
|
}
|
|
14331
|
+
if (name === 'description') {
|
|
14332
|
+
// 生成器以属性承载编辑器标签(元信息),不作为插槽文本
|
|
14333
|
+
node.description = String(value);
|
|
14334
|
+
return;
|
|
14335
|
+
}
|
|
14300
14336
|
if (name === ':style') {
|
|
14301
14337
|
// 支持生成器输出的对象字面量形式
|
|
14302
14338
|
if (typeof value === 'string' && value.trim().charAt(0) === '{') {
|
|
@@ -14317,6 +14353,16 @@ function applyAttrs(node, attrs) {
|
|
|
14317
14353
|
node.props = node.props || {};
|
|
14318
14354
|
var key = name.slice(1);
|
|
14319
14355
|
var trimmed = String(value).trim();
|
|
14356
|
+
// 单引号且以 [ / { 开头:生成器的复杂值载体(紧凑 JSON),还原为真实数组/对象;
|
|
14357
|
+
// 双引号仍按表达式字符串处理,保持历史语义
|
|
14358
|
+
if (attr.quote === "'" && /^[[{]/.test(trimmed)) {
|
|
14359
|
+
try {
|
|
14360
|
+
node.props[key] = new Function('return (' + trimmed + ');')();
|
|
14361
|
+
} catch (e) {
|
|
14362
|
+
node.props[key] = String(value);
|
|
14363
|
+
}
|
|
14364
|
+
return;
|
|
14365
|
+
}
|
|
14320
14366
|
// 数字/布尔直接还原类型,其它保留表达式字符串
|
|
14321
14367
|
if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
|
|
14322
14368
|
node.props[key] = Number(trimmed);
|
|
@@ -15008,7 +15054,9 @@ var NATIVE_HTML_TAGS = new Set(['a', 'abbr', 'address', 'area', 'article', 'asid
|
|
|
15008
15054
|
// 在 children 中查找(HTML 元素)
|
|
15009
15055
|
if (this.page.children && this.page.children.length) {
|
|
15010
15056
|
var found = this.findInTree(this.page.children, this.selected);
|
|
15011
|
-
|
|
15057
|
+
// 只有原生 HTML 标签才算 HTML 元素(脚本级字段归页面);
|
|
15058
|
+
// 业务组件(如 backlog)必须回写自身,否则编辑会误落到 page 上
|
|
15059
|
+
if (found && found.id) return this.isNativeHtmlTag(found.name);
|
|
15012
15060
|
}
|
|
15013
15061
|
return false;
|
|
15014
15062
|
},
|
|
@@ -15447,8 +15495,8 @@ var NATIVE_HTML_TAGS = new Set(['a', 'abbr', 'address', 'area', 'article', 'asid
|
|
|
15447
15495
|
|
|
15448
15496
|
var attribute_component = Object(componentNormalizer["a" /* default */])(
|
|
15449
15497
|
src_attributevue_type_script_lang_js_,
|
|
15450
|
-
|
|
15451
|
-
|
|
15498
|
+
attributevue_type_template_id_4827c20a_render,
|
|
15499
|
+
attributevue_type_template_id_4827c20a_staticRenderFns,
|
|
15452
15500
|
false,
|
|
15453
15501
|
null,
|
|
15454
15502
|
null,
|
|
@@ -16057,6 +16105,9 @@ function lowcodevue_type_script_lang_js_objectWithoutProperties(obj, keys) { var
|
|
|
16057
16105
|
//
|
|
16058
16106
|
//
|
|
16059
16107
|
//
|
|
16108
|
+
//
|
|
16109
|
+
//
|
|
16110
|
+
//
|
|
16060
16111
|
|
|
16061
16112
|
|
|
16062
16113
|
|
|
@@ -16195,7 +16246,7 @@ function lowcodevue_type_script_lang_js_objectWithoutProperties(obj, keys) { var
|
|
|
16195
16246
|
},
|
|
16196
16247
|
rules: {
|
|
16197
16248
|
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
|
16198
|
-
code: [{ required: true, message: '请输入编码', trigger: 'blur' }]
|
|
16249
|
+
code: [{ required: true, message: '请输入编码', trigger: 'blur' }, { pattern: /^[a-zA-Z_][a-zA-Z0-9_]*$/, trigger: 'blur' }]
|
|
16199
16250
|
//title: [{ required: true, message: '请输入页面标题', trigger: 'blur' }],
|
|
16200
16251
|
//description: [
|
|
16201
16252
|
// { required: true, message: '请输入描述', trigger: 'blur' }
|