File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,7 +145,6 @@ class DateTimePicker {
145145 const todayBtn = document . createElement ( "button" ) ;
146146 todayBtn . className = "datetime-btn today" ;
147147 todayBtn . textContent = "今天" ;
148-
149148 const confirmBtn = document . createElement ( "button" ) ;
150149 confirmBtn . className = "datetime-btn confirm" ;
151150 confirmBtn . textContent = "确定" ;
@@ -544,4 +543,4 @@ class DateTimePicker {
544543 ?. setAttribute ( "name" , forName ) ;
545544 }
546545 }
547- }
546+ }
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ class InputNumber {
2424
2525 const decreaseBtn = document . createElement ( "button" ) ;
2626 decreaseBtn . className = "input-number-button decrease" ;
27+ decreaseBtn . setAttribute ( "type" , "button" ) ;
2728 decreaseBtn . innerHTML = "-" ;
2829
2930 const input = document . createElement ( "input" ) ;
@@ -34,6 +35,7 @@ class InputNumber {
3435 const increaseBtn = document . createElement ( "button" ) ;
3536 increaseBtn . className = "input-number-button increase" ;
3637 increaseBtn . innerHTML = "+" ;
38+ increaseBtn . setAttribute ( "type" , "button" ) ;
3739
3840 container . appendChild ( decreaseBtn ) ;
3941 container . appendChild ( input ) ;
Original file line number Diff line number Diff line change 1111const head = arr => (Array .isArray (arr) && arr .length ? arr[0 ] : void 0 );
1212```
1313
14+ ts 代码如下:
15+
16+ <div class =" code-editor " data-url =" codes/javascript/ts/head.ts " data-language =" typescript " ></div >
17+
1418> 调用方式:
1519
1620``` js
@@ -22,6 +26,8 @@ head(undefined); // undefined
2226
2327> 应用场景
2428
29+ 以下是一个实战<a href =" codes/javascript/html/head.html " target =" _blank " rel =" noopener noreferrer " >示例</a >:
30+
2531<div class =" code-editor " data-url =" codes/javascript/html/head.html " data-language =" html " ></div >
2632
2733结果如下:
You can’t perform that action at this time.
0 commit comments