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

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

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