@fmdeui/fmui 1.0.114 → 1.0.116

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.
Files changed (46) hide show
  1. package/es/component.mjs +3 -1
  2. package/es/components/fm-datepicker/index.d.ts +33 -0
  3. package/es/components/fm-datepicker/index.vue.d.ts +34 -0
  4. package/es/components/index.d.ts +1 -0
  5. package/es/index.mjs +2 -1
  6. package/es/packages/components/fm-autocomplete/index2.vue.mjs +46 -41
  7. package/es/packages/components/fm-datepicker/index.mjs +6 -0
  8. package/es/packages/components/fm-datepicker/index.vue.mjs +5 -0
  9. package/es/packages/components/fm-datepicker/index2.vue.mjs +56 -0
  10. package/es/packages/components/index.mjs +1 -0
  11. package/es/packages/utils/formatTime.mjs +12 -1
  12. package/es/packages/utils/gloabdata.mjs +29 -0
  13. package/es/packages/utils/index.mjs +2 -1
  14. package/es/utils/formatTime.d.ts +10 -0
  15. package/es/utils/gloabdata.d.ts +24 -0
  16. package/es/utils/index.d.ts +1 -0
  17. package/index.js +192 -89
  18. package/index.min.js +7 -7
  19. package/index.min.mjs +7 -7
  20. package/index.mjs +188 -90
  21. package/lib/component.js +3 -1
  22. package/lib/components/fm-datepicker/index.d.ts +33 -0
  23. package/lib/components/fm-datepicker/index.vue.d.ts +34 -0
  24. package/lib/components/index.d.ts +1 -0
  25. package/lib/index.js +6 -0
  26. package/lib/packages/components/fm-autocomplete/index2.vue.js +45 -40
  27. package/lib/packages/components/fm-datepicker/index.js +8 -0
  28. package/lib/packages/components/fm-datepicker/index.vue.js +9 -0
  29. package/lib/packages/components/fm-datepicker/index2.vue.js +60 -0
  30. package/lib/packages/components/index.js +6 -4
  31. package/lib/packages/utils/formatTime.js +13 -0
  32. package/lib/packages/utils/gloabdata.js +33 -0
  33. package/lib/packages/utils/index.js +6 -0
  34. package/lib/utils/formatTime.d.ts +10 -0
  35. package/lib/utils/gloabdata.d.ts +24 -0
  36. package/lib/utils/index.d.ts +1 -0
  37. package/locale/en.js +1 -1
  38. package/locale/en.min.js +1 -1
  39. package/locale/en.min.mjs +1 -1
  40. package/locale/en.mjs +1 -1
  41. package/locale/zh-cn.js +1 -1
  42. package/locale/zh-cn.min.js +1 -1
  43. package/locale/zh-cn.min.mjs +1 -1
  44. package/locale/zh-cn.mjs +1 -1
  45. package/package.json +1 -1
  46. /package/lib/{version.css → component.css} +0 -0
package/es/component.mjs CHANGED
@@ -16,6 +16,7 @@ import { FmCascader } from './packages/components/fmcascader/index.mjs';
16
16
  import { FmInputNumber } from './packages/components/fm-inputnumber/index.mjs';
17
17
  import { FmAutocomplete } from './packages/components/fm-autocomplete/index.mjs';
18
18
  import { FmSelect } from './packages/components/fm-select/index.mjs';
19
+ import { Fmdatepicker } from './packages/components/fm-datepicker/index.mjs';
19
20
 
20
21
  const plugins = [
21
22
  FButton,
@@ -35,7 +36,8 @@ const plugins = [
35
36
  FmCascader,
36
37
  FmInputNumber,
37
38
  FmAutocomplete,
38
- FmSelect
39
+ FmSelect,
40
+ Fmdatepicker
39
41
  ];
40
42
 
41
43
  export { plugins as default };
@@ -0,0 +1,33 @@
1
+ import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ export declare const Fmdatepicker: DefineComponent<ExtractPropTypes<{
3
+ dateType: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ adddaynum: {
8
+ type: NumberConstructor;
9
+ default: number;
10
+ };
11
+ modelValue: {
12
+ type: PropType<any>;
13
+ };
14
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
15
+ "update:modelValue": (value: any) => any;
16
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
17
+ dateType: {
18
+ type: StringConstructor;
19
+ default: string;
20
+ };
21
+ adddaynum: {
22
+ type: NumberConstructor;
23
+ default: number;
24
+ };
25
+ modelValue: {
26
+ type: PropType<any>;
27
+ };
28
+ }>> & Readonly<{
29
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
30
+ }>, {
31
+ dateType: string;
32
+ adddaynum: number;
33
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,34 @@
1
+ import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<{
3
+ dateType: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ adddaynum: {
8
+ type: NumberConstructor;
9
+ default: number;
10
+ };
11
+ modelValue: {
12
+ type: PropType<any>;
13
+ };
14
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
15
+ "update:modelValue": (value: any) => any;
16
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
17
+ dateType: {
18
+ type: StringConstructor;
19
+ default: string;
20
+ };
21
+ adddaynum: {
22
+ type: NumberConstructor;
23
+ default: number;
24
+ };
25
+ modelValue: {
26
+ type: PropType<any>;
27
+ };
28
+ }>> & Readonly<{
29
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
30
+ }>, {
31
+ dateType: string;
32
+ adddaynum: number;
33
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
34
+ export default _default;
@@ -15,3 +15,4 @@ export * from './fm-select';
15
15
  export * from './fm-inputdropdown';
16
16
  export * from './fm-inputnumber';
17
17
  export * from './fm-autocomplete';
18
+ export * from './fm-datepicker';
package/es/index.mjs CHANGED
@@ -12,6 +12,7 @@ import './packages/stores/index.mjs';
12
12
  import './packages/hooks/index.mjs';
13
13
  export { getCountryCode, i18n, iso_3166_1_CountryList, languageList, loadRemoteMessages, mergMessage, setupI18n } from './packages/locale/index.mjs';
14
14
  export { version } from './version.mjs';
15
+ export { AppItem, getAppItemData, getAppItemText } from './packages/utils/gloabdata.mjs';
15
16
  export { Local, Session } from './packages/utils/storage.mjs';
16
17
  export { NextLoading } from './packages/utils/loading.mjs';
17
18
  export { StringToObj } from './packages/utils/json-utils.mjs';
@@ -27,7 +28,7 @@ export { default as en } from './packages/locale/lang/en.mjs';
27
28
  export { exportExcel } from './packages/utils/exportExcel.mjs';
28
29
  export { feature, useSysApi } from './packages/api/sys/index.mjs';
29
30
  export { flowLoading } from './packages/utils/flowLoading.mjs';
30
- export { formatAxis, formatDate, formatPast, getWeek } from './packages/utils/formatTime.mjs';
31
+ export { formatAxis, formatDate, formatPast, getBdate, getEdate, getWeek } from './packages/utils/formatTime.mjs';
31
32
  export { gcj02ToBd09, wgs84ToBd09, wgs84ToGcj02 } from './packages/utils/gpsConvertor.mjs';
32
33
  export { getFileUrl, showFileUrl } from './packages/utils/uploadfileurl.mjs';
33
34
  export { getFormItemLabel, getFormItemProp, getRules, getShowColumn, getShowColumnWidth, getSubFormFields, getlimit, showTabelColumn } from './packages/hooks/limitsFunction.mjs';
@@ -1,4 +1,4 @@
1
- import { defineComponent, useModel, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, withModifiers, unref, createCommentVNode, createElementVNode, toDisplayString, mergeModels } from 'vue';
1
+ import { defineComponent, useModel, ref, resolveComponent, openBlock, createBlock, createSlots, withCtx, createElementVNode, toDisplayString, createVNode, withModifiers, unref, createCommentVNode, mergeModels } from 'vue';
2
2
  import { Search } from '@element-plus/icons-vue';
3
3
  import '../../api/index.mjs';
4
4
  import './component/userSelectDialog.vue.mjs';
@@ -157,7 +157,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
157
157
  "trigger-on-focus": false,
158
158
  onSelect: handleSelect,
159
159
  style: { "margin-top": "-2px" }
160
- }, {
160
+ }, createSlots({
161
161
  default: withCtx(({ item }) => [
162
162
  createElementVNode(
163
163
  "div",
@@ -167,45 +167,50 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
167
167
  /* TEXT */
168
168
  )
169
169
  ]),
170
- suffix: withCtx(() => [
171
- createVNode(_component_el_icon, {
172
- color: "#E6A23C",
173
- size: __props.searchsize,
174
- onClick: _cache[0] || (_cache[0] = withModifiers(() => visibleopenDialog.value = true, ["stop"]))
175
- }, {
176
- default: withCtx(() => [
177
- createVNode(unref(Search))
178
- ]),
179
- _: 1
180
- /* STABLE */
181
- }, 8, ["size"]),
182
- __props.openType == 0 ? (openBlock(), createBlock(_sfc_main$1, {
183
- key: 0,
184
- visible: visibleopenDialog.value,
185
- "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => visibleopenDialog.value = $event),
186
- orgService: __props.orgService,
187
- orgAction: __props.orgAction,
188
- orgparas: __props.params,
189
- title: __props.title,
190
- userService: __props.userService,
191
- userAction: __props.userAction,
192
- userParams: __props.params,
193
- onChange: handleSelectDialogChange
194
- }, null, 8, ["visible", "orgService", "orgAction", "orgparas", "title", "userService", "userAction", "userParams"])) : createCommentVNode("v-if", true),
195
- __props.openType == 2 ? (openBlock(), createBlock(_sfc_main$2, {
196
- key: 1,
197
- visible: visibleopenDialog.value,
198
- "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => visibleopenDialog.value = $event),
199
- title: __props.title,
200
- userService: __props.userService,
201
- userAction: __props.userAction,
202
- userParams: __props.params,
203
- onChange: handleSelectDialogChange
204
- }, null, 8, ["visible", "title", "userService", "userAction", "userParams"])) : createCommentVNode("v-if", true)
205
- ]),
206
- _: 1
207
- /* STABLE */
208
- }, 8, ["modelValue", "placeholder"]);
170
+ _: 2
171
+ /* DYNAMIC */
172
+ }, [
173
+ __props.openType > -1 ? {
174
+ name: "suffix",
175
+ fn: withCtx(() => [
176
+ createVNode(_component_el_icon, {
177
+ color: "#E6A23C",
178
+ size: __props.searchsize,
179
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => visibleopenDialog.value = true, ["stop"]))
180
+ }, {
181
+ default: withCtx(() => [
182
+ createVNode(unref(Search))
183
+ ]),
184
+ _: 1
185
+ /* STABLE */
186
+ }, 8, ["size"]),
187
+ __props.openType == 0 ? (openBlock(), createBlock(_sfc_main$1, {
188
+ key: 0,
189
+ visible: visibleopenDialog.value,
190
+ "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => visibleopenDialog.value = $event),
191
+ orgService: __props.orgService,
192
+ orgAction: __props.orgAction,
193
+ orgparas: __props.params,
194
+ title: __props.title,
195
+ userService: __props.userService,
196
+ userAction: __props.userAction,
197
+ userParams: __props.params,
198
+ onChange: handleSelectDialogChange
199
+ }, null, 8, ["visible", "orgService", "orgAction", "orgparas", "title", "userService", "userAction", "userParams"])) : createCommentVNode("v-if", true),
200
+ __props.openType == 2 ? (openBlock(), createBlock(_sfc_main$2, {
201
+ key: 1,
202
+ visible: visibleopenDialog.value,
203
+ "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => visibleopenDialog.value = $event),
204
+ title: __props.title,
205
+ userService: __props.userService,
206
+ userAction: __props.userAction,
207
+ userParams: __props.params,
208
+ onChange: handleSelectDialogChange
209
+ }, null, 8, ["visible", "title", "userService", "userAction", "userParams"])) : createCommentVNode("v-if", true)
210
+ ]),
211
+ key: "0"
212
+ } : void 0
213
+ ]), 1032, ["modelValue", "placeholder"]);
209
214
  };
210
215
  }
211
216
  });
@@ -0,0 +1,6 @@
1
+ import './index.vue.mjs';
2
+ import _sfc_main from './index2.vue.mjs';
3
+
4
+ const Fmdatepicker = _sfc_main;
5
+
6
+ export { Fmdatepicker };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './index2.vue.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,56 @@
1
+ import { defineComponent, useModel, onMounted, nextTick, resolveComponent, openBlock, createBlock, mergeModels } from 'vue';
2
+ import '../../utils/index.mjs';
3
+ import { getBdate, getEdate, formatDate } from '../../utils/formatTime.mjs';
4
+
5
+ var _sfc_main = /* @__PURE__ */ defineComponent({
6
+ ...{
7
+ name: "Fmdatepicker"
8
+ },
9
+ __name: "index",
10
+ props: /* @__PURE__ */ mergeModels({
11
+ dateType: {
12
+ type: String,
13
+ default: "bdate"
14
+ },
15
+ adddaynum: {
16
+ type: Number,
17
+ default: 0
18
+ }
19
+ }, {
20
+ "modelValue": {},
21
+ "modelModifiers": {}
22
+ }),
23
+ emits: ["update:modelValue"],
24
+ setup(__props) {
25
+ const modeValue = useModel(__props, "modelValue");
26
+ const props = __props;
27
+ onMounted(() => {
28
+ nextTick(() => {
29
+ initdate();
30
+ });
31
+ });
32
+ const initdate = () => {
33
+ if (props.dateType === "bdate" && (modeValue.value == null || modeValue.value == void 0 || modeValue.value == "")) {
34
+ modeValue.value = getBdate(props.adddaynum);
35
+ } else if (props.dateType === "edate" && (modeValue.value == null || modeValue.value == void 0 || modeValue.value == "")) {
36
+ modeValue.value = getEdate(props.adddaynum);
37
+ } else if (props.dateType === "curday" && (modeValue.value == null || modeValue.value == void 0 || modeValue.value == "")) {
38
+ modeValue.value = formatDate(/* @__PURE__ */ new Date(), "YYYY-mm-dd");
39
+ }
40
+ };
41
+ initdate();
42
+ return (_ctx, _cache) => {
43
+ const _component_el_date_picker = resolveComponent("el-date-picker");
44
+ return openBlock(), createBlock(_component_el_date_picker, {
45
+ class: "fmdatepicker",
46
+ modelValue: modeValue.value,
47
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modeValue.value = $event),
48
+ type: "date",
49
+ format: "YYYY-MM-DD",
50
+ "value-format": "YYYY-MM-DD"
51
+ }, null, 8, ["modelValue"]);
52
+ };
53
+ }
54
+ });
55
+
56
+ export { _sfc_main as default };
@@ -15,3 +15,4 @@ export { FmSelect } from './fm-select/index.mjs';
15
15
  export { Fminputdropdown } from './fm-inputdropdown/index.mjs';
16
16
  export { FmInputNumber } from './fm-inputnumber/index.mjs';
17
17
  export { FmAutocomplete } from './fm-autocomplete/index.mjs';
18
+ export { Fmdatepicker } from './fm-datepicker/index.mjs';
@@ -106,5 +106,16 @@ function formatAxis(param, t) {
106
106
  else if (hour < 22) return getMessage("eveningGreeting");
107
107
  else return getMessage("nightGreeting");
108
108
  }
109
+ function getBdate(num = 1) {
110
+ const firstDay = /* @__PURE__ */ new Date();
111
+ firstDay.setDate(num);
112
+ return formatDate(firstDay, "YYYY-mm-dd");
113
+ }
114
+ function getEdate(num = 0) {
115
+ const lastDay = /* @__PURE__ */ new Date();
116
+ lastDay.setMonth(lastDay.getMonth() + 1, 0);
117
+ if (num > 0) lastDay.setDate(num);
118
+ return formatDate(lastDay, "YYYY-mm-dd");
119
+ }
109
120
 
110
- export { formatAxis, formatDate, formatPast, getWeek };
121
+ export { formatAxis, formatDate, formatPast, getBdate, getEdate, getWeek };
@@ -0,0 +1,29 @@
1
+ const AppItem = {
2
+ AccountInit: 100,
3
+ AccountJust: 101,
4
+ BookFare: 120,
5
+ BookOtherIn: 121,
6
+ BookOtherOut: 122,
7
+ CarTeam: 125
8
+ };
9
+ function getAppItemData(num = 125) {
10
+ const reldata = [
11
+ { id: 100, name: "\u8D26\u6237\u521D\u59CB\u5316" },
12
+ { id: 101, name: "\u8D26\u6237\u8C03\u8D26" },
13
+ { id: 120, name: "\u8BA2\u5355\u6536\u6B3E" },
14
+ { id: 121, name: "\u5176\u4ED6\u6536\u5165" },
15
+ { id: 122, name: "\u5176\u4ED6\u652F\u51FA" },
16
+ { id: 125, name: "\u4ED8\u8F66\u8D39" }
17
+ ];
18
+ return reldata.filter((x) => x.id <= num);
19
+ }
20
+ function getAppItemText(id, num = 125) {
21
+ let data = getAppItemData(num);
22
+ let item = data.find((x) => x.id == id);
23
+ if (item) {
24
+ return item.name;
25
+ }
26
+ return "";
27
+ }
28
+
29
+ export { AppItem, getAppItemData, getAppItemText };
@@ -5,7 +5,7 @@ export { signatureByKSort } from './data-signature.mjs';
5
5
  export { downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, getFileName, openWindow } from './download.mjs';
6
6
  export { exportExcel } from './exportExcel.mjs';
7
7
  export { flowLoading } from './flowLoading.mjs';
8
- export { formatAxis, formatDate, formatPast, getWeek } from './formatTime.mjs';
8
+ export { formatAxis, formatDate, formatPast, getBdate, getEdate, getWeek } from './formatTime.mjs';
9
9
  export { useFormRulePresets } from './formRule.mjs';
10
10
  export { validateFormWithScroll, validateFormWithScrollCallback } from './formValidate.mjs';
11
11
  import './getStyleSheets.mjs';
@@ -16,6 +16,7 @@ import './md5Signature.mjs';
16
16
  export { getFileUrl, showFileUrl } from './uploadfileurl.mjs';
17
17
  export { accessTokenKey, axiosInstance, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, decryptJWT, getHeader, getJWTDate, getToken, reLoadLoginAccessToken, refreshAccessTokenKey, request2, default as service, sleep, tansParams } from './request.mjs';
18
18
  export { saulVModel } from './saulVModel.mjs';
19
+ export { AppItem, getAppItemData, getAppItemText } from './gloabdata.mjs';
19
20
  export { Local, Session } from './storage.mjs';
20
21
  export { useChangeColor } from './theme.mjs';
21
22
  export { judgementIdCard, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl } from './toolsValidate.mjs';
@@ -35,3 +35,13 @@ export declare function formatPast(param: string | Date, format?: string): strin
35
35
  * @returns 返回拼接后的时间字符串
36
36
  */
37
37
  export declare function formatAxis(param: Date, t?: Function): string;
38
+ /**
39
+ *
40
+ * @returns 返回当前月的第一天
41
+ */
42
+ export declare function getBdate(num?: number): string;
43
+ /**
44
+ *
45
+ * @returns 返回当前月的最后一天
46
+ */
47
+ export declare function getEdate(num?: number): string;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * 全局数据 业务类型
3
+ */
4
+ export declare const AppItem: {
5
+ AccountInit: number;
6
+ AccountJust: number;
7
+ BookFare: number;
8
+ BookOtherIn: number;
9
+ BookOtherOut: number;
10
+ CarTeam: number;
11
+ };
12
+ /**
13
+ * 获取 业务数据类型下拉
14
+ */
15
+ export declare function getAppItemData(num?: number): {
16
+ id: number;
17
+ name: string;
18
+ }[];
19
+ /**
20
+ *
21
+ * @param id 业务类型id
22
+ * @returns 业务名称
23
+ */
24
+ export declare function getAppItemText(id: number, num?: number): string;
@@ -16,6 +16,7 @@ export * from './md5Signature';
16
16
  export * from './uploadfileurl';
17
17
  export * from './request';
18
18
  export * from './saulVModel';
19
+ export * from './gloabdata';
19
20
  export * from './storage';
20
21
  export * from './theme';
21
22
  export * from './toolsValidate';