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', this.runnable)
65
+ this.get_code('codeSlot')
66
66
  },
67
67
  beforeUpdate() {
68
68
  if (this.show === 'code' && !this.edited) {
69
- this.get_code('codeSlot', this.runnable)
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
- this.template = this.toHTML(temp.childNodes[0].nodeValue).children[0]
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
- this.script = script.childNodes[0].nodeValue
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 !important;
398
+ caret-color: white;
399
+ background-color: #15212e;
400
+ color: #fff;
401
+ padding: 10px;
384
402
 
385
403
  .code-script, .code-template {
386
- padding: 10px;
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
- border: 1px solid #444444;
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>
@@ -12,7 +12,7 @@ export default {
12
12
  },
13
13
  methods: {
14
14
  strToObj2(str) {
15
- str = this.$helper.replacer(str, ' ', '')
15
+ str = str.trim()
16
16
  str = this.$helper.replacer(str, "\n", '')
17
17
  str = this.$helper.replacer(str, "\r", '')
18
18
  let open = 0
@@ -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="{'color-one-text':selected===item[value]}"
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: 4px;
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,//Standard timezone offset minutes -07:00
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "renusify",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Vue3 Framework",
5
5
  "keywords": [
6
6
  "vuejs",
@@ -30,6 +30,9 @@ class Translate {
30
30
  }
31
31
 
32
32
  add(key, value) {
33
+ if (!this._messages[this._local]) {
34
+ this._messages[this._local] = {}
35
+ }
33
36
  this._messages[this._local][key] = value;
34
37
  }
35
38