@iankibetsh/shframework 3.0.8 → 4.1.0
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/dist/library.js +11 -9
- package/dist/library.mjs +11 -9
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -2094,18 +2094,19 @@ function filterData(e){
|
|
|
2094
2094
|
}
|
|
2095
2095
|
let filterValue = e.target.innerText;
|
|
2096
2096
|
searchText.value = filterValue;
|
|
2097
|
-
|
|
2097
|
+
console.log(props);
|
|
2098
|
+
if (props.url) {
|
|
2099
|
+
shApis.doGet(props.url, { all: 1,filter_value: filterValue }).then(res => {
|
|
2100
|
+
suggestions.value = res.data.data ?? res.data;
|
|
2101
|
+
}).catch(res => {
|
|
2102
|
+
console.log(res);
|
|
2103
|
+
});
|
|
2104
|
+
} else if(props.data) {
|
|
2098
2105
|
suggestions.value = props.data.filter(item=>{
|
|
2099
2106
|
if(item.name.toLowerCase().includes(filterValue.toLowerCase())){
|
|
2100
2107
|
return item
|
|
2101
2108
|
}
|
|
2102
2109
|
});
|
|
2103
|
-
} else if (props.url) {
|
|
2104
|
-
shApis.doGet(props.url, { all: 1,filter_value: filterValue }).then(res => {
|
|
2105
|
-
suggestions.value = res.data.data ?? res.data;
|
|
2106
|
-
}).catch(res => {
|
|
2107
|
-
console.log(res);
|
|
2108
|
-
});
|
|
2109
2110
|
}
|
|
2110
2111
|
}
|
|
2111
2112
|
|
|
@@ -2136,6 +2137,7 @@ return (_ctx, _cache) => {
|
|
|
2136
2137
|
contenteditable: "true",
|
|
2137
2138
|
onClick: filterData,
|
|
2138
2139
|
onInput: filterData,
|
|
2140
|
+
onChange: filterData,
|
|
2139
2141
|
class: "flex-fill h-100 sh-suggestion-input"
|
|
2140
2142
|
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$9)
|
|
2141
2143
|
], 8 /* PROPS */, _hoisted_2$d),
|
|
@@ -2471,7 +2473,7 @@ var script$s = {
|
|
|
2471
2473
|
if (!this.suggests) {
|
|
2472
2474
|
this.suggests = [];
|
|
2473
2475
|
}
|
|
2474
|
-
this.suggests.
|
|
2476
|
+
this.suggests[key] = this.fillSelects[key].data;
|
|
2475
2477
|
} else if (this.fillSelects[key].data) {
|
|
2476
2478
|
this.selectData[key] = this.fillSelects[key].data;
|
|
2477
2479
|
} else {
|
|
@@ -4305,7 +4307,7 @@ var script$b = {
|
|
|
4305
4307
|
return {
|
|
4306
4308
|
order_by: '',
|
|
4307
4309
|
order_method: '',
|
|
4308
|
-
per_page: shRepo.getShConfig('tablePerPage', 10),
|
|
4310
|
+
per_page: this.pageCount ?? shRepo.getShConfig('tablePerPage', 10),
|
|
4309
4311
|
page: 1,
|
|
4310
4312
|
exactMatch: false,
|
|
4311
4313
|
filter_value: '',
|
package/dist/library.mjs
CHANGED
|
@@ -2082,18 +2082,19 @@ function filterData(e){
|
|
|
2082
2082
|
}
|
|
2083
2083
|
let filterValue = e.target.innerText;
|
|
2084
2084
|
searchText.value = filterValue;
|
|
2085
|
-
|
|
2085
|
+
console.log(props);
|
|
2086
|
+
if (props.url) {
|
|
2087
|
+
shApis.doGet(props.url, { all: 1,filter_value: filterValue }).then(res => {
|
|
2088
|
+
suggestions.value = res.data.data ?? res.data;
|
|
2089
|
+
}).catch(res => {
|
|
2090
|
+
console.log(res);
|
|
2091
|
+
});
|
|
2092
|
+
} else if(props.data) {
|
|
2086
2093
|
suggestions.value = props.data.filter(item=>{
|
|
2087
2094
|
if(item.name.toLowerCase().includes(filterValue.toLowerCase())){
|
|
2088
2095
|
return item
|
|
2089
2096
|
}
|
|
2090
2097
|
});
|
|
2091
|
-
} else if (props.url) {
|
|
2092
|
-
shApis.doGet(props.url, { all: 1,filter_value: filterValue }).then(res => {
|
|
2093
|
-
suggestions.value = res.data.data ?? res.data;
|
|
2094
|
-
}).catch(res => {
|
|
2095
|
-
console.log(res);
|
|
2096
|
-
});
|
|
2097
2098
|
}
|
|
2098
2099
|
}
|
|
2099
2100
|
|
|
@@ -2124,6 +2125,7 @@ return (_ctx, _cache) => {
|
|
|
2124
2125
|
contenteditable: "true",
|
|
2125
2126
|
onClick: filterData,
|
|
2126
2127
|
onInput: filterData,
|
|
2128
|
+
onChange: filterData,
|
|
2127
2129
|
class: "flex-fill h-100 sh-suggestion-input"
|
|
2128
2130
|
}, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$9)
|
|
2129
2131
|
], 8 /* PROPS */, _hoisted_2$d),
|
|
@@ -2459,7 +2461,7 @@ var script$s = {
|
|
|
2459
2461
|
if (!this.suggests) {
|
|
2460
2462
|
this.suggests = [];
|
|
2461
2463
|
}
|
|
2462
|
-
this.suggests.
|
|
2464
|
+
this.suggests[key] = this.fillSelects[key].data;
|
|
2463
2465
|
} else if (this.fillSelects[key].data) {
|
|
2464
2466
|
this.selectData[key] = this.fillSelects[key].data;
|
|
2465
2467
|
} else {
|
|
@@ -4293,7 +4295,7 @@ var script$b = {
|
|
|
4293
4295
|
return {
|
|
4294
4296
|
order_by: '',
|
|
4295
4297
|
order_method: '',
|
|
4296
|
-
per_page: shRepo.getShConfig('tablePerPage', 10),
|
|
4298
|
+
per_page: this.pageCount ?? shRepo.getShConfig('tablePerPage', 10),
|
|
4297
4299
|
page: 1,
|
|
4298
4300
|
exactMatch: false,
|
|
4299
4301
|
filter_value: '',
|