@afeefa/vue-app 0.0.177 → 0.0.179
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/.afeefa/package/release/version.txt +1 -1
- package/package.json +1 -1
- package/src/components/ALoadingIndicator.vue +23 -12
- package/src/components/AModal.vue +6 -11
- package/src/components/ASearchSelect.vue +1 -1
- package/src/components/ATab.vue +27 -0
- package/src/components/ATabs.vue +94 -0
- package/src-admin/components/App.vue +0 -2
- package/src-admin/components/detail/DetailProperty.vue +6 -6
- package/src-admin/components/form/RemoveDialog.vue +1 -0
- package/src-admin/components/list/ListView.vue +2 -1
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.179
|
package/package.json
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
v-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
2
|
+
<div :class="['loadingIndicator', {absolute}]">
|
3
|
+
<v-progress-linear
|
4
|
+
v-if="isLoading_"
|
5
|
+
class="loadingIndicator"
|
6
|
+
indeterminate
|
7
|
+
:color="color"
|
8
|
+
/>
|
9
|
+
<div
|
10
|
+
v-else
|
11
|
+
style="height: 4px;"
|
12
|
+
/>
|
13
|
+
</div>
|
13
14
|
</template>
|
14
15
|
|
15
16
|
<script>
|
16
17
|
import { Component, Vue, Watch } from '@a-vue'
|
17
18
|
|
18
19
|
@Component({
|
19
|
-
props: [
|
20
|
+
props: [{isLoading: false, absolute: false}]
|
20
21
|
})
|
21
22
|
export default class ALoadingIndicator extends Vue {
|
22
23
|
isLoading_ = false
|
@@ -49,3 +50,13 @@ export default class ALoadingIndicator extends Vue {
|
|
49
50
|
}
|
50
51
|
}
|
51
52
|
</script>
|
53
|
+
|
54
|
+
|
55
|
+
<style lang="scss" scoped>
|
56
|
+
.absolute {
|
57
|
+
position: absolute;
|
58
|
+
width: 100%;
|
59
|
+
top: 0;
|
60
|
+
left: 0;
|
61
|
+
}
|
62
|
+
</style>
|
@@ -23,18 +23,13 @@
|
|
23
23
|
|
24
24
|
<v-card v-if="modal">
|
25
25
|
<v-card-title v-if="title">
|
26
|
-
<v-
|
26
|
+
<v-icon
|
27
27
|
v-if="icon"
|
28
|
-
color="
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
:color="icon.color"
|
34
|
-
size="1.2rem"
|
35
|
-
v-text="icon.icon"
|
36
|
-
/>
|
37
|
-
</v-avatar>
|
28
|
+
:color="icon.color"
|
29
|
+
class="mr-2"
|
30
|
+
size="1.5rem"
|
31
|
+
v-text="icon.icon"
|
32
|
+
/>
|
38
33
|
|
39
34
|
{{ title }}
|
40
35
|
</v-card-title>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<slot v-if="visible" />
|
4
|
+
</div>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
import { Component, Vue } from '@a-vue'
|
9
|
+
|
10
|
+
@Component({
|
11
|
+
props: ['title']
|
12
|
+
})
|
13
|
+
export default class ATab extends Vue {
|
14
|
+
visible = false
|
15
|
+
|
16
|
+
show () {
|
17
|
+
this.visible = true
|
18
|
+
}
|
19
|
+
|
20
|
+
hide () {
|
21
|
+
this.visible = false
|
22
|
+
}
|
23
|
+
}
|
24
|
+
</script>
|
25
|
+
|
26
|
+
<style lang="scss" scoped>
|
27
|
+
</style>
|
@@ -0,0 +1,94 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<div :class="['menuContainer', {first}]">
|
4
|
+
<div class="menu">
|
5
|
+
<div
|
6
|
+
v-for="(title, index) in titles"
|
7
|
+
:key="index"
|
8
|
+
:class="['label', {selected: index === currentIndex}]"
|
9
|
+
@click="setTab(index)"
|
10
|
+
>
|
11
|
+
{{ title }}
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<div class="content">
|
17
|
+
<slot />
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</template>
|
21
|
+
|
22
|
+
<script>
|
23
|
+
import { Component, Vue } from '@a-vue'
|
24
|
+
|
25
|
+
@Component({
|
26
|
+
props: [{first: false}]
|
27
|
+
})
|
28
|
+
export default class ATabs extends Vue {
|
29
|
+
titles = []
|
30
|
+
currentIndex = 0
|
31
|
+
|
32
|
+
mounted () {
|
33
|
+
console.log(this.$children)
|
34
|
+
|
35
|
+
this.titles = this.$children.map(c => c.title)
|
36
|
+
|
37
|
+
this.$children[this.currentIndex].show()
|
38
|
+
}
|
39
|
+
|
40
|
+
setTab (index) {
|
41
|
+
this.currentIndex = index
|
42
|
+
this.$children.forEach((tab, i) => {
|
43
|
+
if (i === this.currentIndex) {
|
44
|
+
tab.show()
|
45
|
+
} else {
|
46
|
+
tab.hide()
|
47
|
+
}
|
48
|
+
})
|
49
|
+
}
|
50
|
+
}
|
51
|
+
</script>
|
52
|
+
|
53
|
+
<style lang="scss" scoped>
|
54
|
+
.menuContainer {
|
55
|
+
border-bottom: 2px solid #EEEEEE;
|
56
|
+
margin: 2rem 0;
|
57
|
+
|
58
|
+
&.first {
|
59
|
+
margin-top: 0;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
.menu {
|
64
|
+
position: relative;
|
65
|
+
display: flex;
|
66
|
+
justify-content: center;
|
67
|
+
margin-bottom: -2px;
|
68
|
+
|
69
|
+
.label {
|
70
|
+
padding: .6rem 1.5rem .5rem;
|
71
|
+
border-bottom: 2px solid #EEEEEE;
|
72
|
+
// border-top-left-radius: 6px;
|
73
|
+
// border-top-right-radius: 6px;
|
74
|
+
background: white;
|
75
|
+
cursor: pointer;
|
76
|
+
|
77
|
+
text-transform: uppercase;
|
78
|
+
letter-spacing: 5px;
|
79
|
+
color: #CCCCCC;
|
80
|
+
font-size: .8rem;
|
81
|
+
white-space: nowrap;
|
82
|
+
|
83
|
+
&.selected {
|
84
|
+
padding-top: .3rem;
|
85
|
+
|
86
|
+
border-left: 2px solid #EEEEEE;
|
87
|
+
border-top: 2px solid #EEEEEE;
|
88
|
+
border-right: 2px solid #EEEEEE;
|
89
|
+
border-bottom: none;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
</style>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<v-icon
|
5
5
|
v-if="icon"
|
6
6
|
:color="icon.color"
|
7
|
-
size="
|
7
|
+
size="2.75rem"
|
8
8
|
>
|
9
9
|
{{ icon.icon }}
|
10
10
|
</v-icon>
|
@@ -55,12 +55,12 @@ export default class DetailProperty extends Vue {
|
|
55
55
|
height: 40px;
|
56
56
|
|
57
57
|
> .v-icon {
|
58
|
-
flex: 0 0
|
59
|
-
margin-right:
|
58
|
+
flex: 0 0 2.5rem;
|
59
|
+
margin-right: 1rem;
|
60
60
|
}
|
61
61
|
|
62
62
|
.iconPlaceholder {
|
63
|
-
width:
|
63
|
+
width: 3.5rem;
|
64
64
|
}
|
65
65
|
|
66
66
|
.label {
|
@@ -73,8 +73,8 @@ export default class DetailProperty extends Vue {
|
|
73
73
|
}
|
74
74
|
|
75
75
|
.content {
|
76
|
-
margin-top: .
|
77
|
-
padding-left:
|
76
|
+
margin-top: .75rem;
|
77
|
+
padding-left: 3.5rem;
|
78
78
|
}
|
79
79
|
}
|
80
80
|
</style>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
</a-table-header>
|
35
35
|
|
36
36
|
<a-table-row
|
37
|
-
v-for="model in models_"
|
37
|
+
v-for="(model, index) in models_"
|
38
38
|
:key="model.id"
|
39
39
|
v-flying-context-trigger="hasFlyingContext"
|
40
40
|
:class="getRowClasses(model)"
|
@@ -52,6 +52,7 @@
|
|
52
52
|
<slot
|
53
53
|
name="model-table"
|
54
54
|
:model="model"
|
55
|
+
:index="index"
|
55
56
|
/>
|
56
57
|
</a-table-row>
|
57
58
|
</a-table>
|