提交 c66826c2 编写于 作者: d-u-a's avatar d-u-a

update: nvue uni.createSelectorQuery 移除回调中属性id的#

上级 4f88281d
...@@ -72,7 +72,7 @@ function findAttrs (ids, elm, result) { ...@@ -72,7 +72,7 @@ function findAttrs (ids, elm, result) {
for (let i = 0; i < nodes.length; i++) { for (let i = 0; i < nodes.length; i++) {
let node = nodes[i] let node = nodes[i]
if (node.attr) { if (node.attr) {
let index = ids.indexOf('#' + node.attr.id) let index = ids.indexOf(node.attr.id)
if (index >= 0) { if (index >= 0) {
result[index] = { result[index] = {
id: ids[index], id: ids[index],
...@@ -95,7 +95,7 @@ function getSelectors (queue) { ...@@ -95,7 +95,7 @@ function getSelectors (queue) {
for (let i = 0; i < queue.length; i++) { for (let i = 0; i < queue.length; i++) {
const selector = queue[i].selector const selector = queue[i].selector
if (selector.indexOf('#') === 0) { if (selector.indexOf('#') === 0) {
ids.push(selector) ids.push(selector.substring(1))
} }
} }
return ids return ids
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册