From fe1ba1318b2bdc3f0aa945a1965084ced72f0ea3 Mon Sep 17 00:00:00 2001 From: neverland Date: Fri, 19 Jun 2020 06:16:56 +0800 Subject: [PATCH] chore(Picker): prefer using textContent (#6569) --- src/picker/PickerColumn.js | 2 +- .../test/__snapshots__/index.spec.js.snap | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/picker/PickerColumn.js b/src/picker/PickerColumn.js index bc3ee03df..e6a91317e 100644 --- a/src/picker/PickerColumn.js +++ b/src/picker/PickerColumn.js @@ -285,7 +285,7 @@ export default createComponent({ const childData = { class: 'van-ellipsis', domProps: { - [this.allowHtml ? 'innerHTML' : 'innerText']: text, + [this.allowHtml ? 'innerHTML' : 'textContent']: text, }, }; diff --git a/src/picker/test/__snapshots__/index.spec.js.snap b/src/picker/test/__snapshots__/index.spec.js.snap index 2a6f8bb0d..fe9515293 100644 --- a/src/picker/test/__snapshots__/index.spec.js.snap +++ b/src/picker/test/__snapshots__/index.spec.js.snap @@ -4,25 +4,25 @@ exports[`column watch default index 1`] = `
@@ -32,25 +32,25 @@ exports[`column watch default index 2`] = `
@@ -77,7 +77,7 @@ exports[`not allow html 1`] = `