@iankibetsh/shframework 3.0.7 → 3.0.9
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 +9 -8
- package/dist/library.mjs +9 -8
- 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),
|
|
@@ -4514,7 +4516,6 @@ var script$b = {
|
|
|
4514
4516
|
endPoint = 'sh-ql';
|
|
4515
4517
|
data.query = this.query;
|
|
4516
4518
|
}
|
|
4517
|
-
console.log(endPoint, this.range);
|
|
4518
4519
|
shApis.doGet(endPoint, data).then(req => {
|
|
4519
4520
|
this.$emit('dataReloaded', this.pagination_data);
|
|
4520
4521
|
this.loading = 'done';
|
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),
|
|
@@ -4502,7 +4504,6 @@ var script$b = {
|
|
|
4502
4504
|
endPoint = 'sh-ql';
|
|
4503
4505
|
data.query = this.query;
|
|
4504
4506
|
}
|
|
4505
|
-
console.log(endPoint, this.range);
|
|
4506
4507
|
shApis.doGet(endPoint, data).then(req => {
|
|
4507
4508
|
this.$emit('dataReloaded', this.pagination_data);
|
|
4508
4509
|
this.loading = 'done';
|