@panpanzhao/component-ui 0.0.16 → 0.0.18
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 +125 -102
- package/lib/components/crud.js +9 -31
- package/lib/components/form-dialog.js +3 -28
- package/lib/components/form-drawer.js +40 -25
- package/lib/components/form-group.js +3 -3
- package/lib/components/form-item.js +27 -8
- 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 +3 -3
- package/lib/components/table-column.js +41 -25
- package/lib/components/table-operate.js +9 -31
- package/lib/components/table.js +11 -6
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -481,8 +481,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
481
481
|
// EXPORTS
|
|
482
482
|
__webpack_require__.d(__webpack_exports__, "API", function() { return /* binding */ API; });
|
|
483
483
|
|
|
484
|
-
// 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=
|
|
485
|
-
var
|
|
484
|
+
// 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=1aadb63c&
|
|
485
|
+
var formvue_type_template_id_1aadb63c_render = function render() {
|
|
486
486
|
var _vm = this,
|
|
487
487
|
_c = _vm._self._c
|
|
488
488
|
return _c(
|
|
@@ -549,10 +549,10 @@ var formvue_type_template_id_dfeb985e_render = function render() {
|
|
|
549
549
|
)
|
|
550
550
|
}
|
|
551
551
|
var staticRenderFns = []
|
|
552
|
-
|
|
552
|
+
formvue_type_template_id_1aadb63c_render._withStripped = true
|
|
553
553
|
|
|
554
554
|
|
|
555
|
-
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=
|
|
555
|
+
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=1aadb63c&
|
|
556
556
|
|
|
557
557
|
// EXTERNAL MODULE: external "element-ui/lib/form"
|
|
558
558
|
var form_ = __webpack_require__(24);
|
|
@@ -648,7 +648,7 @@ var external_lodash_ = __webpack_require__(1);
|
|
|
648
648
|
if (item.show === false) {
|
|
649
649
|
return false;
|
|
650
650
|
}
|
|
651
|
-
if (typeof item.show === "function" && !item.show.call(_this, {
|
|
651
|
+
if (typeof item.show === "function" && !item.show.call(_this, _this.formModel, {
|
|
652
652
|
form: _this,
|
|
653
653
|
formModel: _this.formModel,
|
|
654
654
|
config: item
|
|
@@ -858,7 +858,7 @@ function normalizeComponent(
|
|
|
858
858
|
|
|
859
859
|
var component = normalizeComponent(
|
|
860
860
|
src_formvue_type_script_lang_js_,
|
|
861
|
-
|
|
861
|
+
formvue_type_template_id_1aadb63c_render,
|
|
862
862
|
staticRenderFns,
|
|
863
863
|
false,
|
|
864
864
|
null,
|
|
@@ -2386,11 +2386,30 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2386
2386
|
};
|
|
2387
2387
|
});
|
|
2388
2388
|
return relItemOn;
|
|
2389
|
+
},
|
|
2390
|
+
_rules: function _rules() {
|
|
2391
|
+
var _this = this;
|
|
2392
|
+
if (!this.rules) {
|
|
2393
|
+
return [];
|
|
2394
|
+
}
|
|
2395
|
+
var rulesList = Array.isArray(this.rules) ? this.rules : [this.rules];
|
|
2396
|
+
return rulesList.filter(function (item) {
|
|
2397
|
+
return item.disabled !== true;
|
|
2398
|
+
}).map(function (item) {
|
|
2399
|
+
if (typeof item.validator === "function") {
|
|
2400
|
+
item.validator = item.validator.bind({
|
|
2401
|
+
form: _this.form,
|
|
2402
|
+
formModel: _this.form.formModel,
|
|
2403
|
+
formItemLayout: _this.form.formItemLayout
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2406
|
+
return item;
|
|
2407
|
+
});
|
|
2389
2408
|
}
|
|
2390
2409
|
},
|
|
2391
2410
|
methods: {
|
|
2392
2411
|
execEvent: function execEvent(eventName) {
|
|
2393
|
-
var
|
|
2412
|
+
var _this2 = this,
|
|
2394
2413
|
_itemEvent$exec;
|
|
2395
2414
|
for (var _len = arguments.length, arg = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
2396
2415
|
arg[_key - 1] = arguments[_key];
|
|
@@ -2412,7 +2431,7 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2412
2431
|
var targetConfig = {};
|
|
2413
2432
|
if (Array.isArray(itemEvent.target)) {
|
|
2414
2433
|
itemEvent.target.forEach(function (tarItem) {
|
|
2415
|
-
targetConfig[tarItem] =
|
|
2434
|
+
targetConfig[tarItem] = _this2.form.formItemLayout[tarItem];
|
|
2416
2435
|
});
|
|
2417
2436
|
} else if (typeof itemEvent.target === "string") {
|
|
2418
2437
|
targetConfig[itemEvent.target] = this.form.formItemLayout[itemEvent.target];
|
|
@@ -2436,7 +2455,7 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2436
2455
|
}
|
|
2437
2456
|
},
|
|
2438
2457
|
render: function render(h) {
|
|
2439
|
-
var
|
|
2458
|
+
var _this3 = this;
|
|
2440
2459
|
if (typeof this.render === "function") {
|
|
2441
2460
|
return this.render(h, {
|
|
2442
2461
|
form: this.form,
|
|
@@ -2459,12 +2478,12 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2459
2478
|
}),
|
|
2460
2479
|
on: Object.assign({}, this.eventOn, this.actionEventOn, {
|
|
2461
2480
|
input: function input(val) {
|
|
2462
|
-
|
|
2463
|
-
|
|
2481
|
+
_this3.setValue(val);
|
|
2482
|
+
_this3.execEvent("input", val);
|
|
2464
2483
|
},
|
|
2465
2484
|
change: function change(val, selectOption) {
|
|
2466
|
-
|
|
2467
|
-
|
|
2485
|
+
_this3.setValue(val);
|
|
2486
|
+
_this3.execEvent("change", val, selectOption);
|
|
2468
2487
|
}
|
|
2469
2488
|
})
|
|
2470
2489
|
};
|
|
@@ -2472,7 +2491,7 @@ var form_input_default = /*#__PURE__*/__webpack_require__.n(form_input_);
|
|
|
2472
2491
|
"attrs": {
|
|
2473
2492
|
"label": this.label,
|
|
2474
2493
|
"prop": this.prop,
|
|
2475
|
-
"rules": this.
|
|
2494
|
+
"rules": this._rules,
|
|
2476
2495
|
"labelWidth": this.labelWidth,
|
|
2477
2496
|
"size": this.size
|
|
2478
2497
|
}
|
|
@@ -3030,15 +3049,6 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
3030
3049
|
}, {
|
|
3031
3050
|
button: button
|
|
3032
3051
|
});
|
|
3033
|
-
if (typeof _this3.on.success === "function") {
|
|
3034
|
-
_this3.on.success.call(_this3, {
|
|
3035
|
-
request: _this3.requester,
|
|
3036
|
-
reqData: reqData,
|
|
3037
|
-
expandData: _this3.expandModel
|
|
3038
|
-
}, {
|
|
3039
|
-
button: button
|
|
3040
|
-
});
|
|
3041
|
-
}
|
|
3042
3052
|
return false;
|
|
3043
3053
|
}
|
|
3044
3054
|
button.loading = true;
|
|
@@ -3057,14 +3067,6 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
3057
3067
|
resData: res,
|
|
3058
3068
|
expandData: _this3.expandModel
|
|
3059
3069
|
});
|
|
3060
|
-
if (typeof _this3.on.success === "function") {
|
|
3061
|
-
_this3.on.success.call(_this3, {
|
|
3062
|
-
request: _this3.requester,
|
|
3063
|
-
reqData: reqData,
|
|
3064
|
-
resData: res,
|
|
3065
|
-
expandData: _this3.expandModel
|
|
3066
|
-
});
|
|
3067
|
-
}
|
|
3068
3070
|
}).catch(function (error) {
|
|
3069
3071
|
button.loading = false;
|
|
3070
3072
|
_this3.$emit("error", {
|
|
@@ -3073,14 +3075,6 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
|
3073
3075
|
resError: error,
|
|
3074
3076
|
expandData: _this3.expandModel
|
|
3075
3077
|
});
|
|
3076
|
-
if (typeof _this3.on.error === "function") {
|
|
3077
|
-
_this3.on.error.call(_this3, {
|
|
3078
|
-
request: _this3.requester,
|
|
3079
|
-
reqData: reqData,
|
|
3080
|
-
resError: error,
|
|
3081
|
-
expandData: _this3.expandModel
|
|
3082
|
-
});
|
|
3083
|
-
}
|
|
3084
3078
|
});
|
|
3085
3079
|
});
|
|
3086
3080
|
},
|
|
@@ -3317,9 +3311,12 @@ var drawer_default = /*#__PURE__*/__webpack_require__.n(drawer_);
|
|
|
3317
3311
|
},
|
|
3318
3312
|
methods: {
|
|
3319
3313
|
open: function open(model) {
|
|
3314
|
+
var _this2 = this;
|
|
3320
3315
|
this.show = true;
|
|
3321
3316
|
if (model) {
|
|
3322
|
-
this
|
|
3317
|
+
this.$nextTick(function () {
|
|
3318
|
+
_this2.setFormModel(model);
|
|
3319
|
+
});
|
|
3323
3320
|
}
|
|
3324
3321
|
},
|
|
3325
3322
|
close: function close() {
|
|
@@ -3333,31 +3330,31 @@ var drawer_default = /*#__PURE__*/__webpack_require__.n(drawer_);
|
|
|
3333
3330
|
this.$refs.form && this.$refs.form.reset();
|
|
3334
3331
|
},
|
|
3335
3332
|
submit: function submit(button) {
|
|
3336
|
-
var
|
|
3333
|
+
var _this3 = this;
|
|
3337
3334
|
this.$refs.form.validate(function (isValidate, errorMessage) {
|
|
3338
3335
|
if (!isValidate) {
|
|
3339
3336
|
return false;
|
|
3340
3337
|
}
|
|
3341
|
-
var reqData = Object(external_lodash_["merge"])(
|
|
3342
|
-
if (!(
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3338
|
+
var reqData = Object(external_lodash_["merge"])(_this3.api.data || {}, _this3.formModel);
|
|
3339
|
+
if (!(_this3.api.url && _this3.request)) {
|
|
3340
|
+
_this3.$emit("success", null, reqData);
|
|
3341
|
+
_this3.reset();
|
|
3342
|
+
_this3.close();
|
|
3346
3343
|
return false;
|
|
3347
3344
|
}
|
|
3348
3345
|
button.loading = true;
|
|
3349
|
-
|
|
3350
|
-
url: Object(formula_["evaluate"])(
|
|
3351
|
-
method:
|
|
3346
|
+
_this3.request({
|
|
3347
|
+
url: Object(formula_["evaluate"])(_this3.api.url, reqData),
|
|
3348
|
+
method: _this3.api.method || "POST",
|
|
3352
3349
|
data: reqData
|
|
3353
3350
|
}).then(function (res) {
|
|
3354
3351
|
button.loading = false;
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3352
|
+
_this3.$emit("success", res, reqData);
|
|
3353
|
+
_this3.reset();
|
|
3354
|
+
_this3.close();
|
|
3358
3355
|
}).catch(function (error) {
|
|
3359
3356
|
button.loading = false;
|
|
3360
|
-
|
|
3357
|
+
_this3.$emit("error", error, reqData);
|
|
3361
3358
|
});
|
|
3362
3359
|
});
|
|
3363
3360
|
},
|
|
@@ -3377,16 +3374,28 @@ var drawer_default = /*#__PURE__*/__webpack_require__.n(drawer_);
|
|
|
3377
3374
|
}, param]));
|
|
3378
3375
|
},
|
|
3379
3376
|
renderTitle: function renderTitle(h) {
|
|
3380
|
-
if (
|
|
3381
|
-
return this.
|
|
3377
|
+
if (this.$scopedSlots.title) {
|
|
3378
|
+
return this.$scopedSlots.title.call(this, {
|
|
3379
|
+
formModel: this.formModel
|
|
3380
|
+
});
|
|
3381
|
+
} else if (typeof this.slots.title === "function") {
|
|
3382
|
+
return this.slots.title.call(this, {
|
|
3383
|
+
formModel: this.formModel
|
|
3384
|
+
});
|
|
3382
3385
|
}
|
|
3383
|
-
return this.slots.title || this.drawer.title;
|
|
3386
|
+
return this.$slots.title || this.slots.title || this.drawer.title;
|
|
3384
3387
|
},
|
|
3385
3388
|
renderTools: function renderTools(h) {
|
|
3386
|
-
if (
|
|
3387
|
-
return this.
|
|
3389
|
+
if (this.$scopedSlots.footer) {
|
|
3390
|
+
return this.$scopedSlots.footer.call(this, {
|
|
3391
|
+
formModel: this.formModel
|
|
3392
|
+
});
|
|
3393
|
+
} else if (typeof this.slots.footer === "function") {
|
|
3394
|
+
return this.slots.footer.call(this, {
|
|
3395
|
+
formModel: this.formModel
|
|
3396
|
+
});
|
|
3388
3397
|
}
|
|
3389
|
-
return h("div", [(this.tools || this.defaultTools).map(function (item) {
|
|
3398
|
+
return h("div", [this.$slots.footer || (this.tools || this.defaultTools).map(function (item) {
|
|
3390
3399
|
var toolParam = {
|
|
3391
3400
|
attrs: Object.assign({}, item),
|
|
3392
3401
|
on: item.on
|
|
@@ -3396,7 +3405,7 @@ var drawer_default = /*#__PURE__*/__webpack_require__.n(drawer_);
|
|
|
3396
3405
|
}
|
|
3397
3406
|
},
|
|
3398
3407
|
render: function render(h) {
|
|
3399
|
-
var
|
|
3408
|
+
var _this4 = this;
|
|
3400
3409
|
var param = {
|
|
3401
3410
|
attrs: Object.assign({
|
|
3402
3411
|
visible: this.show,
|
|
@@ -3405,7 +3414,7 @@ var drawer_default = /*#__PURE__*/__webpack_require__.n(drawer_);
|
|
|
3405
3414
|
}, this.drawer),
|
|
3406
3415
|
on: Object.assign(this.on, {
|
|
3407
3416
|
close: function close() {
|
|
3408
|
-
|
|
3417
|
+
_this4.close();
|
|
3409
3418
|
}
|
|
3410
3419
|
})
|
|
3411
3420
|
};
|
|
@@ -3446,8 +3455,8 @@ form_drawer_src.install = function (Vue) {
|
|
|
3446
3455
|
Vue.component(form_drawer_src.name, form_drawer_src);
|
|
3447
3456
|
};
|
|
3448
3457
|
/* harmony default export */ var form_drawer = (form_drawer_src);
|
|
3449
|
-
// 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=
|
|
3450
|
-
var
|
|
3458
|
+
// 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&
|
|
3459
|
+
var srcvue_type_template_id_32454b68_render = function render() {
|
|
3451
3460
|
var _vm = this,
|
|
3452
3461
|
_c = _vm._self._c
|
|
3453
3462
|
return _c(
|
|
@@ -3489,11 +3498,11 @@ var srcvue_type_template_id_720bd4fc_render = function render() {
|
|
|
3489
3498
|
2
|
|
3490
3499
|
)
|
|
3491
3500
|
}
|
|
3492
|
-
var
|
|
3493
|
-
|
|
3501
|
+
var srcvue_type_template_id_32454b68_staticRenderFns = []
|
|
3502
|
+
srcvue_type_template_id_32454b68_render._withStripped = true
|
|
3494
3503
|
|
|
3495
3504
|
|
|
3496
|
-
// CONCATENATED MODULE: ./src/components/form-view/src/index.vue?vue&type=template&id=
|
|
3505
|
+
// CONCATENATED MODULE: ./src/components/form-view/src/index.vue?vue&type=template&id=32454b68&
|
|
3497
3506
|
|
|
3498
3507
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions"
|
|
3499
3508
|
var descriptions_ = __webpack_require__(45);
|
|
@@ -3518,6 +3527,7 @@ var descriptions_item_default = /*#__PURE__*/__webpack_require__.n(descriptions_
|
|
|
3518
3527
|
props: {
|
|
3519
3528
|
prop: String,
|
|
3520
3529
|
labelWidth: String,
|
|
3530
|
+
labelPosition: String,
|
|
3521
3531
|
formItems: {
|
|
3522
3532
|
type: Array,
|
|
3523
3533
|
default: function _default() {
|
|
@@ -3535,8 +3545,10 @@ var descriptions_item_default = /*#__PURE__*/__webpack_require__.n(descriptions_
|
|
|
3535
3545
|
formProps: function formProps() {
|
|
3536
3546
|
return Object.assign({
|
|
3537
3547
|
border: true,
|
|
3548
|
+
direction: this.labelPosition === "top" ? "vertical" : "horizontal",
|
|
3538
3549
|
labelStyle: {
|
|
3539
|
-
width: this.labelWidth
|
|
3550
|
+
width: this.labelWidth,
|
|
3551
|
+
textAlign: this.labelPosition
|
|
3540
3552
|
}
|
|
3541
3553
|
}, this.$attrs);
|
|
3542
3554
|
},
|
|
@@ -3598,8 +3610,8 @@ var descriptions_item_default = /*#__PURE__*/__webpack_require__.n(descriptions_
|
|
|
3598
3610
|
|
|
3599
3611
|
var form_view_src_component = normalizeComponent(
|
|
3600
3612
|
components_form_view_srcvue_type_script_lang_js_,
|
|
3601
|
-
|
|
3602
|
-
|
|
3613
|
+
srcvue_type_template_id_32454b68_render,
|
|
3614
|
+
srcvue_type_template_id_32454b68_staticRenderFns,
|
|
3603
3615
|
false,
|
|
3604
3616
|
null,
|
|
3605
3617
|
null,
|
|
@@ -4054,8 +4066,8 @@ form_view_dialog_src.install = function (Vue) {
|
|
|
4054
4066
|
Vue.component(form_view_dialog_src.name, form_view_dialog_src);
|
|
4055
4067
|
};
|
|
4056
4068
|
/* harmony default export */ var form_view_dialog = (form_view_dialog_src);
|
|
4057
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/table.vue?vue&type=template&id=
|
|
4058
|
-
var
|
|
4069
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/table.vue?vue&type=template&id=0a336d65&
|
|
4070
|
+
var tablevue_type_template_id_0a336d65_render = function render() {
|
|
4059
4071
|
var _vm = this,
|
|
4060
4072
|
_c = _vm._self._c
|
|
4061
4073
|
return _c("div", { staticClass: "table" }, [
|
|
@@ -4133,11 +4145,11 @@ var tablevue_type_template_id_a8e62da6_render = function render() {
|
|
|
4133
4145
|
: _vm._e(),
|
|
4134
4146
|
])
|
|
4135
4147
|
}
|
|
4136
|
-
var
|
|
4137
|
-
|
|
4148
|
+
var tablevue_type_template_id_0a336d65_staticRenderFns = []
|
|
4149
|
+
tablevue_type_template_id_0a336d65_render._withStripped = true
|
|
4138
4150
|
|
|
4139
4151
|
|
|
4140
|
-
// CONCATENATED MODULE: ./src/components/table/src/table.vue?vue&type=template&id=
|
|
4152
|
+
// CONCATENATED MODULE: ./src/components/table/src/table.vue?vue&type=template&id=0a336d65&
|
|
4141
4153
|
|
|
4142
4154
|
// EXTERNAL MODULE: external "element-ui/lib/table"
|
|
4143
4155
|
var table_ = __webpack_require__(16);
|
|
@@ -4180,7 +4192,7 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
|
|
|
4180
4192
|
props: {
|
|
4181
4193
|
label: String,
|
|
4182
4194
|
show: {
|
|
4183
|
-
type: [Boolean, Function],
|
|
4195
|
+
type: [Boolean, String, Function],
|
|
4184
4196
|
default: true
|
|
4185
4197
|
},
|
|
4186
4198
|
on: Object,
|
|
@@ -4204,6 +4216,11 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
|
|
|
4204
4216
|
if (this.show === false) {
|
|
4205
4217
|
return null;
|
|
4206
4218
|
}
|
|
4219
|
+
if (typeof this.show === "string" && !Object(formula_["evaluate"])(this.show, this.$parent.selection[0], {
|
|
4220
|
+
evalMode: true
|
|
4221
|
+
})) {
|
|
4222
|
+
return null;
|
|
4223
|
+
}
|
|
4207
4224
|
if (typeof this.show === "function" && !this.show.call(this, this.$parent.selection, this)) {
|
|
4208
4225
|
return null;
|
|
4209
4226
|
}
|
|
@@ -4465,8 +4482,8 @@ var components_table_column_default = /*#__PURE__*/__webpack_require__.n(compone
|
|
|
4465
4482
|
|
|
4466
4483
|
var table_component = normalizeComponent(
|
|
4467
4484
|
src_tablevue_type_script_lang_js_,
|
|
4468
|
-
|
|
4469
|
-
|
|
4485
|
+
tablevue_type_template_id_0a336d65_render,
|
|
4486
|
+
tablevue_type_template_id_0a336d65_staticRenderFns,
|
|
4470
4487
|
false,
|
|
4471
4488
|
null,
|
|
4472
4489
|
null,
|
|
@@ -4684,8 +4701,8 @@ var selection_component = normalizeComponent(
|
|
|
4684
4701
|
)
|
|
4685
4702
|
|
|
4686
4703
|
/* harmony default export */ var selection = (selection_component.exports);
|
|
4687
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/date.vue?vue&type=template&id=
|
|
4688
|
-
var
|
|
4704
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/date.vue?vue&type=template&id=44c029a9&
|
|
4705
|
+
var datevue_type_template_id_44c029a9_render = function render() {
|
|
4689
4706
|
var _vm = this,
|
|
4690
4707
|
_c = _vm._self._c
|
|
4691
4708
|
return _c(
|
|
@@ -4723,11 +4740,11 @@ var datevue_type_template_id_3d682315_render = function render() {
|
|
|
4723
4740
|
)
|
|
4724
4741
|
)
|
|
4725
4742
|
}
|
|
4726
|
-
var
|
|
4727
|
-
|
|
4743
|
+
var datevue_type_template_id_44c029a9_staticRenderFns = []
|
|
4744
|
+
datevue_type_template_id_44c029a9_render._withStripped = true
|
|
4728
4745
|
|
|
4729
4746
|
|
|
4730
|
-
// CONCATENATED MODULE: ./src/components/table/src/column/date.vue?vue&type=template&id=
|
|
4747
|
+
// CONCATENATED MODULE: ./src/components/table/src/column/date.vue?vue&type=template&id=44c029a9&
|
|
4731
4748
|
|
|
4732
4749
|
// EXTERNAL MODULE: external "dayjs"
|
|
4733
4750
|
var external_dayjs_ = __webpack_require__(22);
|
|
@@ -4743,7 +4760,7 @@ var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_)
|
|
|
4743
4760
|
},
|
|
4744
4761
|
props: {
|
|
4745
4762
|
format: {
|
|
4746
|
-
type:
|
|
4763
|
+
type: String,
|
|
4747
4764
|
default: "YYYY-MM-DD"
|
|
4748
4765
|
}
|
|
4749
4766
|
},
|
|
@@ -4759,10 +4776,10 @@ var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_)
|
|
|
4759
4776
|
},
|
|
4760
4777
|
methods: {
|
|
4761
4778
|
formatDate: function formatDate(slotProps) {
|
|
4762
|
-
if (typeof this.format === "function") {
|
|
4763
|
-
return this.format.call(this, slotProps);
|
|
4764
|
-
}
|
|
4765
4779
|
var colVal = slotProps.row && slotProps.row[this.attrs.prop];
|
|
4780
|
+
if (typeof slotProps.column.formatter === "function") {
|
|
4781
|
+
return slotProps.column.formatter.call(this, slotProps.row, slotProps.column, colVal, slotProps.$index);
|
|
4782
|
+
}
|
|
4766
4783
|
if (colVal && this.format && external_dayjs_default()(colVal).isValid()) {
|
|
4767
4784
|
return external_dayjs_default()(colVal).format(this.format);
|
|
4768
4785
|
}
|
|
@@ -4782,8 +4799,8 @@ var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_)
|
|
|
4782
4799
|
|
|
4783
4800
|
var date_component = normalizeComponent(
|
|
4784
4801
|
column_datevue_type_script_lang_js_,
|
|
4785
|
-
|
|
4786
|
-
|
|
4802
|
+
datevue_type_template_id_44c029a9_render,
|
|
4803
|
+
datevue_type_template_id_44c029a9_staticRenderFns,
|
|
4787
4804
|
false,
|
|
4788
4805
|
null,
|
|
4789
4806
|
null,
|
|
@@ -4792,8 +4809,8 @@ var date_component = normalizeComponent(
|
|
|
4792
4809
|
)
|
|
4793
4810
|
|
|
4794
4811
|
/* harmony default export */ var date = (date_component.exports);
|
|
4795
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/dict.vue?vue&type=template&id=
|
|
4796
|
-
var
|
|
4812
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/dict.vue?vue&type=template&id=2b543e49&
|
|
4813
|
+
var dictvue_type_template_id_2b543e49_render = function render() {
|
|
4797
4814
|
var _vm = this,
|
|
4798
4815
|
_c = _vm._self._c
|
|
4799
4816
|
return _c(
|
|
@@ -4831,11 +4848,11 @@ var dictvue_type_template_id_1a393e81_render = function render() {
|
|
|
4831
4848
|
)
|
|
4832
4849
|
)
|
|
4833
4850
|
}
|
|
4834
|
-
var
|
|
4835
|
-
|
|
4851
|
+
var dictvue_type_template_id_2b543e49_staticRenderFns = []
|
|
4852
|
+
dictvue_type_template_id_2b543e49_render._withStripped = true
|
|
4836
4853
|
|
|
4837
4854
|
|
|
4838
|
-
// CONCATENATED MODULE: ./src/components/table/src/column/dict.vue?vue&type=template&id=
|
|
4855
|
+
// CONCATENATED MODULE: ./src/components/table/src/column/dict.vue?vue&type=template&id=2b543e49&
|
|
4839
4856
|
|
|
4840
4857
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/table/src/column/dict.vue?vue&type=script&lang=js&
|
|
4841
4858
|
|
|
@@ -4850,7 +4867,7 @@ dictvue_type_template_id_1a393e81_render._withStripped = true
|
|
|
4850
4867
|
type: Array
|
|
4851
4868
|
},
|
|
4852
4869
|
optionProp: {
|
|
4853
|
-
type:
|
|
4870
|
+
type: Object,
|
|
4854
4871
|
default: function _default() {
|
|
4855
4872
|
return {
|
|
4856
4873
|
value: "value",
|
|
@@ -4890,10 +4907,10 @@ dictvue_type_template_id_1a393e81_render._withStripped = true
|
|
|
4890
4907
|
},
|
|
4891
4908
|
methods: {
|
|
4892
4909
|
renderOption: function renderOption(slotProps) {
|
|
4893
|
-
if (typeof this.optionProp === "function") {
|
|
4894
|
-
return this.optionProp.call(this, slotProps, this.options);
|
|
4895
|
-
}
|
|
4896
4910
|
var colVal = slotProps.row && slotProps.row[this.attrs.prop];
|
|
4911
|
+
if (typeof slotProps.column.formatter === "function") {
|
|
4912
|
+
return slotProps.column.formatter.call(this, slotProps.row, slotProps.column, colVal, slotProps.$index);
|
|
4913
|
+
}
|
|
4897
4914
|
if (colVal && this.optionMap[colVal]) {
|
|
4898
4915
|
return this.optionMap[colVal] && this.optionMap[colVal][this.optionProp.label || "label"];
|
|
4899
4916
|
}
|
|
@@ -4913,8 +4930,8 @@ dictvue_type_template_id_1a393e81_render._withStripped = true
|
|
|
4913
4930
|
|
|
4914
4931
|
var dict_component = normalizeComponent(
|
|
4915
4932
|
column_dictvue_type_script_lang_js_,
|
|
4916
|
-
|
|
4917
|
-
|
|
4933
|
+
dictvue_type_template_id_2b543e49_render,
|
|
4934
|
+
dictvue_type_template_id_2b543e49_staticRenderFns,
|
|
4918
4935
|
false,
|
|
4919
4936
|
null,
|
|
4920
4937
|
null,
|
|
@@ -4958,6 +4975,7 @@ var index_ = __webpack_require__(5);
|
|
|
4958
4975
|
|
|
4959
4976
|
|
|
4960
4977
|
|
|
4978
|
+
|
|
4961
4979
|
/* harmony default export */ var operatevue_type_script_lang_js_ = ({
|
|
4962
4980
|
name: "Operate",
|
|
4963
4981
|
props: {
|
|
@@ -5004,7 +5022,12 @@ var index_ = __webpack_require__(5);
|
|
|
5004
5022
|
var _this = this;
|
|
5005
5023
|
var filterItems = Object(external_lodash_["sortBy"])(this.items, ['sort']).filter(function (row) {
|
|
5006
5024
|
if (typeof row.show === "function") {
|
|
5007
|
-
return row.show.call(_this, scoped,
|
|
5025
|
+
return row.show.call(_this, scoped.row, scoped);
|
|
5026
|
+
}
|
|
5027
|
+
if (typeof row.show === "string") {
|
|
5028
|
+
return Object(formula_["evaluate"])(row.show, scoped.row, {
|
|
5029
|
+
evalMode: true
|
|
5030
|
+
});
|
|
5008
5031
|
}
|
|
5009
5032
|
return row.show !== false;
|
|
5010
5033
|
});
|
|
@@ -5100,7 +5123,7 @@ var index_ = __webpack_require__(5);
|
|
|
5100
5123
|
props: {
|
|
5101
5124
|
label: String,
|
|
5102
5125
|
parentData: Object,
|
|
5103
|
-
show: [Boolean, Function],
|
|
5126
|
+
show: [Boolean, String, Function],
|
|
5104
5127
|
on: Object
|
|
5105
5128
|
},
|
|
5106
5129
|
data: function data() {
|
|
@@ -5141,7 +5164,7 @@ var index_ = __webpack_require__(5);
|
|
|
5141
5164
|
props: {
|
|
5142
5165
|
label: String,
|
|
5143
5166
|
parentData: Object,
|
|
5144
|
-
show: [Boolean, Function],
|
|
5167
|
+
show: [Boolean, String, Function],
|
|
5145
5168
|
on: Object
|
|
5146
5169
|
},
|
|
5147
5170
|
computed: {
|
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=1aadb63c&
|
|
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=1aadb63c&
|
|
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
|
|
@@ -552,7 +552,7 @@ module.exports = require("element-ui/lib/collapse-item");
|
|
|
552
552
|
// ESM COMPAT FLAG
|
|
553
553
|
__webpack_require__.r(__webpack_exports__);
|
|
554
554
|
|
|
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=
|
|
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=32454b68&
|
|
556
556
|
var render = function render() {
|
|
557
557
|
var _vm = this,
|
|
558
558
|
_c = _vm._self._c
|
|
@@ -599,7 +599,7 @@ var staticRenderFns = []
|
|
|
599
599
|
render._withStripped = true
|
|
600
600
|
|
|
601
601
|
|
|
602
|
-
// CONCATENATED MODULE: ./src/components/form-view/src/index.vue?vue&type=template&id=
|
|
602
|
+
// CONCATENATED MODULE: ./src/components/form-view/src/index.vue?vue&type=template&id=32454b68&
|
|
603
603
|
|
|
604
604
|
// EXTERNAL MODULE: external "element-ui/lib/descriptions"
|
|
605
605
|
var descriptions_ = __webpack_require__(18);
|
|
@@ -630,6 +630,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
630
630
|
props: {
|
|
631
631
|
prop: String,
|
|
632
632
|
labelWidth: String,
|
|
633
|
+
labelPosition: String,
|
|
633
634
|
formItems: {
|
|
634
635
|
type: Array,
|
|
635
636
|
default: function _default() {
|
|
@@ -647,8 +648,10 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
647
648
|
formProps: function formProps() {
|
|
648
649
|
return Object.assign({
|
|
649
650
|
border: true,
|
|
651
|
+
direction: this.labelPosition === "top" ? "vertical" : "horizontal",
|
|
650
652
|
labelStyle: {
|
|
651
|
-
width: this.labelWidth
|
|
653
|
+
width: this.labelWidth,
|
|
654
|
+
textAlign: this.labelPosition
|
|
652
655
|
}
|
|
653
656
|
}, this.$attrs);
|
|
654
657
|
},
|
|
@@ -1610,15 +1613,6 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1610
1613
|
}, {
|
|
1611
1614
|
button: button
|
|
1612
1615
|
});
|
|
1613
|
-
if (typeof _this3.on.success === "function") {
|
|
1614
|
-
_this3.on.success.call(_this3, {
|
|
1615
|
-
request: _this3.requester,
|
|
1616
|
-
reqData: reqData,
|
|
1617
|
-
expandData: _this3.expandModel
|
|
1618
|
-
}, {
|
|
1619
|
-
button: button
|
|
1620
|
-
});
|
|
1621
|
-
}
|
|
1622
1616
|
return false;
|
|
1623
1617
|
}
|
|
1624
1618
|
button.loading = true;
|
|
@@ -1637,14 +1631,6 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1637
1631
|
resData: res,
|
|
1638
1632
|
expandData: _this3.expandModel
|
|
1639
1633
|
});
|
|
1640
|
-
if (typeof _this3.on.success === "function") {
|
|
1641
|
-
_this3.on.success.call(_this3, {
|
|
1642
|
-
request: _this3.requester,
|
|
1643
|
-
reqData: reqData,
|
|
1644
|
-
resData: res,
|
|
1645
|
-
expandData: _this3.expandModel
|
|
1646
|
-
});
|
|
1647
|
-
}
|
|
1648
1634
|
}).catch(function (error) {
|
|
1649
1635
|
button.loading = false;
|
|
1650
1636
|
_this3.$emit("error", {
|
|
@@ -1653,14 +1639,6 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1653
1639
|
resError: error,
|
|
1654
1640
|
expandData: _this3.expandModel
|
|
1655
1641
|
});
|
|
1656
|
-
if (typeof _this3.on.error === "function") {
|
|
1657
|
-
_this3.on.error.call(_this3, {
|
|
1658
|
-
request: _this3.requester,
|
|
1659
|
-
reqData: reqData,
|
|
1660
|
-
resError: error,
|
|
1661
|
-
expandData: _this3.expandModel
|
|
1662
|
-
});
|
|
1663
|
-
}
|
|
1664
1642
|
});
|
|
1665
1643
|
});
|
|
1666
1644
|
},
|