renusify 1.3.0 → 1.3.2
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/components/breadcrumb/style.scss +1 -1
- package/components/form/input.vue +2 -2
- package/components/form/json/JsonView.vue +13 -5
- package/components/form/json/index.vue +10 -21
- package/components/form/rating.vue +1 -1
- package/components/form/unit-input.vue +1 -1
- package/components/list/style.scss +2 -2
- package/components/menu/index.vue +1 -1
- package/components/table/style.scss +4 -4
- package/package.json +1 -1
- package/style/colors.scss +3 -4
- package/tools/helper.js +0 -4
|
@@ -313,12 +313,12 @@ export default {
|
|
|
313
313
|
|
|
314
314
|
input::placeholder,
|
|
315
315
|
textarea::placeholder {
|
|
316
|
-
color: var(--color-
|
|
316
|
+
color: var(--color-disabled)
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
&.input-disabled {
|
|
320
320
|
* {
|
|
321
|
-
color: var(--color-
|
|
321
|
+
color: var(--color-disabled)
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<r-btn v-if="!disableDel" icon class="color-error-text" text @click="del(key)">
|
|
7
7
|
<r-icon v-html="$r.icons.delete"></r-icon>
|
|
8
8
|
</r-btn>
|
|
9
|
-
<div v-if="typeof value==='object'">{{ key }}</div>
|
|
9
|
+
<div v-if="typeof value==='object'">{{ t(key) }}</div>
|
|
10
10
|
</div>
|
|
11
11
|
<div v-if="typeof value==='object'" class="flex-grow-1 w-full ps-10">
|
|
12
12
|
<r-json-input :tile="tile"
|
|
@@ -14,21 +14,22 @@
|
|
|
14
14
|
@update:model-value="emit(key,$event)"
|
|
15
15
|
:disableAdd="disableAdd||template!==undefined"
|
|
16
16
|
:disableDel="disableDel||template!==undefined"
|
|
17
|
+
:translate="translate"
|
|
17
18
|
disableEditKey
|
|
18
19
|
></r-json-input>
|
|
19
20
|
</div>
|
|
20
21
|
<div v-else class="mb-1 flex-grow-1">
|
|
21
22
|
<r-text-input v-if="typeof value==='string'"
|
|
22
23
|
:tile="tile"
|
|
23
|
-
:label="!is_array?key:''"
|
|
24
|
+
:label="!is_array?t(key):''"
|
|
24
25
|
:model-value="value" @update:model-value="emit(key,$event)"></r-text-input>
|
|
25
26
|
<r-number-input v-else-if="typeof value==='number'"
|
|
26
27
|
:tile="tile"
|
|
27
|
-
:label="!is_array?key:''"
|
|
28
|
+
:label="!is_array?t(key):''"
|
|
28
29
|
:model-value="value" @update:model-value="emit(key,$event)"></r-number-input>
|
|
29
30
|
<r-switch-input v-else-if="typeof value==='boolean'"
|
|
30
31
|
:tile="tile"
|
|
31
|
-
:label="!is_array?key:''"
|
|
32
|
+
:label="!is_array?t(key):''"
|
|
32
33
|
:model-value="value" @update:model-value="emit(key,$event)"></r-switch-input>
|
|
33
34
|
|
|
34
35
|
</div>
|
|
@@ -43,7 +44,8 @@ export default {
|
|
|
43
44
|
template: Object,
|
|
44
45
|
disableAdd: Boolean,
|
|
45
46
|
disableDel: Boolean,
|
|
46
|
-
tile: Boolean
|
|
47
|
+
tile: Boolean,
|
|
48
|
+
translate:Boolean
|
|
47
49
|
},
|
|
48
50
|
emits: ['update:modelValue'],
|
|
49
51
|
data() {
|
|
@@ -57,6 +59,12 @@ export default {
|
|
|
57
59
|
}
|
|
58
60
|
},
|
|
59
61
|
methods: {
|
|
62
|
+
t(key){
|
|
63
|
+
if(this.translate){
|
|
64
|
+
return this.$t(key)
|
|
65
|
+
}
|
|
66
|
+
return key
|
|
67
|
+
},
|
|
60
68
|
del(key) {
|
|
61
69
|
let o = this.modelValue
|
|
62
70
|
if (this.is_array) {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
:template="template"
|
|
11
11
|
:disableAdd="disableAdd"
|
|
12
12
|
:disableDel="disableDel"
|
|
13
|
+
:translate="translate"
|
|
13
14
|
:tile="tile"
|
|
14
15
|
></json-view>
|
|
15
16
|
<r-btn
|
|
@@ -24,27 +25,28 @@
|
|
|
24
25
|
<r-text-input
|
|
25
26
|
v-if="!is_array"
|
|
26
27
|
v-model="info.key"
|
|
27
|
-
:label="
|
|
28
|
+
:label="$t('key','renusify')"
|
|
28
29
|
:tile="tile"
|
|
29
30
|
class="w-30 pe-1"></r-text-input>
|
|
30
|
-
<div class="w-20"
|
|
31
|
+
<div class="w-20" >
|
|
31
32
|
<r-select-input v-model="info.type"
|
|
32
33
|
:tile="tile"
|
|
33
34
|
class="me-1"
|
|
34
35
|
:items="['text','number','boolean','json','array']"
|
|
35
36
|
just-value
|
|
36
37
|
disableSearch
|
|
38
|
+
:translate="translate"
|
|
37
39
|
@update:model-value="info.value=null"
|
|
38
40
|
firstSelect></r-select-input>
|
|
39
41
|
</div>
|
|
40
|
-
<r-text-input v-if="
|
|
42
|
+
<r-text-input v-if="info.type==='text'"
|
|
41
43
|
:tile="tile"
|
|
42
|
-
:label="
|
|
44
|
+
:label="$t('value','renusify')"
|
|
43
45
|
v-model="info.value"></r-text-input>
|
|
44
|
-
<r-number-input v-else-if="
|
|
46
|
+
<r-number-input v-else-if="info.type==='number'"
|
|
45
47
|
:tile="tile"
|
|
46
48
|
:label="$t('value','renusify')" v-model="info.value"></r-number-input>
|
|
47
|
-
<r-switch-input v-else-if="
|
|
49
|
+
<r-switch-input v-else-if="info.type==='boolean'"
|
|
48
50
|
:tile="tile"
|
|
49
51
|
:label="$t('value','renusify')" v-model="info.value"></r-switch-input>
|
|
50
52
|
<r-btn @click.prevent="add" class="ms-1 color-success" rounded>{{ $t('add', 'renusify') }}</r-btn>
|
|
@@ -69,23 +71,16 @@ export default {
|
|
|
69
71
|
components: {JsonView},
|
|
70
72
|
props: {
|
|
71
73
|
label: String,
|
|
72
|
-
keyLabel: {type: String, default: 'key'},
|
|
73
|
-
valueLabel: {type: String, default: 'value'},
|
|
74
74
|
modelValue: {
|
|
75
75
|
type: Object, Array
|
|
76
76
|
},
|
|
77
|
-
valueType: {
|
|
78
|
-
type: String,
|
|
79
|
-
validator: function (value) {
|
|
80
|
-
return ['text', 'number', 'boolean'].indexOf(value) !== -1
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
77
|
template: Object,
|
|
84
78
|
baseArray: Boolean,
|
|
85
79
|
disableAdd: Boolean,
|
|
86
80
|
tile: Boolean,
|
|
87
81
|
disableEditKey: Boolean,
|
|
88
|
-
disableDel: Boolean
|
|
82
|
+
disableDel: Boolean,
|
|
83
|
+
translate: Boolean
|
|
89
84
|
},
|
|
90
85
|
emits: ['update:modelValue'],
|
|
91
86
|
data() {
|
|
@@ -98,12 +93,6 @@ export default {
|
|
|
98
93
|
}
|
|
99
94
|
},
|
|
100
95
|
computed: {
|
|
101
|
-
val_type() {
|
|
102
|
-
if (this.valueType) {
|
|
103
|
-
return this.valueType
|
|
104
|
-
}
|
|
105
|
-
return this.info.type
|
|
106
|
-
},
|
|
107
96
|
is_array() {
|
|
108
97
|
if (this.baseArray) {
|
|
109
98
|
return true
|
|
@@ -13,11 +13,11 @@ $item-height: 48px;
|
|
|
13
13
|
|
|
14
14
|
.list-item {
|
|
15
15
|
&.list-item-active {
|
|
16
|
-
background-color: var(--color-
|
|
16
|
+
background-color: var(--color-sheet-active)
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&:hover {
|
|
20
|
-
background-color: var(--color-
|
|
20
|
+
background-color: var(--color-sheet-hover)
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -50,7 +50,7 @@ $data-table-regular-header-height: 38px !default;
|
|
|
50
50
|
|
|
51
51
|
&:hover {
|
|
52
52
|
td:first-child {
|
|
53
|
-
background: var(--color-
|
|
53
|
+
background: var(--color-sheet-hover)
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -60,7 +60,7 @@ $data-table-regular-header-height: 38px !default;
|
|
|
60
60
|
tbody {
|
|
61
61
|
tr:nth-child(2n):not(:hover) {
|
|
62
62
|
td {
|
|
63
|
-
background: var(--color-
|
|
63
|
+
background: var(--color-sheet-active)
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -69,11 +69,11 @@ $data-table-regular-header-height: 38px !default;
|
|
|
69
69
|
tbody {
|
|
70
70
|
tr {
|
|
71
71
|
&:active {
|
|
72
|
-
background: var(--color-
|
|
72
|
+
background: var(--color-sheet-active)
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
&:hover {
|
|
76
|
-
background: var(--color-
|
|
76
|
+
background: var(--color-sheet-hover)
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
package/package.json
CHANGED
package/style/colors.scss
CHANGED
|
@@ -15,14 +15,13 @@ $colorsList: (
|
|
|
15
15
|
'divider':rgba(#444, 0.2),
|
|
16
16
|
'text-primary':#515151,
|
|
17
17
|
'text-secondary':#888,
|
|
18
|
-
'text-disabled':rgba(#000, 0.26),
|
|
19
18
|
'disabled':rgba(#000, 0.26),
|
|
20
19
|
'focused':rgba(#000, 0.12),
|
|
21
20
|
'pressed':rgba(#999, 0.4),
|
|
22
21
|
'border': rgba(#000, 0.24),
|
|
23
22
|
'sheet': #fff,
|
|
24
|
-
'
|
|
25
|
-
'
|
|
23
|
+
'sheet-active': #f5f5f5,
|
|
24
|
+
'sheet-hover': #eeeeee,
|
|
26
25
|
'overlay': rgba(225, 225, 225, 0.5)
|
|
27
26
|
) !default;
|
|
28
27
|
|
|
@@ -105,7 +104,7 @@ $colorsList: (
|
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
.color-disabled-text {
|
|
108
|
-
@include text-color(var(--color-
|
|
107
|
+
@include text-color(var(--color-disabled), true);
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
|
package/tools/helper.js
CHANGED
|
@@ -173,10 +173,6 @@ export function limiter(string, length) {
|
|
|
173
173
|
: string;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
export function url() {
|
|
177
|
-
return process.env.NODE_ENV === 'production' ? process.env.VUE_APP_API_production_URL : process.env.VUE_APP_API_URL;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
176
|
export function cleanArray(actual) {
|
|
181
177
|
const newArray = [];
|
|
182
178
|
const lng = actual.length
|