@panpanzhao/component-ui 0.0.17 → 0.0.19
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/component-ui.common.js +545 -139
- package/lib/components/crud.js +23 -15
- package/lib/components/form-dialog.js +8 -3
- package/lib/components/form-drawer.js +51 -34
- package/lib/components/form-group.js +5 -3
- package/lib/components/form-input.js +25 -15
- package/lib/components/form-item.js +32 -11
- package/lib/components/form-query.js +606 -0
- package/lib/components/form-view-dialog.js +6 -3
- package/lib/components/form-view-group.js +6 -3
- package/lib/components/form-view.js +6 -3
- package/lib/components/form.js +5 -3
- package/lib/components/table-column.js +41 -25
- package/lib/components/table-editable.js +2 -1
- package/lib/components/table-operate.js +17 -8
- package/lib/components/table.js +16 -6
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/components/crud.js
CHANGED
|
@@ -215,7 +215,7 @@ module.exports = require("@panpanzhao/component-ui/lib/utils/formula");
|
|
|
215
215
|
// ESM COMPAT FLAG
|
|
216
216
|
__webpack_require__.r(__webpack_exports__);
|
|
217
217
|
|
|
218
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=
|
|
218
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=5d1533a2&
|
|
219
219
|
var render = function render() {
|
|
220
220
|
var _vm = this,
|
|
221
221
|
_c = _vm._self._c
|
|
@@ -286,7 +286,7 @@ var staticRenderFns = []
|
|
|
286
286
|
render._withStripped = true
|
|
287
287
|
|
|
288
288
|
|
|
289
|
-
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=
|
|
289
|
+
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=5d1533a2&
|
|
290
290
|
|
|
291
291
|
// EXTERNAL MODULE: external "element-ui/lib/form"
|
|
292
292
|
var form_ = __webpack_require__(12);
|
|
@@ -382,7 +382,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
382
382
|
if (item.show === false) {
|
|
383
383
|
return false;
|
|
384
384
|
}
|
|
385
|
-
if (typeof item.show === "function" && !item.show.call(_this, {
|
|
385
|
+
if (typeof item.show === "function" && !item.show.call(_this, _this.formModel, {
|
|
386
386
|
form: _this,
|
|
387
387
|
formModel: _this.formModel,
|
|
388
388
|
config: item
|
|
@@ -417,6 +417,8 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
417
417
|
},
|
|
418
418
|
created: function created() {
|
|
419
419
|
var _this2 = this;
|
|
420
|
+
console.log(this.formItems);
|
|
421
|
+
debugger;
|
|
420
422
|
this.formItems.forEach(function (item) {
|
|
421
423
|
_this2.formItemLayout[item.prop] = item;
|
|
422
424
|
if (typeof item.value === "function") {
|
|
@@ -552,7 +554,7 @@ module.exports = require("element-ui/lib/collapse-item");
|
|
|
552
554
|
// ESM COMPAT FLAG
|
|
553
555
|
__webpack_require__.r(__webpack_exports__);
|
|
554
556
|
|
|
555
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-view/src/index.vue?vue&type=template&id=
|
|
557
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-view/src/index.vue?vue&type=template&id=32454b68&
|
|
556
558
|
var render = function render() {
|
|
557
559
|
var _vm = this,
|
|
558
560
|
_c = _vm._self._c
|
|
@@ -599,7 +601,7 @@ var staticRenderFns = []
|
|
|
599
601
|
render._withStripped = true
|
|
600
602
|
|
|
601
603
|
|
|
602
|
-
// CONCATENATED MODULE: ./src/components/form-view/src/index.vue?vue&type=template&id=
|
|
604
|
+
// CONCATENATED MODULE: ./src/components/form-view/src/index.vue?vue&type=template&id=32454b68&
|
|
603
605
|
|
|
604
606
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions"
|
|
605
607
|
var descriptions_ = __webpack_require__(18);
|
|
@@ -630,6 +632,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
630
632
|
props: {
|
|
631
633
|
prop: String,
|
|
632
634
|
labelWidth: String,
|
|
635
|
+
labelPosition: String,
|
|
633
636
|
formItems: {
|
|
634
637
|
type: Array,
|
|
635
638
|
default: function _default() {
|
|
@@ -647,8 +650,10 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
647
650
|
formProps: function formProps() {
|
|
648
651
|
return Object.assign({
|
|
649
652
|
border: true,
|
|
653
|
+
direction: this.labelPosition === "top" ? "vertical" : "horizontal",
|
|
650
654
|
labelStyle: {
|
|
651
|
-
width: this.labelWidth
|
|
655
|
+
width: this.labelWidth,
|
|
656
|
+
textAlign: this.labelPosition
|
|
652
657
|
}
|
|
653
658
|
}, this.$attrs);
|
|
654
659
|
},
|
|
@@ -1564,6 +1569,9 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1564
1569
|
return this.api.request || this.request || (this.$COMPONENT || {}).request;
|
|
1565
1570
|
}
|
|
1566
1571
|
},
|
|
1572
|
+
created: function created() {
|
|
1573
|
+
console.log(this.form);
|
|
1574
|
+
},
|
|
1567
1575
|
methods: {
|
|
1568
1576
|
open: function open(model, expandModel) {
|
|
1569
1577
|
var _this2 = this;
|
|
@@ -2056,7 +2064,7 @@ module.exports = require("element-ui/lib/message-box");
|
|
|
2056
2064
|
// ESM COMPAT FLAG
|
|
2057
2065
|
__webpack_require__.r(__webpack_exports__);
|
|
2058
2066
|
|
|
2059
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=
|
|
2067
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=8fb8bc56&
|
|
2060
2068
|
var render = function render() {
|
|
2061
2069
|
var _vm = this,
|
|
2062
2070
|
_c = _vm._self._c
|
|
@@ -2127,7 +2135,7 @@ var staticRenderFns = []
|
|
|
2127
2135
|
render._withStripped = true
|
|
2128
2136
|
|
|
2129
2137
|
|
|
2130
|
-
// CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=
|
|
2138
|
+
// CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=8fb8bc56&
|
|
2131
2139
|
|
|
2132
2140
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-search"
|
|
2133
2141
|
var table_search_ = __webpack_require__(27);
|
|
@@ -2173,21 +2181,21 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2173
2181
|
};
|
|
2174
2182
|
},
|
|
2175
2183
|
createProps: function createProps() {
|
|
2176
|
-
return Object
|
|
2184
|
+
return Object(external_lodash_["merge"])({
|
|
2177
2185
|
dialog: {
|
|
2178
2186
|
title: "添加"
|
|
2179
2187
|
}
|
|
2180
2188
|
}, this.create);
|
|
2181
2189
|
},
|
|
2182
2190
|
updateProps: function updateProps() {
|
|
2183
|
-
return Object
|
|
2191
|
+
return Object(external_lodash_["merge"])({
|
|
2184
2192
|
dialog: {
|
|
2185
2193
|
title: "修改"
|
|
2186
2194
|
}
|
|
2187
2195
|
}, this.update);
|
|
2188
2196
|
},
|
|
2189
2197
|
viewProps: function viewProps() {
|
|
2190
|
-
return Object
|
|
2198
|
+
return Object(external_lodash_["merge"])({
|
|
2191
2199
|
dialog: {
|
|
2192
2200
|
title: "查看"
|
|
2193
2201
|
}
|
|
@@ -2263,7 +2271,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2263
2271
|
// 添加按钮处理
|
|
2264
2272
|
if (this.create) {
|
|
2265
2273
|
var tools = this.table && this.table.tools || [];
|
|
2266
|
-
tools.unshift(Object
|
|
2274
|
+
tools.unshift(Object(external_lodash_["merge"])({
|
|
2267
2275
|
label: "添加",
|
|
2268
2276
|
loading: false,
|
|
2269
2277
|
sort: 10,
|
|
@@ -2283,7 +2291,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2283
2291
|
var optColumn = filterColumns && filterColumns[0];
|
|
2284
2292
|
var items = optColumn && optColumn.items || [];
|
|
2285
2293
|
if (this.update) {
|
|
2286
|
-
items.push(Object
|
|
2294
|
+
items.push(Object(external_lodash_["merge"])({
|
|
2287
2295
|
label: "修改",
|
|
2288
2296
|
loading: false,
|
|
2289
2297
|
sort: 10,
|
|
@@ -2293,7 +2301,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2293
2301
|
}, this.update.tool));
|
|
2294
2302
|
}
|
|
2295
2303
|
if (this.view) {
|
|
2296
|
-
items.push(Object
|
|
2304
|
+
items.push(Object(external_lodash_["merge"])({
|
|
2297
2305
|
label: "查看",
|
|
2298
2306
|
loading: false,
|
|
2299
2307
|
sort: 20,
|
|
@@ -2303,7 +2311,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2303
2311
|
}, this.view.tool));
|
|
2304
2312
|
}
|
|
2305
2313
|
if (this.delete) {
|
|
2306
|
-
items.push(Object
|
|
2314
|
+
items.push(Object(external_lodash_["merge"])({
|
|
2307
2315
|
label: "删除",
|
|
2308
2316
|
loading: false,
|
|
2309
2317
|
sort: 30,
|
|
@@ -215,7 +215,7 @@ module.exports = require("@panpanzhao/component-ui/lib/utils/formula");
|
|
|
215
215
|
// ESM COMPAT FLAG
|
|
216
216
|
__webpack_require__.r(__webpack_exports__);
|
|
217
217
|
|
|
218
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=
|
|
218
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=5d1533a2&
|
|
219
219
|
var render = function render() {
|
|
220
220
|
var _vm = this,
|
|
221
221
|
_c = _vm._self._c
|
|
@@ -286,7 +286,7 @@ var staticRenderFns = []
|
|
|
286
286
|
render._withStripped = true
|
|
287
287
|
|
|
288
288
|
|
|
289
|
-
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=
|
|
289
|
+
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=5d1533a2&
|
|
290
290
|
|
|
291
291
|
// EXTERNAL MODULE: external "element-ui/lib/form"
|
|
292
292
|
var form_ = __webpack_require__(12);
|
|
@@ -382,7 +382,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
382
382
|
if (item.show === false) {
|
|
383
383
|
return false;
|
|
384
384
|
}
|
|
385
|
-
if (typeof item.show === "function" && !item.show.call(_this, {
|
|
385
|
+
if (typeof item.show === "function" && !item.show.call(_this, _this.formModel, {
|
|
386
386
|
form: _this,
|
|
387
387
|
formModel: _this.formModel,
|
|
388
388
|
config: item
|
|
@@ -417,6 +417,8 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
417
417
|
},
|
|
418
418
|
created: function created() {
|
|
419
419
|
var _this2 = this;
|
|
420
|
+
console.log(this.formItems);
|
|
421
|
+
debugger;
|
|
420
422
|
this.formItems.forEach(function (item) {
|
|
421
423
|
_this2.formItemLayout[item.prop] = item;
|
|
422
424
|
if (typeof item.value === "function") {
|
|
@@ -1119,6 +1121,9 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1119
1121
|
return this.api.request || this.request || (this.$COMPONENT || {}).request;
|
|
1120
1122
|
}
|
|
1121
1123
|
},
|
|
1124
|
+
created: function created() {
|
|
1125
|
+
console.log(this.form);
|
|
1126
|
+
},
|
|
1122
1127
|
methods: {
|
|
1123
1128
|
open: function open(model, expandModel) {
|
|
1124
1129
|
var _this2 = this;
|
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 80);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -616,7 +616,7 @@ module.exports = require("@panpanzhao/component-ui/lib/components/drawer");
|
|
|
616
616
|
// ESM COMPAT FLAG
|
|
617
617
|
__webpack_require__.r(__webpack_exports__);
|
|
618
618
|
|
|
619
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=
|
|
619
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=5d1533a2&
|
|
620
620
|
var render = function render() {
|
|
621
621
|
var _vm = this,
|
|
622
622
|
_c = _vm._self._c
|
|
@@ -687,7 +687,7 @@ var staticRenderFns = []
|
|
|
687
687
|
render._withStripped = true
|
|
688
688
|
|
|
689
689
|
|
|
690
|
-
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=
|
|
690
|
+
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=5d1533a2&
|
|
691
691
|
|
|
692
692
|
// EXTERNAL MODULE: external "element-ui/lib/form"
|
|
693
693
|
var form_ = __webpack_require__(12);
|
|
@@ -783,7 +783,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
783
783
|
if (item.show === false) {
|
|
784
784
|
return false;
|
|
785
785
|
}
|
|
786
|
-
if (typeof item.show === "function" && !item.show.call(_this, {
|
|
786
|
+
if (typeof item.show === "function" && !item.show.call(_this, _this.formModel, {
|
|
787
787
|
form: _this,
|
|
788
788
|
formModel: _this.formModel,
|
|
789
789
|
config: item
|
|
@@ -818,6 +818,8 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
818
818
|
},
|
|
819
819
|
created: function created() {
|
|
820
820
|
var _this2 = this;
|
|
821
|
+
console.log(this.formItems);
|
|
822
|
+
debugger;
|
|
821
823
|
this.formItems.forEach(function (item) {
|
|
822
824
|
_this2.formItemLayout[item.prop] = item;
|
|
823
825
|
if (typeof item.value === "function") {
|
|
@@ -938,7 +940,14 @@ module.exports = require("element-ui/lib/tab-pane");
|
|
|
938
940
|
|
|
939
941
|
/***/ }),
|
|
940
942
|
|
|
941
|
-
/***/
|
|
943
|
+
/***/ 8:
|
|
944
|
+
/***/ (function(module, exports) {
|
|
945
|
+
|
|
946
|
+
module.exports = require("element-ui/lib/collapse");
|
|
947
|
+
|
|
948
|
+
/***/ }),
|
|
949
|
+
|
|
950
|
+
/***/ 80:
|
|
942
951
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
943
952
|
|
|
944
953
|
"use strict";
|
|
@@ -1111,9 +1120,12 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1111
1120
|
},
|
|
1112
1121
|
methods: {
|
|
1113
1122
|
open: function open(model) {
|
|
1123
|
+
var _this2 = this;
|
|
1114
1124
|
this.show = true;
|
|
1115
1125
|
if (model) {
|
|
1116
|
-
this
|
|
1126
|
+
this.$nextTick(function () {
|
|
1127
|
+
_this2.setFormModel(model);
|
|
1128
|
+
});
|
|
1117
1129
|
}
|
|
1118
1130
|
},
|
|
1119
1131
|
close: function close() {
|
|
@@ -1127,31 +1139,31 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1127
1139
|
this.$refs.form && this.$refs.form.reset();
|
|
1128
1140
|
},
|
|
1129
1141
|
submit: function submit(button) {
|
|
1130
|
-
var
|
|
1142
|
+
var _this3 = this;
|
|
1131
1143
|
this.$refs.form.validate(function (isValidate, errorMessage) {
|
|
1132
1144
|
if (!isValidate) {
|
|
1133
1145
|
return false;
|
|
1134
1146
|
}
|
|
1135
|
-
var reqData = Object(external_lodash_["merge"])(
|
|
1136
|
-
if (!(
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1147
|
+
var reqData = Object(external_lodash_["merge"])(_this3.api.data || {}, _this3.formModel);
|
|
1148
|
+
if (!(_this3.api.url && _this3.request)) {
|
|
1149
|
+
_this3.$emit("success", null, reqData);
|
|
1150
|
+
_this3.reset();
|
|
1151
|
+
_this3.close();
|
|
1140
1152
|
return false;
|
|
1141
1153
|
}
|
|
1142
1154
|
button.loading = true;
|
|
1143
|
-
|
|
1144
|
-
url: Object(formula_["evaluate"])(
|
|
1145
|
-
method:
|
|
1155
|
+
_this3.request({
|
|
1156
|
+
url: Object(formula_["evaluate"])(_this3.api.url, reqData),
|
|
1157
|
+
method: _this3.api.method || "POST",
|
|
1146
1158
|
data: reqData
|
|
1147
1159
|
}).then(function (res) {
|
|
1148
1160
|
button.loading = false;
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1161
|
+
_this3.$emit("success", res, reqData);
|
|
1162
|
+
_this3.reset();
|
|
1163
|
+
_this3.close();
|
|
1152
1164
|
}).catch(function (error) {
|
|
1153
1165
|
button.loading = false;
|
|
1154
|
-
|
|
1166
|
+
_this3.$emit("error", error, reqData);
|
|
1155
1167
|
});
|
|
1156
1168
|
});
|
|
1157
1169
|
},
|
|
@@ -1171,16 +1183,28 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1171
1183
|
}, param]));
|
|
1172
1184
|
},
|
|
1173
1185
|
renderTitle: function renderTitle(h) {
|
|
1174
|
-
if (
|
|
1175
|
-
return this.
|
|
1186
|
+
if (this.$scopedSlots.title) {
|
|
1187
|
+
return this.$scopedSlots.title.call(this, {
|
|
1188
|
+
formModel: this.formModel
|
|
1189
|
+
});
|
|
1190
|
+
} else if (typeof this.slots.title === "function") {
|
|
1191
|
+
return this.slots.title.call(this, {
|
|
1192
|
+
formModel: this.formModel
|
|
1193
|
+
});
|
|
1176
1194
|
}
|
|
1177
|
-
return this.slots.title || this.drawer.title;
|
|
1195
|
+
return this.$slots.title || this.slots.title || this.drawer.title;
|
|
1178
1196
|
},
|
|
1179
1197
|
renderTools: function renderTools(h) {
|
|
1180
|
-
if (
|
|
1181
|
-
return this.
|
|
1198
|
+
if (this.$scopedSlots.footer) {
|
|
1199
|
+
return this.$scopedSlots.footer.call(this, {
|
|
1200
|
+
formModel: this.formModel
|
|
1201
|
+
});
|
|
1202
|
+
} else if (typeof this.slots.footer === "function") {
|
|
1203
|
+
return this.slots.footer.call(this, {
|
|
1204
|
+
formModel: this.formModel
|
|
1205
|
+
});
|
|
1182
1206
|
}
|
|
1183
|
-
return h("div", [(this.tools || this.defaultTools).map(function (item) {
|
|
1207
|
+
return h("div", [this.$slots.footer || (this.tools || this.defaultTools).map(function (item) {
|
|
1184
1208
|
var toolParam = {
|
|
1185
1209
|
attrs: Object.assign({}, item),
|
|
1186
1210
|
on: item.on
|
|
@@ -1190,7 +1214,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1190
1214
|
}
|
|
1191
1215
|
},
|
|
1192
1216
|
render: function render(h) {
|
|
1193
|
-
var
|
|
1217
|
+
var _this4 = this;
|
|
1194
1218
|
var param = {
|
|
1195
1219
|
attrs: Object.assign({
|
|
1196
1220
|
visible: this.show,
|
|
@@ -1199,7 +1223,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1199
1223
|
}, this.drawer),
|
|
1200
1224
|
on: Object.assign(this.on, {
|
|
1201
1225
|
close: function close() {
|
|
1202
|
-
|
|
1226
|
+
_this4.close();
|
|
1203
1227
|
}
|
|
1204
1228
|
})
|
|
1205
1229
|
};
|
|
@@ -1246,13 +1270,6 @@ src.install = function (Vue) {
|
|
|
1246
1270
|
|
|
1247
1271
|
/***/ }),
|
|
1248
1272
|
|
|
1249
|
-
/***/ 8:
|
|
1250
|
-
/***/ (function(module, exports) {
|
|
1251
|
-
|
|
1252
|
-
module.exports = require("element-ui/lib/collapse");
|
|
1253
|
-
|
|
1254
|
-
/***/ }),
|
|
1255
|
-
|
|
1256
1273
|
/***/ 9:
|
|
1257
1274
|
/***/ (function(module, exports) {
|
|
1258
1275
|
|
|
@@ -215,7 +215,7 @@ module.exports = require("@panpanzhao/component-ui/lib/utils/formula");
|
|
|
215
215
|
// ESM COMPAT FLAG
|
|
216
216
|
__webpack_require__.r(__webpack_exports__);
|
|
217
217
|
|
|
218
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=
|
|
218
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=5d1533a2&
|
|
219
219
|
var render = function render() {
|
|
220
220
|
var _vm = this,
|
|
221
221
|
_c = _vm._self._c
|
|
@@ -286,7 +286,7 @@ var staticRenderFns = []
|
|
|
286
286
|
render._withStripped = true
|
|
287
287
|
|
|
288
288
|
|
|
289
|
-
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=
|
|
289
|
+
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=5d1533a2&
|
|
290
290
|
|
|
291
291
|
// EXTERNAL MODULE: external "element-ui/lib/form"
|
|
292
292
|
var form_ = __webpack_require__(12);
|
|
@@ -382,7 +382,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
382
382
|
if (item.show === false) {
|
|
383
383
|
return false;
|
|
384
384
|
}
|
|
385
|
-
if (typeof item.show === "function" && !item.show.call(_this, {
|
|
385
|
+
if (typeof item.show === "function" && !item.show.call(_this, _this.formModel, {
|
|
386
386
|
form: _this,
|
|
387
387
|
formModel: _this.formModel,
|
|
388
388
|
config: item
|
|
@@ -417,6 +417,8 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
417
417
|
},
|
|
418
418
|
created: function created() {
|
|
419
419
|
var _this2 = this;
|
|
420
|
+
console.log(this.formItems);
|
|
421
|
+
debugger;
|
|
420
422
|
this.formItems.forEach(function (item) {
|
|
421
423
|
_this2.formItemLayout[item.prop] = item;
|
|
422
424
|
if (typeof item.value === "function") {
|
|
@@ -375,8 +375,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
375
375
|
var babel_helper_vue_jsx_merge_props_ = __webpack_require__(0);
|
|
376
376
|
var babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props_);
|
|
377
377
|
|
|
378
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Input.vue?vue&type=template&id=
|
|
379
|
-
var
|
|
378
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/Input.vue?vue&type=template&id=74fa485e&
|
|
379
|
+
var Inputvue_type_template_id_74fa485e_render = function render() {
|
|
380
380
|
var _vm = this,
|
|
381
381
|
_c = _vm._self._c
|
|
382
382
|
return _c(
|
|
@@ -428,10 +428,10 @@ var Inputvue_type_template_id_24c10975_render = function render() {
|
|
|
428
428
|
)
|
|
429
429
|
}
|
|
430
430
|
var staticRenderFns = []
|
|
431
|
-
|
|
431
|
+
Inputvue_type_template_id_74fa485e_render._withStripped = true
|
|
432
432
|
|
|
433
433
|
|
|
434
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/Input.vue?vue&type=template&id=
|
|
434
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/Input.vue?vue&type=template&id=74fa485e&
|
|
435
435
|
|
|
436
436
|
// EXTERNAL MODULE: external "element-ui/lib/input"
|
|
437
437
|
var input_ = __webpack_require__(22);
|
|
@@ -447,7 +447,11 @@ var input_default = /*#__PURE__*/__webpack_require__.n(input_);
|
|
|
447
447
|
props: {},
|
|
448
448
|
computed: {
|
|
449
449
|
attrs: function attrs() {
|
|
450
|
-
return Object.assign({
|
|
450
|
+
return Object.assign({
|
|
451
|
+
clearable: true,
|
|
452
|
+
placeholder: "请输入",
|
|
453
|
+
maxlength: 30
|
|
454
|
+
}, this.$attrs);
|
|
451
455
|
}
|
|
452
456
|
}
|
|
453
457
|
});
|
|
@@ -466,7 +470,7 @@ var componentNormalizer = __webpack_require__(1);
|
|
|
466
470
|
|
|
467
471
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
468
472
|
item_Inputvue_type_script_lang_js_,
|
|
469
|
-
|
|
473
|
+
Inputvue_type_template_id_74fa485e_render,
|
|
470
474
|
staticRenderFns,
|
|
471
475
|
false,
|
|
472
476
|
null,
|
|
@@ -476,8 +480,8 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
476
480
|
)
|
|
477
481
|
|
|
478
482
|
/* harmony default export */ var Input = (component.exports);
|
|
479
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/InputNumber.vue?vue&type=template&id=
|
|
480
|
-
var
|
|
483
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/item/InputNumber.vue?vue&type=template&id=6c463d52&
|
|
484
|
+
var InputNumbervue_type_template_id_6c463d52_render = function render() {
|
|
481
485
|
var _vm = this,
|
|
482
486
|
_c = _vm._self._c
|
|
483
487
|
return _c(
|
|
@@ -528,11 +532,11 @@ var InputNumbervue_type_template_id_7a2f5f6e_render = function render() {
|
|
|
528
532
|
)
|
|
529
533
|
)
|
|
530
534
|
}
|
|
531
|
-
var
|
|
532
|
-
|
|
535
|
+
var InputNumbervue_type_template_id_6c463d52_staticRenderFns = []
|
|
536
|
+
InputNumbervue_type_template_id_6c463d52_render._withStripped = true
|
|
533
537
|
|
|
534
538
|
|
|
535
|
-
// CONCATENATED MODULE: ./src/components/form/src/item/InputNumber.vue?vue&type=template&id=
|
|
539
|
+
// CONCATENATED MODULE: ./src/components/form/src/item/InputNumber.vue?vue&type=template&id=6c463d52&
|
|
536
540
|
|
|
537
541
|
// EXTERNAL MODULE: external "element-ui/lib/input-number"
|
|
538
542
|
var input_number_ = __webpack_require__(37);
|
|
@@ -548,7 +552,10 @@ var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
|
|
|
548
552
|
props: {},
|
|
549
553
|
computed: {
|
|
550
554
|
attrs: function attrs() {
|
|
551
|
-
return Object.assign({
|
|
555
|
+
return Object.assign({
|
|
556
|
+
clearable: true,
|
|
557
|
+
placeholder: "请输入"
|
|
558
|
+
}, this.$attrs);
|
|
552
559
|
}
|
|
553
560
|
}
|
|
554
561
|
});
|
|
@@ -564,8 +571,8 @@ var input_number_default = /*#__PURE__*/__webpack_require__.n(input_number_);
|
|
|
564
571
|
|
|
565
572
|
var InputNumber_component = Object(componentNormalizer["a" /* default */])(
|
|
566
573
|
item_InputNumbervue_type_script_lang_js_,
|
|
567
|
-
|
|
568
|
-
|
|
574
|
+
InputNumbervue_type_template_id_6c463d52_render,
|
|
575
|
+
InputNumbervue_type_template_id_6c463d52_staticRenderFns,
|
|
569
576
|
false,
|
|
570
577
|
null,
|
|
571
578
|
null,
|
|
@@ -984,7 +991,10 @@ var formula_ = __webpack_require__(3);
|
|
|
984
991
|
},
|
|
985
992
|
computed: {
|
|
986
993
|
attrs: function attrs() {
|
|
987
|
-
return Object.assign({
|
|
994
|
+
return Object.assign({
|
|
995
|
+
clearable: true,
|
|
996
|
+
placeholder: "请选择"
|
|
997
|
+
}, this.$attrs);
|
|
988
998
|
},
|
|
989
999
|
dictOption: function dictOption() {
|
|
990
1000
|
if (this.dictCode && this.$COMPONENT.dataSource && this.$COMPONENT.dataSource.dict) {
|
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 82);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -115,7 +115,7 @@ module.exports = require("element-ui/lib/form-item");
|
|
|
115
115
|
|
|
116
116
|
/***/ }),
|
|
117
117
|
|
|
118
|
-
/***/
|
|
118
|
+
/***/ 82:
|
|
119
119
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
120
120
|
|
|
121
121
|
"use strict";
|
|
@@ -159,6 +159,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
159
159
|
inlineMessage: Boolean,
|
|
160
160
|
size: String,
|
|
161
161
|
rules: [Object, Array],
|
|
162
|
+
required: Boolean,
|
|
162
163
|
actions: Array,
|
|
163
164
|
on: Object,
|
|
164
165
|
config: Object,
|
|
@@ -218,11 +219,30 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
218
219
|
};
|
|
219
220
|
});
|
|
220
221
|
return relItemOn;
|
|
222
|
+
},
|
|
223
|
+
_rules: function _rules() {
|
|
224
|
+
var _this = this;
|
|
225
|
+
if (!this.rules) {
|
|
226
|
+
return [];
|
|
227
|
+
}
|
|
228
|
+
var rulesList = Array.isArray(this.rules) ? this.rules : [this.rules];
|
|
229
|
+
return rulesList.filter(function (item) {
|
|
230
|
+
return item.disabled !== true;
|
|
231
|
+
}).map(function (item) {
|
|
232
|
+
if (typeof item.validator === "function") {
|
|
233
|
+
item.validator = item.validator.bind({
|
|
234
|
+
form: _this.form,
|
|
235
|
+
formModel: _this.form.formModel,
|
|
236
|
+
formItemLayout: _this.form.formItemLayout
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
return item;
|
|
240
|
+
});
|
|
221
241
|
}
|
|
222
242
|
},
|
|
223
243
|
methods: {
|
|
224
244
|
execEvent: function execEvent(eventName) {
|
|
225
|
-
var
|
|
245
|
+
var _this2 = this,
|
|
226
246
|
_itemEvent$exec;
|
|
227
247
|
for (var _len = arguments.length, arg = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
228
248
|
arg[_key - 1] = arguments[_key];
|
|
@@ -244,12 +264,12 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
244
264
|
var targetConfig = {};
|
|
245
265
|
if (Array.isArray(itemEvent.target)) {
|
|
246
266
|
itemEvent.target.forEach(function (tarItem) {
|
|
247
|
-
targetConfig[tarItem] =
|
|
267
|
+
targetConfig[tarItem] = _this2.form.formItemLayout[tarItem];
|
|
248
268
|
});
|
|
249
269
|
} else if (typeof itemEvent.target === "string") {
|
|
250
270
|
targetConfig[itemEvent.target] = this.form.formItemLayout[itemEvent.target];
|
|
251
271
|
}
|
|
252
|
-
(_itemEvent$exec = itemEvent.exec).call.apply(_itemEvent$exec, [this, {
|
|
272
|
+
itemEvent.exec && (_itemEvent$exec = itemEvent.exec).call.apply(_itemEvent$exec, [this, {
|
|
253
273
|
trigger: this.form,
|
|
254
274
|
triggerForm: this.form.formModel,
|
|
255
275
|
triggerConfig: this.form.formItemLayout[this.prop],
|
|
@@ -268,7 +288,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
268
288
|
}
|
|
269
289
|
},
|
|
270
290
|
render: function render(h) {
|
|
271
|
-
var
|
|
291
|
+
var _this3 = this;
|
|
272
292
|
if (typeof this.render === "function") {
|
|
273
293
|
return this.render(h, {
|
|
274
294
|
form: this.form,
|
|
@@ -291,12 +311,12 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
291
311
|
}),
|
|
292
312
|
on: Object.assign({}, this.eventOn, this.actionEventOn, {
|
|
293
313
|
input: function input(val) {
|
|
294
|
-
|
|
295
|
-
|
|
314
|
+
_this3.setValue(val);
|
|
315
|
+
_this3.execEvent("input", val);
|
|
296
316
|
},
|
|
297
317
|
change: function change(val, selectOption) {
|
|
298
|
-
|
|
299
|
-
|
|
318
|
+
_this3.setValue(val);
|
|
319
|
+
_this3.execEvent("change", val, selectOption);
|
|
300
320
|
}
|
|
301
321
|
})
|
|
302
322
|
};
|
|
@@ -304,7 +324,8 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
304
324
|
"attrs": {
|
|
305
325
|
"label": this.label,
|
|
306
326
|
"prop": this.prop,
|
|
307
|
-
"
|
|
327
|
+
"required": this.required,
|
|
328
|
+
"rules": this._rules,
|
|
308
329
|
"labelWidth": this.labelWidth,
|
|
309
330
|
"size": this.size
|
|
310
331
|
}
|