renusify 1.0.5 → 1.0.6
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.
|
@@ -62,11 +62,11 @@ export default {
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
mounted() {
|
|
65
|
-
this.get_code('codeSlot'
|
|
65
|
+
this.get_code('codeSlot')
|
|
66
66
|
},
|
|
67
67
|
beforeUpdate() {
|
|
68
68
|
if (this.show === 'code' && !this.edited) {
|
|
69
|
-
this.get_code('codeSlot'
|
|
69
|
+
this.get_code('codeSlot')
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
methods: {
|
|
@@ -190,14 +190,25 @@ export default {
|
|
|
190
190
|
let temp = this.code.querySelector('.code-template')
|
|
191
191
|
|
|
192
192
|
if (temp && temp.childNodes.length > 0) {
|
|
193
|
-
|
|
193
|
+
for (let i = 0; i < temp.childNodes.length; i++) {
|
|
194
|
+
if (temp.childNodes[i].nodeName === "#comment") {
|
|
195
|
+
this.template = this.toHTML(temp.childNodes[i].nodeValue).children[0]
|
|
196
|
+
break
|
|
197
|
+
}
|
|
198
|
+
}
|
|
194
199
|
}
|
|
195
200
|
|
|
196
201
|
let script = this.code.querySelector('.code-script')
|
|
197
202
|
if (script && script.childNodes.length > 0) {
|
|
198
|
-
|
|
203
|
+
for (let i = 0; i < script.childNodes.length; i++) {
|
|
204
|
+
if (script.childNodes[i].nodeName === "#comment") {
|
|
205
|
+
this.script = script.childNodes[i].nodeValue
|
|
206
|
+
break
|
|
207
|
+
}
|
|
208
|
+
}
|
|
199
209
|
}
|
|
200
210
|
|
|
211
|
+
|
|
201
212
|
if (this.template || this.script) {
|
|
202
213
|
this.$refs.codeViewTemplate.innerHTML = this.buildHtml(this.template)
|
|
203
214
|
this.$refs.codeViewScript.innerHTML = this.buildScript(this.script)
|
|
@@ -341,6 +352,8 @@ export default {
|
|
|
341
352
|
res = this.$helper.replacer(res, ' let ', ' <span class="color-orange code-editor-span">let</span> ')
|
|
342
353
|
res = this.$helper.replacer(res, ' const ', ' <span class="color-orange code-editor-span">const</span> ')
|
|
343
354
|
res = this.$helper.replacer(res, ' return ', ' <span class="color-orange code-editor-span">return</span> ')
|
|
355
|
+
res = this.$helper.replacer(res, ' true', ' <span class="color-orange code-editor-span">true</span>')
|
|
356
|
+
res = this.$helper.replacer(res, ' false', ' <span class="color-orange code-editor-span">false</span>')
|
|
344
357
|
res = this.$helper.replacer(res, ' this.', ' <span class="color-orange code-editor-span">this</span>.')
|
|
345
358
|
|
|
346
359
|
return res
|
|
@@ -378,30 +391,31 @@ export default {
|
|
|
378
391
|
@import "../../style/include";
|
|
379
392
|
|
|
380
393
|
.#{$prefix}code-editor {
|
|
394
|
+
direction: ltr;
|
|
395
|
+
text-align: left;
|
|
381
396
|
position: relative;
|
|
382
397
|
white-space: break-spaces;
|
|
383
|
-
caret-color: white
|
|
398
|
+
caret-color: white;
|
|
399
|
+
background-color: #15212e;
|
|
400
|
+
color: #fff;
|
|
401
|
+
padding: 10px;
|
|
384
402
|
|
|
385
403
|
.code-script, .code-template {
|
|
386
|
-
padding:
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
.code-action {
|
|
390
|
-
color: #ffffff;
|
|
391
|
-
background: #283739;
|
|
404
|
+
padding: 0 20px;
|
|
392
405
|
}
|
|
393
406
|
|
|
394
407
|
.code-wrapper {
|
|
395
408
|
direction: ltr;
|
|
396
409
|
text-align: left;
|
|
397
|
-
background: #283739;
|
|
398
|
-
color: #ffffff;
|
|
399
410
|
padding: 10px;
|
|
400
411
|
}
|
|
401
412
|
|
|
402
413
|
.code-compile {
|
|
403
|
-
|
|
414
|
+
background-color: #fafafa;
|
|
404
415
|
min-height: 300px;
|
|
416
|
+
padding: 10px;
|
|
417
|
+
margin: 0 -10px -10px -10px;
|
|
418
|
+
color: black;
|
|
405
419
|
}
|
|
406
420
|
|
|
407
421
|
.color-func {
|
|
@@ -438,4 +452,4 @@ export default {
|
|
|
438
452
|
color: #898d8c;
|
|
439
453
|
}
|
|
440
454
|
}
|
|
441
|
-
</style>
|
|
455
|
+
</style>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}">
|
|
23
23
|
<r-card>
|
|
24
24
|
<div class="dropdown-menu-item pa-2" v-for="(item,i) in list" :key="i"
|
|
25
|
-
:class="{'
|
|
25
|
+
:class="{'menu-selected':selected===item[value]}"
|
|
26
26
|
@click="emit(item)">
|
|
27
27
|
<slot :item="item">
|
|
28
28
|
{{ item }}
|
|
@@ -98,18 +98,18 @@ export default {
|
|
|
98
98
|
this.top += elm.height
|
|
99
99
|
}
|
|
100
100
|
this.opacity = 0
|
|
101
|
-
let n = 80
|
|
102
|
-
if (!this.$r.rtl) {
|
|
103
|
-
this.left = 0
|
|
104
|
-
} else {
|
|
105
|
-
this.right = 0
|
|
106
|
-
}
|
|
107
101
|
if (this.reverse) {
|
|
108
102
|
if (!this.$r.rtl) {
|
|
109
103
|
this.right = 0
|
|
110
104
|
} else {
|
|
111
105
|
this.left = 0
|
|
112
106
|
}
|
|
107
|
+
} else {
|
|
108
|
+
if (!this.$r.rtl) {
|
|
109
|
+
this.left = 0
|
|
110
|
+
} else {
|
|
111
|
+
this.right = 0
|
|
112
|
+
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
this.show = true
|
|
@@ -136,6 +136,22 @@ export default {
|
|
|
136
136
|
.#{$prefix}menu {
|
|
137
137
|
position: relative;
|
|
138
138
|
|
|
139
|
+
.menu-selected {
|
|
140
|
+
position: relative;
|
|
141
|
+
color: var(--color-one-light);
|
|
142
|
+
|
|
143
|
+
&:before {
|
|
144
|
+
content: '';
|
|
145
|
+
position: absolute;
|
|
146
|
+
left: 0;
|
|
147
|
+
top: 0;
|
|
148
|
+
background-color: var(--color-one-light);
|
|
149
|
+
opacity: .1;
|
|
150
|
+
width: 100%;
|
|
151
|
+
height: 100%;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
139
155
|
@include light() {
|
|
140
156
|
.dropdown-menu {
|
|
141
157
|
border: 1px solid var(--color-border-light);
|
|
@@ -168,7 +184,7 @@ export default {
|
|
|
168
184
|
max-height: 200px;
|
|
169
185
|
overflow-y: auto;
|
|
170
186
|
background-clip: padding-box;
|
|
171
|
-
border-radius:
|
|
187
|
+
border-radius: 8px;
|
|
172
188
|
|
|
173
189
|
&-item {
|
|
174
190
|
cursor: pointer;
|
package/index.js
CHANGED
|
@@ -67,7 +67,7 @@ export default {
|
|
|
67
67
|
{
|
|
68
68
|
'en': {
|
|
69
69
|
first_day: 0,
|
|
70
|
-
time_zone_offset: -480
|
|
70
|
+
time_zone_offset: -480,/*Standard timezone offset minutes -07:00*/
|
|
71
71
|
daylight_saving_time: true,
|
|
72
72
|
localizeName: 'en-US',
|
|
73
73
|
timeZone: 'America/Los_Angeles',
|
package/package.json
CHANGED