@fmdevui/fm-dev 1.0.65 → 1.0.67

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.
@@ -624,6 +624,18 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
624
624
  type: StringConstructor;
625
625
  default: string;
626
626
  };
627
+ apiService: {
628
+ type: StringConstructor;
629
+ default: string;
630
+ };
631
+ apiAction: {
632
+ type: StringConstructor;
633
+ default: string;
634
+ };
635
+ basecode: {
636
+ type: StringConstructor;
637
+ default: string;
638
+ };
627
639
  id: {
628
640
  type: PropType<any>;
629
641
  };
@@ -672,6 +684,18 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
672
684
  type: StringConstructor;
673
685
  default: string;
674
686
  };
687
+ apiService: {
688
+ type: StringConstructor;
689
+ default: string;
690
+ };
691
+ apiAction: {
692
+ type: StringConstructor;
693
+ default: string;
694
+ };
695
+ basecode: {
696
+ type: StringConstructor;
697
+ default: string;
698
+ };
675
699
  id: {
676
700
  type: PropType<any>;
677
701
  };
@@ -687,8 +711,11 @@ declare const Fminputdropdown: DefineComponent<ExtractPropTypes<{
687
711
  optionData: any[];
688
712
  bvalue: string;
689
713
  blabel: string;
714
+ apiService: string;
715
+ apiAction: string;
690
716
  inputWidth: string;
691
717
  dropWidth: string;
718
+ basecode: string;
692
719
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
693
720
  declare const FmTree: DefineComponent<ExtractPropTypes<{
694
721
  checkStrictly: {
@@ -43,6 +43,27 @@ declare const _default: DefineComponent<ExtractPropTypes<{
43
43
  type: StringConstructor;
44
44
  default: string;
45
45
  };
46
+ /**
47
+ * api service name
48
+ */
49
+ apiService: {
50
+ type: StringConstructor;
51
+ default: string;
52
+ };
53
+ /**
54
+ * api service 下的方法
55
+ */
56
+ apiAction: {
57
+ type: StringConstructor;
58
+ default: string;
59
+ };
60
+ /**
61
+ * 基础编码 自动获取数据
62
+ */
63
+ basecode: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
46
67
  id: {
47
68
  type: PropType<any>;
48
69
  };
@@ -97,6 +118,27 @@ declare const _default: DefineComponent<ExtractPropTypes<{
97
118
  type: StringConstructor;
98
119
  default: string;
99
120
  };
121
+ /**
122
+ * api service name
123
+ */
124
+ apiService: {
125
+ type: StringConstructor;
126
+ default: string;
127
+ };
128
+ /**
129
+ * api service 下的方法
130
+ */
131
+ apiAction: {
132
+ type: StringConstructor;
133
+ default: string;
134
+ };
135
+ /**
136
+ * 基础编码 自动获取数据
137
+ */
138
+ basecode: {
139
+ type: StringConstructor;
140
+ default: string;
141
+ };
100
142
  id: {
101
143
  type: PropType<any>;
102
144
  };
@@ -112,7 +154,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
112
154
  optionData: any[];
113
155
  bvalue: string;
114
156
  blabel: string;
157
+ apiService: string;
158
+ apiAction: string;
115
159
  inputWidth: string;
116
160
  dropWidth: string;
161
+ basecode: string;
117
162
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
118
163
  export default _default;
package/es/defaults.css CHANGED
@@ -1,3 +1 @@
1
1
  .drag_verify[data-v-9e8c9ed2]{background-color:#e8e8e8;overflow:hidden;position:relative;text-align:center}.drag_verify .dv_handler[data-v-9e8c9ed2]{cursor:move;left:0;position:absolute;top:0}.drag_verify .dv_handler i[data-v-9e8c9ed2]{color:#666;font-size:16px;padding-left:0}.drag_verify .dv_handler .el-icon-circle-check[data-v-9e8c9ed2]{color:#6c6;margin-top:9px}.drag_verify .dv_progress_bar[data-v-9e8c9ed2]{height:34px;position:absolute;width:0}.drag_verify .dv_text[data-v-9e8c9ed2]{background:-webkit-gradient(linear,left top,right top,color-stop(0,var(--textColor)),color-stop(.4,var(--textColor)),color-stop(.5,#fff),color-stop(.6,var(--textColor)),color-stop(1,var(--textColor)));-webkit-background-clip:text;color:transparent;position:absolute;top:0;-moz-user-select:none;-webkit-user-select:none;user-select:none;-o-user-select:none;-ms-user-select:none;-webkit-text-fill-color:transparent;-webkit-text-size-adjust:none;animation:slidetounlock 3s infinite}.drag_verify .dv_text[data-v-9e8c9ed2] *{-webkit-text-fill-color:var(--textColor)}.goFirst[data-v-9e8c9ed2]{left:0!important;transition:left .5s}.goOrigin[data-v-9e8c9ed2]{transition:transform .5s}.goKeep[data-v-9e8c9ed2]{transition:left .2s}.goFirst2[data-v-9e8c9ed2]{transition:width .5s;width:0!important}.drag-verify-container[data-v-9e8c9ed2]{border-radius:50%;line-height:0;position:relative}.move-bar[data-v-9e8c9ed2]{position:absolute;z-index:100}.clip-bar[data-v-9e8c9ed2]{background:hsla(0,0%,100%,.8);position:absolute}.refresh[data-v-9e8c9ed2]{cursor:pointer;font-size:20px;position:absolute;right:5px;top:5px;z-index:200}.tips[data-v-9e8c9ed2]{bottom:25px;font-size:12px;height:20px;line-height:20px;position:absolute;text-align:center;width:100%;z-index:200}.tips.success[data-v-9e8c9ed2]{background:hsla(0,0%,100%,.6);color:green}.tips.danger[data-v-9e8c9ed2]{background:rgba(0,0,0,.6);color:#ff0}.check-img[data-v-9e8c9ed2]{border-radius:50%;width:100%}
2
-
3
- .box-card[data-v-69322010]{height:100%}.card-header[data-v-69322010]{padding:5px}.tree-h-flex[data-v-69322010]{align-items:center;display:flex;flex-wrap:nowrap;gap:8px;overflow:hidden}.tree-h-left[data-v-69322010]{flex:1 1 200px;min-width:0;overflow:hidden}.tree-h-right-group[data-v-69322010]{align-items:center;display:flex;flex-shrink:0;white-space:nowrap}
@@ -1,7 +1,5 @@
1
1
  import _sfc_main from './index.vue2.mjs';
2
- import './index.vue3.mjs';
3
- import _export_sfc from '../../../../../_virtual/_plugin-vue_export-helper.mjs';
4
2
 
5
- var fmtree = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-69322010"]]);
6
3
 
7
- export { fmtree as default };
4
+
5
+ export { _sfc_main as default };
@@ -2,10 +2,10 @@ import { defineComponent, ref, reactive, onMounted, watch, resolveComponent, res
2
2
  import { Search, MoreFilled } from '@element-plus/icons-vue';
3
3
  import { useBaseApi } from '../../../api/base/index.mjs';
4
4
 
5
- const _hoisted_1 = { class: "card-header" };
6
- const _hoisted_2 = { class: "tree-h-flex" };
7
- const _hoisted_3 = { class: "tree-h-left" };
8
- const _hoisted_4 = { class: "tree-h-right-group" };
5
+ const _hoisted_1 = { style: { "padding": "5px" } };
6
+ const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "8px", "flex-wrap": "nowrap", "overflow": "hidden" } };
7
+ const _hoisted_3 = { style: { "flex": "1 1 200px", "min-width": "0", "overflow": "hidden" } };
8
+ const _hoisted_4 = { style: { "display": "flex", "align-items": "center", "flex-shrink": "0", "white-space": "nowrap" } };
9
9
  const _hoisted_5 = { style: { "margin-bottom": "45px" } };
10
10
  var _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  ...{
@@ -109,9 +109,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
109
109
  const _component_el_card = resolveComponent("el-card");
110
110
  const _directive_loading = resolveDirective("loading");
111
111
  return openBlock(), createBlock(_component_el_card, {
112
- class: "box-card",
113
112
  shadow: "hover",
114
- "body-style": "height:100%;overflow:auto;padding:5px;width:100%;"
113
+ "body-style": "height:100%;overflow:auto;padding:5px;width:100%;",
114
+ style: { "height": "100%" }
115
115
  }, {
116
116
  header: withCtx(() => [
117
117
  createElementVNode("div", _hoisted_1, [
@@ -4,13 +4,14 @@ import dragimg from './dragVerify/dragVerifyImgRotate.vue.mjs';
4
4
  import './fmselect/index.vue.mjs';
5
5
  import './fmautocomplete/index.vue.mjs';
6
6
  import './inputdropdown/index.vue.mjs';
7
- import fmtree from './fmtree/index.vue.mjs';
7
+ import './fmtree/index.vue.mjs';
8
8
  export { elSvg } from './svgIcon/index.mjs';
9
9
  import _sfc_main from './transfer/index.vue2.mjs';
10
10
  import _sfc_main$1 from './noticeBar/index.vue2.mjs';
11
11
  import _sfc_main$2 from './fmselect/index.vue2.mjs';
12
12
  import _sfc_main$3 from './fmautocomplete/index.vue2.mjs';
13
13
  import _sfc_main$4 from './inputdropdown/index.vue2.mjs';
14
+ import _sfc_main$5 from './fmtree/index.vue2.mjs';
14
15
 
15
16
  const FmTransfer = _sfc_main;
16
17
  const FmNoticeBar = _sfc_main$1;
@@ -18,6 +19,6 @@ const FmDragImg = dragimg;
18
19
  const Fmselect = _sfc_main$2;
19
20
  const FmAutocomplete = _sfc_main$3;
20
21
  const Fminputdropdown = _sfc_main$4;
21
- const FmTree = fmtree;
22
+ const FmTree = _sfc_main$5;
22
23
 
23
24
  export { FmAutocomplete, FmDragImg, FmNoticeBar, FmTransfer, FmTree, Fminputdropdown, Fmselect };
@@ -1,4 +1,5 @@
1
- import { defineComponent, useModel, resolveComponent, createBlock, openBlock, withCtx, createVNode, normalizeStyle, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, mergeModels } from 'vue';
1
+ import { defineComponent, useModel, reactive, onMounted, resolveComponent, createBlock, openBlock, withCtx, createVNode, normalizeStyle, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, mergeModels } from 'vue';
2
+ import { useBaseApi } from '../../../api/base/index.mjs';
2
3
 
3
4
  var _sfc_main = /* @__PURE__ */ defineComponent({
4
5
  ...{
@@ -36,6 +37,27 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
36
37
  dropWidth: {
37
38
  type: String,
38
39
  default: "90px"
40
+ },
41
+ /**
42
+ * api service name
43
+ */
44
+ apiService: {
45
+ type: String,
46
+ default: "baseData"
47
+ },
48
+ /**
49
+ * api service 下的方法
50
+ */
51
+ apiAction: {
52
+ type: String,
53
+ default: "baseDataList"
54
+ },
55
+ /**
56
+ * 基础编码 自动获取数据
57
+ */
58
+ basecode: {
59
+ type: String,
60
+ default: ""
39
61
  }
40
62
  }, {
41
63
  "id": {
@@ -54,6 +76,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
54
76
  const modeValueId = useModel(__props, "id");
55
77
  const modeValueName = useModel(__props, "name");
56
78
  const props = __props;
79
+ const state = reactive({
80
+ optionData: props.optionData
81
+ });
57
82
  const emit = __emit;
58
83
  const handCommand = (command) => {
59
84
  const fitem = props.optionData.find((item) => item[props.bvalue] === command);
@@ -61,6 +86,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
61
86
  modeValueName.value = fitem != null ? fitem[props.blabel] : "";
62
87
  emit("change", fitem);
63
88
  };
89
+ onMounted(async () => {
90
+ state.optionData = props.optionData;
91
+ if (props.basecode && props.basecode != "") {
92
+ const res = useBaseApi(props.apiService).get(null, props.apiAction + "/" + props.basecode);
93
+ state.optionData = res.data.result ?? [];
94
+ }
95
+ });
64
96
  return (_ctx, _cache) => {
65
97
  const _component_el_input = resolveComponent("el-input");
66
98
  const _component_el_dropdown_item = resolveComponent("el-dropdown-item");
@@ -80,7 +112,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
80
112
  (openBlock(true), createElementBlock(
81
113
  Fragment,
82
114
  null,
83
- renderList(__props.optionData, (item, index) => {
115
+ renderList(state.optionData, (item, index) => {
84
116
  return openBlock(), createBlock(_component_el_dropdown_item, {
85
117
  key: index,
86
118
  command: item[__props.bvalue],
package/index.css CHANGED
@@ -111,34 +111,3 @@
111
111
  }
112
112
 
113
113
 
114
-
115
-
116
- /* 主容器 */
117
- .box-card[data-v-69322010] {
118
- height: 100%;
119
- }
120
-
121
- /* 卡片头部 */
122
- .card-header[data-v-69322010] {
123
- padding: 5px;
124
- }
125
-
126
- /* 水平布局 */
127
- .tree-h-flex[data-v-69322010] {
128
- display: flex;
129
- align-items: center;
130
- gap: 8px;
131
- flex-wrap: nowrap;
132
- overflow: hidden;
133
- }
134
- .tree-h-left[data-v-69322010] {
135
- flex: 1 1 200px;
136
- min-width: 0;
137
- overflow: hidden;
138
- }
139
- .tree-h-right-group[data-v-69322010] {
140
- display: flex;
141
- align-items: center;
142
- flex-shrink: 0;
143
- white-space: nowrap;
144
- }
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.65 */
1
+ /*! fm-dev v1.0.67 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('crypto'), require('url'), require('http'), require('https'), require('util'), require('stream'), require('assert'), require('zlib'), require('element-plus')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vue', 'crypto', 'url', 'http', 'https', 'util', 'stream', 'assert', 'zlib', 'element-plus'], factory) :
@@ -23896,6 +23896,27 @@
23896
23896
  dropWidth: {
23897
23897
  type: String,
23898
23898
  default: "90px"
23899
+ },
23900
+ /**
23901
+ * api service name
23902
+ */
23903
+ apiService: {
23904
+ type: String,
23905
+ default: "baseData"
23906
+ },
23907
+ /**
23908
+ * api service 下的方法
23909
+ */
23910
+ apiAction: {
23911
+ type: String,
23912
+ default: "baseDataList"
23913
+ },
23914
+ /**
23915
+ * 基础编码 自动获取数据
23916
+ */
23917
+ basecode: {
23918
+ type: String,
23919
+ default: ""
23899
23920
  }
23900
23921
  }, {
23901
23922
  "id": {
@@ -23914,6 +23935,9 @@
23914
23935
  const modeValueId = vue.useModel(__props, "id");
23915
23936
  const modeValueName = vue.useModel(__props, "name");
23916
23937
  const props = __props;
23938
+ const state = vue.reactive({
23939
+ optionData: props.optionData
23940
+ });
23917
23941
  const emit = __emit;
23918
23942
  const handCommand = (command) => {
23919
23943
  const fitem = props.optionData.find((item) => item[props.bvalue] === command);
@@ -23921,6 +23945,13 @@
23921
23945
  modeValueName.value = fitem != null ? fitem[props.blabel] : "";
23922
23946
  emit("change", fitem);
23923
23947
  };
23948
+ vue.onMounted(async () => {
23949
+ state.optionData = props.optionData;
23950
+ if (props.basecode && props.basecode != "") {
23951
+ const res = useBaseApi(props.apiService).get(null, props.apiAction + "/" + props.basecode);
23952
+ state.optionData = res.data.result ?? [];
23953
+ }
23954
+ });
23924
23955
  return (_ctx, _cache) => {
23925
23956
  const _component_el_input = vue.resolveComponent("el-input");
23926
23957
  const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
@@ -23940,7 +23971,7 @@
23940
23971
  (vue.openBlock(true), vue.createElementBlock(
23941
23972
  vue.Fragment,
23942
23973
  null,
23943
- vue.renderList(__props.optionData, (item, index) => {
23974
+ vue.renderList(state.optionData, (item, index) => {
23944
23975
  return vue.openBlock(), vue.createBlock(_component_el_dropdown_item, {
23945
23976
  key: index,
23946
23977
  command: item[__props.bvalue],
@@ -30038,10 +30069,10 @@
30038
30069
  ZoomOut: zoom_out_default
30039
30070
  });
30040
30071
 
30041
- const _hoisted_1$1 = { class: "card-header" };
30042
- const _hoisted_2 = { class: "tree-h-flex" };
30043
- const _hoisted_3 = { class: "tree-h-left" };
30044
- const _hoisted_4 = { class: "tree-h-right-group" };
30072
+ const _hoisted_1$1 = { style: { "padding": "5px" } };
30073
+ const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "8px", "flex-wrap": "nowrap", "overflow": "hidden" } };
30074
+ const _hoisted_3 = { style: { "flex": "1 1 200px", "min-width": "0", "overflow": "hidden" } };
30075
+ const _hoisted_4 = { style: { "display": "flex", "align-items": "center", "flex-shrink": "0", "white-space": "nowrap" } };
30045
30076
  const _hoisted_5 = { style: { "margin-bottom": "45px" } };
30046
30077
  var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
30047
30078
  ...{
@@ -30145,9 +30176,9 @@
30145
30176
  const _component_el_card = vue.resolveComponent("el-card");
30146
30177
  const _directive_loading = vue.resolveDirective("loading");
30147
30178
  return vue.openBlock(), vue.createBlock(_component_el_card, {
30148
- class: "box-card",
30149
30179
  shadow: "hover",
30150
- "body-style": "height:100%;overflow:auto;padding:5px;width:100%;"
30180
+ "body-style": "height:100%;overflow:auto;padding:5px;width:100%;",
30181
+ style: { "height": "100%" }
30151
30182
  }, {
30152
30183
  header: vue.withCtx(() => [
30153
30184
  vue.createElementVNode("div", _hoisted_1$1, [
@@ -30274,8 +30305,6 @@
30274
30305
  }
30275
30306
  });
30276
30307
 
30277
- var fmtree = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-69322010"]]);
30278
-
30279
30308
  const _hoisted_1 = ["src"];
30280
30309
  var _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
30281
30310
  ...{
@@ -30381,7 +30410,7 @@
30381
30410
  const Fmselect = _sfc_main$5;
30382
30411
  const FmAutocomplete = _sfc_main$4;
30383
30412
  const Fminputdropdown = _sfc_main$3;
30384
- const FmTree = fmtree;
30413
+ const FmTree = _sfc_main$2;
30385
30414
 
30386
30415
  const makeInstaller = (components = []) => {
30387
30416
  const install = (app) => {
package/index.min.css CHANGED
@@ -1,3 +1 @@
1
1
  .drag_verify[data-v-9e8c9ed2]{background-color:#e8e8e8;overflow:hidden;position:relative;text-align:center}.drag_verify .dv_handler[data-v-9e8c9ed2]{cursor:move;left:0;position:absolute;top:0}.drag_verify .dv_handler i[data-v-9e8c9ed2]{color:#666;font-size:16px;padding-left:0}.drag_verify .dv_handler .el-icon-circle-check[data-v-9e8c9ed2]{color:#6c6;margin-top:9px}.drag_verify .dv_progress_bar[data-v-9e8c9ed2]{height:34px;position:absolute;width:0}.drag_verify .dv_text[data-v-9e8c9ed2]{background:-webkit-gradient(linear,left top,right top,color-stop(0,var(--textColor)),color-stop(.4,var(--textColor)),color-stop(.5,#fff),color-stop(.6,var(--textColor)),color-stop(1,var(--textColor)));-webkit-background-clip:text;color:transparent;position:absolute;top:0;-moz-user-select:none;-webkit-user-select:none;user-select:none;-o-user-select:none;-ms-user-select:none;-webkit-text-fill-color:transparent;-webkit-text-size-adjust:none;animation:slidetounlock 3s infinite}.drag_verify .dv_text[data-v-9e8c9ed2] *{-webkit-text-fill-color:var(--textColor)}.goFirst[data-v-9e8c9ed2]{left:0!important;transition:left .5s}.goOrigin[data-v-9e8c9ed2]{transition:transform .5s}.goKeep[data-v-9e8c9ed2]{transition:left .2s}.goFirst2[data-v-9e8c9ed2]{transition:width .5s;width:0!important}.drag-verify-container[data-v-9e8c9ed2]{border-radius:50%;line-height:0;position:relative}.move-bar[data-v-9e8c9ed2]{position:absolute;z-index:100}.clip-bar[data-v-9e8c9ed2]{background:hsla(0,0%,100%,.8);position:absolute}.refresh[data-v-9e8c9ed2]{cursor:pointer;font-size:20px;position:absolute;right:5px;top:5px;z-index:200}.tips[data-v-9e8c9ed2]{bottom:25px;font-size:12px;height:20px;line-height:20px;position:absolute;text-align:center;width:100%;z-index:200}.tips.success[data-v-9e8c9ed2]{background:hsla(0,0%,100%,.6);color:green}.tips.danger[data-v-9e8c9ed2]{background:rgba(0,0,0,.6);color:#ff0}.check-img[data-v-9e8c9ed2]{border-radius:50%;width:100%}
2
-
3
- .box-card[data-v-69322010]{height:100%}.card-header[data-v-69322010]{padding:5px}.tree-h-flex[data-v-69322010]{align-items:center;display:flex;flex-wrap:nowrap;gap:8px;overflow:hidden}.tree-h-left[data-v-69322010]{flex:1 1 200px;min-width:0;overflow:hidden}.tree-h-right-group[data-v-69322010]{align-items:center;display:flex;flex-shrink:0;white-space:nowrap}