@fmdevui/fm-dev 1.0.70 → 1.0.72
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/es/core/stores/ainputdropdow.d.ts +17 -0
- package/es/core/utils/comm/formatTime.d.ts +10 -0
- package/es/index.mjs +1 -1
- package/es/packages/core/index.mjs +1 -1
- package/es/packages/core/stores/ainputdropdow.mjs +24 -0
- package/es/packages/core/ui/components/inputdropdown/index.vue2.mjs +4 -5
- package/es/packages/core/utils/comm/formatTime.mjs +12 -1
- package/es/packages/core/utils/comm/index.mjs +1 -1
- package/es/packages/core/utils/index.mjs +1 -1
- package/index.js +1443 -1412
- package/index.min.js +31 -31
- package/index.min.mjs +31 -31
- package/index.mjs +1443 -1414
- package/lib/core/stores/ainputdropdow.d.ts +17 -0
- package/lib/core/utils/comm/formatTime.d.ts +10 -0
- package/lib/index.js +2 -0
- package/lib/packages/core/index.js +2 -0
- package/lib/packages/core/stores/ainputdropdow.js +26 -0
- package/lib/packages/core/ui/components/inputdropdown/index.vue2.js +4 -5
- package/lib/packages/core/utils/comm/formatTime.js +13 -0
- package/lib/packages/core/utils/comm/index.js +2 -0
- package/lib/packages/core/utils/index.js +2 -0
- package/package.json +1 -1
- /package/es/{component.css → defaults.css} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StoreDefinition } from 'pinia';
|
|
2
|
+
export declare const usefminputdropdownstore: StoreDefinition<"fminputdropdownstore", Pick<{
|
|
3
|
+
state: {
|
|
4
|
+
optionsData: any;
|
|
5
|
+
};
|
|
6
|
+
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean) => Promise<any>;
|
|
7
|
+
}, "state">, Pick<{
|
|
8
|
+
state: {
|
|
9
|
+
optionsData: any;
|
|
10
|
+
};
|
|
11
|
+
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean) => Promise<any>;
|
|
12
|
+
}, never>, Pick<{
|
|
13
|
+
state: {
|
|
14
|
+
optionsData: any;
|
|
15
|
+
};
|
|
16
|
+
getOptionsData: (apiService: string, apiAction: string, basecode: string, reload?: boolean) => Promise<any>;
|
|
17
|
+
}, "getOptionsData">>;
|
|
@@ -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;
|
package/lib/index.js
CHANGED
|
@@ -132,6 +132,8 @@ exports.verifyUrl = toolsValidate.verifyUrl;
|
|
|
132
132
|
exports.formatAxis = formatTime.formatAxis;
|
|
133
133
|
exports.formatDate = formatTime.formatDate;
|
|
134
134
|
exports.formatPast = formatTime.formatPast;
|
|
135
|
+
exports.getBdate = formatTime.getBdate;
|
|
136
|
+
exports.getEdate = formatTime.getEdate;
|
|
135
137
|
exports.getWeek = formatTime.getWeek;
|
|
136
138
|
exports.useChangeColor = theme.useChangeColor;
|
|
137
139
|
exports.downloadByBase64 = download.downloadByBase64;
|
|
@@ -132,6 +132,8 @@ exports.verifyUrl = toolsValidate.verifyUrl;
|
|
|
132
132
|
exports.formatAxis = formatTime.formatAxis;
|
|
133
133
|
exports.formatDate = formatTime.formatDate;
|
|
134
134
|
exports.formatPast = formatTime.formatPast;
|
|
135
|
+
exports.getBdate = formatTime.getBdate;
|
|
136
|
+
exports.getEdate = formatTime.getEdate;
|
|
135
137
|
exports.getWeek = formatTime.getWeek;
|
|
136
138
|
exports.useChangeColor = theme.useChangeColor;
|
|
137
139
|
exports.downloadByBase64 = download.downloadByBase64;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var pinia = require('pinia');
|
|
4
|
+
var index = require('../api/base/index.js');
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
const usefminputdropdownstore = pinia.defineStore("fminputdropdownstore", () => {
|
|
8
|
+
const state = vue.reactive({
|
|
9
|
+
optionsData: {}
|
|
10
|
+
});
|
|
11
|
+
const getOptionsData = async (apiService, apiAction, basecode, reload = false) => {
|
|
12
|
+
if (!reload) {
|
|
13
|
+
if (state.optionsData[basecode] && state.optionsData[basecode].length > 0) {
|
|
14
|
+
return state.optionsData[basecode];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const res = await index.useBaseApi(apiService).get(null, apiAction + "/?codetype=" + basecode);
|
|
18
|
+
return state.optionsData[basecode] = res.data.result ?? [];
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
state,
|
|
22
|
+
getOptionsData
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
exports.usefminputdropdownstore = usefminputdropdownstore;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var svg = require('@element-plus/icons-vue');
|
|
7
|
-
var
|
|
7
|
+
var ainputdropdow = require('../../../stores/ainputdropdow.js');
|
|
8
8
|
|
|
9
9
|
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
10
10
|
...{
|
|
@@ -81,6 +81,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
81
81
|
const modeValueId = vue.useModel(__props, "id");
|
|
82
82
|
const modeValueName = vue.useModel(__props, "name");
|
|
83
83
|
const props = __props;
|
|
84
|
+
const useBaseApi = ainputdropdow.usefminputdropdownstore();
|
|
84
85
|
const state = vue.reactive({
|
|
85
86
|
optionData: props.optionData
|
|
86
87
|
});
|
|
@@ -94,14 +95,12 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
94
95
|
vue.onMounted(async () => {
|
|
95
96
|
state.optionData = props.optionData;
|
|
96
97
|
if (props.basecode && props.basecode != "") {
|
|
97
|
-
|
|
98
|
-
state.optionData = res.data.result ?? [];
|
|
98
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode);
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
const handRestdata = async () => {
|
|
102
102
|
if (props.basecode && props.basecode != "") {
|
|
103
|
-
|
|
104
|
-
state.optionData = res.data.result ?? [];
|
|
103
|
+
state.optionData = await useBaseApi.getOptionsData(props.apiService, props.apiAction, props.basecode, true);
|
|
105
104
|
}
|
|
106
105
|
};
|
|
107
106
|
return (_ctx, _cache) => {
|
|
@@ -108,8 +108,21 @@ function formatAxis(param, t) {
|
|
|
108
108
|
else if (hour < 22) return getMessage("eveningGreeting");
|
|
109
109
|
else return getMessage("nightGreeting");
|
|
110
110
|
}
|
|
111
|
+
function getBdate(num = 1) {
|
|
112
|
+
const firstDay = /* @__PURE__ */ new Date();
|
|
113
|
+
firstDay.setDate(num);
|
|
114
|
+
return formatDate(firstDay, "YYYY-mm-dd");
|
|
115
|
+
}
|
|
116
|
+
function getEdate(num = 0) {
|
|
117
|
+
const lastDay = /* @__PURE__ */ new Date();
|
|
118
|
+
lastDay.setMonth(lastDay.getMonth() + 1, 0);
|
|
119
|
+
if (num > 0) lastDay.setDate(num);
|
|
120
|
+
return formatDate(lastDay, "YYYY-mm-dd");
|
|
121
|
+
}
|
|
111
122
|
|
|
112
123
|
exports.formatAxis = formatAxis;
|
|
113
124
|
exports.formatDate = formatDate;
|
|
114
125
|
exports.formatPast = formatPast;
|
|
126
|
+
exports.getBdate = getBdate;
|
|
127
|
+
exports.getEdate = getEdate;
|
|
115
128
|
exports.getWeek = getWeek;
|
|
@@ -37,6 +37,8 @@ exports.verifyUrl = toolsValidate.verifyUrl;
|
|
|
37
37
|
exports.formatAxis = formatTime.formatAxis;
|
|
38
38
|
exports.formatDate = formatTime.formatDate;
|
|
39
39
|
exports.formatPast = formatTime.formatPast;
|
|
40
|
+
exports.getBdate = formatTime.getBdate;
|
|
41
|
+
exports.getEdate = formatTime.getEdate;
|
|
40
42
|
exports.getWeek = formatTime.getWeek;
|
|
41
43
|
exports.useChangeColor = theme.useChangeColor;
|
|
42
44
|
exports.downloadByBase64 = download.downloadByBase64;
|
|
@@ -58,6 +58,8 @@ exports.verifyUrl = toolsValidate.verifyUrl;
|
|
|
58
58
|
exports.formatAxis = formatTime.formatAxis;
|
|
59
59
|
exports.formatDate = formatTime.formatDate;
|
|
60
60
|
exports.formatPast = formatTime.formatPast;
|
|
61
|
+
exports.getBdate = formatTime.getBdate;
|
|
62
|
+
exports.getEdate = formatTime.getEdate;
|
|
61
63
|
exports.getWeek = formatTime.getWeek;
|
|
62
64
|
exports.useChangeColor = theme.useChangeColor;
|
|
63
65
|
exports.downloadByBase64 = download.downloadByBase64;
|
package/package.json
CHANGED
|
File without changes
|