-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1136 lines (1096 loc) · 66 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<<<<<<< HEAD
<!doctype html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0,viewport-fit=cover"
/>
<title>hxm-test</title>
<meta name="author" content="hxm" />
<meta name="copyright" content="hxm" />
<meta name="format-detection" content="telephone=no" />
<meta name="theme-color" content="#ffffff" />
<meta property="og:type" content="website" />
<meta property="og:title" content="hxm-test" />
<meta property="og:url" content="http://hxmhxm1.github.io/index.html" />
<meta property="og:site_name" content="hxm-test" />
<meta property="og:locale" content="en_US" />
<meta
property="og:image"
content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"
/>
<meta property="article:author" content="hxm" />
<meta name="twitter:card" content="summary" />
<meta
name="twitter:image"
content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"
/>
<link rel="shortcut icon" href="/img/favicon.png" />
<link rel="canonical" href="http://hxmhxm1.github.io/index.html" />
<link rel="preconnect" href="//cdn.jsdelivr.net" />
<link rel="preconnect" href="//busuanzi.ibruce.info" />
<link rel="stylesheet" href="/css/index.css" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css"
media="print"
onload="this.media='all'"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css"
media="print"
onload="this.media='all'"
/>
<script>
const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: undefined,
translate: undefined,
noticeOutdate: undefined,
highlight: {
plugin: 'highlighjs',
highlightCopy: true,
highlightLang: true,
highlightHeightLimit: false,
},
copy: {
success: 'Copy successfully',
error: 'Copy error',
noSupport: 'The browser does not support',
},
relativeDate: {
homepage: false,
post: false,
},
runtime: '',
dateSuffix: {
just: 'Just',
min: 'minutes ago',
hour: 'hours ago',
day: 'days ago',
month: 'months ago',
},
copyright: undefined,
lightbox: 'fancybox',
Snackbar: undefined,
source: {
justifiedGallery: {
js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css',
},
},
isPhotoFigcaption: false,
islazyload: false,
isAnchor: false,
percent: {
toc: true,
rightside: false,
},
autoDarkmode: false,
};
</script>
<script id="config-diff">
var GLOBAL_CONFIG_SITE = {
title: 'hxm-test',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2023-07-08 12:26:06',
};
</script>
<noscript
><style type="text/css">
#nav {
opacity: 1;
=======
<!DOCTYPE html><html lang="en" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>hxm-test</title><meta name="author" content="hxm"><meta name="copyright" content="hxm"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta property="og:type" content="website">
<meta property="og:title" content="hxm-test">
<meta property="og:url" content="http://hxmhxm1.github.io/index.html">
<meta property="og:site_name" content="hxm-test">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png">
<meta property="article:author" content="hxm">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="http://hxmhxm1.github.io/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: undefined,
translate: undefined,
noticeOutdate: undefined,
highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
copy: {
success: 'Copy successfully',
error: 'Copy error',
noSupport: 'The browser does not support'
},
relativeDate: {
homepage: false,
post: false
},
runtime: '',
dateSuffix: {
just: 'Just',
min: 'minutes ago',
hour: 'hours ago',
day: 'days ago',
month: 'months ago'
},
copyright: undefined,
lightbox: 'fancybox',
Snackbar: undefined,
source: {
justifiedGallery: {
js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
}
},
isPhotoFigcaption: false,
islazyload: false,
isAnchor: false,
percent: {
toc: true,
rightside: false,
},
autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: 'hxm-test',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2024-05-09 16:15:59'
}</script><noscript><style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style></noscript><script>(win=>{
win.saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
if (ttl === 0) return
const now = new Date()
const expiryDay = ttl * 86400000
const item = {
value: value,
expiry: now.getTime() + expiryDay,
>>>>>>> aea5151685ee2530581891f68e047a79406a5b6e
}
.justified-gallery img {
opacity: 1;
}
#recent-posts time,
#post-meta time {
display: inline !important;
}
</style></noscript
>
<script>
((win) => {
win.saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
if (ttl === 0) return;
const now = new Date();
const expiryDay = ttl * 86400000;
const item = {
value: value,
expiry: now.getTime() + expiryDay,
};
localStorage.setItem(key, JSON.stringify(item));
},
get: function getWithExpiry(key) {
const itemStr = localStorage.getItem(key);
if (!itemStr) {
return undefined;
}
const item = JSON.parse(itemStr);
const now = new Date();
if (now.getTime() > item.expiry) {
localStorage.removeItem(key);
return undefined;
}
return item.value;
},
};
win.getScript = (url) =>
new Promise((resolve, reject) => {
const script = document.createElement('script');
script.src = url;
script.async = true;
script.onerror = reject;
script.onload = script.onreadystatechange = function () {
const loadState = this.readyState;
if (
loadState &&
loadState !== 'loaded' &&
loadState !== 'complete'
)
return;
script.onload = script.onreadystatechange = null;
resolve();
};
document.head.appendChild(script);
});
win.getCSS = (url, id = false) =>
new Promise((resolve, reject) => {
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = url;
if (id) link.id = id;
link.onerror = reject;
link.onload = link.onreadystatechange = function () {
const loadState = this.readyState;
if (
loadState &&
loadState !== 'loaded' &&
loadState !== 'complete'
)
return;
link.onload = link.onreadystatechange = null;
resolve();
};
document.head.appendChild(link);
});
win.activateDarkMode = function () {
document.documentElement.setAttribute('data-theme', 'dark');
if (document.querySelector('meta[name="theme-color"]') !== null) {
document
.querySelector('meta[name="theme-color"]')
.setAttribute('content', '#0d0d0d');
}
};
win.activateLightMode = function () {
document.documentElement.setAttribute('data-theme', 'light');
if (document.querySelector('meta[name="theme-color"]') !== null) {
document
.querySelector('meta[name="theme-color"]')
.setAttribute('content', '#ffffff');
}
};
const t = saveToLocal.get('theme');
if (t === 'dark') activateDarkMode();
else if (t === 'light') activateLightMode();
const asideStatus = saveToLocal.get('aside-status');
if (asideStatus !== undefined) {
if (asideStatus === 'hide') {
document.documentElement.classList.add('hide-aside');
} else {
document.documentElement.classList.remove('hide-aside');
}
}
<<<<<<< HEAD
const detectApple = () => {
if (/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)) {
document.documentElement.classList.add('apple');
}
};
detectApple();
})(window);
</script>
<meta name="generator" content="Hexo 6.3.0" />
</head>
<body>
<div id="sidebar">
<div id="menu-mask"></div>
<div id="sidebar-menus">
<div class="avatar-img is-center">
<img
src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"
onerror="onerror=null;src='/img/friend_404.gif'"
alt="avatar"
/>
</div>
<div class="sidebar-site-data site-data is-center">
<a href="/archives/"
><div class="headline">Articles</div>
<div class="length-num">14</div></a
><a href="/tags/"
><div class="headline">Tags</div>
<div class="length-num">1</div></a
><a href="/categories/"
><div class="headline">Categories</div>
<div class="length-num">6</div></a
>
</div>
<hr />
</div>
</div>
<div class="page" id="body-wrap">
<header class="full_page" id="page-header">
<nav id="nav">
<span id="blog-info"
><a href="/" title="hxm-test"
><span class="site-name">hxm-test</span></a
></span
>
<div id="menus">
<div id="toggle-menu">
<a class="site-page" href="javascript:void(0);"
><i class="fas fa-bars fa-fw"></i
></a>
</div>
</div>
</nav>
<div id="site-info"><h1 id="site-title">hxm-test</h1></div>
<div id="scroll-down">
<i class="fas fa-angle-down scroll-down-effects"></i>
</div>
</header>
<main class="layout" id="content-inner">
<div class="recent-posts" id="recent-posts">
<div class="recent-post-item">
<div class="recent-post-info no-cover">
<a
class="article-title"
href="/2023/07/08/webpack/"
title="webpack"
>webpack</a
>
<div class="article-meta-wrap">
<span class="post-meta-date"
><i class="far fa-calendar-alt"></i
><span class="article-meta-label">Created</span
><time
datetime="2023-07-08T04:14:04.100Z"
title="Created 2023-07-08 12:14:04"
>2023-07-08</time
></span
><span class="article-meta"
><span class="article-meta-separator">|</span
><i class="fas fa-inbox"></i
><a
class="article-meta__categories"
href="/categories/%E6%89%93%E5%8C%85%E5%B7%A5%E5%85%B7/"
>打包工具</a
></span
>
</div>
<div class="content">
一、主要概念●5大核心概念1234567891011121314module.exports =
{ // 入口 entry: '', // 输出 output:
{}, // 加载器loader module: { rules: [], },
// 插件 plugins: [], // 模式 mode: '', //
development|production};
●生产模式和开发模式○开发模式(1)编译代码,使浏览器能识别运行开发时我们有样式资源、字体图标、图片资源、html
资源等,webpack
默认都不能处理这些资源,所以我们要加载配置来编译这些资源(2)代码质量检查,树立代码规范提前检查代码的一些隐患,让代码运行时能更加健壮。提前检查代码规范和格式,统一团队编码风格,让代码更优雅美观。
○生产模式生产模式是开发完成代码后,我们需要得到代码将来部署上线。这个模式下我们主要
对代码进行优化,让其运行性能更好。优化主要从两个角度出发:1)优化代码运行
...
</div>
</div>
</div>
<div class="recent-post-item">
<div class="recent-post-info no-cover">
<a
class="article-title"
href="/2023/07/08/hello-world/"
title="Hello World"
>Hello World</a
>
<div class="article-meta-wrap">
<span class="post-meta-date"
><i class="far fa-calendar-alt"></i
><span class="article-meta-label">Created</span
><time
datetime="2023-07-08T04:14:04.098Z"
title="Created 2023-07-08 12:14:04"
>2023-07-08</time
></span
>
</div>
<div class="content">
Welcome to Hexo! This is your very first post. Check
documentation for more info. If you get any problems when using
Hexo, you can find the answer in troubleshooting or you can ask
me on GitHub. Quick StartCreate a new post1hexo new "My New
Post" More info: Writing Run server1hexo server More info:
Server Generate static files1hexo generate More info: Generating
Deploy to remote sites1hexo deploy More info: Deployment
</div>
</div>
</div>
<div class="recent-post-item">
<div class="recent-post-info no-cover">
<a
class="article-title"
href="/2023/07/08/commitlint/"
title="commitlint+husky+lint-staged"
>commitlint+husky+lint-staged</a
>
<div class="article-meta-wrap">
<span class="post-meta-date"
><i class="far fa-calendar-alt"></i
><span class="article-meta-label">Created</span
><time
datetime="2023-07-08T04:14:04.097Z"
title="Created 2023-07-08 12:14:04"
>2023-07-08</time
></span
><span class="article-meta"
><span class="article-meta-separator">|</span
><i class="fas fa-inbox"></i
><a
class="article-meta__categories"
href="/categories/%E4%BB%A3%E7%A0%81%E8%A7%84%E8%8C%83/"
>代码规范</a
></span
>
</div>
<div class="content">
为什么要使用多人开发的时候,commit
message五花八门,统一规范有利于及时查找出错的提交代码,从而定位到具体的问题如何使用
●huskygit hooks工具,可以在执行git命令时,执行自定义脚本程序
123npm i -D huskynpx husky installnpm set-script prepare
"husky install"
//执行完上面的操作之后,项目中会多一个.husky文件夹,并且package.json中增加以下命令
123456789{ "scripts": { "prepare":
"husky install" }}//
现在husky已经安装好了,接下来添加对应的钩子函数,比如我需要在每次git
commit提交前执行某些操作,就可以添加一个commit-msg钩子npx husky
add .husky/commit-msg 'npm test'//然后.husky ...
</div>
</div>
</div>
<div class="recent-post-item">
<div class="recent-post-info no-cover">
<a
class="article-title"
href="/2023/07/08/css-modules/"
title="css-modules解决css样式命名冲突的问题"
>css-modules解决css样式命名冲突的问题</a
>
<div class="article-meta-wrap">
<span class="post-meta-date"
><i class="far fa-calendar-alt"></i
><span class="article-meta-label">Created</span
><time
datetime="2023-07-08T04:14:04.097Z"
title="Created 2023-07-08 12:14:04"
>2023-07-08</time
></span
><span class="article-meta"
><span class="article-meta-separator">|</span
><i class="fas fa-inbox"></i
><a
class="article-meta__categories"
href="/categories/%E6%89%93%E5%8C%85%E5%B7%A5%E5%85%B7/"
>打包工具</a
></span
>
</div>
<div class="content">
是什么css
modules是用于模块化和组合css的系统,通过加入局部作用域、依赖管理来避免全局污染和样式冲突,并且css
module在打包的时候会自动将类名转成hash值,完全杜绝css类名冲突问题
特性○作用域:模块中的名称默认属于本地作用域,定义在:loacal中的名称也属于本地作用域,定义在:global中的名称属于全局作用域,全局名称不用被编译成哈希字符串○命名:对于本地类名称,css
modules建议使用camelCase方式来命名,这样会使得js文件更干净,即styles.className。但你仍然也可使用style[‘class-name’],不过不推荐○下面两点还没有体会。。。
12import styles from './index.moudule.scss';<div
className={style.chat}></div>;
</div>
</div>
</div>
<div class="recent-post-item">
<div class="recent-post-info no-cover">
<a
class="article-title"
href="/2023/07/08/%E4%BA%8C%E6%AC%A1%E5%B0%81%E8%A3%85el-input/"
title="二次封装el-input"
>二次封装el-input</a
>
<div class="article-meta-wrap">
<span class="post-meta-date"
><i class="far fa-calendar-alt"></i
><span class="article-meta-label">Created</span
><time
datetime="2023-07-08T02:58:04.000Z"
title="Created 2023-07-08 10:58:04"
>2023-07-08</time
></span
><span class="article-meta"
><span class="article-meta-separator">|</span
><i class="fas fa-inbox"></i
><a
class="article-meta__categories"
href="/categories/UI%E7%BB%84%E4%BB%B6/"
>UI组件</a
></span
>
</div>
<div class="content">
二次封装el-inputv-model实现数据双向版本12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455<input
v-model="searchText" />//等效于<input
:value="searchText" @input="searchText =
$event.target.value"/>//当在一个组件中使用时<CustomInput
:modelValue="searchText"
@update:modelValue="newValue => searchText =
newValue"/>//等效于<CustomInput
v-model="searchText" />//CustomInput.vue<script
s ...
</div>
</div>
</div>
<div class="recent-post-item">
<div class="recent-post-info no-cover">
<a class="article-title" href="/2023/07/08/bug/" title="bug"
>bug</a
>
<div class="article-meta-wrap">
<span class="post-meta-date"
><i class="far fa-calendar-alt"></i
><span class="article-meta-label">Created</span
><time
datetime="2023-07-08T02:55:28.000Z"
title="Created 2023-07-08 10:55:28"
>2023-07-08</time
></span
><span class="article-meta"
><span class="article-meta-separator">|</span
><i class="fas fa-inbox"></i
><a class="article-meta__categories" href="/categories/vue/"
>vue</a
></span
>
</div>
<div class="content">
v-for中设置:key=”index”,在数组中使用splice方法,结果造成数据删除或增加数据时混乱,这是因为虚拟dom时会将旧和新的vnode进行比较,但是两者之间的key又没有发生变化,造成了数据混乱,所以尽量不要使用index作为key
</div>
</div>
</div>
<div class="recent-post-item">
<div class="recent-post-info no-cover">
<a
class="article-title"
href="/2023/07/08/protable%EF%BD%9Cproform/"
title="protable|proform"
>protable|proform</a
>
<div class="article-meta-wrap">
<span class="post-meta-date"
><i class="far fa-calendar-alt"></i
><span class="article-meta-label">Created</span
><time
datetime="2023-07-08T02:53:12.000Z"
title="Created 2023-07-08 10:53:12"
>2023-07-08</time
></span
><span class="article-meta"
><span class="article-meta-separator">|</span
><i class="fas fa-inbox"></i
><a
class="article-meta__categories"
href="/categories/UI%E7%BB%84%E4%BB%B6/"
>UI组件</a
></span
>
</div>
<div class="content">
●protable用于数据展示,const ref =
useRef()用于多选框清楚、表单重新加载(重置,筛选
●proform用于数据录入 , const ref = useRef()表单内容清空
●search选择框中12345678910111213//
是一个枚举对象map或者objectfieldProps: { multiple:
true}valueEnum: { '': {text:
''}}//valueType:
'select',fieldProps: { multiple: true, options:
[{label:'', value:''}]}
1、valueEnum是枚举类型,可以将数值转化成你想要的值,如果hideInSearch也会是选择框2、fieldProps:{
</div>
</div>
</div>
<div class="recent-post-item">
<div class="recent-post-info no-cover">
<a
class="article-title"
href="/2023/07/08/%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0/"
title="文件上传"
>文件上传</a
>
<div class="article-meta-wrap">
<span class="post-meta-date"
><i class="far fa-calendar-alt"></i
><span class="article-meta-label">Created</span
><time
datetime="2023-07-08T02:51:04.000Z"
title="Created 2023-07-08 10:51:04"
>2023-07-08</time
></span
><span class="article-meta"
><span class="article-meta-separator">|</span
><i class="fas fa-inbox"></i
><a
class="article-meta__categories"
href="/categories/UI%E7%BB%84%E4%BB%B6/"
>UI组件</a
></span
>
</div>
<div class="content">
一、文件上传方式●通过formData上传,multipart/form-data方式12var
formData = new FormData();formData.append('file',
file);
●通过fileReader读取文件数据,将文件转成base64编码再上传,application/json方式12345678//
HTML5的新api,兼容性不是特别好,只兼容到了IE10const fr = new
FileReader();fr.readAsDataURL(file);fr.onload = function (event)
{ const data = event.target.result;
//此处获取的data是base64格式的数据 img.src = data; //
将data发生给后端};
将文件转成base64编码会导致文件体积变大4/3倍,所以不适合大文件,会造成浏览器卡顿
●总结对比下这两种文件上传的方式优缺点1)multipart/form-d
...
</div>
</div>
</div>
<div class="recent-post-item">
<div class="recent-post-info no-cover">
<a
class="article-title"
href="/2023/07/08/el-form/"
title="el-form"
>el-form</a
>
<div class="article-meta-wrap">
<span class="post-meta-date"
><i class="far fa-calendar-alt"></i
><span class="article-meta-label">Created</span
><time
datetime="2023-07-08T02:47:38.000Z"
title="Created 2023-07-08 10:47:38"
>2023-07-08</time
></span
><span class="article-meta"
><span class="article-meta-separator">|</span
><i class="fas fa-inbox"></i
><a
class="article-meta__categories"
href="/categories/UI%E7%BB%84%E4%BB%B6/"
>UI组件</a
></span
>
</div>
<div class="content">
123456789101112131415161718192021222324const ruleFormRef =
ref<FormInstance>()<el-form
ref="ruleFormRef"><el-form-item>
<el-button type="primary"
@click="submitForm(ruleFormRef)"> Create
</el-button> <el-button
@click="resetForm(ruleFormRef)">Reset</el-button>
</el-form-item></el-form>const submitForm = async
(formEl: FormInstance | undefined) => { if (!formEl)
return await formEl.valid ...
</div>
</div>
</div>
<div class="recent-post-item">
<div class="recent-post-info no-cover">
<a class="article-title" href="/2023/07/08/flex/" title="flex"
>flex</a
>
<div class="article-meta-wrap">
<span class="post-meta-date"
><i class="far fa-calendar-alt"></i
><span class="article-meta-label">Created</span
><time
datetime="2023-07-08T02:43:39.000Z"
title="Created 2023-07-08 10:43:39"
>2023-07-08</time
></span
><span class="article-meta"
><span class="article-meta-separator">|</span
><i class="fas fa-inbox"></i
><a class="article-meta__categories" href="/categories/css/"
>css</a
></span
>
</div>
<div class="content">
align-content、align-items、align-self区别●align-content(flex-start/flex-end/center/stretch/space-between/space-around●align-items●align-selfalign-self属性规定的是flex容器规定的align-items属性,同样也只能规定在交叉轴上的对齐方式,默认align-self:auto,所以会继承align-items属性
</div>
</div>
</div>
<nav id="pagination">
<div class="pagination">
<span class="page-number current">1</span
><a class="page-number" href="/page/2/#content-inner">2</a
><a class="extend next" rel="next" href="/page/2/#content-inner"
><i class="fas fa-chevron-right fa-fw"></i
></a>
</div>
</nav>
</div>
<div class="aside-content" id="aside-content">
<div class="card-widget card-info">
<div class="is-center">
<div class="avatar-img">
<img
src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"
onerror="this.onerror=null;this.src='/img/friend_404.gif'"
alt="avatar"
/>
</div>
<div class="author-info__name">hxm</div>
<div class="author-info__description"></div>
</div>
<div class="card-info-data site-data is-center">
<a href="/archives/"
><div class="headline">Articles</div>
<div class="length-num">14</div></a
><a href="/tags/"
><div class="headline">Tags</div>
<div class="length-num">1</div></a
><a href="/categories/"
><div class="headline">Categories</div>
<div class="length-num">6</div></a
>
</div>
<a
id="card-info-btn"
target="_blank"
rel="noopener"
href="https://github.com/xxxxxx"
><i class="fab fa-github"></i><span>Follow Me</span></a
>
</div>
<div class="card-widget card-announcement">
<div class="item-headline">
<i class="fas fa-bullhorn fa-shake"></i><span>Announcement</span>
</div>
<div class="announcement_content">This is my Blog</div>
</div>
<div class="sticky_layout">
<div class="card-widget card-recent-post">
<div class="item-headline">
<i class="fas fa-history"></i><span>Recent Post</span>
</div>
<div class="aside-list">
<div class="aside-list-item no-cover">
<div class="content">
<a class="title" href="/2023/07/08/webpack/" title="webpack"
>webpack</a
><time
datetime="2023-07-08T04:14:04.100Z"
title="Created 2023-07-08 12:14:04"
>2023-07-08</time
>
</div>
</div>
<div class="aside-list-item no-cover">
<div class="content">
<a
class="title"
href="/2023/07/08/hello-world/"
title="Hello World"
>Hello World</a
><time
datetime="2023-07-08T04:14:04.098Z"
title="Created 2023-07-08 12:14:04"
>2023-07-08</time
>
</div>
</div>
<div class="aside-list-item no-cover">
<div class="content">
<a
class="title"
href="/2023/07/08/commitlint/"
title="commitlint+husky+lint-staged"
>commitlint+husky+lint-staged</a
><time
datetime="2023-07-08T04:14:04.097Z"
title="Created 2023-07-08 12:14:04"
>2023-07-08</time
>
</div>
</div>
<div class="aside-list-item no-cover">
<div class="content">
<a
class="title"
href="/2023/07/08/css-modules/"
title="css-modules解决css样式命名冲突的问题"
>css-modules解决css样式命名冲突的问题</a
><time
datetime="2023-07-08T04:14:04.097Z"
title="Created 2023-07-08 12:14:04"
>2023-07-08</time
>
</div>
</div>
<div class="aside-list-item no-cover">
<div class="content">
<a
class="title"
href="/2023/07/08/%E4%BA%8C%E6%AC%A1%E5%B0%81%E8%A3%85el-input/"
title="二次封装el-input"
>二次封装el-input</a
><time
datetime="2023-07-08T02:58:04.000Z"
title="Created 2023-07-08 10:58:04"
>2023-07-08</time
>
</div>
</div>
</div>
</div>
<div class="card-widget card-categories">
<div class="item-headline">
<i class="fas fa-folder-open"></i>
<span>Categories</span>
</div>
<ul class="card-category-list" id="aside-cat-list">
<li class="card-category-list-item">
<a
class="card-category-list-link"
href="/categories/UI%E7%BB%84%E4%BB%B6/"
><span class="card-category-list-name">UI组件</span
><span class="card-category-list-count">4</span></a
>
</li>
<li class="card-category-list-item">
<a class="card-category-list-link" href="/categories/css/"
><span class="card-category-list-name">css</span
><span class="card-category-list-count">1</span></a
>
</li>
<li class="card-category-list-item">
<a class="card-category-list-link" href="/categories/vue/"
><span class="card-category-list-name">vue</span
><span class="card-category-list-count">2</span></a
>
</li>
<li class="card-category-list-item">
<a
class="card-category-list-link"
href="/categories/%E4%BB%A3%E7%A0%81%E8%A7%84%E8%8C%83/"
><span class="card-category-list-name">代码规范</span
><span class="card-category-list-count">2</span></a
>
</li>
<li class="card-category-list-item">
<a
class="card-category-list-link"
href="/categories/%E6%89%93%E5%8C%85%E5%B7%A5%E5%85%B7/"
><span class="card-category-list-name">打包工具</span
><span class="card-category-list-count">2</span></a
>
</li>
<li class="card-category-list-item">
<a
class="card-category-list-link"
href="/categories/%E6%8F%92%E4%BB%B6%E4%BD%BF%E7%94%A8/"
><span class="card-category-list-name">插件使用</span
><span class="card-category-list-count">2</span></a
>
</li>
</ul>
</div>
<div class="card-widget card-tags">
<div class="item-headline">
<i class="fas fa-tags"></i><span>Tags</span>
</div>
<div class="card-tag-cloud">
<a href="/tags/dayjs/" style="font-size: 1.1em; color: #999"
>dayjs</a
>
</div>
</div>
<div class="card-widget card-archives">
<div class="item-headline">
<i class="fas fa-archive"></i><span>Archives</span>
</div>
<ul class="card-archive-list">
<li class="card-archive-list-item">
<a class="card-archive-list-link" href="/archives/2023/07/"
><span class="card-archive-list-date">July 2023</span
><span class="card-archive-list-count">13</span></a
>
</li>
<li class="card-archive-list-item">
<a class="card-archive-list-link" href="/archives/2023/05/"
><span class="card-archive-list-date">May 2023</span
><span class="card-archive-list-count">1</span></a
>
</li>
</ul>
</div>
<div class="card-widget card-webinfo">
<div class="item-headline">
<i class="fas fa-chart-line"></i><span>Info</span>
</div>
<div class="webinfo">
<div class="webinfo-item">
<div class="item-name">Article :</div>
<div class="item-count">14</div>
</div>
<div class="webinfo-item">
<div class="item-name">UV :</div>
<div class="item-count" id="busuanzi_value_site_uv">
<i class="fa-solid fa-spinner fa-spin"></i>
</div>
</div>
<div class="webinfo-item">
<div class="item-name">PV :</div>
<div class="item-count" id="busuanzi_value_site_pv">
<i class="fa-solid fa-spinner fa-spin"></i>
</div>
</div>
<div class="webinfo-item">
<div class="item-name">Last Push :</div>
<div
class="item-count"
id="last-push-date"
data-lastPushDate="2023-07-08T04:26:05.977Z"
>
<i class="fa-solid fa-spinner fa-spin"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<footer id="footer">
<div id="footer-wrap">
<div class="copyright">©2020 - 2023 By hxm</div>
<div class="framework-info">
<span>Framework </span
><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a
><span class="footer-separator">|</span><span>Theme </span
><a
target="_blank"
rel="noopener"
href="https://github.com/jerryc127/hexo-theme-butterfly"
>Butterfly</a
>
</div>
</div>
</footer>
</div>
<div id="rightside">
<div id="rightside-config-hide">
<button
id="darkmode"
type="button"
title="Switch Between Light And Dark Mode"
>
<i class="fas fa-adjust"></i></button
><button