@mpxjs/api-proxy
Advanced tools
Comparing version 2.9.28 to 2.9.38
{ | ||
"name": "@mpxjs/api-proxy", | ||
"version": "2.9.28", | ||
"version": "2.9.38", | ||
"description": "convert miniprogram API at each end", | ||
@@ -42,3 +42,3 @@ "module": "src/index.js", | ||
}, | ||
"gitHead": "d573387d467bb2efb88cca627380627a1d45a4cd" | ||
"gitHead": "5e2740e2091edda91eda9ffe775989c7fd9838df" | ||
} |
@@ -98,2 +98,12 @@ /** | ||
function parseDataset (dataset) { | ||
const parsed = {} | ||
for (const key in dataset) { | ||
if (hasOwn(dataset, key)) { | ||
parsed[key] = JSON.parse(dataset[key]) | ||
} | ||
} | ||
return parsed | ||
} | ||
const isBrowser = typeof window !== 'undefined' | ||
@@ -119,3 +129,4 @@ | ||
throwSSRWarning, | ||
ENV_OBJ | ||
ENV_OBJ, | ||
parseDataset | ||
} |
import { nextTick } from '../next-tick' | ||
import { parseDataset } from '../../../common/js' | ||
@@ -30,4 +31,5 @@ let isInit = true | ||
id: { | ||
value: entry.target.getAttribute('id') || '', | ||
writable: false, | ||
get () { | ||
return entry.target.id || '' | ||
}, | ||
enumerable: true, | ||
@@ -37,4 +39,5 @@ configurable: true | ||
dataset: { | ||
value: entry.target.dataset || {}, | ||
writable: false, | ||
get () { | ||
return parseDataset(entry.target.dataset) | ||
}, | ||
enumerable: true, | ||
@@ -41,0 +44,0 @@ configurable: true |
import NodesRef from './NodesRef' | ||
import { parseDataset } from '../../../common/js' | ||
@@ -85,3 +86,3 @@ class SelectQuery { | ||
if (id) res.id = el.id | ||
if (dataset) res.dataset = Object.assign({}, el.dataset) | ||
if (dataset) res.dataset = parseDataset(el.dataset) | ||
if (rect) { | ||
@@ -88,0 +89,0 @@ if (isViewport) { |
@@ -1,2 +0,2 @@ | ||
import { isBrowser, throwSSRWarning } from '../../../../common/js/utils' | ||
import { isBrowser, throwSSRWarning } from '../../../../common/js' | ||
const fnMap = new Map() | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { isBrowser } from '../../../common/js/utils' | ||
import { isBrowser } from '../../../common/js' | ||
@@ -3,0 +3,0 @@ const callbacks = [] |
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
137336
3566