Skip to content

Commit ac4118c

Browse files
author
utkace
committed
feature: add ImageKitContext component
1 parent fabd813 commit ac4118c

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/components/IKContext.vue

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<script>
2+
export default {
3+
name: "IKContext",
4+
5+
inheritAttrs:false,
6+
7+
provide() {
8+
const contextConfigurations = {}
9+
Object.assign(contextConfigurations, this.$attrs);
10+
return {configurations:contextConfigurations};
11+
},
12+
13+
computed: {
14+
attributes() {
15+
return this.$attrs
16+
}
17+
},
18+
19+
render(h) {
20+
return h(
21+
"div",
22+
{
23+
class: { "ik-context": true },
24+
attrs: this.attributes
25+
},
26+
this.$slots.default
27+
);
28+
}
29+
};
30+
</script>

0 commit comments

Comments
 (0)