@winchsa/ui 0.1.18 → 0.1.21

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.
@@ -306,7 +306,7 @@ defineExpose({
306
306
 
307
307
  <template #clear>
308
308
  <div
309
- v-if="(Array.isArray(value) && value?.length > 0 || value) && value && !disabled"
309
+ v-if="(Array.isArray(value) ? value.length > 0 : !!value) && !disabled && clearable"
310
310
  class="multiselect-clear cursor-pointer"
311
311
  @mousedown.prevent.stop="value = null"
312
312
  >
@@ -437,7 +437,7 @@ defineExpose({
437
437
 
438
438
  <template #clear>
439
439
  <div
440
- v-if="(Array.isArray(value) && value?.length > 0 || value) && value && !disabled && clearable"
440
+ v-if="(Array.isArray(value) ? value.length > 0 : !!value) && !disabled && clearable"
441
441
  class="multiselect-clear cursor-pointer"
442
442
  @mousedown.prevent.stop="value = null"
443
443
  >
@@ -13,12 +13,12 @@ const clientInstance = _ofetch.ofetch.create({
13
13
  async function apiRequest(method, path, options) {
14
14
  const baseUrl = process.env.VITE_BASE_API;
15
15
  const prefix = process.env.VITE_APP_TYPE;
16
+ const token = localStorage.getItem("token");
16
17
  const {
17
18
  ignoreUrlPrefix,
18
19
  headers,
19
20
  ...restOptions
20
21
  } = options || {};
21
- const token = localStorage.getItem("token");
22
22
  return clientInstance(path, {
23
23
  method,
24
24
  baseURL: ignoreUrlPrefix ? baseUrl : `${baseUrl}/${prefix}`,
@@ -26,7 +26,7 @@ async function apiRequest(method, path, options) {
26
26
  headers: {
27
27
  "Accept": "application/json",
28
28
  "X-Requested-With": "XMLHttpRequest",
29
- "Accept-Language": localStorage.getItem("token"),
29
+ "Accept-Language": localStorage.getItem("winch-lang"),
30
30
  "User-Platform": "web",
31
31
  ...(token && {
32
32
  Authorization: `Bearer ${token}`
@@ -5,8 +5,8 @@ const clientInstance = ofetch.create({ credentials: "include" });
5
5
  async function apiRequest(method, path, options) {
6
6
  const baseUrl = import.meta.env.VITE_BASE_API;
7
7
  const prefix = import.meta.env.VITE_APP_TYPE;
8
- const { ignoreUrlPrefix, headers, ...restOptions } = options || {};
9
8
  const token = localStorage.getItem("token");
9
+ const { ignoreUrlPrefix, headers, ...restOptions } = options || {};
10
10
  return clientInstance(path, {
11
11
  method,
12
12
  baseURL: ignoreUrlPrefix ? baseUrl : `${baseUrl}/${prefix}`,
@@ -14,7 +14,7 @@ async function apiRequest(method, path, options) {
14
14
  headers: {
15
15
  "Accept": "application/json",
16
16
  "X-Requested-With": "XMLHttpRequest",
17
- "Accept-Language": localStorage.getItem("token"),
17
+ "Accept-Language": localStorage.getItem("winch-lang"),
18
18
  "User-Platform": "web",
19
19
  ...token && { Authorization: `Bearer ${token}` },
20
20
  ...headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winchsa/ui",
3
- "version": "0.1.18",
3
+ "version": "0.1.21",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "publishConfig": {