cnhis-design-vue 2.1.104 → 2.1.105

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [2.1.105](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-v2/compare/v2.1.104...v2.1.105) (2023-09-22)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **direct:** 注释指令抛出 ([4e09adb](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-v2/commit/4e09adb27d2318ec0f89a887024dc0f4ed0a7935))
11
+
5
12
  ### [2.1.104](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-v2/compare/v2.1.102...v2.1.104) (2023-09-21)
6
13
 
7
14
 
package/es/index/index.js CHANGED
@@ -4450,9 +4450,201 @@ var Classification_comvue_type_template_id_35e4c00c_scoped_true_staticRenderFns
4450
4450
 
4451
4451
  // CONCATENATED MODULE: ./packages/table-filter/src/classification/Classification-com.vue?vue&type=template&id=35e4c00c&scoped=true&
4452
4452
 
4453
- // EXTERNAL MODULE: ./src/directive/flexibleResize.js
4454
- var flexibleResize = __webpack_require__("87e0");
4453
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
4454
+ var classCallCheck = __webpack_require__("d4ec");
4455
+
4456
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
4457
+ var createClass = __webpack_require__("bee2");
4458
+
4459
+ // CONCATENATED MODULE: ./src/directive/flexibleResize.js
4460
+
4461
+
4462
+
4463
+
4464
+ var flexibleResize_FlexibleResize = /*#__PURE__*/function () {
4465
+ function FlexibleResize(options) {
4466
+ var _this = this;
4467
+
4468
+ Object(classCallCheck["a" /* default */])(this, FlexibleResize);
4469
+
4470
+ Object(defineProperty["a" /* default */])(this, "maskMove", function (e) {
4471
+ var v = _this._isV ? e.screenX : e.screenY;
4472
+ var distance = parseInt(v - _this._mv);
4473
+ _this._mv = v;
4474
+ var onMove = _this.options.onMove;
4475
+ onMove && onMove({
4476
+ evt: e,
4477
+ distance: distance
4478
+ });
4479
+ });
4480
+
4481
+ Object(defineProperty["a" /* default */])(this, "maskUp", function (e) {
4482
+ var onEnd = _this.options.onEnd;
4483
+ var v = _this._isV ? e.screenX : e.screenY;
4484
+ onEnd && onEnd({
4485
+ evt: e,
4486
+ distance: parseInt(v - _this._ms)
4487
+ });
4488
+
4489
+ _this.maskRemove();
4490
+ });
4491
+
4492
+ Object(defineProperty["a" /* default */])(this, "toolDown", function (e) {
4493
+ _this.maskInsert();
4494
+
4495
+ _this._isV = /^V/.test(_this.options.mode);
4496
+ _this._ms = _this._mv = _this._isV ? e.screenX : e.screenY;
4497
+ var onStart = _this.options.onStart;
4498
+ onStart && onStart({
4499
+ evt: e,
4500
+ distance: 0
4501
+ });
4502
+ });
4503
+
4504
+ this.init(options);
4505
+ }
4455
4506
 
4507
+ Object(createClass["a" /* default */])(FlexibleResize, [{
4508
+ key: "init",
4509
+ value: function init(options) {
4510
+ this.options = options || {};
4511
+ this.tool = null;
4512
+ this.mask = null;
4513
+ var el = options.el;
4514
+ if (!el) return;
4515
+ var tool = this.toolCreate();
4516
+ this.initElPosition();
4517
+ el.appendChild(tool);
4518
+ }
4519
+ }, {
4520
+ key: "destroyed",
4521
+ value: function destroyed() {
4522
+ var el = this.options.el;
4523
+ this.maskRemove();
4524
+ this.toolRemove();
4525
+
4526
+ if (this._elPosition) {
4527
+ el.style.setProperty("position", this._elPosition);
4528
+ } else {
4529
+ el.style.removeProperty("position");
4530
+ }
4531
+ }
4532
+ }, {
4533
+ key: "initElPosition",
4534
+ value: function initElPosition() {
4535
+ var el = this.options.el;
4536
+ if (!el) return;
4537
+ this._elPosition = el.style.position;
4538
+ var defStyle = window.getComputedStyle(el, null);
4539
+ var position = defStyle.position;
4540
+
4541
+ if (!position || position === "static") {
4542
+ el.style.setProperty("position", "relative");
4543
+ }
4544
+ }
4545
+ }, {
4546
+ key: "maskCreate",
4547
+ value: function maskCreate(mode) {
4548
+ if (this.mask) return this.mask;
4549
+ var mask = document.createElement("div");
4550
+ mask.style = "position:fixed;top:0;bottom:0;left:0;right:0;z-index:99999;cursor:" + (/^V/.test(mode) ? "col" : "row") + "-resize";
4551
+ mask.addEventListener("mousemove", this.maskMove);
4552
+ mask.addEventListener("mouseup", this.maskUp);
4553
+ this.mask = mask;
4554
+ return mask;
4555
+ }
4556
+ }, {
4557
+ key: "maskRemove",
4558
+ value: function maskRemove() {
4559
+ var mask = this.mask;
4560
+ if (!mask) return;
4561
+ mask.parentNode && mask.parentNode.removeChild(mask);
4562
+ mask.removeEventListener("mousemove", this.maskMove);
4563
+ mask.removeEventListener("mouseup", this.maskUp);
4564
+ this.mask = null;
4565
+ }
4566
+ }, {
4567
+ key: "maskInsert",
4568
+ value: function maskInsert() {
4569
+ var mask = this.mask || this.maskCreate(this.options.mode);
4570
+ document.body.appendChild(mask);
4571
+ return mask;
4572
+ }
4573
+ }, {
4574
+ key: "toolCreate",
4575
+ value: function toolCreate() {
4576
+ if (this.tool) return this.tool;
4577
+ var div = document.createElement("div");
4578
+ div.addEventListener("mousedown", this.toolDown);
4579
+ this.tool = div;
4580
+ this.toolInitStyle();
4581
+ return div;
4582
+ }
4583
+ }, {
4584
+ key: "toolRemove",
4585
+ value: function toolRemove() {
4586
+ var tool = this.tool;
4587
+ if (!tool) return;
4588
+ tool.parentNode && tool.parentNode.removeChild(tool);
4589
+ this.tool = null;
4590
+ }
4591
+ }, {
4592
+ key: "toolInitStyle",
4593
+ value: function toolInitStyle() {
4594
+ var style = "user-select:none;cursor:col-resize;position:absolute;";
4595
+ var mode = this.options.mode;
4596
+
4597
+ if (/^V/.test(mode)) {
4598
+ style += "width: 8px;cursor:col-resize;";
4599
+ } else {
4600
+ style += "height: 8px;cursor:row-resize;";
4601
+ }
4602
+
4603
+ var keys = {
4604
+ VR: "left",
4605
+ VL: "right",
4606
+ HT: "bottom",
4607
+ HB: "top"
4608
+ };
4609
+ var mk = keys[mode];
4610
+ var p = Object.keys(keys).reduce(function (v, k) {
4611
+ var value = keys[k];
4612
+
4613
+ if (value !== mk) {
4614
+ v += "".concat(value, ":0;");
4615
+ }
4616
+
4617
+ return v;
4618
+ }, "");
4619
+ style += p;
4620
+
4621
+ if (this.tool) {
4622
+ this.tool.style = style;
4623
+ }
4624
+ }
4625
+ }]);
4626
+
4627
+ return FlexibleResize;
4628
+ }();
4629
+ /* harmony default export */ var flexibleResize = ({
4630
+ inserted: function inserted(el, _ref) {
4631
+ var value = _ref.value;
4632
+ if (el._flexibleResize) return;
4633
+ el._flexibleResize = new flexibleResize_FlexibleResize({
4634
+ el: el,
4635
+ mode: value.mode || "VR",
4636
+ onMove: value.onMove,
4637
+ onEnd: value.onEnd
4638
+ });
4639
+ },
4640
+ unbind: function unbind(el) {
4641
+ if (el._flexibleResize) {
4642
+ el._flexibleResize.destroyed();
4643
+
4644
+ el._flexibleResize = void 0;
4645
+ }
4646
+ }
4647
+ });
4456
4648
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"e5155026-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/table-filter/src/components/search-modal/set-classification.vue?vue&type=template&id=1e2a1c83&scoped=true&
4457
4649
  var set_classificationvue_type_template_id_1e2a1c83_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"search"},[_c('TableModal',_vm._b({attrs:{"dataSource":_vm.curConditionList,"visibleIn":_vm.oneVisible,"edit":_vm.edit,"copy":_vm.copy,"delItem":_vm.delItem,"type":"search","filterApiConfig":_vm.filterApiConfig},on:{"handleOk":_vm.oneSave,"close":_vm.oneCancel,"changeData":_vm.changeData,"resetPopconfirm":_vm.resetPopconfirm},scopedSlots:_vm._u([{key:"add",fn:function(){return [_c('a-button',{attrs:{"type":"primary"},on:{"click":_vm.add}},[_vm._v("新增")])]},proxy:true}])},'TableModal',_vm.$attrs,false)),_vm._t("searchCondition",function(){return [_c('SearchFilter',_vm._b({ref:"searchFilter",attrs:{"visible":_vm.addVisible,"conditionList":_vm.curConditionList,"actionList_prop":_vm.actionList_prop,"searchFieldList":_vm.newSearchFieldList,"isInSearch":true,"isCnHis":true,"showCompareField":true,"filterApiConfig":_vm.filterApiConfig},on:{"saveAdd":_vm.saveAdd,"cancelSaveAdd":_vm.cancelSaveAdd}},'SearchFilter',_vm.$attrs,false))]},{"attrs":Object.assign({}, _vm.$attrs, {visible: _vm.addVisible, loading: _vm.saveLoading, conditionList: _vm.conditionList, actionList_prop: _vm.actionList_prop, searchFieldList: _vm.searchFieldList, isInSearch: true, isCnHis: true, showCompareField: true, filterApiConfig: _vm.filterApiConfig}),"listeners":{ saveAdd: _vm.saveAdd, cancelSaveAdd: _vm.cancelSaveAdd }})],2)}
4458
4650
  var set_classificationvue_type_template_id_1e2a1c83_scoped_true_staticRenderFns = []
@@ -7655,7 +7847,7 @@ var Classification_comvue_type_script_lang_js_components;
7655
7847
  }
7656
7848
  },
7657
7849
  directives: {
7658
- flexibleResize: flexibleResize["a" /* default */]
7850
+ flexibleResize: flexibleResize
7659
7851
  }
7660
7852
  }));
7661
7853
  // CONCATENATED MODULE: ./packages/table-filter/src/classification/Classification-com.vue?vue&type=script&lang=js&
@@ -50967,9 +51159,6 @@ __webpack_require__.r(__webpack_exports__);
50967
51159
  /* harmony import */ var _shortcut_provider__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__("8f5f");
50968
51160
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ShortcutProvider", function() { return _shortcut_provider__WEBPACK_IMPORTED_MODULE_101__["default"]; });
50969
51161
 
50970
- /* harmony import */ var _directive_flexibleResize__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__("87e0");
50971
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flexibleResize", function() { return _directive_flexibleResize__WEBPACK_IMPORTED_MODULE_102__["a"]; });
50972
-
50973
51162
 
50974
51163
 
50975
51164
 
@@ -51072,8 +51261,7 @@ __webpack_require__.r(__webpack_exports__);
51072
51261
 
51073
51262
 
51074
51263
 
51075
-
51076
-
51264
+ // import flexibleResize from '@/directive/flexibleResize';
51077
51265
 
51078
51266
  var req = __webpack_require__("bf03");
51079
51267
 
@@ -86895,207 +87083,6 @@ module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM
86895
87083
 
86896
87084
  /***/ }),
86897
87085
 
86898
- /***/ "87e0":
86899
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
86900
-
86901
- "use strict";
86902
- /* unused harmony export FlexibleResize */
86903
- /* harmony import */ var F_project_crm_refactor_low_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d4ec");
86904
- /* harmony import */ var F_project_crm_refactor_low_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("bee2");
86905
- /* harmony import */ var F_project_crm_refactor_low_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ade3");
86906
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ea64");
86907
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_3__);
86908
-
86909
-
86910
-
86911
-
86912
- var FlexibleResize = /*#__PURE__*/function () {
86913
- function FlexibleResize(options) {
86914
- var _this = this;
86915
-
86916
- Object(F_project_crm_refactor_low_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, FlexibleResize);
86917
-
86918
- Object(F_project_crm_refactor_low_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "maskMove", function (e) {
86919
- var v = _this._isV ? e.screenX : e.screenY;
86920
- var distance = parseInt(v - _this._mv);
86921
- _this._mv = v;
86922
- var onMove = _this.options.onMove;
86923
- onMove && onMove({
86924
- evt: e,
86925
- distance: distance
86926
- });
86927
- });
86928
-
86929
- Object(F_project_crm_refactor_low_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "maskUp", function (e) {
86930
- var onEnd = _this.options.onEnd;
86931
- var v = _this._isV ? e.screenX : e.screenY;
86932
- onEnd && onEnd({
86933
- evt: e,
86934
- distance: parseInt(v - _this._ms)
86935
- });
86936
-
86937
- _this.maskRemove();
86938
- });
86939
-
86940
- Object(F_project_crm_refactor_low_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, "toolDown", function (e) {
86941
- _this.maskInsert();
86942
-
86943
- _this._isV = /^V/.test(_this.options.mode);
86944
- _this._ms = _this._mv = _this._isV ? e.screenX : e.screenY;
86945
- var onStart = _this.options.onStart;
86946
- onStart && onStart({
86947
- evt: e,
86948
- distance: 0
86949
- });
86950
- });
86951
-
86952
- this.init(options);
86953
- }
86954
-
86955
- Object(F_project_crm_refactor_low_cnhis_design_v2_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(FlexibleResize, [{
86956
- key: "init",
86957
- value: function init(options) {
86958
- this.options = options || {};
86959
- this.tool = null;
86960
- this.mask = null;
86961
- var el = options.el;
86962
- if (!el) return;
86963
- var tool = this.toolCreate();
86964
- this.initElPosition();
86965
- el.appendChild(tool);
86966
- }
86967
- }, {
86968
- key: "destroyed",
86969
- value: function destroyed() {
86970
- var el = this.options.el;
86971
- this.maskRemove();
86972
- this.toolRemove();
86973
-
86974
- if (this._elPosition) {
86975
- el.style.setProperty("position", this._elPosition);
86976
- } else {
86977
- el.style.removeProperty("position");
86978
- }
86979
- }
86980
- }, {
86981
- key: "initElPosition",
86982
- value: function initElPosition() {
86983
- var el = this.options.el;
86984
- if (!el) return;
86985
- this._elPosition = el.style.position;
86986
- var defStyle = window.getComputedStyle(el, null);
86987
- var position = defStyle.position;
86988
-
86989
- if (!position || position === "static") {
86990
- el.style.setProperty("position", "relative");
86991
- }
86992
- }
86993
- }, {
86994
- key: "maskCreate",
86995
- value: function maskCreate(mode) {
86996
- if (this.mask) return this.mask;
86997
- var mask = document.createElement("div");
86998
- mask.style = "position:fixed;top:0;bottom:0;left:0;right:0;z-index:99999;cursor:" + (/^V/.test(mode) ? "col" : "row") + "-resize";
86999
- mask.addEventListener("mousemove", this.maskMove);
87000
- mask.addEventListener("mouseup", this.maskUp);
87001
- this.mask = mask;
87002
- return mask;
87003
- }
87004
- }, {
87005
- key: "maskRemove",
87006
- value: function maskRemove() {
87007
- var mask = this.mask;
87008
- if (!mask) return;
87009
- mask.parentNode && mask.parentNode.removeChild(mask);
87010
- mask.removeEventListener("mousemove", this.maskMove);
87011
- mask.removeEventListener("mouseup", this.maskUp);
87012
- this.mask = null;
87013
- }
87014
- }, {
87015
- key: "maskInsert",
87016
- value: function maskInsert() {
87017
- var mask = this.mask || this.maskCreate(this.options.mode);
87018
- document.body.appendChild(mask);
87019
- return mask;
87020
- }
87021
- }, {
87022
- key: "toolCreate",
87023
- value: function toolCreate() {
87024
- if (this.tool) return this.tool;
87025
- var div = document.createElement("div");
87026
- div.addEventListener("mousedown", this.toolDown);
87027
- this.tool = div;
87028
- this.toolInitStyle();
87029
- return div;
87030
- }
87031
- }, {
87032
- key: "toolRemove",
87033
- value: function toolRemove() {
87034
- var tool = this.tool;
87035
- if (!tool) return;
87036
- tool.parentNode && tool.parentNode.removeChild(tool);
87037
- this.tool = null;
87038
- }
87039
- }, {
87040
- key: "toolInitStyle",
87041
- value: function toolInitStyle() {
87042
- var style = "user-select:none;cursor:col-resize;position:absolute;";
87043
- var mode = this.options.mode;
87044
-
87045
- if (/^V/.test(mode)) {
87046
- style += "width: 8px;cursor:col-resize;";
87047
- } else {
87048
- style += "height: 8px;cursor:row-resize;";
87049
- }
87050
-
87051
- var keys = {
87052
- VR: "left",
87053
- VL: "right",
87054
- HT: "bottom",
87055
- HB: "top"
87056
- };
87057
- var mk = keys[mode];
87058
- var p = Object.keys(keys).reduce(function (v, k) {
87059
- var value = keys[k];
87060
-
87061
- if (value !== mk) {
87062
- v += "".concat(value, ":0;");
87063
- }
87064
-
87065
- return v;
87066
- }, "");
87067
- style += p;
87068
-
87069
- if (this.tool) {
87070
- this.tool.style = style;
87071
- }
87072
- }
87073
- }]);
87074
-
87075
- return FlexibleResize;
87076
- }();
87077
- /* harmony default export */ __webpack_exports__["a"] = ({
87078
- inserted: function inserted(el, _ref) {
87079
- var value = _ref.value;
87080
- if (el._flexibleResize) return;
87081
- el._flexibleResize = new FlexibleResize({
87082
- el: el,
87083
- mode: value.mode || "VR",
87084
- onMove: value.onMove,
87085
- onEnd: value.onEnd
87086
- });
87087
- },
87088
- unbind: function unbind(el) {
87089
- if (el._flexibleResize) {
87090
- el._flexibleResize.destroyed();
87091
-
87092
- el._flexibleResize = void 0;
87093
- }
87094
- }
87095
- });
87096
-
87097
- /***/ }),
87098
-
87099
87086
  /***/ "881a":
87100
87087
  /***/ (function(module, exports, __webpack_require__) {
87101
87088