@appscode/design-system 1.0.43-alpha.138 → 1.0.43-alpha.140

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "1.0.43-alpha.138",
3
+ "version": "1.0.43-alpha.140",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -34,7 +34,7 @@
34
34
  <editor
35
35
  v-else-if="!isPreviewLoading && !hideValue"
36
36
  v-model="activeFile.content"
37
- :original-value="activeFile.content"
37
+ :original-value="originalValue"
38
38
  :language="activeFile.format"
39
39
  :read-only="isEditorReadOnly"
40
40
  :editor-height="editorHeight"
@@ -107,6 +107,12 @@ export default {
107
107
  );
108
108
  return activeFile || { content: "", format: "yaml" };
109
109
  },
110
+ originalValue(){
111
+ const activeFile = this.filteredYamls.find(
112
+ element => element.uid === this.activeKey
113
+ );
114
+ return (activeFile && activeFile.initContent) || "";
115
+ },
110
116
  filteredYamls() {
111
117
  if (this.searchText) {
112
118
  return this.previewYamls.filter(
@@ -2,6 +2,7 @@
2
2
  <content-layout>
3
3
  <template #content-header>
4
4
  <content-header
5
+ v-if="!hideHeader"
5
6
  :header-title="tableTitle"
6
7
  :header-sub-title="tableSubTitle"
7
8
  :class="{ 'pl-0 pr-0': removeTableHeaderPadding }"
@@ -38,6 +39,10 @@ export default defineComponent({
38
39
  type: Boolean,
39
40
  default: true,
40
41
  },
42
+ hideHeader: {
43
+ type: Boolean,
44
+ default: false
45
+ }
41
46
  },
42
47
  components: {
43
48
  ContentLayout: defineAsyncComponent(() =>
@@ -15,12 +15,12 @@
15
15
  :language="language"
16
16
  :options="{
17
17
  minimap: {
18
- enabled: calcShowMinimap,
18
+ enabled: calcShowMinimap
19
19
  },
20
20
  theme: theme,
21
21
  readOnly: readOnly,
22
22
  wordWrap: wordWrap,
23
- scrollBeyondLastLine: false,
23
+ scrollBeyondLastLine: false
24
24
  }"
25
25
  />
26
26
  <monaco-editor
@@ -31,12 +31,12 @@
31
31
  :language="language"
32
32
  :options="{
33
33
  minimap: {
34
- enabled: calcShowMinimap,
34
+ enabled: calcShowMinimap
35
35
  },
36
36
  theme: theme,
37
37
  readOnly: true,
38
38
  wordWrap: wordWrap,
39
- scrollBeyondLastLine: false,
39
+ scrollBeyondLastLine: false
40
40
  }"
41
41
  :original="originalEditorContent"
42
42
  :diff-editor="true"
@@ -50,62 +50,61 @@ import Preloader from "../../v2/preloader/Preloader.vue";
50
50
  import Banner from "../../v2/banner/Banner.vue";
51
51
  export default defineComponent({
52
52
  props: {
53
- value: {
53
+ modelValue: {
54
54
  type: String,
55
- default: "",
55
+ default: ""
56
56
  },
57
57
  originalValue: {
58
58
  type: String,
59
- default: "",
59
+ default: ""
60
60
  },
61
61
  readOnly: {
62
62
  type: Boolean,
63
- default: false,
63
+ default: false
64
64
  },
65
65
  language: {
66
66
  type: String,
67
- default: "yaml",
67
+ default: "yaml"
68
68
  },
69
69
  showMinimap: {
70
70
  type: Boolean,
71
- default: true,
71
+ default: true
72
72
  },
73
73
  editorHeight: {
74
74
  type: Number,
75
- default: 40,
75
+ default: 40
76
76
  },
77
77
  editorTheme: {
78
78
  type: String,
79
- default: "",
79
+ default: ""
80
80
  },
81
81
  wordWrap: {
82
82
  type: String,
83
- default: "off",
84
- },
83
+ default: "off"
84
+ }
85
85
  },
86
86
 
87
87
  emits: ["update:modelValue"],
88
88
 
89
89
  components: {
90
90
  EditorTabs: defineAsyncComponent(() =>
91
- import("../tabs/EditorTabs.vue").then((module) => module.default)
91
+ import("../tabs/EditorTabs.vue").then(module => module.default)
92
92
  ),
93
93
  MonacoEditor: defineAsyncComponent({
94
- loader: () =>
95
- import("monaco-editor-vue3").then((module) => module.default),
94
+ loader: () => import("./MonacoEditor.vue").then(module => module.default),
96
95
 
97
96
  loadingComponent: Preloader,
98
97
  delay: 200,
99
98
  errorComponent: Banner,
100
- timeout: 20000,
101
- }),
99
+ timeout: 20000
100
+ })
102
101
  },
103
102
 
104
103
  data() {
105
104
  return {
106
105
  activeTab: "edit",
107
106
  editorContent: "",
108
- originalEditorContent: "",
107
+ originalEditorContent: ""
109
108
  };
110
109
  },
111
110
 
@@ -121,17 +120,17 @@ export default defineComponent({
121
120
  ? "vs-dark"
122
121
  : "vs")
123
122
  );
124
- },
123
+ }
125
124
  },
126
125
 
127
126
  watch: {
128
- value: {
127
+ modelValue: {
129
128
  immediate: true,
130
129
  handler(n) {
131
130
  if (this.editorContent !== n) {
132
131
  this.editorContent = n;
133
132
  }
134
- },
133
+ }
135
134
  },
136
135
  originalValue: {
137
136
  immediate: true,
@@ -139,8 +138,8 @@ export default defineComponent({
139
138
  if (this.originalEditorContent !== n) {
140
139
  this.originalEditorContent = n;
141
140
  }
142
- },
143
- },
141
+ }
142
+ }
144
143
  },
145
144
 
146
145
  methods: {
@@ -152,7 +151,7 @@ export default defineComponent({
152
151
  editor.onDidBlurEditorText(() => {
153
152
  this.$emit("update:modelValue", this.editorContent);
154
153
  });
155
- },
156
- },
154
+ }
155
+ }
157
156
  });
158
157
  </script>
@@ -0,0 +1,166 @@
1
+ <template>
2
+ <div class="ac-preview is-active is-not-fixed">
3
+ <div class="ac-preview-inner">
4
+ <!-- preview body start -->
5
+ <div class="ac-preview-body mt-0 pt-15 pl-20">
6
+ <div
7
+ v-if="isPreviewLoading || (!isPreviewLoading && previewYamls)"
8
+ class="left-content"
9
+ >
10
+ <div class="ac-files">
11
+ <ul v-if="!isPreviewLoading">
12
+ <li
13
+ v-for="(previewYaml, idx) in filteredYamls"
14
+ :key="previewYaml.name + idx"
15
+ :class="{ 'is-active': activeKey === previewYaml.uid }"
16
+ >
17
+ <a @click.prevent="setActivePreview(previewYaml.uid)">
18
+ <span>
19
+ <img
20
+ src="~@appscode/design-system-images/icons/file-icon.svg"
21
+ alt=""
22
+ />
23
+ </span>
24
+ <span>{{ previewYaml.name }}</span>
25
+ </a>
26
+ </li>
27
+ </ul>
28
+ <sidebar-loader v-else />
29
+ </div>
30
+ </div>
31
+ <div class="right-content">
32
+ <div class="right-content">
33
+ <resource-loader v-if="isPreviewLoading" />
34
+ <editor
35
+ v-else-if="!isPreviewLoading && !hideValue"
36
+ v-model="activeFile.content"
37
+ :original-value="originalValue"
38
+ :language="activeFile.format"
39
+ :read-only="isEditorReadOnly"
40
+ :editor-height="editorHeight"
41
+ :show-minimap="showMinimap"
42
+ />
43
+ <span v-else> *************** </span>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </template>
50
+ <script>
51
+ import { defineComponent, defineAsyncComponent } from "vue";
52
+ import Preloader from "../../v2/preloader/Preloader.vue";
53
+ import Banner from "../../v2/banner/Banner.vue";
54
+ export default defineComponent({
55
+ components: {
56
+ Editor: defineAsyncComponent({
57
+ loader: () =>
58
+ import("../editor/Editor.vue").then(module => module.default),
59
+ loadingComponent: Preloader,
60
+ delay: 200,
61
+ errorComponent: Banner,
62
+ timeout: 20000
63
+ }),
64
+ ResourceLoader: defineAsyncComponent(() =>
65
+ import("../loaders/ResourceLoader.vue")
66
+ ),
67
+ SidebarLoader: defineAsyncComponent(() =>
68
+ import("../loaders/SidebarLoader.vue")
69
+ )
70
+ },
71
+ props: {
72
+ searchText: {
73
+ type: String,
74
+ default: ""
75
+ },
76
+ toggleHideValue: {
77
+ type: Boolean,
78
+ default: true
79
+ },
80
+ isPreviewLoading: {
81
+ type: Boolean,
82
+ default: false
83
+ },
84
+ isEditorReadOnly: {
85
+ type: Boolean,
86
+ default: false
87
+ },
88
+ previewYamls: {
89
+ type: Array,
90
+ default: () => {
91
+ [];
92
+ }
93
+ },
94
+ showMinimap: {
95
+ type: Boolean,
96
+ default: false
97
+ },
98
+ editorHeight: {
99
+ type: Number,
100
+ default: 60
101
+ }
102
+ },
103
+ emits: ["setActiveKey"],
104
+ data() {
105
+ return {
106
+ activeKey: "",
107
+ hideValue: ""
108
+ };
109
+ },
110
+ computed: {
111
+ activeFile() {
112
+ const activeFile = this.filteredYamls.find(
113
+ element => element.uid === this.activeKey
114
+ );
115
+ return activeFile || { content: "", format: "yaml" };
116
+ },
117
+ originalValue(){
118
+ const activeFile = this.filteredYamls.find(
119
+ element => element.uid === this.activeKey
120
+ );
121
+ return (activeFile && activeFile.initContent) || "";
122
+ },
123
+ filteredYamls() {
124
+ if (this.searchText) {
125
+ return this.previewYamls.filter(
126
+ element => JSON.stringify(element).search(this.searchText) > -1
127
+ );
128
+ } else return this.previewYamls;
129
+ },
130
+ isKeyAvailable() {
131
+ const val = this.previewYamls.find(element => {
132
+ return element.uid === this.activeKey;
133
+ });
134
+ return val === undefined ? false : true;
135
+ }
136
+ },
137
+ methods: {
138
+ initActivePreview() {
139
+ if (!this.isKeyAvailable) {
140
+ this.activeKey = this.previewYamls[0].uid;
141
+ this.hideValue = this.activeFile.isSecret;
142
+ this.$emit("setActiveKey", this.activeKey);
143
+ }
144
+ },
145
+ setActivePreview(uid) {
146
+ this.activeKey = uid;
147
+ this.hideValue = this.activeFile.isSecret;
148
+ this.$emit("setActiveKey", this.activeKey);
149
+ }
150
+ },
151
+ watch: {
152
+ previewYamls: {
153
+ deep: true,
154
+ immediate: true,
155
+ handler(n) {
156
+ if (n.length) {
157
+ this.initActivePreview();
158
+ }
159
+ }
160
+ },
161
+ toggleHideValue(n) {
162
+ this.hideValue = n;
163
+ }
164
+ }
165
+ });
166
+ </script>
@@ -0,0 +1,124 @@
1
+ <template>
2
+ <div class="monaco-editor-vue3" :style="style"></div>
3
+ </template>
4
+
5
+ <script>
6
+ import { defineComponent, computed, toRefs } from 'vue'
7
+ import * as monaco from 'monaco-editor'
8
+
9
+ export default defineComponent({
10
+ name: "MonacoEditor",
11
+ props: {
12
+ diffEditor: { type: Boolean, default: false },
13
+ width: {type: [String, Number], default: '100%'},
14
+ height: {type: [String, Number], default: '100%'},
15
+ original: String,
16
+ value: String,
17
+ language: {type: String, default: 'javascript'},
18
+ theme: {type: String, default: 'vs'},
19
+ options: {type: Object, default() {return {};}},
20
+ },
21
+ emits: [
22
+ 'editorWillMount',
23
+ 'editorDidMount',
24
+ 'change'
25
+ ],
26
+ setup(props){
27
+ const { width, height } = toRefs(props)
28
+ const style = computed(()=>{
29
+ const fixedWidth = width.value.toString().includes('%') ? width.value : `${width.value}px`
30
+ const fixedHeight = height.value.toString().includes('%')? height.value : `${height.value}px`
31
+ return {
32
+ width: fixedWidth,
33
+ height: fixedHeight,
34
+ 'text-align': 'left'
35
+ }
36
+ })
37
+ return {
38
+ style
39
+ }
40
+ },
41
+ mounted() {
42
+ this.initMonaco()
43
+ },
44
+ beforeDestroy() {
45
+ this.editor && this.editor.dispose();
46
+ },
47
+ methods: {
48
+ initMonaco(){
49
+ this.$emit('editorWillMount', this.monaco)
50
+ const { value, language, theme, options } = this;
51
+ this.editor = monaco.editor[this.diffEditor ? 'createDiffEditor' : 'create'](this.$el, {
52
+ value: value,
53
+ language: language,
54
+ theme: theme,
55
+ ...options
56
+ });
57
+ this.diffEditor && this._setModel(this.value, this.original);
58
+
59
+ // @event `change`
60
+ const editor = this._getEditor()
61
+ editor.onDidChangeModelContent(event => {
62
+ const value = editor.getValue()
63
+ if (this.value !== value) {
64
+ this.$emit('change', value, event)
65
+ }
66
+ })
67
+
68
+ this.$emit('editorDidMount', this.editor)
69
+ },
70
+ _setModel(value, original) {
71
+ const { language } = this;
72
+ const originalModel = monaco.editor.createModel(original, language);
73
+ const modifiedModel = monaco.editor.createModel(value, language);
74
+ this.editor.setModel({
75
+ original: originalModel,
76
+ modified: modifiedModel
77
+ });
78
+ },
79
+ _setValue(value) {
80
+ let editor = this._getEditor();
81
+ if(editor) return editor.setValue(value);
82
+ },
83
+ _getValue() {
84
+ let editor = this._getEditor();
85
+ if(!editor) return '';
86
+ return editor.getValue();
87
+ },
88
+ _getEditor() {
89
+ if(!this.editor) return null;
90
+ return this.diffEditor ? this.editor.getModifiedEditor() : this.editor;
91
+ },
92
+ _setOriginal(){
93
+ const { original } = this.editor.getModel()
94
+ original.setValue(this.original)
95
+ }
96
+ },
97
+ watch: {
98
+ options: {
99
+ deep: true,
100
+ handler(options) {
101
+ this.editor.updateOptions(options);
102
+ }
103
+ },
104
+ value() {
105
+ this.value !== this._getValue() && this._setValue(this.value);
106
+ },
107
+ original() {
108
+ this._setOriginal()
109
+ },
110
+ language() {
111
+ if(!this.editor) return;
112
+ if(this.diffEditor){
113
+ const { original, modified } = this.editor.getModel();
114
+ monaco.editor.setModelLanguage(original, this.language);
115
+ monaco.editor.setModelLanguage(modified, this.language);
116
+ }else
117
+ monaco.editor.setModelLanguage(this.editor.getModel(), this.language);
118
+ },
119
+ theme() {
120
+ monaco.editor.setTheme(this.theme);
121
+ },
122
+ }
123
+ });
124
+ </script>
@@ -0,0 +1,124 @@
1
+ <template>
2
+ <content-table
3
+ :table-title="title"
4
+ :searchable="isSearchable"
5
+ :hide-header="hideHeader"
6
+ >
7
+ <template #content-right-controls>
8
+ <header-item v-if="showHideBtn">
9
+ <ac-button
10
+ modifier-classes="is-square is-primary"
11
+ :icon-class="toggleHideValue ? 'eye-slash' : 'eye'"
12
+ @click.prevent="toggleHideValue = !toggleHideValue"
13
+ />
14
+ </header-item>
15
+ <slot name="content-action" />
16
+ </template>
17
+ <template #content="{ searchText }">
18
+ <filtered-file-editor
19
+ :search-text="searchText"
20
+ :toggle-hide-value="toggleHideValue"
21
+ :is-preview-loading="isPreviewLoading"
22
+ :is-editor-read-only="isEditorReadOnly"
23
+ :preview-yamls="previewYamls"
24
+ :show-minimap="showMinimap"
25
+ :editor-height="editorHeight"
26
+ @setActiveKey="setActiveKey"
27
+ />
28
+ </template>
29
+ </content-table>
30
+ </template>
31
+ <script>
32
+ import { defineComponent, defineAsyncComponent } from "vue";
33
+ export default defineComponent({
34
+ components: {
35
+ AcButton: defineAsyncComponent(() => import("../button/Button.vue")),
36
+ ContentTable: defineAsyncComponent(() =>
37
+ import("../content/ContentTable.vue")
38
+ ),
39
+ HeaderItem: defineAsyncComponent(() => import("../header/HeaderItem.vue")),
40
+ FilteredFileEditor: defineAsyncComponent(() =>
41
+ import("./FilteredFileEditor.vue")
42
+ )
43
+ },
44
+ props: {
45
+ title: {
46
+ type: String,
47
+ default: "Title"
48
+ },
49
+ isSearchable: {
50
+ type: Boolean,
51
+ default: false
52
+ },
53
+ isPreviewLoading: {
54
+ type: Boolean,
55
+ default: false
56
+ },
57
+ isEditorReadOnly: {
58
+ type: Boolean,
59
+ default: false
60
+ },
61
+ previewYamls: {
62
+ type: Array,
63
+ default: () => {
64
+ [];
65
+ }
66
+ },
67
+ showHideBtn: {
68
+ type: Boolean,
69
+ default: false,
70
+ },
71
+ showMinimap: {
72
+ type: Boolean,
73
+ default: false
74
+ },
75
+ isUpdateActive: {
76
+ type: Boolean,
77
+ default: false
78
+ },
79
+ deleteModalStatus: {
80
+ type: String,
81
+ default: "closed"
82
+ },
83
+ editorHeight: {
84
+ type: Number,
85
+ default: 60
86
+ },
87
+ hideHeader: {
88
+ type: Boolean,
89
+ default: false
90
+ }
91
+ },
92
+ emits: ["activeKey"],
93
+ data() {
94
+ return {
95
+ activeKey: "",
96
+ toggleHideValue: "",
97
+ showDeleteDataModal: false
98
+ };
99
+ },
100
+ computed: {
101
+ activeFile() {
102
+ const activeFile = this.previewYamls.find(
103
+ element => element.uid === this.activeKey
104
+ );
105
+ return activeFile || { content: "", format: "yaml" };
106
+ },
107
+ },
108
+ methods: {
109
+ setActiveKey(key) {
110
+ this.activeKey = key;
111
+ this.toggleHideValue = this.activeFile.isSecret;
112
+ }
113
+ },
114
+ watch: {
115
+ activeKey:{
116
+ immediate: true,
117
+ handler(n){
118
+ this.$emit("activeKey",this.activeKey);
119
+ }
120
+ }
121
+
122
+ }
123
+ });
124
+ </script>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="header-item">
3
+ <slot />
4
+ </div>
5
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="header-items is-flex is-align-items-center">
3
+ <slot />
4
+ </div>
5
+ </template>
@@ -0,0 +1,83 @@
1
+ <template>
2
+ <div>
3
+ <content-loader>
4
+ <rect x="21" y="6" rx="3" ry="3" width="42" height="3" />
5
+ <rect x="69" y="6" rx="3" ry="3" width="39" height="3" />
6
+ <rect x="114" y="6" rx="3" ry="3" width="24" height="3" />
7
+
8
+ <rect x="39" y="12" rx="3" ry="3" width="24" height="3" />
9
+ <rect x="69" y="12" rx="3" ry="3" width="45" height="3" />
10
+ <rect x="120" y="12" rx="3" ry="3" width="12" height="3" />
11
+
12
+ <rect x="39" y="18" rx="3" ry="3" width="30" height="3" />
13
+ <rect x="75" y="18" rx="3" ry="3" width="60" height="3" />
14
+
15
+ <rect x="21" y="27" rx="3" ry="3" width="42" height="3" />
16
+ <rect x="69" y="27" rx="3" ry="3" width="39" height="3" />
17
+ <rect x="114" y="27" rx="3" ry="3" width="24" height="3" />
18
+
19
+ <rect x="39" y="33" rx="3" ry="3" width="24" height="3" />
20
+ <rect x="69" y="33" rx="3" ry="3" width="45" height="3" />
21
+ <rect x="120" y="33" rx="3" ry="3" width="12" height="3" />
22
+
23
+ <rect x="39" y="39" rx="3" ry="3" width="30" height="3" />
24
+ <rect x="75" y="39" rx="3" ry="3" width="60" height="3" />
25
+
26
+ <rect x="21" y="48" rx="3" ry="3" width="42" height="3" />
27
+ <rect x="69" y="48" rx="3" ry="3" width="39" height="3" />
28
+ <rect x="114" y="48" rx="3" ry="3" width="24" height="3" />
29
+
30
+ <rect x="39" y="54" rx="3" ry="3" width="24" height="3" />
31
+ <rect x="69" y="54" rx="3" ry="3" width="45" height="3" />
32
+ <rect x="120" y="54" rx="3" ry="3" width="12" height="3" />
33
+
34
+ <rect x="39" y="60" rx="3" ry="3" width="30" height="3" />
35
+ <rect x="75" y="60" rx="3" ry="3" width="60" height="3" />
36
+
37
+ <rect x="21" y="69" rx="3" ry="3" width="42" height="3" />
38
+ <rect x="69" y="69" rx="3" ry="3" width="39" height="3" />
39
+ <rect x="114" y="69" rx="3" ry="3" width="24" height="3" />
40
+
41
+ <rect x="39" y="75" rx="3" ry="3" width="24" height="3" />
42
+ <rect x="69" y="75" rx="3" ry="3" width="45" height="3" />
43
+ <rect x="120" y="75" rx="3" ry="3" width="12" height="3" />
44
+
45
+ <rect x="39" y="81" rx="3" ry="3" width="30" height="3" />
46
+ <rect x="75" y="81" rx="3" ry="3" width="60" height="3" />
47
+
48
+ <rect x="21" y="90" rx="3" ry="3" width="42" height="3" />
49
+ <rect x="69" y="90" rx="3" ry="3" width="39" height="3" />
50
+ <rect x="114" y="90" rx="3" ry="3" width="24" height="3" />
51
+
52
+ <rect x="39" y="96" rx="3" ry="3" width="24" height="3" />
53
+ <rect x="69" y="96" rx="3" ry="3" width="45" height="3" />
54
+ <rect x="120" y="96" rx="3" ry="3" width="12" height="3" />
55
+
56
+ <rect x="39" y="102" rx="3" ry="3" width="30" height="3" />
57
+ <rect x="75" y="102" rx="3" ry="3" width="60" height="3" />
58
+
59
+ <rect x="21" y="111" rx="3" ry="3" width="42" height="3" />
60
+ <rect x="69" y="111" rx="3" ry="3" width="39" height="3" />
61
+ <rect x="114" y="111" rx="3" ry="3" width="24" height="3" />
62
+
63
+ <rect x="39" y="117" rx="3" ry="3" width="24" height="3" />
64
+ <rect x="69" y="117" rx="3" ry="3" width="45" height="3" />
65
+ <rect x="120" y="117" rx="3" ry="3" width="12" height="3" />
66
+
67
+ <rect x="39" y="123" rx="3" ry="3" width="30" height="3" />
68
+ <rect x="75" y="123" rx="3" ry="3" width="60" height="3" />
69
+ </content-loader>
70
+ </div>
71
+ </template>
72
+
73
+ <script>
74
+ import { defineAsyncComponent, defineComponent } from 'vue'
75
+ export default defineComponent({
76
+ name: 'LoaderElement',
77
+ components: {
78
+ ContentLoader: defineAsyncComponent(() =>
79
+ import('vue-content-loader').then((module) => module.ContentLoader)
80
+ ),
81
+ },
82
+ })
83
+ </script>
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <div>
3
+ <content-loader :width="200" :height="350" :speed="2">
4
+ <rect x="0" y="24" rx="3" ry="3" width="200" height="20" />
5
+ <rect x="20" y="49" rx="3" ry="3" width="200" height="20" />
6
+ <rect x="20" y="74" rx="3" ry="3" width="200" height="20" />
7
+ <rect x="20" y="124" rx="3" ry="3" width="200" height="20" />
8
+
9
+ <rect x="0" y="149" rx="3" ry="3" width="200" height="20" />
10
+ <rect x="20" y="174" rx="3" ry="3" width="200" height="20" />
11
+ <rect x="20" y="199" rx="3" ry="3" width="200" height="20" />
12
+ <rect x="20" y="249" rx="3" ry="3" width="200" height="20" />
13
+
14
+ <rect x="0" y="274" rx="3" ry="3" width="200" height="20" />
15
+ <rect x="20" y="299" rx="3" ry="3" width="200" height="20" />
16
+ <rect x="20" y="324" rx="3" ry="3" width="200" height="20" />
17
+ <rect x="20" y="349" rx="3" ry="3" width="200" height="20" />
18
+
19
+ <rect x="0" y="374" rx="3" ry="3" width="200" height="20" />
20
+ </content-loader>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ import { defineAsyncComponent, defineComponent } from 'vue'
26
+ export default defineComponent({
27
+ name: 'LoaderElement',
28
+ components: {
29
+ ContentLoader: defineAsyncComponent(() =>
30
+ import('vue-content-loader').then((module) => module.ContentLoader)
31
+ ),
32
+ },
33
+ })
34
+ </script>