Skip to content

Commit 08e952a

Browse files
committed
update wip
1 parent 187f4d1 commit 08e952a

File tree

3 files changed

+526
-104
lines changed

3 files changed

+526
-104
lines changed

package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@
2929
},
3030
"dependencies": {
3131
"element-ready": "^4.1.1",
32-
"gridjs": "^1.5.0",
32+
"gridjs": "^1.7.0",
3333
"nanoid": "^3.1.10",
3434
"vue-runtime-helpers": "1.1.2"
3535
},
3636
"devDependencies": {
37-
"@babel/core": "^7.10.2",
38-
"@babel/preset-env": "^7.10.2",
39-
"@vue/cli-plugin-babel": "~4.4.0",
40-
"@vue/cli-plugin-eslint": "~4.4.0",
41-
"@vue/cli-plugin-unit-jest": "~4.4.0",
42-
"@vue/cli-service": "~4.4.0",
43-
"@vue/cli-service-global": "^4.4.4",
37+
"@babel/core": "^7.10.3",
38+
"@babel/preset-env": "^7.10.3",
39+
"@vue/cli-plugin-babel": "~4.4.6",
40+
"@vue/cli-plugin-eslint": "~4.4.6",
41+
"@vue/cli-plugin-unit-jest": "~4.4.6",
42+
"@vue/cli-service": "~4.4.6",
43+
"@vue/cli-service-global": "^4.4.6",
4444
"@vue/compiler-sfc": "^3.0.0-beta.15",
4545
"@vue/eslint-config-prettier": "^6.0.0",
4646
"@vue/test-utils": "^1.0.3",
@@ -50,13 +50,15 @@
5050
"bili-babel": "^0.2.0",
5151
"core-js": "^3.6.5",
5252
"cross-env": "^5.2.0",
53-
"eslint": "^6.7.2",
53+
"eslint": "^7.3.1",
5454
"eslint-plugin-import": "^2.21.2",
5555
"eslint-plugin-prettier": "^3.1.3",
5656
"eslint-plugin-vue": "^6.2.2",
57-
"prettier": "^1.19.1",
57+
"prettier": "^2.0.5",
58+
"raw-loader": "^4.0.1",
5859
"rollup-plugin-css": "^1.0.10",
5960
"rollup-plugin-node-resolve": "^5.2.0",
61+
"rollup-plugin-string": "^3.0.0",
6062
"rollup-plugin-vue": "5",
6163
"typescript": "^3.9.5",
6264
"vue": "^2.6.11",

src/gridjs-vue.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ export default {
1414
type: Boolean,
1515
default: true
1616
},
17+
classNames: {
18+
type: Object,
19+
default: undefined
20+
},
1721
cols: {
1822
type: Array,
1923
default: undefined
@@ -46,6 +50,10 @@ export default {
4650
type: [Object, Boolean],
4751
default: false
4852
},
53+
styles: {
54+
type: Object,
55+
default: undefined
56+
},
4957
theme: {
5058
type: String,
5159
default: 'mermaid'
@@ -79,10 +87,14 @@ export default {
7987
width: this.width
8088
}
8189
90+
// let classNames
91+
92+
if (this.classNames) options.className = this.classNames
8293
if (this.from) options.from = this.from
8394
if (this.language) options.language = this.language
8495
if (this.search) options.search = this.search
8596
if (this.server) options.server = this.server
97+
if (this.styles) options.style = this.styles
8698
8799
return options
88100
}
@@ -144,7 +156,7 @@ export default {
144156
const themes = ['mermaid']
145157
146158
if (themes.includes(this.theme)) {
147-
await import(`./themes/${this.theme}.css`)
159+
console.log(await import(`raw-loader!gridjs/dist/theme/${this.theme}.css`))
148160
}
149161
150162
const styleSheets = document.styleSheets

0 commit comments

Comments
 (0)