Hello World!
jkchao / blog-admin Goto Github PK
View Code? Open in Web Editor NEWblog-admin @react、@typescript、@apollographql
Home Page: https://admin.jkchao.cn
blog-admin @react、@typescript、@apollographql
Home Page: https://admin.jkchao.cn
Hello World!
运行错误
大佬,假如我要操作$ref.获得的是个什么类型啊.换句话说,在typescript中,有没有一些内置类型是原生的,比如我知道的有Node什么的
我的问题是:me.$refs[type].offsetTop会提示我offsetTop不属于前面那个类型,谢谢大佬了
大佬,我是通过Vue.use(elementui)这样全局使用,然后在vue组件中使用ts,但是报了elementui组件未注册
webpack版本:"^4.5.0"
ts-loader版本: "^4.4.2"
Hi jkchao,
我用node stable 8.11.3 和 10.1.0 都不能成功install 成功,请问你用的哪个版本的Node
https://github.com/jkchao/vue-admin/b
lob/2b65f0145301673f8db6c9ca62c073724b955c86/src/pages/set/index.vue#L293
$ npm run dev
[email protected] dev G:\GitHub\vue-admin
webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
94% asset optimization ERROR Failed to compile with 12 errors13:38:37
error in G:\GitHub\vue-admin\src\pages\Links\Index.vue.tsx
[tsl] ERROR in G:\GitHub\vue-admin\src\pages\Links\Index.vue.tsx(188,24)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\GitHub\vue-admin\src\pages\Links\Index.vue.tsx
[tsl] ERROR in G:\GitHub\vue-admin\src\pages\Links\Index.vue.tsx(222,27)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\GitHub\vue-admin\src\pages\Book\Index.vue.tsx
[tsl] ERROR in G:\GitHub\vue-admin\src\pages\Book\Index.vue.tsx(291,24)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\GitHub\vue-admin\src\pages\Book\Index.vue.tsx
[tsl] ERROR in G:\GitHub\vue-admin\src\pages\Book\Index.vue.tsx(326,27)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\GitHub\vue-admin\src\pages\Tags\Index.vue.tsx
[tsl] ERROR in G:\GitHub\vue-admin\src\pages\Tags\Index.vue.tsx(144,24)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\GitHub\vue-admin\src\pages\Tags\Index.vue.tsx
[tsl] ERROR in G:\GitHub\vue-admin\src\pages\Tags\Index.vue.tsx(178,27)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
环境
node: v8.6.0
npm: 5.3.0
ERROR Failed to compile with 18 errors 21:16:50
error in G:\github\vue-admin\src\components\card.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\components\card.vue.tsx(32,3)
TS2564: Property 'carLoading' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\components\card.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\components\card.vue.tsx(35,3)
TS2564: Property 'width' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\components\card.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\components\card.vue.tsx(38,3)
TS2564: Property 'type' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\pages\book\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\book\index.vue.tsx(224,11)
TS2564: Property 'state' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\pages\book\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\book\index.vue.tsx(291,24)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\github\vue-admin\src\pages\book\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\book\index.vue.tsx(326,27)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\github\vue-admin\src\pages\heros\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\heros\index.vue.tsx(164,11)
TS2564: Property 'state' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\pages\tags\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\tags\index.vue.tsx(144,24)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\github\vue-admin\src\pages\tags\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\tags\index.vue.tsx(178,27)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\github\vue-admin\src\pages\set\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\set\index.vue.tsx(179,3)
TS2564: Property '$refs' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\pages\article\release.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\article\release.vue.tsx(185,24)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\github\vue-admin\src\pages\comments\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\comments\index.vue.tsx(187,11)
TS2564: Property 'state' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\pages\login.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\login.vue.tsx(46,3)
TS2564: Property '$refs' has no initializer and is not definitely assigned in the constructor.
error in ./src/utils/loginIn.ts
[tsl] ERROR in G:\github\vue-admin\src\utils\loginIn.ts(8,15)
TS2339: Property 'localStorage' does not exist on type 'typeof window'.
error in ./src/utils/loginIn.ts
[tsl] ERROR in G:\github\vue-admin\src\utils\loginIn.ts(9,38)
TS2339: Property 'localStorage' does not exist on type 'typeof window'.
error in ./src/store/index.ts
[tsl] ERROR in G:\github\vue-admin\src\store\index.ts(60,14)
TS2339: Property 'localStorage' does not exist on type 'typeof window'.
error in ./src/api/axios.ts
[tsl] ERROR in G:\github\vue-admin\src\api\axios.ts(21,14)
TS2339: Property 'localStorage' does not exist on type 'typeof window'.
error in ./src/api/axios.ts
[tsl] ERROR in G:\github\vue-admin\src\api\axios.ts(22,64)
TS2339: Property 'localStorage' does not exist on type 'typeof window'.
终止批处理操作吗(Y/N)?
^Cy
PS G:\github\vue-admin> npm start
[email protected] start G:\github\vue-admin
npm run dev
[email protected] dev G:\github\vue-admin
webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
94% asset optimization
ERROR Failed to compile with 18 errors 21:20:41
error in G:\github\vue-admin\src\components\card.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\components\card.vue.tsx(32,3)
TS2564: Property 'carLoading' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\components\card.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\components\card.vue.tsx(35,3)
TS2564: Property 'width' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\components\card.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\components\card.vue.tsx(38,3)
TS2564: Property 'type' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\pages\book\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\book\index.vue.tsx(224,11)
TS2564: Property 'state' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\pages\book\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\book\index.vue.tsx(291,24)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\github\vue-admin\src\pages\book\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\book\index.vue.tsx(326,27)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\github\vue-admin\src\pages\set\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\set\index.vue.tsx(179,3)
TS2564: Property '$refs' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\pages\comments\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\comments\index.vue.tsx(187,11)
TS2564: Property 'state' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\pages\heros\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\heros\index.vue.tsx(164,11)
TS2564: Property 'state' has no initializer and is not definitely assigned in the constructor.
error in G:\github\vue-admin\src\pages\article\release.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\article\release.vue.tsx(185,24)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\github\vue-admin\src\pages\tags\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\tags\index.vue.tsx(144,24)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\github\vue-admin\src\pages\tags\index.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\tags\index.vue.tsx(178,27)
TS2339: Property 'assign' does not exist on type 'typeof Object'.
error in G:\github\vue-admin\src\pages\login.vue.tsx
[tsl] ERROR in G:\github\vue-admin\src\pages\login.vue.tsx(46,3)
TS2564: Property '$refs' has no initializer and is not definitely assigned in the constructor.
error in ./src/utils/loginIn.ts
[tsl] ERROR in G:\github\vue-admin\src\utils\loginIn.ts(8,15)
TS2339: Property 'localStorage' does not exist on type 'typeof window'.
error in ./src/utils/loginIn.ts
[tsl] ERROR in G:\github\vue-admin\src\utils\loginIn.ts(9,38)
TS2339: Property 'localStorage' does not exist on type 'typeof window'.
error in ./src/store/index.ts
[tsl] ERROR in G:\github\vue-admin\src\store\index.ts(60,14)
TS2339: Property 'localStorage' does not exist on type 'typeof window'.
error in ./src/api/axios.ts
[tsl] ERROR in G:\github\vue-admin\src\api\axios.ts(21,14)
TS2339: Property 'localStorage' does not exist on type 'typeof window'.
error in ./src/api/axios.ts
[tsl] ERROR in G:\github\vue-admin\src\api\axios.ts(22,64)
TS2339: Property 'localStorage' does not exist on type 'typeof window'.
src/store/modules/index.ts
files.keys().forEach(key => {
if (key === './index.js') return // 应为 key === './index.ts'
modules[key.replace(/(\.\/|\.ts)/g, '')] = files(key).default
})
否则,在 src/store/index.ts
内
export default new Vuex.Store({
state,
actions,
mutations,
modules: {
modules // 无法正常使用namespaced
}
})
问一下大佬,在组件中使用vue-router的'beforeRouteEnter','beforeRouteLeave','beforeRouteUpdate'钩子函数,registerHooks之后,怎么在组件内使用呢?谢谢大佬
可以给个账户密码吗?谢谢
27% building modules 142/180 modules 38 active ...ighlight.js/lib/languages/routeros.jsnode[5727]: ../src/node_file.cc:943:void node::fs::Stat(const FunctionCallbackInfov8::Value &): Assertion `(argc) == (4)' failed
这个问题是什么原因呢
你好,我使用npm run dev的时候项目报错,起不来,不知道为啥
如题
https://github.com/jkchao/vue-admin/blob/2b65f
0145301673f8db6c9ca62c073724b955c86/src/pages/comments/index.vue#L189
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.