@factoringplus/pl-components-pack-v3 0.4.79 → 0.4.80
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.
|
@@ -37829,13 +37829,13 @@ const formatDateObj = (parseObj, typeToString = false) => {
|
|
|
37829
37829
|
recursiveDeep(obj);
|
|
37830
37830
|
return obj;
|
|
37831
37831
|
};
|
|
37832
|
-
const ApiJs = function(optionsRequest, isGetResourse = false, token) {
|
|
37832
|
+
const ApiJs = function(optionsRequest, isGetResourse = false, token, isChat = false) {
|
|
37833
37833
|
return new Promise((resolve, reject) => {
|
|
37834
37834
|
const options = { ...optionsRequest };
|
|
37835
37835
|
axios({
|
|
37836
37836
|
url: options.url,
|
|
37837
37837
|
method: options.method,
|
|
37838
|
-
params: formatDateObj(options.params, true),
|
|
37838
|
+
params: isChat ? options.params : formatDateObj(options.params, true),
|
|
37839
37839
|
headers: {
|
|
37840
37840
|
authorization: token,
|
|
37841
37841
|
...options.headers
|
|
@@ -41867,21 +41867,44 @@ const useTestStore = defineStore("test", {
|
|
|
41867
41867
|
}
|
|
41868
41868
|
}
|
|
41869
41869
|
});
|
|
41870
|
+
const useConfigStore = defineStore("config", {
|
|
41871
|
+
state: () => ({
|
|
41872
|
+
token: 0
|
|
41873
|
+
}),
|
|
41874
|
+
actions: {
|
|
41875
|
+
getToken(token) {
|
|
41876
|
+
this.token = token;
|
|
41877
|
+
}
|
|
41878
|
+
}
|
|
41879
|
+
});
|
|
41870
41880
|
const _sfc_main = {
|
|
41871
41881
|
__name: "pl-chat-manager",
|
|
41882
|
+
props: {
|
|
41883
|
+
token: {
|
|
41884
|
+
type: String,
|
|
41885
|
+
value: ""
|
|
41886
|
+
}
|
|
41887
|
+
},
|
|
41872
41888
|
setup(__props) {
|
|
41889
|
+
const props = __props;
|
|
41890
|
+
const {
|
|
41891
|
+
token
|
|
41892
|
+
} = toRefs(props);
|
|
41873
41893
|
const testStore = useTestStore();
|
|
41894
|
+
const configStore = useConfigStore();
|
|
41874
41895
|
const getInput = (evt) => {
|
|
41875
41896
|
console.log(evt.target.value);
|
|
41876
41897
|
testStore.setTest(evt.target.value);
|
|
41877
41898
|
};
|
|
41899
|
+
configStore.getToken(token);
|
|
41878
41900
|
return (_ctx, _cache) => {
|
|
41879
41901
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
41880
41902
|
createElementVNode("div", null, "input value: " + toDisplayString(unref(testStore).test), 1),
|
|
41881
41903
|
createElementVNode("input", {
|
|
41882
41904
|
onInput: getInput,
|
|
41883
41905
|
type: "text"
|
|
41884
|
-
}, null, 32)
|
|
41906
|
+
}, null, 32),
|
|
41907
|
+
createElementVNode("div", null, "token: " + toDisplayString(unref(token)), 1)
|
|
41885
41908
|
], 64);
|
|
41886
41909
|
};
|
|
41887
41910
|
}
|