8000 chore: add vue to devDependencies and fix some typo · Kingwl/vue-function-api@b25a9cb · GitHub
[go: up one dir, main page]

Skip to content

Commit b25a9cb

Browse files
ariesjialiximomo
authored andcommitted
chore: add vue to devDependencies and fix some typo
* add vue to devDependencies * fix typo
1 parent 88b5c36 commit b25a9cb

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ package-lock.json
55
dist
66
lib
77
.vscode
8+
.idea
89
.rpt2_cache
910
TODO.md

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"rollup-plugin-replace": "^2.2.0",
4141
"rollup-plugin-terser": "^4.0.4",
4242
"rollup-plugin-typescript2": "^0.21.0",
43-
"typescript": "^3.4.5"
43+
"typescript": "^3.4.5",
44+
"vue": "^2.6.10"
4445
},
4546
"peerDependencies": {
4647
"vue": "^2.0.0"

src/setup.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import { value } from './functions/state';
77

88
export function mixin(Vue: VueConstructor) {
99
Vue.mixin({
10-
created: vuexInit,
10+
created: functionApiInit,
1111
});
1212

1313
/**
1414
* Vuex init hook, injected into each instances init hooks list.
1515
*/
16-
function vuexInit(this: any) {
16+
function functionApiInit(this: any) {
1717
const vm = this;
1818
const { setup } = vm.$options;
1919
if (!setup) {
@@ -58,8 +58,7 @@ export function mixin(Vue: VueConstructor) {
5858

5959
Object.keys(binding).forEach(name => {
6060
let bindingValue = binding[name];
61-
if (bindingValue === undefined)
62-
return;
61+
if (bindingValue === undefined) return;
6362
// make plain value reactive
6463
if (!isWrapper(bindingValue) && !isFunction(bindingValue) && !Object.isFrozen(bindingValue)) {
6564
bindingValue = value(bindingValue);

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4201,10 +4201,10 @@ verror@1.10.0:
42014201
core-util-is "1.0.2"
42024202
extsprintf "^1.2.0"
42034203

4204-
vue@^2.0.0:
4204+
vue@^2.6.10:
42054205
version "2.6.10"
4206-
resolved "https://registry.npm.taobao.org/vue/download/vue-2.6.10.tgz#a72b1a42a4d82a721ea438d1b6bf55e66195c637"
4207-
integrity sha1-pysaQqTYKnIepDjRtr9V5mGVxjc=
4206+
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.10.tgz#a72b1a42a4d82a721ea438d1b6bf55e66195c637"
4207+
integrity sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==
42084208

42094209
w3c-hr-time@^1.0.1:
42104210
version "1.0.1"

0 commit comments

Comments
 (0)
0