Skip to content

Commit 9269c99

Browse files
committed
modify: 修改vue3最新语法md
1 parent 129753e commit 9269c99

File tree

3 files changed

+31
-30
lines changed

3 files changed

+31
-30
lines changed

.gitignore

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
.DS_Store
2-
node_modules
3-
/dist
4-
5-
# local env files
6-
.env.local
7-
.env.*.local
8-
9-
# Log files
10-
npm-debug.log*
11-
yarn-debug.log*
12-
yarn-error.log*
13-
14-
# Editor directories and files
15-
.idea
16-
.vscode
17-
*.suo
18-
*.ntvs*
19-
*.njsproj
20-
*.sln
21-
*.sw?
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw?
22+
.history

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,21 @@ export default {
8080
components: {},
8181
setup() {
8282
const instance = getCurrentInstance()
83-
const { proxy } = instance.appContext.config.globalProperties
84-
proxy.ls.set('foo', 'boo');
83+
const { ls } = instance.appContext.config.globalProperties
84+
ls.set('foo', 'boo');
8585
// Set expire for item
86-
proxy.ls.set('foo', 'boo', 60 * 60 * 1000); //expiry 1 hour
87-
proxy.ls.get('foo');
88-
proxy.ls.get('boo', 10); //if not set boo returned default 10
86+
ls.set('foo', 'boo', 60 * 60 * 1000); //expiry 1 hour
87+
ls.get('foo');
88+
ls.get('boo', 10); //if not set boo returned default 10
8989

9090
let callback = (val, oldVal, uri) => {
9191
console.log('localStorage change', val);
9292
}
9393

94-
proxy.ls.on('foo', callback) //watch change foo key and triggered callback
95-
proxy.ls.off('foo', callback) //unwatch
94+
ls.on('foo', callback) //watch change foo key and triggered callback
95+
ls.off('foo', callback) //unwatch
9696

97-
proxy.ls.remove('foo');
97+
ls.remove('foo');
9898
return {}
9999
},
100100
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-lsp",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"scripts": {
55
"dev": "vite",
66
"build-lib": "vite build -c vite.lib.config.js",

0 commit comments

Comments
 (0)