From a66ff7deb0444b3e831e09060f5ce1d2e45d4581 Mon Sep 17 00:00:00 2001 From: zkwolf Date: Wed, 18 Dec 2019 13:05:59 +0800 Subject: [PATCH] fix: timepicker non-unique id (#1566) --- .../__tests__/__snapshots__/demo.test.js.snap | 4 +- .../__tests__/__snapshots__/demo.test.js.snap | 2 +- .../__snapshots__/index.test.js.snap | 88 +++++++++---------- .../__tests__/__snapshots__/demo.test.js.snap | 26 +++--- .../__snapshots__/index.test.js.snap | 2 +- components/vc-time-picker/TimePicker.jsx | 1 - 6 files changed, 61 insertions(+), 62 deletions(-) diff --git a/components/form/__tests__/__snapshots__/demo.test.js.snap b/components/form/__tests__/__snapshots__/demo.test.js.snap index 56f5da203..a67a01c66 100644 --- a/components/form/__tests__/__snapshots__/demo.test.js.snap +++ b/components/form/__tests__/__snapshots__/demo.test.js.snap @@ -506,7 +506,7 @@ exports[`renders ./components/form/demo/time-related-controls.vue correctly 1`]
-
+
@@ -734,7 +734,7 @@ exports[`renders ./components/form/demo/validate-static.vue correctly 1`] = `
-
+
diff --git a/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap b/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap index ceee6c17f..999cd07cf 100644 --- a/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap +++ b/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap @@ -39,7 +39,7 @@ exports[`renders ./components/locale-provider/demo/all.md correctly 1`] = `
-
~
~ diff --git a/components/locale-provider/__tests__/__snapshots__/index.test.js.snap b/components/locale-provider/__tests__/__snapshots__/index.test.js.snap index 3a926dd0f..9f40f1f8e 100644 --- a/components/locale-provider/__tests__/__snapshots__/index.test.js.snap +++ b/components/locale-provider/__tests__/__snapshots__/index.test.js.snap @@ -566,7 +566,7 @@ exports[`Locale Provider should display the text as ar 1`] = ` -
~
~ Click to confirm
@@ -980,7 +980,7 @@ exports[`Locale Provider should display the text as bg 1`] = `
-
~
~ Click to confirm
@@ -1394,7 +1394,7 @@ exports[`Locale Provider should display the text as ca 1`] = `
-
~
~ Click to confirm
@@ -1808,7 +1808,7 @@ exports[`Locale Provider should display the text as cs 1`] = `
-
~
~ Click to confirm
@@ -2222,7 +2222,7 @@ exports[`Locale Provider should display the text as da 1`] = `
-
~
~ Click to confirm
@@ -2636,7 +2636,7 @@ exports[`Locale Provider should display the text as de 1`] = `
-
~
~ Click to confirm
@@ -3050,7 +3050,7 @@ exports[`Locale Provider should display the text as el 1`] = `
-
~
~ Click to confirm
@@ -3464,7 +3464,7 @@ exports[`Locale Provider should display the text as en 1`] = `
-
~
~ Click to confirm
@@ -3878,7 +3878,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
-
~
~ Click to confirm
@@ -4292,7 +4292,7 @@ exports[`Locale Provider should display the text as es 1`] = `
-
~
~ Click to confirm
@@ -4706,7 +4706,7 @@ exports[`Locale Provider should display the text as et 1`] = `
-
~
~ Click to confirm
@@ -5120,7 +5120,7 @@ exports[`Locale Provider should display the text as fa 1`] = `
-
~
~ Click to confirm
@@ -5534,7 +5534,7 @@ exports[`Locale Provider should display the text as fi 1`] = `
-
~
~ Click to confirm
@@ -5948,7 +5948,7 @@ exports[`Locale Provider should display the text as fr 1`] = `
-
~
~ Click to confirm
@@ -6362,7 +6362,7 @@ exports[`Locale Provider should display the text as fr 2`] = `
-
~
~ Click to confirm
@@ -6776,7 +6776,7 @@ exports[`Locale Provider should display the text as he 1`] = `
-
~
~ Click to confirm
@@ -7190,7 +7190,7 @@ exports[`Locale Provider should display the text as hi 1`] = `
-
~
~ Click to confirm
@@ -7599,7 +7599,7 @@ exports[`Locale Provider should display the text as hu 1`] = `
-
~
~ Click to confirm
@@ -8013,7 +8013,7 @@ exports[`Locale Provider should display the text as id 1`] = `
-
~
~ Click to confirm
@@ -8427,7 +8427,7 @@ exports[`Locale Provider should display the text as is 1`] = `
-
~
~ Click to confirm
@@ -8841,7 +8841,7 @@ exports[`Locale Provider should display the text as it 1`] = `
-
~
~ Click to confirm
@@ -9255,7 +9255,7 @@ exports[`Locale Provider should display the text as ja 1`] = `
-
~
~ Click to confirm
@@ -9669,7 +9669,7 @@ exports[`Locale Provider should display the text as kn 1`] = `
-
~
~ Click to confirm
@@ -10078,7 +10078,7 @@ exports[`Locale Provider should display the text as ko 1`] = `
-
~
~ Click to confirm
@@ -10492,7 +10492,7 @@ exports[`Locale Provider should display the text as ku-iq 1`] = `
-
~
~ Click to confirm
@@ -10906,7 +10906,7 @@ exports[`Locale Provider should display the text as mn-mn 1`] = `
-
~
~ Click to confirm
@@ -11320,7 +11320,7 @@ exports[`Locale Provider should display the text as nb 1`] = `
-
~
~ Click to confirm
@@ -11734,7 +11734,7 @@ exports[`Locale Provider should display the text as ne-np 1`] = `
-
~
~ Click to confirm
@@ -12148,7 +12148,7 @@ exports[`Locale Provider should display the text as nl 1`] = `
-
~
~ Click to confirm
@@ -12562,7 +12562,7 @@ exports[`Locale Provider should display the text as nl-be 1`] = `
-
~
~ Click to confirm
@@ -12976,7 +12976,7 @@ exports[`Locale Provider should display the text as pl 1`] = `
-
~
~ Click to confirm
@@ -13390,7 +13390,7 @@ exports[`Locale Provider should display the text as pt 1`] = `
-
~
~ Click to confirm
@@ -13804,7 +13804,7 @@ exports[`Locale Provider should display the text as pt-br 1`] = `
-
~
~ Click to confirm
@@ -14218,7 +14218,7 @@ exports[`Locale Provider should display the text as ru 1`] = `
-
~
~ Click to confirm
@@ -14632,7 +14632,7 @@ exports[`Locale Provider should display the text as sk 1`] = `
-
~
~ Click to confirm
@@ -15046,7 +15046,7 @@ exports[`Locale Provider should display the text as sl 1`] = `
-
~
~ Click to confirm
@@ -15460,7 +15460,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
-
~
~ Click to confirm
@@ -15874,7 +15874,7 @@ exports[`Locale Provider should display the text as sv 1`] = `
-
~
~ Click to confirm
@@ -16288,7 +16288,7 @@ exports[`Locale Provider should display the text as th 1`] = `
-
~
~ Click to confirm
@@ -16702,7 +16702,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
-
~
~ Click to confirm
@@ -17116,7 +17116,7 @@ exports[`Locale Provider should display the text as uk 1`] = `
-
~
~ Click to confirm
@@ -17530,7 +17530,7 @@ exports[`Locale Provider should display the text as vi 1`] = `
-
~
~ Click to confirm
@@ -17944,7 +17944,7 @@ exports[`Locale Provider should display the text as zh-cn 1`] = `
-
~
~ Click to confirm
@@ -18358,7 +18358,7 @@ exports[`Locale Provider should display the text as zh-tw 1`] = `
-
~
~ Click to confirm
diff --git a/components/time-picker/__tests__/__snapshots__/demo.test.js.snap b/components/time-picker/__tests__/__snapshots__/demo.test.js.snap index 75d22135a..0dba5a7f7 100644 --- a/components/time-picker/__tests__/__snapshots__/demo.test.js.snap +++ b/components/time-picker/__tests__/__snapshots__/demo.test.js.snap @@ -1,42 +1,42 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`renders ./components/time-picker/demo/12hours.md correctly 1`] = `
`; +exports[`renders ./components/time-picker/demo/12hours.md correctly 1`] = `
`; -exports[`renders ./components/time-picker/demo/addon.md correctly 1`] = `
`; +exports[`renders ./components/time-picker/demo/addon.md correctly 1`] = `
`; -exports[`renders ./components/time-picker/demo/basic.md correctly 1`] = ``; +exports[`renders ./components/time-picker/demo/basic.md correctly 1`] = ``; exports[`renders ./components/time-picker/demo/disabled.md correctly 1`] = ` - `; exports[`renders ./components/time-picker/demo/hide-column.md correctly 1`] = ` - `; -exports[`renders ./components/time-picker/demo/interval-options.md correctly 1`] = ``; +exports[`renders ./components/time-picker/demo/interval-options.md correctly 1`] = ``; exports[`renders ./components/time-picker/demo/size.md correctly 1`] = ` -
`; -exports[`renders ./components/time-picker/demo/suffix.md correctly 1`] = ``; +exports[`renders ./components/time-picker/demo/suffix.md correctly 1`] = ``; exports[`renders ./components/time-picker/demo/value.md correctly 1`] = `
-

use value and @change



-

v-model



-

Do not change

use value and @change



+

v-model



+

Do not change

diff --git a/components/time-picker/__tests__/__snapshots__/index.test.js.snap b/components/time-picker/__tests__/__snapshots__/index.test.js.snap index 37a7b02f5..beee9e2d6 100644 --- a/components/time-picker/__tests__/__snapshots__/index.test.js.snap +++ b/components/time-picker/__tests__/__snapshots__/index.test.js.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`TimePicker not render clean icon when allowClear is false 1`] = ``; +exports[`TimePicker not render clean icon when allowClear is false 1`] = ``; exports[`TimePicker renders addon correctly 1`] = `
`; diff --git a/components/vc-time-picker/TimePicker.jsx b/components/vc-time-picker/TimePicker.jsx index 4905b0a60..10ca375b5 100644 --- a/components/vc-time-picker/TimePicker.jsx +++ b/components/vc-time-picker/TimePicker.jsx @@ -78,7 +78,6 @@ export default { popupClassName: '', popupStyle: {}, align: {}, - id: '', allowEmpty: true, showHour: true, showMinute: true,