renusify 2.1.7 → 2.2.0
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/codeEditor/index.vue +9 -9
- package/components/codeEditor/run.vue +3 -3
- package/components/form/checkboxInput/index.vue +6 -2
- package/components/form/groupInput/index.vue +5 -2
- package/components/form/switchInput/index.vue +3 -1
- package/components/form/timeInput/range.vue +6 -6
- package/components/img/index.vue +1 -1
- package/components/message/index.vue +1 -1
- package/index.js +14 -10
- package/package.json +1 -1
- package/tools/helper.js +1 -1
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<r-code-editor-run
|
|
30
30
|
:id="id"
|
|
31
31
|
:script="scr"
|
|
32
|
-
:
|
|
32
|
+
:css="sty"
|
|
33
33
|
:template="temp"
|
|
34
34
|
></r-code-editor-run>
|
|
35
35
|
</div>
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
<span v-show="scriptShow" class="color-orange">}<br/></script></span>
|
|
48
48
|
</div>
|
|
49
49
|
<div>
|
|
50
|
-
<span v-show="
|
|
50
|
+
<span v-show="cssShow" class="color-orange"
|
|
51
51
|
><style lang<span class="color-green">="css"</span>></span
|
|
52
52
|
>
|
|
53
53
|
<highlight-css ref="h-css" v-model="sty"></highlight-css>
|
|
54
|
-
<span v-show="
|
|
54
|
+
<span v-show="cssShow" class="color-orange"></style></span>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
57
|
</div>
|
|
@@ -77,12 +77,12 @@ export default {
|
|
|
77
77
|
runnable: Boolean,
|
|
78
78
|
templateShow: {type: Boolean, default: true},
|
|
79
79
|
scriptShow: {type: Boolean, default: true},
|
|
80
|
-
|
|
80
|
+
cssShow: {type: Boolean, default: true},
|
|
81
81
|
template: String,
|
|
82
82
|
script: String,
|
|
83
|
-
|
|
83
|
+
css: String,
|
|
84
84
|
},
|
|
85
|
-
|
|
85
|
+
emits: ["update:template", "update:script", "update:css"],
|
|
86
86
|
data() {
|
|
87
87
|
return {
|
|
88
88
|
show: "code",
|
|
@@ -90,7 +90,7 @@ export default {
|
|
|
90
90
|
edited: false,
|
|
91
91
|
temp: this.template,
|
|
92
92
|
scr: this.script,
|
|
93
|
-
|
|
93
|
+
sty: this.css,
|
|
94
94
|
id: this.$helper.uniqueId(),
|
|
95
95
|
};
|
|
96
96
|
},
|
|
@@ -111,7 +111,7 @@ export default {
|
|
|
111
111
|
script: function (n) {
|
|
112
112
|
this.scr = n
|
|
113
113
|
},
|
|
114
|
-
|
|
114
|
+
css: function (n) {
|
|
115
115
|
this.sty = n
|
|
116
116
|
},
|
|
117
117
|
temp: function () {
|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
121
121
|
this.$emit("update:script", this.scr);
|
|
122
122
|
},
|
|
123
123
|
sty: function () {
|
|
124
|
-
|
|
124
|
+
this.$emit("update:css", this.sty);
|
|
125
125
|
},
|
|
126
126
|
},
|
|
127
127
|
methods: {
|
|
@@ -9,12 +9,12 @@ export default {
|
|
|
9
9
|
props: {
|
|
10
10
|
template: String,
|
|
11
11
|
script: String,
|
|
12
|
-
|
|
12
|
+
css: String,
|
|
13
13
|
id: String,
|
|
14
14
|
},
|
|
15
15
|
computed: {
|
|
16
16
|
page() {
|
|
17
|
-
if (this.
|
|
17
|
+
if (this.css) {
|
|
18
18
|
let children = document.querySelectorAll(`[f='${this.id}']`);
|
|
19
19
|
if (children) {
|
|
20
20
|
let childArray = Array.prototype.slice.call(children);
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
let s = document.createElement("style");
|
|
27
|
-
s.innerText = this.
|
|
27
|
+
s.innerText = this.css;
|
|
28
28
|
s.setAttribute("f", this.id);
|
|
29
29
|
s.setAttribute("type", "text/css");
|
|
30
30
|
window.document.head.append(s);
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
v-html="$r.icons.check" exact></r-icon>
|
|
17
17
|
</transition>
|
|
18
18
|
</span>
|
|
19
|
-
<span class="ms-2" @click.prevent="emit">
|
|
19
|
+
<span class="ms-2 checkbox-label" @click.prevent="emit">
|
|
20
20
|
<span class="color-error-text" v-if="isRequired">*</span>
|
|
21
21
|
<slot name="label">{{ label }}</slot>
|
|
22
22
|
</span>
|
|
@@ -40,7 +40,7 @@ export default {
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
|
-
emits:['update:modelValue'],
|
|
43
|
+
emits: ['update:modelValue'],
|
|
44
44
|
data() {
|
|
45
45
|
return {
|
|
46
46
|
lazyValue: this.modelValue
|
|
@@ -71,6 +71,10 @@ emits:['update:modelValue'],
|
|
|
71
71
|
width: 100%;
|
|
72
72
|
cursor: pointer;
|
|
73
73
|
|
|
74
|
+
.checkbox-label {
|
|
75
|
+
color: var(--color-on-sheet);
|
|
76
|
+
}
|
|
77
|
+
|
|
74
78
|
.checkbox-input {
|
|
75
79
|
border: 1px solid var(--color-on-sheet-low)
|
|
76
80
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
:model-value="modelValue"
|
|
4
4
|
hide>
|
|
5
5
|
<div class="w-full">
|
|
6
|
-
<span v-if="label">{{ label }}</span>
|
|
6
|
+
<span v-if="label" class="group-input-label">{{ label }}</span>
|
|
7
7
|
<div class="group-holder" v-for="(item,i) in modelValue" :key="i">
|
|
8
8
|
<div class="group-slot">
|
|
9
9
|
<slot :item="item" :index="i" :disableDel="disDel">
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<r-icon v-html="$r.icons.chevron_down" :class="{'icon-disabled':i===modelValue.length-1}"
|
|
25
25
|
@click.prevent="down(i)"></r-icon>
|
|
26
26
|
</r-btn>
|
|
27
|
-
<r-btn v-if="!disableItems.includes(item[itemKey])" icon text @click.prevent="del(i)">
|
|
27
|
+
<r-btn v-if="!disableItems.includes(itemKey?item[itemKey]:'')" icon text @click.prevent="del(i)">
|
|
28
28
|
<r-icon v-html="$r.icons.delete" class="color-error-text"></r-icon>
|
|
29
29
|
</r-btn>
|
|
30
30
|
</div>
|
|
@@ -137,6 +137,9 @@ export default {
|
|
|
137
137
|
@import "../../../style/include";
|
|
138
138
|
|
|
139
139
|
.#{$prefix}group-input {
|
|
140
|
+
.group-input-label {
|
|
141
|
+
color: var(--color-on-sheet);
|
|
142
|
+
}
|
|
140
143
|
.group-holder {
|
|
141
144
|
position: relative;
|
|
142
145
|
|
|
@@ -43,22 +43,22 @@
|
|
|
43
43
|
:disableTime="disableTime"
|
|
44
44
|
v-model="lazyValue[1]"
|
|
45
45
|
></timepicker>
|
|
46
|
+
<div class="mt-3 d-flex h-space-between">
|
|
46
47
|
<r-btn
|
|
47
|
-
class="color-success-text
|
|
48
|
+
class="color-success-text"
|
|
48
49
|
outlined
|
|
49
50
|
@click.prevent="accept"
|
|
50
51
|
>
|
|
51
52
|
{{ $t('accept', 'renusify') }}
|
|
52
|
-
</r-btn
|
|
53
|
-
>
|
|
53
|
+
</r-btn>
|
|
54
54
|
<r-btn
|
|
55
|
-
class="color-warning-text
|
|
55
|
+
class="color-warning-text"
|
|
56
56
|
outlined
|
|
57
57
|
@click.prevent="(show_modal = false), (lazyValue = []),emit()"
|
|
58
58
|
>
|
|
59
59
|
{{ $t('cancel', 'renusify') }}
|
|
60
|
-
</r-btn
|
|
61
|
-
>
|
|
60
|
+
</r-btn>
|
|
61
|
+
</div>
|
|
62
62
|
</div>
|
|
63
63
|
</r-modal>
|
|
64
64
|
</div>
|
package/components/img/index.vue
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[$r.prefix+'img']:true,
|
|
4
4
|
'img-hoverZoom':hoverZoom,'img-hoverDark':hoverDark,'img-hoverTitle':hoverTitle}"
|
|
5
5
|
ref="rImg">
|
|
6
|
-
<div v-if="hoverTitle" class="title-3 color-white-text img-title w-full"
|
|
6
|
+
<div v-if="hoverTitle" class="title-3 color-white-text img-title w-full pa-1"
|
|
7
7
|
:class="{
|
|
8
8
|
'title-hs':titleHs,
|
|
9
9
|
'title-hc':titleHc,
|
package/index.js
CHANGED
|
@@ -101,35 +101,39 @@ export default {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
app.provide('$r', app.config.globalProperties.$r)
|
|
105
104
|
// renusify toast
|
|
106
105
|
app.config.globalProperties.$toast = function (message, options) {
|
|
107
106
|
Toast.show(message, options);
|
|
108
107
|
}
|
|
109
|
-
app.provide('$toast', app.config.globalProperties.$toast)
|
|
110
108
|
// renusify storage
|
|
111
109
|
app.config.globalProperties.$storage = Storage
|
|
112
|
-
app.provide('$storage', app.config.globalProperties.$storage)
|
|
113
110
|
|
|
114
111
|
// renusify helper
|
|
115
112
|
app.config.globalProperties.$helper = helper
|
|
116
|
-
app.provide('$helper', app.config.globalProperties.$helper)
|
|
117
113
|
// renusify translate
|
|
118
114
|
app.config.globalProperties.$translate = new Translate(app.config.globalProperties.$r, app.config.globalProperties.$storage)
|
|
119
|
-
app.provide('$translate', app.config.globalProperties.$translate)
|
|
120
115
|
app.config.globalProperties.$dateTime = new DateTime(app.config.globalProperties.$r, app.config.globalProperties.$r.langs)
|
|
121
|
-
app.provide('$dateTime', app.config.globalProperties.$dateTime)
|
|
122
116
|
app.config.globalProperties.$t = (key, package_name = null, lang = null) => app.config.globalProperties.$translate.get(key, package_name, lang)
|
|
123
|
-
app.provide('$t', app.config.globalProperties.$t)
|
|
124
117
|
app.config.globalProperties.$d = (value, key = 'long', local = null) => app.config.globalProperties.$dateTime.formatLocal(value, key, local)
|
|
125
|
-
app.provide('$d', app.config.globalProperties.$d)
|
|
126
118
|
const c = new Currency(app.config.globalProperties.$r)
|
|
127
119
|
app.config.globalProperties.$n = (value) => c.formatLocal(value)
|
|
128
|
-
app.provide('$n', app.config.globalProperties.$n)
|
|
129
120
|
// renusify validation
|
|
130
121
|
const v = new valid(app.config.globalProperties.$t)
|
|
131
122
|
app.config.globalProperties.$v = (names) => v.checkType(names)
|
|
132
|
-
|
|
123
|
+
|
|
124
|
+
app.provide('renusify', {
|
|
125
|
+
$r: app.config.globalProperties.$r,
|
|
126
|
+
$toast: app.config.globalProperties.$toast,
|
|
127
|
+
$storage: app.config.globalProperties.$storage,
|
|
128
|
+
$helper: app.config.globalProperties.$helper,
|
|
129
|
+
$translate: app.config.globalProperties.$translate,
|
|
130
|
+
$dateTime: app.config.globalProperties.$dateTime,
|
|
131
|
+
$t: app.config.globalProperties.$t,
|
|
132
|
+
$d: app.config.globalProperties.$d,
|
|
133
|
+
$n: app.config.globalProperties.$n,
|
|
134
|
+
$v: app.config.globalProperties.$v,
|
|
135
|
+
})
|
|
136
|
+
|
|
133
137
|
// install components
|
|
134
138
|
let required_directive = _register(app, options['components'] || {});
|
|
135
139
|
if (options['directives']) {
|
package/package.json
CHANGED
package/tools/helper.js
CHANGED
|
@@ -394,7 +394,7 @@ export function changeColor(vars) {
|
|
|
394
394
|
head.appendChild(style);
|
|
395
395
|
let css = ':root{';
|
|
396
396
|
for (let k in vars) {
|
|
397
|
-
css +=
|
|
397
|
+
css += k + ':' + vars[k] + ';'
|
|
398
398
|
}
|
|
399
399
|
css += '}'
|
|
400
400
|
style.appendChild(document.createTextNode(css));
|