renusify 1.0.3 → 1.0.5

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.
Files changed (68) hide show
  1. package/LICENSE +1 -1
  2. package/components/app/index.vue +14 -14
  3. package/components/{notify → app/notify}/index.vue +1 -1
  4. package/components/{notify → app/notify}/notification.vue +0 -0
  5. package/components/{notify → app/notify}/notify.js +0 -0
  6. package/components/app/style.scss +0 -1
  7. package/components/{toast → app/toast}/index.vue +0 -0
  8. package/components/{toast → app/toast}/style.scss +1 -1
  9. package/components/{toast → app/toast}/toast.js +0 -0
  10. package/components/{toast → app/toast}/toast.vue +0 -0
  11. package/components/breadcrumb/bredcrumbItem.vue +11 -11
  12. package/components/breadcrumb/index.vue +6 -5
  13. package/components/button/buttonGroup.vue +0 -4
  14. package/components/button/index.vue +0 -2
  15. package/components/card/index.vue +0 -2
  16. package/components/chart/chart.vue +3 -0
  17. package/components/chat/MessageList.vue +0 -2
  18. package/components/chat/chatInput.vue +139 -135
  19. package/components/chat/chatMsg.vue +4 -4
  20. package/components/codeEditor/index.vue +412 -443
  21. package/components/codeEditor/run.vue +76 -80
  22. package/components/content/style.scss +0 -1
  23. package/components/form/address.vue +109 -109
  24. package/components/form/address_ir.vue +106 -0
  25. package/components/form/colorPicker/Alpha.vue +29 -45
  26. package/components/form/colorPicker/Hue.vue +32 -51
  27. package/components/form/colorPicker/Preview.vue +24 -28
  28. package/components/form/colorPicker/Saturation.vue +49 -69
  29. package/components/form/colorPicker/index.vue +53 -38
  30. package/components/form/colorPicker/mixin.js +6 -1
  31. package/components/form/colorPicker/picker.vue +80 -39
  32. package/components/form/group-input.vue +124 -106
  33. package/components/form/inputTel/index.vue +8 -10
  34. package/components/form/json/JsonView.vue +15 -11
  35. package/components/form/json/index.vue +29 -10
  36. package/components/form/mask-input.vue +0 -5
  37. package/components/form/number.vue +1 -1
  38. package/components/form/range.vue +0 -2
  39. package/components/form/select.vue +14 -14
  40. package/components/iframe/index.vue +60 -38
  41. package/components/index.js +189 -93
  42. package/components/infinite/div.vue +2 -3
  43. package/components/infinite/index.vue +0 -2
  44. package/components/infinite/page.vue +2 -3
  45. package/components/list/index.vue +0 -2
  46. package/components/menu/index.vue +160 -131
  47. package/components/modal/index.vue +85 -90
  48. package/components/modal/style.scss +0 -1
  49. package/components/searchBox/index.vue +0 -4
  50. package/components/slider/index.vue +0 -4
  51. package/components/swiper/index.vue +0 -4
  52. package/components/table/crud/index.vue +12 -13
  53. package/components/table/index.vue +0 -4
  54. package/directive/clickOutSide/index.js +2 -3
  55. package/directive/drag/index.js +1 -2
  56. package/directive/index.js +18 -19
  57. package/directive/intersect/index.js +3 -3
  58. package/directive/resize/index.js +3 -4
  59. package/directive/ripple/index.js +4 -6
  60. package/directive/scroll/index.js +3 -4
  61. package/directive/sortable/index.js +1 -2
  62. package/directive/title/index.js +2 -3
  63. package/directive/touch/index.js +32 -20
  64. package/index.js +11 -5
  65. package/package.json +1 -1
  66. package/plugins/trans/Translate.js +9 -14
  67. package/tools/helper.js +23 -0
  68. package/components/form/colorPicker/Box.vue +0 -85
@@ -3,7 +3,7 @@
3
3
  <r-input :active="active"
4
4
  v-bind="$attrs"
5
5
  :readonly="readonly"
6
- :modelValue="$helper.ifHas(chips,null,0,'value')"
6
+ :modelValue="$helper.ifHas(chips,null,0,value)"
7
7
  @click.prevent="handleClick()">
8
8
  <div class="select-wrap v-center"
9
9
  :class="{'flex-nowrap':!multiple}">
@@ -49,7 +49,7 @@
49
49
  checked>
50
50
  <template v-slot="props">
51
51
  <slot :item="props.item">
52
- <div class="list-title" role="option">
52
+ <div class="list-title">
53
53
  {{ props.item[text] }}
54
54
  </div>
55
55
  </slot>
@@ -66,14 +66,10 @@
66
66
  </template>
67
67
  <script>
68
68
  import './scss/select.scss'
69
- import clickOutside from '../../directive/clickOutSide/index'
70
69
 
71
70
  export default {
72
71
  name: 'r-select',
73
72
  inheritAttrs: false,
74
- directives: {
75
- 'click-outside': clickOutside
76
- },
77
73
  props: {
78
74
  searchLink: String,
79
75
  type: {
@@ -84,6 +80,10 @@ export default {
84
80
  type: String,
85
81
  default: 'name'
86
82
  },
83
+ value: {
84
+ type: String,
85
+ default: 'value'
86
+ },
87
87
  combo: Boolean,
88
88
  readonly: Boolean,
89
89
  textChip: Boolean,
@@ -132,7 +132,7 @@ export default {
132
132
  if (this.$helper.hasKey(res, i)) {
133
133
  let v = {}
134
134
  v[this.text] = res[i].toString()
135
- v['value'] = res[i]
135
+ v[this.value] = res[i]
136
136
  res[i] = v
137
137
  }
138
138
  }
@@ -178,22 +178,22 @@ export default {
178
178
  if (this.$helper.ifHas(this.modelValue, false, this.text)) {
179
179
  return [this.modelValue]
180
180
  } else if (typeof this.modelValue === 'string' || typeof this.modelValue === 'number') {
181
- const index = this.$helper.searchArray(this.genItems, 'value', this.modelValue)
181
+ const index = this.$helper.searchArray(this.genItems, this.value, this.modelValue)
182
182
  if (index !== false) {
183
183
  return [this.genItems[index]]
184
184
  }
185
185
  return [{
186
- [this.text]: this.modelValue.toString(), value: this.modelValue
186
+ [this.text]: this.modelValue.toString(), [this.value]: this.modelValue
187
187
  }]
188
188
  } else if (typeof this.modelValue[0] === 'string' || typeof this.modelValue[0] === 'number') {
189
189
  let res = []
190
190
  const lng = this.modelValue.length
191
191
  for (let i = 0; i < lng; i++) {
192
- const index = this.$helper.searchArray(this.genItems, 'value', this.modelValue[i])
192
+ const index = this.$helper.searchArray(this.genItems, this.value, this.modelValue[i])
193
193
  if (index !== false) {
194
194
  res.push(this.genItems[index])
195
195
  } else {
196
- res.push({[this.text]: this.modelValue[i].toString(), value: this.modelValue[i]})
196
+ res.push({[this.text]: this.modelValue[i].toString(), [this.value]: this.modelValue[i]})
197
197
  }
198
198
  }
199
199
  return res
@@ -220,7 +220,7 @@ export default {
220
220
  },
221
221
  add() {
222
222
  if (this.inputVal) {
223
- let val = {[this.text]: this.inputVal.toString(), value: this.inputVal}
223
+ let val = {[this.text]: this.inputVal.toString(), [this.value]: this.inputVal}
224
224
  if (!this.multiple) {
225
225
  this.chips = []
226
226
  }
@@ -246,7 +246,7 @@ export default {
246
246
  val = []
247
247
  for (let i in this.chips) {
248
248
  if (this.$helper.hasKey(this.chips, i)) {
249
- val.push(this.chips[i]['value'])
249
+ val.push(this.chips[i][this.value])
250
250
  }
251
251
  }
252
252
  }
@@ -254,7 +254,7 @@ export default {
254
254
  val = val[0]
255
255
  if (val) {
256
256
  if (this.justValue) {
257
- val = val['value']
257
+ val = val[this.value]
258
258
  }
259
259
  this.closeList()
260
260
  }
@@ -1,45 +1,67 @@
1
1
  <script>
2
- import {createApp} from 'vue'
3
- export default {
4
- name: 'r-frame',
5
- props: {
6
- head: String
7
- },
8
- render(h) {
9
- return h('iframe', {
10
- on: {load: this.renderChildren}
11
- })
12
- },
13
- beforeUpdate() {
14
- const head = this.$el.contentDocument.head
15
- head.innerHTML = this.head
16
- this.iApp.children = Object.freeze(this.$slots.default)
17
- },
18
- methods: {
19
- renderChildren() {
20
- const children = this.$slots.default
21
- const body = this.$el.contentDocument.body
22
- const el = document.createElement('DIV')
23
- body.appendChild(el)
24
- const iApp = createApp({
25
- name: 'iApp',
26
- data: function () {
27
- return {children: Object.freeze(children)};
28
- },
29
- render(h) {
30
- return h('div', this.children)
31
- }
32
- })
2
+ import {createApp, h} from 'vue'
3
+ import renusify from "renusify";
33
4
 
34
- iApp.$mount(el)
35
-
36
- this.iApp = iApp
37
- }
5
+ export default {
6
+ name: 'r-frame',
7
+ props: {
8
+ head: String,
9
+ plugins: Array,
10
+ renusifyConfig: {
11
+ type: Object,
12
+ default: () => {
13
+ return {
14
+ prefix: "sm-",
15
+ lang: "en",
16
+ package: 'renusify',
17
+ directives: []
38
18
  }
19
+ }
39
20
  }
21
+ },
22
+ render() {
23
+ return h('iframe', {
24
+ onLoad: this.renderChildren
25
+ })
26
+ },
27
+ beforeUpdate() {
28
+ const head = this.$el.contentDocument.head
29
+ head.innerHTML = this.head
30
+ this.iApp.children = this.$slots.default()
31
+ },
32
+ methods: {
33
+ renderChildren() {
34
+ const children = this.$slots.default()
35
+ const head = this.$el.contentDocument.head
36
+ head.innerHTML = this.head
37
+ const body = this.$el.contentDocument.body
38
+ const el = document.createElement('DIV')
39
+ body.appendChild(el)
40
+ const iApp = createApp({
41
+ name: 'iApp',
42
+ data: function () {
43
+ return {children: children};
44
+ },
45
+ render() {
46
+ return h('div', this.children)
47
+ }
48
+ })
49
+ if (this.plugins) {
50
+ this.plugins.forEach((item) => {
51
+ iApp.use(item)
52
+ })
53
+ }
54
+ iApp.use(renusify, this.renusifyConfig)
55
+ iApp.mount(el)
56
+
57
+ this.iApp = iApp
58
+ }
59
+ }
60
+ }
40
61
  </script>
41
62
  <style>
42
- iframe {
43
- width: 100%;
44
- }
63
+ iframe {
64
+ width: 100%;
65
+ height: 100%;
66
+ }
45
67
  </style>
@@ -1,104 +1,200 @@
1
- import {defineAsyncComponent} from "vue";
2
-
3
1
  const list = {
4
- 'r-app': 'app/index.vue',
5
- 'r-content': 'content/index.vue',
6
- 'r-meta': 'meta/index.js',
7
- 'r-container': 'container/index.vue',
8
- 'r-row': 'container/row.vue',
9
- 'r-col': 'container/col.vue',
10
- 'r-spacer': 'container/spacer.vue',
11
- 'r-divider': 'container/divider.vue',
12
- 'r-btn': 'button/index.vue',
13
- 'r-icon': 'icon/index.vue',
14
- 'r-form-creator': 'formCreator/index.vue',
15
- 'r-card': 'card/index.vue',
16
- 'r-modal': 'modal/index.vue',
17
- 'r-form': 'form/form.vue',
18
- 'r-input': 'form/input.vue',
19
- 'r-text-input': 'form/text-input.vue',
20
- 'r-unit-input': 'form/unit-input.vue',
21
- 'r-tel': 'form/inputTel/index.vue',
22
- 'r-switch': 'form/switch.vue',
23
- 'r-checkbox': 'form/checkbox.vue',
24
- 'r-radio-input': 'form/radioInput.vue',
25
- 'r-chip': 'chip/index.vue',
26
- 'r-list': 'list/index.vue',
27
- 'r-table': 'table/index.vue',
28
- 'r-table-crud': 'table/crud/index.vue',
29
- 'r-message': 'message/index.vue',
30
- 'r-time-ago': 'timeAgo/index.vue',
31
- 'r-confirm': 'confirm/index.vue',
32
- 'r-mask-input': 'form/mask-input.vue',
33
- 'r-progress-circular': 'progress/circular.vue',
34
- 'r-progress-liner': 'progress/liner.vue',
35
- 'r-img': 'img/index.vue',
36
- 'r-chart': "chart/chart.vue",
37
- 'r-date-picker': 'form/datePicker/index.vue',
38
- 'r-btn-group': 'button/buttonGroup.vue',
39
- 'r-group-input': "form/group-input.vue",
40
- 'r-text-area': 'form/text-area.vue',
41
- 'r-address': 'form/address.vue',
42
- 'r-check-input': 'form/check-input.vue',
43
- 'r-unique-feild': 'form/uniqueFeild/index.vue',
44
- 'r-file-uploader': 'form/fileUploader/index.vue',
45
- 'r-select': 'form/select.vue',
46
- 'r-range': 'form/range.vue',
47
- 'r-number': 'form/number.vue',
48
- 'r-rating': 'form/rating.vue',
49
- 'r-text-editor': 'form/text-editor/index.vue',
50
- 'r-text-editor-preview': 'form/text-editor/preview.vue',
51
- 'r-avatar': 'avatar/index.vue',
52
- 'r-toolbar': 'bar/toolbar/index.vue',
53
- 'r-bottom-navigation': 'bar/bottomNav.vue',
54
- 'r-bottom-navigation-circle': "bar/bottomNavigationCircle.vue",
55
- 'r-breadcrumbs': 'breadcrumb/index.vue',
56
- 'r-breadcrumbs-item': 'breadcrumb/bredcrumbItem.vue',
57
- 'r-count-down': 'countdown/index.vue',
58
- 'r-slider': 'slider/index.vue',
59
- 'r-swiper': 'swiper/index.vue',
60
- 'r-tabs': 'tabs/index.vue',
61
- 'r-infinite-div': 'infinite/div.vue',
62
- 'r-infinite-page': 'infinite/page.vue',
63
- 'r-infinite-box': 'infinite/index.vue',
64
- 'r-iframe': 'iframe/index.vue',
65
- 'r-menu': 'menu/index.vue',
66
- 'r-tree': 'tree/index.vue',
67
- 'r-tree-element': 'tree/tree-element.vue',
68
- 'r-float': 'float/index.vue',
69
- 'r-timeline': 'timeline/index.vue',
70
- 'r-password': "form/password.vue",
71
- 'r-color-picker': "form/colorPicker/index.vue",
72
- 'r-html2pdf': "html2pdf/index.vue",
73
- 'r-html2pdf-page-break': "html2pdf/pageBreak.vue",
74
- 'r-code-editor': "codeEditor/index.vue",
75
- 'r-map': "map/index.vue",
76
- 'r-map-select': "map/select.vue",
77
- 'r-map-route': "map/route.vue",
78
- 'r-tour': "tour/index.vue",
79
- 'r-chat': "chat/index.vue",
80
- 'r-time-picker': "form/timepicker/index.vue",
81
- 'r-cam-input': "form/camInput",
82
- 'r-json': 'form/json/index.vue',
83
- 'r-calendar': 'calendar/index.vue',
84
- 'r-search-box': 'searchBox/index.vue',
2
+ 'r-app': {'p': 'app/index.vue', 'c': ['r-btn', 'r-icon', 'r-spacer'], 'd': []},
3
+ 'r-avatar': {'p': 'avatar/index.vue', 'c': ['r-btn', 'r-icon'], 'd': []},
4
+ 'r-toolbar': {
5
+ 'p': 'bar/toolbar/index.vue',
6
+ 'c': ['r-container', 'r-spacer', 'r-search-box', 'r-img', 'r-icon', 'r-btn', 'r-divider'],
7
+ 'd': []
8
+ },
9
+ 'r-bottom-navigation': {'p': 'bar/bottomNav.vue', 'c': [], 'd': []},
10
+ 'r-bottom-navigation-circle': {'p': 'bar/bottomNavigationCircle.vue', 'c': ['r-icon'], 'd': []},
11
+ 'r-breadcrumbs': {'p': 'breadcrumb/index.vue', 'c': ['r-icon'], 'd': []},
12
+ 'r-btn': {'p': 'button/index.vue', 'c': ['r-progress-circular'], 'd': ['ripple']},
13
+ 'r-btn-group': {
14
+ 'p': 'button/buttonGroup.vue',
15
+ 'c': ['r-btn', 'r-icon', 'r-card', 'r-list'],
16
+ 'd': ['click-outside']
17
+ },
18
+ 'r-calendar': {
19
+ 'p': 'calendar/index.vue',
20
+ 'c': ['r-container', 'r-row', 'r-col', 'r-btn', 'r-icon', 'r-modal', 'r-card'],
21
+ 'd': []
22
+ },
23
+ 'r-card': {'p': 'card/index.vue', 'c': [], 'd': ['ripple']},
24
+ 'r-chart': {'p': 'chart/chart.vue', 'c': [], 'd': []},
25
+ 'r-chat': {
26
+ 'p': 'chat/index.vue',
27
+ 'c': ['r-btn', 'r-icon', 'r-progress-circular', 'r-img'],
28
+ 'd': ['intersect', 'scroll']
29
+ },
30
+ 'r-chip': {'p': 'chip/index.vue', 'c': ['r-btn', 'r-icon'], 'd': []},
31
+ 'r-code-editor': {'p': 'codeEditor/index.vue', 'c': ['r-btn', 'r-icon'], 'd': []},
32
+ 'r-confirm': {
33
+ 'p': 'confirm/index.vue',
34
+ 'c': ['r-modal', 'r-card', 'r-container', 'r-row', 'r-col', 'r-divider', 'r-form', 'r-text-input', 'r-btn'],
35
+ 'd': []
36
+ },
37
+ 'r-container': {'p': 'container/index.vue', 'c': [], 'd': []},
38
+ 'r-row': {'p': 'container/row.vue', 'c': [], 'd': []},
39
+ 'r-col': {'p': 'container/col.vue', 'c': [], 'd': []},
40
+ 'r-spacer': {'p': 'container/spacer.vue', 'c': [], 'd': []},
41
+ 'r-divider': {'p': 'container/divider.vue', 'c': [], 'd': []},
42
+ 'r-content': {'p': 'content/index.vue', 'c': [], 'd': []},
43
+ 'r-count-down': {'p': 'countdown/index.vue', 'c': [], 'd': []},
44
+ 'r-float': {'p': 'float/index.vue', 'c': [], 'd': []},
45
+ 'r-form': {'p': 'form/form.vue', 'c': [], 'd': []},
46
+ 'r-color-picker': {
47
+ 'p': 'form/colorPicker/index.vue',
48
+ 'c': ['r-input', 'r-modal', 'r-btn', 'r-icon'],
49
+ 'd': ['touch']
50
+ },
51
+ 'r-date-picker': {
52
+ 'p': 'form/datePicker/index.vue',
53
+ 'c': ['r-input', 'r-modal', 'r-container', 'r-row', 'r-col', 'r-btn', 'r-icon'],
54
+ 'd': []
55
+ },
56
+ 'r-file-uploader': {
57
+ 'p': 'form/fileUploader/index.vue',
58
+ 'c': ['r-input', 'r-row', 'r-btn', 'r-icon', 'r-progress-circular', 'r-text-input'],
59
+ 'd': []
60
+ },
61
+ 'r-tel': {
62
+ 'p': 'form/inputTel/index.vue',
63
+ 'c': ['r-modal', 'r-card', 'r-text-input', 'r-list', 'r-spacer', 'r-btn'],
64
+ 'd': []
65
+ },
66
+ 'r-json': {
67
+ 'p': 'form/json/index.vue',
68
+ 'c': ['r-btn', 'r-icon', 'r-text-input', 'r-select', 'r-number', 'r-switch'],
69
+ 'd': []
70
+ },
71
+ 'r-text-editor': {
72
+ 'p': 'form/text-editor/index.vue',
73
+ 'c': ['r-container', 'r-row', 'r-col', 'r-btn-group', 'r-btn',
74
+ 'r-icon', 'r-select', 'r-input', 'r-img', 'r-modal',
75
+ 'r-form', 'r-file-uploader', 'r-text-input', 'r-switch', 'r-number'],
76
+ 'd': []
77
+ },
78
+ 'r-text-editor-preview': {'p': 'form/text-editor/preview.vue', 'c': [], 'd': []},
79
+ 'r-time-picker': {'p': 'form/timepicker/index.vue', 'c': ['r-input', 'r-modal', 'r-card', 'r-btn'], 'd': []},
80
+ 'r-unique-feild': {'p': 'form/uniqueFeild/index.vue', 'c': ['r-text-input'], 'd': []},
81
+ 'r-address': {'p': 'form/address.vue', 'c': ['r-select', 'r-text-area', 'r-text-input'], 'd': []},
82
+ 'r-cam-input': {'p': 'form/camInput', 'c': ['r-input', 'r-btn', 'r-icon'], 'd': []},
83
+ 'r-check-input': {'p': 'form/check-input.vue', 'c': ['r-input', 'r-btn', 'r-icon'], 'd': []},
84
+ 'r-checkbox': {'p': 'form/checkbox.vue', 'c': ['r-input', 'r-icon'], 'd': []},
85
+ 'r-group-input': {
86
+ 'p': 'form/group-input.vue',
87
+ 'c': ['r-text-input', 'r-number', 'r-switch', 'r-btn', 'r-icon'],
88
+ 'd': []
89
+ },
90
+ 'r-input': {'p': 'form/input.vue', 'c': ['r-icon'], 'd': []},
91
+ 'r-mask-input': {'p': 'form/mask-input.vue', 'c': ['r-input'], 'd': ['mask']},
92
+ 'r-number': {'p': 'form/number.vue', 'c': ['r-input', 'r-btn', 'r-icon'], 'd': []},
93
+ 'r-password': {'p': 'form/password.vue', 'c': ['r-input', 'r-icon'], 'd': []},
94
+ 'r-radio-input': {'p': 'form/radioInput.vue', 'c': ['r-input', 'r-icon'], 'd': []},
95
+ 'r-range': {'p': 'form/range.vue', 'c': ['r-input'], 'd': ['touch']},
96
+ 'r-rating': {'p': 'form/rating.vue', 'c': ['r-btn', 'r-icon'], 'd': []},
97
+ 'r-select': {
98
+ 'p': 'form/select.vue',
99
+ 'c': ['r-input', 'r-chip', 'r-progress-liner', 'r-card', 'r-list', 'r-icon'],
100
+ 'd': ['click-outside']
101
+ },
102
+ 'r-switch': {'p': 'form/switch.vue', 'c': ['r-input'], 'd': []},
103
+ 'r-text-area': {'p': 'form/text-area.vue', 'c': ['r-input'], 'd': []},
104
+ 'r-text-input': {'p': 'form/text-input.vue', 'c': ['r-input'], 'd': []},
105
+ 'r-unit-input': {'p': 'form/unit-input.vue', 'c': ['r-input', 'r-select'], 'd': []},
106
+ 'r-form-creator': {
107
+ 'p': 'formCreator/index.vue',
108
+ 'c': ['r-card', 'r-container', 'r-message', 'r-form', 'r-row', 'r-col', 'r-btn'],
109
+ 'd': []
110
+ },
111
+ 'r-html2pdf': {'p': 'html2pdf/index.vue', 'c': ['r-btn', 'r-icon', 'r-html2pdf-page-break'], 'd': []},
112
+ 'r-html2pdf-page-break': {'p': 'html2pdf/pageBreak.vue', 'c': [], 'd': []},
113
+ 'r-icon': {'p': 'icon/index.vue', 'c': [], 'd': []},
114
+ 'r-img': {'p': 'img/index.vue', 'c': [], 'd': []},
115
+ 'r-infinite-div': {
116
+ 'p': 'infinite/div.vue',
117
+ 'c': ['r-container', 'r-row', 'r-col', 'r-progress-liner'],
118
+ 'd': ['scroll']
119
+ },
120
+ 'r-infinite-page': {'p': 'infinite/page.vue', 'c': ['r-progress-liner'], 'd': ['scroll']},
121
+ 'r-infinite-box': {
122
+ 'p': 'infinite/index.vue',
123
+ 'c': ['r-card', 'r-container', 'r-row', 'r-col', 'r-switch', 'r-infinite-div'],
124
+ 'd': []
125
+ },
126
+ 'r-list': {'p': 'list/index.vue', 'c': ['r-icon'], 'd': ['ripple']},
127
+ 'r-map': {'p': 'map/index.vue', 'c': ['r-search-box', 'r-btn', 'r-icon', 'r-confirm'], 'd': []},
128
+ 'r-map-select': {'p': 'map/select.vue', 'c': ['r-map'], 'd': []},
129
+ 'r-map-route': {
130
+ 'p': 'map/route.vue',
131
+ 'c': ['r-container', 'r-row', 'r-col', 'r-map', 'r-divider', 'r-spacer', 'r-btn', 'r-icon'],
132
+ 'd': []
133
+ },
134
+ 'r-menu': {'p': 'menu/index.vue', 'c': ['r-btn', 'r-icon', 'r-card'], 'd': ['click-outside']},
135
+ 'r-message': {'p': 'message/index.vue', 'c': ['r-container', 'r-row', 'r-col'], 'd': []},
136
+ 'r-meta': {'p': 'meta/index.js', 'c': [], 'd': []},
137
+ 'r-modal': {'p': 'modal/index.vue', 'c': ['r-btn', 'r-icon'], 'd': []},
138
+ 'r-progress-circular': {'p': 'progress/circular.vue', 'c': [], 'd': []},
139
+ 'r-progress-liner': {'p': 'progress/liner.vue', 'c': [], 'd': []},
140
+ 'r-search-box': {
141
+ 'p': 'searchBox/index.vue',
142
+ 'c': ['r-input', 'r-progress-liner', 'r-card', 'r-list', 'r-btn', 'r-icon'],
143
+ 'd': ['click-outside']
144
+ },
145
+ 'r-slider': {'p': 'slider/index.vue', 'c': ['r-progress-liner', 'r-btn', 'r-icon'], 'd': ['touch']},
146
+ 'r-swiper': {'p': 'swiper/index.vue', 'c': [], 'd': ['touch']},
147
+ 'r-table': {
148
+ 'p': 'table/index.vue',
149
+ 'c': ['r-btn', 'r-icon', 'r-switch', 'r-progress-liner', 'r-modal', 'r-card', 'r-container', 'r-row', 'r-col'],
150
+ 'd': ['sortable']
151
+ },
152
+ 'r-table-crud': {
153
+ 'p': 'table/crud/index.vue',
154
+ 'c': ['r-card', 'r-modal', 'r-form-creator', 'r-json', 'r-divider', 'r-number', 'r-btn', 'r-table', 'r-icon',
155
+ 'r-time-ago', 'r-switch', 'r-confirm', 'r-container', 'r-row', 'r-col', 'r-text-input', 'r-select', 'r-date-picker',
156
+ 'r-progress-liner'],
157
+ 'd': []
158
+ },
159
+ 'r-tabs': {'p': 'tabs/index.vue', 'c': ['r-btn', 'r-icon'], 'd': []},
160
+ 'r-time-ago': {'p': 'timeAgo/index.vue', 'c': [], 'd': []},
161
+ 'r-timeline': {'p': 'timeline/index.vue', 'c': ['r-container', 'r-row', 'r-col'], 'd': []},
162
+ 'r-tour': {'p': 'tour/index.vue', 'c': ['r-container', 'r-spacer', 'r-btn'], 'd': []},
163
+
164
+ 'r-tree': {
165
+ 'p': 'tree/index.vue',
166
+ 'c': ['r-container', 'r-row', 'r-col', 'r-select', 'r-float', 'r-tree-element'],
167
+ 'd': []
168
+ },
169
+ 'r-tree-element': {'p': 'tree/tree-element.vue', 'c': ['r-container', 'r-row', 'r-col', 'r-btn', 'r-icon'], 'd': []}
85
170
  }
86
171
 
87
172
  export const register = (app, components) => {
88
- if (components.length === 0) {
89
- for (let c in list) {
90
- if (list.hasOwnProperty(c)) {
91
- app.component(c, require('./' + list[c]).default)
92
- }
93
- }
94
- } else {
95
- components.forEach((c) => {
173
+ let d = {}
174
+ let s = {}
175
+ const setup = (ls) => {
176
+ ls.forEach((c) => {
96
177
  try {
97
- app.component(c, require('./' + list[c]).default)
178
+ if (!s[c]) {
179
+ app.component(c, require('./' + list[c]['p']).default)
180
+ list[c]['d'].forEach((i) => {
181
+ d[i] = true
182
+ })
183
+ setup(list[c]['c'])
184
+ s[c] = true
185
+ }
98
186
  } catch (e) {
99
187
  console.error('component not found', c, e)
100
188
  }
101
-
102
189
  })
103
190
  }
191
+ if (components.length === 0) {
192
+ setup(Object.keys(list))
193
+ } else {
194
+ if (!components.includes('r-app')) {
195
+ setup(['r-app'])
196
+ }
197
+ setup(components)
198
+ }
199
+ return Object.keys(d)
104
200
  }
@@ -29,10 +29,9 @@
29
29
  </template>
30
30
 
31
31
  <script>
32
- import Scroll from "renusify/directive/scroll";
33
- export default {
32
+
33
+ export default {
34
34
  name: 'r-infinite-div',
35
- directives: {'scroll':Scroll},
36
35
  props: {
37
36
  isChat: Boolean,
38
37
  height: {
@@ -30,11 +30,9 @@
30
30
  </template>
31
31
 
32
32
  <script>
33
- import RInfiniteDiv from "./div";
34
33
 
35
34
  export default {
36
35
  name: 'r-infinite-box',
37
- components: {RInfiniteDiv},
38
36
  props: {
39
37
  color:{
40
38
  type:String,
@@ -15,10 +15,9 @@
15
15
  </template>
16
16
 
17
17
  <script>
18
- import Scroll from "renusify/directive/scroll";
19
- export default {
18
+
19
+ export default {
20
20
  name: 'r-infinite-page',
21
- directives: {'scroll':Scroll},
22
21
  props: {
23
22
  url: {
24
23
  required: true,
@@ -22,11 +22,9 @@
22
22
 
23
23
  <script>
24
24
  import './style.scss'
25
- import Ripple from '../../directive/ripple/index'
26
25
 
27
26
  export default {
28
27
  name: 'r-list',
29
- directives: {ripple: Ripple},
30
28
  props: {
31
29
  disabled: Boolean,
32
30
  multiple: Boolean,