总结:
-
函数式编程其实是一种编程思想,它追求更细的粒度,将应用拆分成一组组极小的单元函数,组合调用操作数据流;
-
它提倡着 纯函数 / 函数复合 / 数据不可变, 谨慎对待函数内的 状态共享 / 依赖外部 / 副作用;
开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】
Tips:
其实我们很难也不需要在面试过程中去完美地阐述出整套思想,这里也只是浅尝辄止,一些个人理解而已。博主也是初级小菜鸟,停留在表面而已,只求对大家能有所帮助,轻喷🤣;
我个人觉得: 这些编程范式之间,其实并不矛盾,各有各的 优劣势。
理解和学习它们的理念与优势,合理地 设计融合,将优秀的软件编程思想用于提升我们应用;
所有设计思想,最终的目标一定是使我们的应用更加 解耦颗粒化、易拓展、易测试、高复用,开发更为高效和安全;
NVM_SOURCE_URL="https://raw.githubusercontent.com/${NVM_GITHUB_REPO}/${NVM_VERSION}/nvm.sh"
elif [ "_$NVM_METHOD" = "_git" ] || [ -z "$NVM_METHOD" ]; then
NVM_SOURCE_URL="https://github.com/${NVM_GITHUB_REPO}.git"
else
nvm_echo >&2 "Unexpected value \"$NVM_METHOD\" for \$NVM_METHOD"
return 1
fi
fi
nvm_echo “$NVM_SOURCE_URL”
}
Node.js version to install
nvm_node_version() {
nvm_echo “$NODE_VERSION”
}
nvm_download() {
if nvm_has “curl”; then
curl --fail --compressed -q "KaTeX parse error: Expected 'EOF', got '#' at position 36: …get"; then #̲ Emulate curl w…(nvm_echo “$@” | command sed -e ‘s/–progress-bar /–progress=bar /’
-e ‘s/–compressed //’
-e ‘s/–fail //’
-e ‘s/-L //’
-e ‘s/-I /–server-response /’
-e ‘s/-s /-q /’
-e ‘s/-sS /-nv /’
-e ‘s/-o /-O /’
-e ‘s/-C - /-c /’)
# shellcheck disable=SC2086
eval wget $ARGS
fi
}
install_nvm_from_git() {
local INSTALL_DIR
INSTALL_DIR=“
(
n
v
m
i
n
s
t
a
l
l
d
i
r
)
"
l
o
c
a
l
N
V
M
V
E
R
S
I
O
N
N
V
M
V
E
R
S
I
O
N
=
"
(nvm_install_dir)" local NVM_VERSION NVM_VERSION="
(nvminstalldir)"localNVMVERSIONNVMVERSION="{NVM_INSTALL_VERSION:-KaTeX parse error: Expected 'EOF', got '}' at position 21: …latest_version)}̲" if [ -n "{NVM_INSTALL_VERSION:-}” ]; then
# Check if version is an existing ref
if command git ls-remote “
(
n
v
m
s
o
u
r
c
e
"
g
i
t
"
)
"
"
(nvm_source "git")" "
(nvmsource"git")""NVM_VERSION” | nvm_grep -q “KaTeX parse error: Expected 'EOF', got '#' at position 33: …en : #̲ Check if versi…(nvm_source “script-nvm-exec”)”; then
nvm_echo >&2 “Failed to find ‘$NVM_VERSION’ version.”
exit 1
fi
fi
local fetch_error
if [ -d “$INSTALL_DIR/.git” ]; then
# Updating repo
nvm_echo “=> nvm is already installed in $INSTALL_DIR, trying to update using git”
command printf ‘\r=> ’
fetch_error=“Failed to update nvm with $NVM_VERSION, run ‘git fetch’ in $INSTALL_DIR yourself.”
else
fetch_error="Failed to fetch origin with
N
V
M
V
E
R
S
I
O
N
.
P
l
e
a
s
e
r
e
p
o
r
t
t
h
i
s
!
"
n
v
m
e
c
h
o
"
=
>
D
o
w
n
l
o
a
d
i
n
g
n
v
m
f
r
o
m
g
i
t
t
o
′
NVM_VERSION. Please report this!" nvm_echo "=> Downloading nvm from git to '
NVMVERSION.Pleasereportthis!"nvmecho"=>Downloadingnvmfromgitto′INSTALL_DIR’"
command printf '\r=> ’
mkdir -p “
I
N
S
T
A
L
L
D
I
R
"
i
f
[
"
{INSTALL_DIR}" if [ "
INSTALLDIR"if["(ls -A “KaTeX parse error: Expected 'EOF', got '#' at position 32: … ]; then #̲ Initializing r…{INSTALL_DIR}” || {
nvm_echo >&2 ‘Failed to initialize nvm repo. Please report this!’
exit 2
}
command git --git-dir=”
I
N
S
T
A
L
L
D
I
R
/
.
g
i
t
"
r
e
m
o
t
e
a
d
d
o
r
i
g
i
n
"
{INSTALL_DIR}/.git" remote add origin "
INSTALLDIR/.git"remoteaddorigin"(nvm_source)" 2> /dev/null
|| command git --git-dir=“
I
N
S
T
A
L
L
D
I
R
/
.
g
i
t
"
r
e
m
o
t
e
s
e
t
−
u
r
l
o
r
i
g
i
n
"
{INSTALL_DIR}/.git" remote set-url origin "
INSTALLDIR/.git"remoteset−urlorigin"(nvm_source)” || {
nvm_echo >&2 ‘Failed to add remote “origin” (or set the URL). Please report this!’
exit 2
}
else
# Cloning repo
command git clone “
(
n
v
m
s
o
u
r
c
e
)
"
−
−
d
e
p
t
h
=
1
"
(nvm_source)" --depth=1 "
(nvmsource)"−−depth=1"{INSTALL_DIR}” || {
nvm_echo >&2 ‘Failed to clone nvm repo. Please report this!’
exit 2
}
fi
fi
Try to fetch tag
if command git --git-dir=“
I
N
S
T
A
L
L
D
I
R
"
/
.
g
i
t
−
−
w
o
r
k
−
t
r
e
e
=
"
INSTALL_DIR"/.git --work-tree="
INSTALLDIR"/.git−−work−tree="INSTALL_DIR” fetch origin tag “$NVM_VERSION” --depth=1 2>/dev/null; then
:
Fetch given version
elif ! command git --git-dir=“
I
N
S
T
A
L
L
D
I
R
"
/
.
g
i
t
−
−
w
o
r
k
−
t
r
e
e
=
"
INSTALL_DIR"/.git --work-tree="
INSTALLDIR"/.git−−work−tree="INSTALL_DIR” fetch origin “KaTeX parse error: Expected 'EOF', got '&' at position 44: … nvm_echo >&̲2 "fetch_error”
exit 1
fi
command git -c advice.detachedHead=false --git-dir=“
I
N
S
T
A
L
L
D
I
R
"
/
.
g
i
t
−
−
w
o
r
k
−
t
r
e
e
=
"
INSTALL_DIR"/.git --work-tree="
INSTALLDIR"/.git−−work−tree="INSTALL_DIR” checkout -f --quiet FETCH_HEAD || {
nvm_echo >&2 “Failed to checkout the given version KaTeX parse error: Expected 'EOF', got '}' at position 48: …" exit 2 }̲ if [ -n "(command git --git-dir=“
I
N
S
T
A
L
L
D
I
R
"
/
.
g
i
t
−
−
w
o
r
k
−
t
r
e
e
=
"
INSTALL_DIR"/.git --work-tree="
INSTALLDIR"/.git−−work−tree="INSTALL_DIR” show-ref refs/heads/master)” ]; then
if command git --no-pager --git-dir=“
I
N
S
T
A
L
L
D
I
R
"
/
.
g
i
t
−
−
w
o
r
k
−
t
r
e
e
=
"
INSTALL_DIR"/.git --work-tree="
INSTALLDIR"/.git−−work−tree="INSTALL_DIR” branch --quiet 2>/dev/null; then
command git --no-pager --git-dir=“
I
N
S
T
A
L
L
D
I
R
"
/
.
g
i
t
−
−
w
o
r
k
−
t
r
e
e
=
"
INSTALL_DIR"/.git --work-tree="
INSTALLDIR"/.git−−work−tree="INSTALL_DIR” branch --quiet -D master >/dev/null 2>&1
else
nvm_echo >&2 “Your version of git is out of date. Please update it!”
command git --no-pager --git-dir=“
I
N
S
T
A
L
L
D
I
R
"
/
.
g
i
t
−
−
w
o
r
k
−
t
r
e
e
=
"
INSTALL_DIR"/.git --work-tree="
INSTALLDIR"/.git−−work−tree="INSTALL_DIR” branch -D master >/dev/null 2>&1
fi
fi
nvm_echo “=> Compressing and cleaning up git repository”
if ! command git --git-dir=“
I
N
S
T
A
L
L
D
I
R
"
/
.
g
i
t
−
−
w
o
r
k
−
t
r
e
e
=
"
INSTALL_DIR"/.git --work-tree="
INSTALLDIR"/.git−−work−tree="INSTALL_DIR” reflog expire --expire=now --all; then
nvm_echo >&2 “Your version of git is out of date. Please update it!”
fi
if ! command git --git-dir=“
I
N
S
T
A
L
L
D
I
R
"
/
.
g
i
t
−
−
w
o
r
k
−
t
r
e
e
=
"
INSTALL_DIR"/.git --work-tree="
INSTALLDIR"/.git−−work−tree="INSTALL_DIR” gc --auto --aggressive --prune=now ; then
nvm_echo >&2 “Your version of git is out of date. Please update it!”
fi
return
}
Automatically install Node.js
nvm_install_node() {
local NODE_VERSION_LOCAL
NODE_VERSION_LOCAL=“$(nvm_node_version)”
if [ -z “$NODE_VERSION_LOCAL” ]; then
return 0
fi
nvm_echo “=> Installing Node.js version
N
O
D
E
V
E
R
S
I
O
N
L
O
C
A
L
"
n
v
m
i
n
s
t
a
l
l
"
NODE_VERSION_LOCAL" nvm install "
NODEVERSIONLOCAL"nvminstall"NODE_VERSION_LOCAL”
local CURRENT_NVM_NODE
CURRENT_NVM_NODE="
(
n
v
m
v
e
r
s
i
o
n
c
u
r
r
e
n
t
)
"
i
f
[
"
(nvm_version current)" if [ "
(nvmversioncurrent)"if["(nvm_version “
N
O
D
E
V
E
R
S
I
O
N
L
O
C
A
L
"
)
"
=
=
"
NODE_VERSION_LOCAL")" == "
NODEVERSIONLOCAL")"=="CURRENT_NVM_NODE” ]; then
nvm_echo “=> Node.js version $NODE_VERSION_LOCAL has been successfully installed”
else
nvm_echo >&2 “Failed to install Node.js $NODE_VERSION_LOCAL”
fi
}
install_nvm_as_script() {
local INSTALL_DIR
INSTALL_DIR=“
(
n
v
m
i
n
s
t
a
l
l
d
i
r
)
"
l
o
c
a
l
N
V
M
S
O
U
R
C
E
L
O
C
A
L
N
V
M
S
O
U
R
C
E
L
O
C
A
L
=
"
(nvm_install_dir)" local NVM_SOURCE_LOCAL NVM_SOURCE_LOCAL="
(nvminstalldir)"localNVMSOURCELOCALNVMSOURCELOCAL="(nvm_source script)”
local NVM_EXEC_SOURCE
NVM_EXEC_SOURCE=“
(
n
v
m
s
o
u
r
c
e
s
c
r
i
p
t
−
n
v
m
−
e
x
e
c
)
"
l
o
c
a
l
N
V
M
B
A
S
H
C
O
M
P
L
E
T
I
O
N
S
O
U
R
C
E
N
V
M
B
A
S
H
C
O
M
P
L
E
T
I
O
N
S
O
U
R
C
E
=
"
(nvm_source script-nvm-exec)" local NVM_BASH_COMPLETION_SOURCE NVM_BASH_COMPLETION_SOURCE="
(nvmsourcescript−nvm−exec)"localNVMBASHCOMPLETIONSOURCENVMBASHCOMPLETIONSOURCE="(nvm_source script-nvm-bash-completion)”
Downloading to $INSTALL_DIR
mkdir -p “
I
N
S
T
A
L
L
D
I
R
"
i
f
[
−
f
"
INSTALL_DIR" if [ -f "
INSTALLDIR"if[−f"INSTALL_DIR/nvm.sh” ]; then
nvm_echo “=> nvm is already installed in
I
N
S
T
A
L
L
D
I
R
,
t
r
y
i
n
g
t
o
u
p
d
a
t
e
t
h
e
s
c
r
i
p
t
"
e
l
s
e
n
v
m
e
c
h
o
"
=
>
D
o
w
n
l
o
a
d
i
n
g
n
v
m
a
s
s
c
r
i
p
t
t
o
′
INSTALL_DIR, trying to update the script" else nvm_echo "=> Downloading nvm as script to '
INSTALLDIR,tryingtoupdatethescript"elsenvmecho"=>Downloadingnvmasscriptto′INSTALL_DIR’”
fi
nvm_download -s “
N
V
M
S
O
U
R
C
E
L
O
C
A
L
"
−
o
"
NVM_SOURCE_LOCAL" -o "
NVMSOURCELOCAL"−o"INSTALL_DIR/nvm.sh” || {
nvm_echo >&2 “Failed to download 'KaTeX parse error: Expected 'EOF', got '}' at position 35: … return 1 }̲ & nvm_downlo…NVM_EXEC_SOURCE” -o “KaTeX parse error: Expected '}', got '&' at position 42: … nvm_echo >&̲2 "Failed to do…NVM_EXEC_SOURCE’”
return 2
} &
nvm_download -s “
N
V
M
B
A
S
H
C
O
M
P
L
E
T
I
O
N
S
O
U
R
C
E
"
−
o
"
NVM_BASH_COMPLETION_SOURCE" -o "
NVMBASHCOMPLETIONSOURCE"−o"INSTALL_DIR/bash_completion” || {
nvm_echo >&2 “Failed to download ‘$NVM_BASH_COMPLETION_SOURCE’”
return 2
} &
for job in
(
j
o
b
s
−
p
∣
c
o
m
m
a
n
d
s
o
r
t
)
d
o
w
a
i
t
"
(jobs -p | command sort) do wait "
(jobs−p∣commandsort)dowait"job" || return
?
d
o
n
e
c
h
m
o
d
a
+
x
"
? done chmod a+x "
?donechmoda+x"INSTALL_DIR/nvm-exec" || {
nvm_echo >&2 “Failed to mark ‘$INSTALL_DIR/nvm-exec’ as executable”
return 3
}
}
nvm_try_profile() {
if [ -z “
1
−
"
]
∣
∣
[
!
−
f
"
{1-}" ] || [ ! -f "
1−"]∣∣[!−f"{1}” ]; then
return 1
fi
nvm_echo “${1}”
}
Detect profile file if not specified as environment variable
(eg: PROFILE=~/.myprofile)
The echo’ed path is guaranteed to be an existing file
Otherwise, an empty string is returned
nvm_detect_profile() {
if [ “${PROFILE-}” = ‘/dev/null’ ]; then
# the user has specifically requested NOT to have nvm touch their profile
return
fi
if [ -n “KaTeX parse error: Expected 'EOF', got '&' at position 14: {PROFILE}" ] &̲& [ -f "{PROFILE}” ]; then
nvm_echo “${PROFILE}”
return
fi
local DETECTED_PROFILE
DETECTED_PROFILE=‘’
if [ “KaTeX parse error: Expected '}', got '#' at position 7: {SHELL#̲*bash}" != "SHELL” ]; then
if [ -f “
H
O
M
E
/
.
b
a
s
h
r
c
"
]
;
t
h
e
n
D
E
T
E
C
T
E
D
P
R
O
F
I
L
E
=
"
HOME/.bashrc" ]; then DETECTED_PROFILE="
HOME/.bashrc"];thenDETECTEDPROFILE="HOME/.bashrc”
elif [ -f “
H
O
M
E
/
.
b
a
s
h
p
r
o
f
i
l
e
"
]
;
t
h
e
n
D
E
T
E
C
T
E
D
P
R
O
F
I
L
E
=
"
HOME/.bash_profile" ]; then DETECTED_PROFILE="
HOME/.bashprofile"];thenDETECTEDPROFILE="HOME/.bash_profile”
fi
elif [ “KaTeX parse error: Expected '}', got '#' at position 7: {SHELL#̲*zsh}" != "SHELL” ]; then
if [ -f “
H
O
M
E
/
.
z
s
h
r
c
"
]
;
t
h
e
n
D
E
T
E
C
T
E
D
P
R
O
F
I
L
E
=
"
HOME/.zshrc" ]; then DETECTED_PROFILE="
HOME/.zshrc"];thenDETECTEDPROFILE="HOME/.zshrc”
elif [ -f “
H
O
M
E
/
.
z
p
r
o
f
i
l
e
"
]
;
t
h
e
n
D
E
T
E
C
T
E
D
P
R
O
F
I
L
E
=
"
HOME/.zprofile" ]; then DETECTED_PROFILE="
HOME/.zprofile"];thenDETECTEDPROFILE="HOME/.zprofile”
fi
fi
if [ -z “
D
E
T
E
C
T
E
D
P
R
O
F
I
L
E
"
]
;
t
h
e
n
f
o
r
E
A
C
H
P
R
O
F
I
L
E
i
n
"
.
p
r
o
f
i
l
e
"
"
.
b
a
s
h
r
c
"
"
.
b
a
s
h
p
r
o
f
i
l
e
"
"
.
z
p
r
o
f
i
l
e
"
"
.
z
s
h
r
c
"
d
o
i
f
D
E
T
E
C
T
E
D
P
R
O
F
I
L
E
=
"
DETECTED_PROFILE" ]; then for EACH_PROFILE in ".profile" ".bashrc" ".bash_profile" ".zprofile" ".zshrc" do if DETECTED_PROFILE="
DETECTEDPROFILE"];thenforEACHPROFILEin".profile"".bashrc"".bashprofile"".zprofile"".zshrc"doifDETECTEDPROFILE="(nvm_try_profile “
H
O
M
E
/
{HOME}/
HOME/{EACH_PROFILE}”)”; then
break
fi
done
fi
if [ -n “
D
E
T
E
C
T
E
D
P
R
O
F
I
L
E
"
]
;
t
h
e
n
n
v
m
e
c
h
o
"
DETECTED_PROFILE" ]; then nvm_echo "
DETECTEDPROFILE"];thennvmecho"DETECTED_PROFILE”
fi
}
Check whether the user has any globally-installed npm modules in their system
Node, and warn them if so.
nvm_check_global_modules() {
local NPM_COMMAND
NPM_COMMAND=“
(
c
o
m
m
a
n
d
−
v
n
p
m
2
>
/
d
e
v
/
n
u
l
l
)
"
∣
∣
r
e
t
u
r
n
0
[
−
n
"
(command -v npm 2>/dev/null)" || return 0 [ -n "
(command−vnpm2>/dev/null)"∣∣return0[−n"{NVM_DIR}” ] && [ -z “KaTeX parse error: Expected '}', got 'EOF' at end of input: {NPM_COMMAND%%"NVM_DIR”/*}" ] && return 0
local NPM_VERSION
NPM_VERSION=“
(
n
p
m
−
−
v
e
r
s
i
o
n
)
"
N
P
M
V
E
R
S
I
O
N
=
"
(npm --version)" NPM_VERSION="
(npm−−version)"NPMVERSION="{NPM_VERSION:–1}”
[ “${NPM_VERSION%%[!-0-9]*}” -gt 0 ] || return 0
local NPM_GLOBAL_MODULES
NPM_GLOBAL_MODULES=“
(
n
p
m
l
i
s
t
−
g
−
−
d
e
p
t
h
=
0
∣
c
o
m
m
a
n
d
s
e
d
−
e
′
/
n
p
m
@
/
d
′
−
e
′
/
(
e
m
p
t
y
)
( npm list -g --depth=0 | command sed -e '/ npm@/d' -e '/ (empty)
(npmlist−g−−depth=0∣commandsed−e′/npm@/d′−e′/(empty)/d’
)”
local MODULE_COUNT
MODULE_COUNT=“
(
c
o
m
m
a
n
d
p
r
i
n
t
f
( command printf %s\\n "
(commandprintfNPM_GLOBAL_MODULES” |
command sed -ne ‘1!p’ | # Remove the first line
wc -l | command tr -d ’ ’ # Count entries
)"
if [ "KaTeX parse error: Expected 'EOF', got '#' at position 36: …0' ]; then #̲ shellcheck dis…PATH`)’
# shellcheck disable=SC2016
nvm_echo ‘=> override the binaries of modules installed with `nvm`:’
nvm_echo
command printf %s\\n "$NPM_GLOBAL_MODULES"
nvm_echo '=> If you wish to uninstall them at a later point (or re-install them under your'
# shellcheck disable=SC2016
nvm_echo '=> `nvm` Nodes), you can remove them from the system Node as follows:'
nvm_echo
nvm_echo ' $ nvm use system'
nvm_echo ' $ npm uninstall -g a_module'
nvm_echo
fi
}
nvm_do_install() {
if [ -n “KaTeX parse error: Expected 'EOF', got '&' at position 15: {NVM_DIR-}" ] &̲& ! [ -d "{NVM_DIR}” ]; then
if [ -e “KaTeX parse error: Expected 'EOF', got '&' at position 36: … nvm_echo >&̲2 "File \"{NVM_DIR}” has the same name as installation directory."
exit 1
fi
if [ "${NVM_DIR}" = "$(nvm_default_install_dir)" ]; then
mkdir "${NVM_DIR}"
else
nvm_echo >&2 "You have \$NVM_DIR set to \"${NVM_DIR}\", but that directory does not exist. Check your profile files and environment."
exit 1
fi
fi
Disable the optional which check, https://www.shellcheck.net/wiki/SC2230
shellcheck disable=SC2230
if nvm_has xcode-select && [ “$(xcode-select -p >/dev/null 2>/dev/null ; echo KaTeX parse error: Expected 'EOF', got '&' at position 13: ?)" = '2' ] &̲& [ "(which git)” = ‘/usr/bin/git’ ] && [ “KaTeX parse error: Expected 'EOF', got '&' at position 55: … nvm_echo >&̲2 'You may be o…{METHOD}” ]; then
# Autodetect install method
if nvm_has git; then
install_nvm_from_git
elif nvm_has curl || nvm_has wget; then
install_nvm_as_script
else
nvm_echo >&2 ‘You need git, curl, or wget to install nvm’
exit 1
fi
elif [ “KaTeX parse error: Expected 'EOF', got '&' at position 70: … nvm_echo >&̲2 "You need git…{METHOD}” = ‘script’ ]; then
if ! nvm_has curl && ! nvm_has wget; then
nvm_echo >&2 “You need curl or wget to install nvm”
exit 1
fi
install_nvm_as_script
else
nvm_echo >&2 “The environment variable $METHOD is set to “${METHOD}”, which is not recognized as a valid installation method.”
exit 1
fi
nvm_echo
local NVM_PROFILE
NVM_PROFILE=“
(
n
v
m
d
e
t
e
c
t
p
r
o
f
i
l
e
)
"
l
o
c
a
l
P
R
O
F
I
L
E
I
N
S
T
A
L
L
D
I
R
P
R
O
F
I
L
E
I
N
S
T
A
L
L
D
I
R
=
"
(nvm_detect_profile)" local PROFILE_INSTALL_DIR PROFILE_INSTALL_DIR="
(nvmdetectprofile)"localPROFILEINSTALLDIRPROFILEINSTALLDIR="(nvm_install_dir | command sed “s:^$HOME:$HOME:”)”
SOURCE_STR=“\nexport NVM_DIR=”${PROFILE_INSTALL_DIR}“\n[ -s “$NVM_DIR/nvm.sh” ] && \. “$NVM_DIR/nvm.sh” # This loads nvm\n”
shellcheck disable=SC2016
COMPLETION_STR=‘[ -s “KaTeX parse error: Expected 'EOF', got '&' at position 28: …_completion" ] &̲& \. "NVM_DIR/bash_completion” # This loads nvm bash_completion\n’
BASH_OR_ZSH=false
if [ -z “${NVM_PROFILE-}” ] ; then
Vue 面试题
1.Vue 双向绑定原理
2.描述下 vue 从初始化页面–修改数据–刷新页面 UI 的过程?
3.你是如何理解 Vue 的响应式系统的?
4.虚拟 DOM 实现原理
5.既然 Vue 通过数据劫持可以精准探测数据变化,为什么还需要虚拟 DOM 进行 diff 检测差异?
6.Vue 中 key 值的作用?
7.Vue 的生命周期
8.Vue 组件间通信有哪些方式?
9.watch、methods 和 computed 的区别?
10.vue 中怎么重置 data?
11.组件中写 name 选项有什么作用?
12.vue-router 有哪些钩子函数?
13.route 和 router 的区别是什么?
14.说一下 Vue 和 React 的认识,做一个简单的对比
15.Vue 的 nextTick 的原理是什么?
16.Vuex 有哪几种属性?
17.vue 首屏加载优化
18.Vue 3.0 有没有过了解?
19.vue-cli 替我们做了哪些工作?
如果你觉得对你有帮助,可以戳这里获取:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】
和 computed 的区别?
10.vue 中怎么重置 data?
11.组件中写 name 选项有什么作用?
12.vue-router 有哪些钩子函数?
13.route 和 router 的区别是什么?
14.说一下 Vue 和 React 的认识,做一个简单的对比
15.Vue 的 nextTick 的原理是什么?
16.Vuex 有哪几种属性?
17.vue 首屏加载优化
18.Vue 3.0 有没有过了解?
19.vue-cli 替我们做了哪些工作?
[外链图片转存中…(img-DR1PXLEQ-1715154309040)]