mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat: Replace Vue.extend with defineComponent in design system (no-changelog) (#5918)
* refactor: replace new Vue() with custom event bus (no-changelog) * fix: export types from design system main * fix: update component types * fix: update form inputs event bus * refactor: replace global Vue references in design-system * refactor: update prop types * feat: improve types * fix: further type improvements * fix: further types improvements * fix: further type improvements * test: fix test snapshots * test: fix snapshot * chore: fix linting issues * test: fix personalization modal snapshot
This commit is contained in:
@@ -16,32 +16,33 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { defineComponent, PropType } from 'vue';
|
||||
|
||||
export default Vue.extend({
|
||||
export default defineComponent({
|
||||
name: 'variable-table',
|
||||
data() {
|
||||
return {
|
||||
observer: null as null | MutationObserver,
|
||||
values: {},
|
||||
values: {} as Record<string, string>,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
variables: {
|
||||
type: Array,
|
||||
type: Array as PropType<string[]>,
|
||||
required: true,
|
||||
},
|
||||
attr: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
created() {
|
||||
const setValues = () => {
|
||||
(this.variables as string[]).forEach((variable: string) => {
|
||||
this.variables.forEach((variable) => {
|
||||
const style = getComputedStyle(document.body);
|
||||
const value = style.getPropertyValue(variable);
|
||||
|
||||
Vue.set(this.values, variable, value);
|
||||
this.$set(this.values, variable, value);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user