Comparing version 0.8.1 to 0.8.2
{ | ||
"name": "material", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"description": "A lightweight implementation of Material Design Components for the web - ES6", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
export default { | ||
add (info, context) { | ||
// console.log('list add', info) | ||
// console.log('list add', info) | ||
if (!this.dataStore) return | ||
context = context || null | ||
context = context !== undefined ? context : null | ||
this.dataList = this.dataList || [] | ||
if (context === 'bottom') { | ||
if (typeof context === 'number') { | ||
if (this.data) { | ||
this.data.splice(context, 0, info) | ||
} else { | ||
console.log('error no data') | ||
} | ||
if (this.dataList) { | ||
this.dataList.splice(context, 0, info[this.dataId]) | ||
} | ||
} else if (context === 'bottom') { | ||
if (this.data) { this.data.push(info) } | ||
@@ -33,2 +43,4 @@ if (this.dataList) { this.dataList.push(info[this.dataId]) } | ||
this.emit('added', info, context) | ||
// this.ui.body.scrollTo(0, this.ui.body.scrollTop + 1) | ||
@@ -39,2 +51,3 @@ // this.ui.body.scrollTo(0, this.ui.body.scrollTop - 1) | ||
} | ||
} |
@@ -23,3 +23,2 @@ | ||
get (page, size, more) { | ||
7 | ||
// console.log('fetch', page, size, more) | ||
@@ -26,0 +25,0 @@ if (more !== true) { |
@@ -24,3 +24,3 @@ const request = async (url, method = 'GET', body = null, headers = {}, signal = null, debug = false) => { | ||
if (!response.ok) { | ||
console.log('Error', response) | ||
// console.log('Error', response) | ||
} | ||
@@ -36,5 +36,5 @@ | ||
if (headers.Accept === 'text/xml') { | ||
return error | ||
throw error | ||
} else { | ||
return { error } | ||
throw { error } | ||
} | ||
@@ -41,0 +41,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
454624
10610