chxj1992 / kline

一个 javascript K线插件. A K line library written in javascript.
Do What The F*ck You Want To Public License
793 stars 337 forks source link

vue中整合了这个库,但是出现了这个错误 #68

Closed LeonYanghaha closed 6 years ago

LeonYanghaha commented 6 years ago

` var kline = new Kline({ element: "#kline_container", width: 1200, height: 650, theme: 'light', // light/dark language: 'zh-cn', // zh-cn/en-us/zh-tw ranges: ["1w", "1d", "1h", "30m", "15m", "5m", "1m", "line"], symbol: "TTT", symbolName: "BTC/TTT", type: "poll", // poll/socket url: "http://*******/mockNN.json", limit: 1000, intervalTime: 5000, debug: false, showTrade: false }); kline.draw();

`

wechat screenshot_20180614172221

Guanyuhao commented 6 years ago

var K = Kline.default; new k({...})

LeonYanghaha commented 6 years ago

@Guanyuhao 有点没明白你的意思,我按照这个写法,但是出现了这个错误。

` TypeError: k is not a constructor

at eval (deal.vue?e244:195)
at Object../node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/pages/deal/deal.vue (2.js:31)
at __webpack_require__ (app.js:708)
at fn (app.js:113)
at eval (deal.vue?ed52:1)
at Object../src/pages/deal/deal.vue (2.js:180)
at __webpack_require__ (app.js:708)
at fn (app.js:113)
at eval (index.js?3672:77)`
samuelterra22 commented 6 years ago

@Yangk030208 you fix this problem?