eoss-mobiles 0.1.13

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 (285) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +28 -0
  3. package/lib/action-sheet.js +313 -0
  4. package/lib/button-group.js +421 -0
  5. package/lib/button.js +278 -0
  6. package/lib/calendar.js +301 -0
  7. package/lib/cascader.js +336 -0
  8. package/lib/cell.js +366 -0
  9. package/lib/checkbox.js +2170 -0
  10. package/lib/circle.js +299 -0
  11. package/lib/config/api.js +31 -0
  12. package/lib/count-down.js +299 -0
  13. package/lib/date.js +956 -0
  14. package/lib/empty.js +274 -0
  15. package/lib/eoss-mobile.common.js +15072 -0
  16. package/lib/field.js +440 -0
  17. package/lib/flow.js +5664 -0
  18. package/lib/form.js +714 -0
  19. package/lib/grid-item.js +274 -0
  20. package/lib/grid.js +317 -0
  21. package/lib/image-preview.js +325 -0
  22. package/lib/index.js +1 -0
  23. package/lib/list.js +315 -0
  24. package/lib/loading.js +279 -0
  25. package/lib/nav-bar.js +283 -0
  26. package/lib/pagination.js +323 -0
  27. package/lib/picker.js +2714 -0
  28. package/lib/popover.js +306 -0
  29. package/lib/popup.js +297 -0
  30. package/lib/radio.js +2137 -0
  31. package/lib/rate.js +300 -0
  32. package/lib/search.js +316 -0
  33. package/lib/selector.js +3496 -0
  34. package/lib/skeleton.js +277 -0
  35. package/lib/stepper.js +300 -0
  36. package/lib/switch.js +304 -0
  37. package/lib/tab.js +274 -0
  38. package/lib/table-column.js +2991 -0
  39. package/lib/table.js +2652 -0
  40. package/lib/tabs.js +315 -0
  41. package/lib/tag.js +281 -0
  42. package/lib/theme-chalk/action-sheet.css +0 -0
  43. package/lib/theme-chalk/base.css +1 -0
  44. package/lib/theme-chalk/button-group.css +1 -0
  45. package/lib/theme-chalk/button.css +1 -0
  46. package/lib/theme-chalk/calendar.css +1 -0
  47. package/lib/theme-chalk/cascader.css +1 -0
  48. package/lib/theme-chalk/cell.css +1 -0
  49. package/lib/theme-chalk/checkbox.css +1 -0
  50. package/lib/theme-chalk/circle.css +1 -0
  51. package/lib/theme-chalk/count-down.css +0 -0
  52. package/lib/theme-chalk/date.css +0 -0
  53. package/lib/theme-chalk/empty.css +0 -0
  54. package/lib/theme-chalk/field.css +1 -0
  55. package/lib/theme-chalk/flow.css +1 -0
  56. package/lib/theme-chalk/fonts/iconfont.scss +530 -0
  57. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  58. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  59. package/lib/theme-chalk/form.css +0 -0
  60. package/lib/theme-chalk/grid-item.css +1 -0
  61. package/lib/theme-chalk/grid.css +0 -0
  62. package/lib/theme-chalk/icon.css +1 -0
  63. package/lib/theme-chalk/image-preview.css +0 -0
  64. package/lib/theme-chalk/index.css +1 -0
  65. package/lib/theme-chalk/list.css +0 -0
  66. package/lib/theme-chalk/loading.css +0 -0
  67. package/lib/theme-chalk/nav-bar.css +0 -0
  68. package/lib/theme-chalk/navbar.css +1 -0
  69. package/lib/theme-chalk/pagination.css +1 -0
  70. package/lib/theme-chalk/picker.css +1 -0
  71. package/lib/theme-chalk/popover.css +0 -0
  72. package/lib/theme-chalk/popup.css +0 -0
  73. package/lib/theme-chalk/radio.css +1 -0
  74. package/lib/theme-chalk/rate.css +0 -0
  75. package/lib/theme-chalk/search.css +0 -0
  76. package/lib/theme-chalk/selector.css +1 -0
  77. package/lib/theme-chalk/skeleton.css +0 -0
  78. package/lib/theme-chalk/stepper.css +1 -0
  79. package/lib/theme-chalk/switch.css +1 -0
  80. package/lib/theme-chalk/tab.css +0 -0
  81. package/lib/theme-chalk/table-column.css +0 -0
  82. package/lib/theme-chalk/table.css +1 -0
  83. package/lib/theme-chalk/tabs.css +1 -0
  84. package/lib/theme-chalk/tag.css +1 -0
  85. package/lib/theme-chalk/theme.css +0 -0
  86. package/lib/theme-chalk/tree.css +1 -0
  87. package/lib/theme-chalk/uploader.css +0 -0
  88. package/lib/uploader.js +307 -0
  89. package/lib/utils/axios.js +199 -0
  90. package/lib/utils/date-util.js +320 -0
  91. package/lib/utils/http.js +74 -0
  92. package/lib/utils/rules.js +21 -0
  93. package/lib/utils/store.js +24 -0
  94. package/lib/utils/util.js +1315 -0
  95. package/package.json +153 -0
  96. package/packages/action-sheet/index.js +5 -0
  97. package/packages/action-sheet/src/main.vue +32 -0
  98. package/packages/button/index.js +5 -0
  99. package/packages/button/src/main.vue +15 -0
  100. package/packages/button-group/index.js +5 -0
  101. package/packages/button-group/src/main.vue +80 -0
  102. package/packages/calendar/index.js +5 -0
  103. package/packages/calendar/src/main.vue +34 -0
  104. package/packages/cascader/index.js +5 -0
  105. package/packages/cascader/src/main.vue +40 -0
  106. package/packages/cell/index.js +5 -0
  107. package/packages/cell/src/main.vue +72 -0
  108. package/packages/checkbox/index.js +5 -0
  109. package/packages/checkbox/src/main.vue +149 -0
  110. package/packages/circle/index.js +5 -0
  111. package/packages/circle/src/main.vue +27 -0
  112. package/packages/count-down/index.js +5 -0
  113. package/packages/count-down/src/main.vue +27 -0
  114. package/packages/date/index.js +5 -0
  115. package/packages/date/src/date-time.vue +290 -0
  116. package/packages/date/src/main.vue +319 -0
  117. package/packages/empty/index.js +5 -0
  118. package/packages/empty/src/main.vue +16 -0
  119. package/packages/field/index.js +5 -0
  120. package/packages/field/src/main.vue +130 -0
  121. package/packages/flow/index.js +5 -0
  122. package/packages/flow/src/components/Handle.vue +1031 -0
  123. package/packages/flow/src/components/Message.vue +96 -0
  124. package/packages/flow/src/components/Opinion.vue +112 -0
  125. package/packages/flow/src/components/Reject.vue +202 -0
  126. package/packages/flow/src/components/StartFlow.vue +440 -0
  127. package/packages/flow/src/components/TaskRead.vue +237 -0
  128. package/packages/flow/src/main.vue +43 -0
  129. package/packages/form/index.js +5 -0
  130. package/packages/form/src/main.vue +158 -0
  131. package/packages/grid/index.js +5 -0
  132. package/packages/grid/src/main.vue +28 -0
  133. package/packages/grid-item/index.js +5 -0
  134. package/packages/grid-item/src/main.vue +16 -0
  135. package/packages/image-preview/index.js +5 -0
  136. package/packages/image-preview/src/main.vue +34 -0
  137. package/packages/list/index.js +5 -0
  138. package/packages/list/src/main.vue +32 -0
  139. package/packages/loading/index.js +5 -0
  140. package/packages/loading/src/main.vue +20 -0
  141. package/packages/nav-bar/index.js +5 -0
  142. package/packages/nav-bar/src/main.vue +16 -0
  143. package/packages/pagination/index.js +5 -0
  144. package/packages/pagination/src/main.vue +29 -0
  145. package/packages/picker/index.js +5 -0
  146. package/packages/picker/src/main.vue +500 -0
  147. package/packages/popover/index.js +5 -0
  148. package/packages/popover/src/main.vue +32 -0
  149. package/packages/popup/index.js +5 -0
  150. package/packages/popup/src/main.vue +27 -0
  151. package/packages/radio/index.js +5 -0
  152. package/packages/radio/src/main.vue +147 -0
  153. package/packages/rate/index.js +5 -0
  154. package/packages/rate/src/main.vue +27 -0
  155. package/packages/search/index.js +5 -0
  156. package/packages/search/src/main.vue +39 -0
  157. package/packages/selector/index.js +5 -0
  158. package/packages/selector/src/main.vue +77 -0
  159. package/packages/selector/src/selector-field.vue +225 -0
  160. package/packages/selector/src/selector-tree.vue +472 -0
  161. package/packages/selector/src/tree.vue +179 -0
  162. package/packages/skeleton/index.js +5 -0
  163. package/packages/skeleton/src/main.vue +17 -0
  164. package/packages/stepper/index.js +5 -0
  165. package/packages/stepper/src/main.vue +25 -0
  166. package/packages/switch/index.js +5 -0
  167. package/packages/switch/src/main.vue +29 -0
  168. package/packages/tab/index.js +5 -0
  169. package/packages/tab/src/main.vue +16 -0
  170. package/packages/table/index.js +5 -0
  171. package/packages/table/src/main.vue +830 -0
  172. package/packages/table-column/index.js +5 -0
  173. package/packages/table-column/src/main.vue +742 -0
  174. package/packages/table-column/src/mixins/table.js +12 -0
  175. package/packages/tabs/index.js +5 -0
  176. package/packages/tabs/src/main.vue +34 -0
  177. package/packages/tag/index.js +5 -0
  178. package/packages/tag/src/main.vue +16 -0
  179. package/packages/theme-chalk/README.md +33 -0
  180. package/packages/theme-chalk/lib/action-sheet.css +0 -0
  181. package/packages/theme-chalk/lib/base.css +1 -0
  182. package/packages/theme-chalk/lib/button-group.css +1 -0
  183. package/packages/theme-chalk/lib/button.css +1 -0
  184. package/packages/theme-chalk/lib/calendar.css +1 -0
  185. package/packages/theme-chalk/lib/cascader.css +1 -0
  186. package/packages/theme-chalk/lib/cell.css +1 -0
  187. package/packages/theme-chalk/lib/checkbox.css +1 -0
  188. package/packages/theme-chalk/lib/circle.css +1 -0
  189. package/packages/theme-chalk/lib/count-down.css +0 -0
  190. package/packages/theme-chalk/lib/date.css +0 -0
  191. package/packages/theme-chalk/lib/empty.css +0 -0
  192. package/packages/theme-chalk/lib/field.css +1 -0
  193. package/packages/theme-chalk/lib/flow.css +1 -0
  194. package/packages/theme-chalk/lib/fonts/iconfont.scss +530 -0
  195. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  196. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  197. package/packages/theme-chalk/lib/form.css +0 -0
  198. package/packages/theme-chalk/lib/grid-item.css +1 -0
  199. package/packages/theme-chalk/lib/grid.css +0 -0
  200. package/packages/theme-chalk/lib/icon.css +1 -0
  201. package/packages/theme-chalk/lib/image-preview.css +0 -0
  202. package/packages/theme-chalk/lib/index.css +1 -0
  203. package/packages/theme-chalk/lib/list.css +0 -0
  204. package/packages/theme-chalk/lib/loading.css +0 -0
  205. package/packages/theme-chalk/lib/nav-bar.css +0 -0
  206. package/packages/theme-chalk/lib/navbar.css +1 -0
  207. package/packages/theme-chalk/lib/pagination.css +1 -0
  208. package/packages/theme-chalk/lib/picker.css +1 -0
  209. package/packages/theme-chalk/lib/popover.css +0 -0
  210. package/packages/theme-chalk/lib/popup.css +0 -0
  211. package/packages/theme-chalk/lib/radio.css +1 -0
  212. package/packages/theme-chalk/lib/rate.css +0 -0
  213. package/packages/theme-chalk/lib/search.css +0 -0
  214. package/packages/theme-chalk/lib/selector.css +1 -0
  215. package/packages/theme-chalk/lib/skeleton.css +0 -0
  216. package/packages/theme-chalk/lib/stepper.css +1 -0
  217. package/packages/theme-chalk/lib/switch.css +1 -0
  218. package/packages/theme-chalk/lib/tab.css +0 -0
  219. package/packages/theme-chalk/lib/table-column.css +0 -0
  220. package/packages/theme-chalk/lib/table.css +1 -0
  221. package/packages/theme-chalk/lib/tabs.css +1 -0
  222. package/packages/theme-chalk/lib/tag.css +1 -0
  223. package/packages/theme-chalk/lib/theme.css +0 -0
  224. package/packages/theme-chalk/lib/tree.css +1 -0
  225. package/packages/theme-chalk/lib/uploader.css +0 -0
  226. package/packages/theme-chalk/package.json +35 -0
  227. package/packages/theme-chalk/src/action-sheet.scss +0 -0
  228. package/packages/theme-chalk/src/base.scss +182 -0
  229. package/packages/theme-chalk/src/button-group.scss +26 -0
  230. package/packages/theme-chalk/src/button.scss +3 -0
  231. package/packages/theme-chalk/src/calendar.scss +12 -0
  232. package/packages/theme-chalk/src/cascader.scss +12 -0
  233. package/packages/theme-chalk/src/cell.scss +14 -0
  234. package/packages/theme-chalk/src/checkbox.scss +10 -0
  235. package/packages/theme-chalk/src/circle.scss +7 -0
  236. package/packages/theme-chalk/src/common/var.scss +1525 -0
  237. package/packages/theme-chalk/src/count-down.scss +0 -0
  238. package/packages/theme-chalk/src/date.scss +0 -0
  239. package/packages/theme-chalk/src/empty.scss +0 -0
  240. package/packages/theme-chalk/src/field.scss +28 -0
  241. package/packages/theme-chalk/src/flow.scss +542 -0
  242. package/packages/theme-chalk/src/fonts/iconfont.scss +530 -0
  243. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  244. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  245. package/packages/theme-chalk/src/form.scss +15 -0
  246. package/packages/theme-chalk/src/grid-item.scss +8 -0
  247. package/packages/theme-chalk/src/grid.scss +0 -0
  248. package/packages/theme-chalk/src/icon.scss +1661 -0
  249. package/packages/theme-chalk/src/image-preview.scss +0 -0
  250. package/packages/theme-chalk/src/index.scss +38 -0
  251. package/packages/theme-chalk/src/list.scss +0 -0
  252. package/packages/theme-chalk/src/loading.scss +0 -0
  253. package/packages/theme-chalk/src/mixins/color.scss +117 -0
  254. package/packages/theme-chalk/src/mixins/mixins.scss +25 -0
  255. package/packages/theme-chalk/src/nav-bar.scss +0 -0
  256. package/packages/theme-chalk/src/navbar.scss +6 -0
  257. package/packages/theme-chalk/src/pagination.scss +10 -0
  258. package/packages/theme-chalk/src/picker.scss +27 -0
  259. package/packages/theme-chalk/src/popover.scss +0 -0
  260. package/packages/theme-chalk/src/popup.scss +0 -0
  261. package/packages/theme-chalk/src/radio.scss +7 -0
  262. package/packages/theme-chalk/src/rate.scss +0 -0
  263. package/packages/theme-chalk/src/search.scss +0 -0
  264. package/packages/theme-chalk/src/selector.scss +218 -0
  265. package/packages/theme-chalk/src/skeleton.scss +0 -0
  266. package/packages/theme-chalk/src/stepper.scss +10 -0
  267. package/packages/theme-chalk/src/switch.scss +6 -0
  268. package/packages/theme-chalk/src/tab.scss +0 -0
  269. package/packages/theme-chalk/src/table-column.scss +0 -0
  270. package/packages/theme-chalk/src/table.scss +42 -0
  271. package/packages/theme-chalk/src/tabs.scss +21 -0
  272. package/packages/theme-chalk/src/tag.scss +13 -0
  273. package/packages/theme-chalk/src/theme.scss +2 -0
  274. package/packages/theme-chalk/src/tree.scss +115 -0
  275. package/packages/theme-chalk/src/uploader.scss +0 -0
  276. package/packages/uploader/index.js +5 -0
  277. package/packages/uploader/src/main.vue +31 -0
  278. package/src/config/api.js +29 -0
  279. package/src/index.js +130 -0
  280. package/src/utils/axios.js +198 -0
  281. package/src/utils/date-util.js +312 -0
  282. package/src/utils/http.js +66 -0
  283. package/src/utils/rules.js +18 -0
  284. package/src/utils/store.js +21 -0
  285. package/src/utils/util.js +1346 -0
@@ -0,0 +1,43 @@
1
+ <template>
2
+ <div class="em-flow">
3
+ <StartFlow v-if="type === 'start'" v-bind="$attrs" :beforeSubmit="beforeSubmit" />
4
+ <Handle
5
+ v-else-if="type === 'handle'"
6
+ v-bind="$attrs"
7
+ :identityIds="userId"
8
+ :beforeSubmit="beforeSubmit"
9
+ />
10
+ <Reject v-else-if="type === 'reject'" :type="type" v-bind="$attrs" :userId="userId" :beforeSubmit="beforeSubmit" />
11
+ <TaskRead v-else-if="type === 'taskRead'" v-bind="$attrs" :userId="userId" :beforeSubmit="beforeSubmit" />
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ import StartFlow from './components/StartFlow.vue';
17
+ import Handle from './components/Handle.vue';
18
+ import Reject from './components/Reject.vue';
19
+ import TaskRead from './components/TaskRead.vue';
20
+ export default {
21
+ name: 'EmFlow',
22
+ inheritAttrs: false,
23
+ components: {
24
+ Handle,
25
+ StartFlow,
26
+ Reject,
27
+ TaskRead
28
+ },
29
+ props: {
30
+ userId: String, //用户id
31
+ beforeSubmit: Function,
32
+ type: {
33
+ type: String,
34
+ default: 'handle'
35
+ }
36
+ },
37
+ data() {
38
+ return {};
39
+ }
40
+ };
41
+ </script>
42
+
43
+ <style></style>
@@ -0,0 +1,5 @@
1
+ import EmForm from './src/main';
2
+
3
+ EmForm.install = Vue => Vue.component(EmForm.name, EmForm);
4
+
5
+ export default EmForm;
@@ -0,0 +1,158 @@
1
+ <template>
2
+ <!-- <van-row class="em-form">
3
+ <van-col
4
+ v-for="(item, index) in contents"
5
+ :key="index"
6
+ :span="(item.col && item.col * 2) || 24"
7
+ > -->
8
+ <van-form v-bind="$attrs" v-on="$listeners" >
9
+ <div v-for="(item, index) in contents" :key="index">
10
+ <em-input
11
+ v-if="
12
+ item.type === 'text' ||
13
+ item.type === 'textarea' ||
14
+ item.type == 'number' ||
15
+ item.type == 'digit'
16
+ "
17
+ class="em-table-input"
18
+ v-bind="item"
19
+ ref="input"
20
+ v-model="model[item.name]"
21
+ :label="item.label.text || item.label"
22
+ @blur="handleChange(item.name, model[item.name])"
23
+ />
24
+ <em-picker
25
+ v-if="item.type === 'select'"
26
+ v-bind="item"
27
+ ref="select"
28
+ v-model="model[item.name]"
29
+ :ajax="false"
30
+ :columns="item.data || []"
31
+ @confirm="
32
+ value => {
33
+ handleChange(item.name, value);
34
+ }
35
+ "
36
+ />
37
+ <em-date
38
+ v-else-if="
39
+ item.date ||
40
+ item.type == 'date' ||
41
+ item.type == 'year' ||
42
+ item.type == 'year-month' ||
43
+ item.type == 'month-day' ||
44
+ item.type == 'time' ||
45
+ item.type == 'datetimeSecond' ||
46
+ item.type == 'datetime' ||
47
+ item.type == 'datehour'
48
+ "
49
+ ref="date"
50
+ v-bind="item"
51
+ v-model="model[item.name]"
52
+ :joinStr="item.joinStr || ''"
53
+ @confirm="
54
+ value => {
55
+ handleChange(item.name, value);
56
+ }
57
+ "
58
+ />
59
+ <em-input v-else-if="item.type === 'radio'" ref="radio" v-bind="item">
60
+ <template slot="input">
61
+ <em-radio-group
62
+ v-bind="item"
63
+ v-model="model[item.name]"
64
+ :ajax="false"
65
+ :data="item.data"
66
+ @change="
67
+ value => {
68
+ handleChange(item.name, value);
69
+ }
70
+ "
71
+ />
72
+ </template>
73
+ </em-input>
74
+ <em-input v-else-if="item.type === 'checkbox'" ref="checkbox" v-bind="item">
75
+ <template slot="input">
76
+ <em-checkbox-group
77
+ v-bind="item"
78
+ v-model="model[item.name]"
79
+ :ajax="false"
80
+ @change="
81
+ value => {
82
+ handleChange(item.name, value);
83
+ }
84
+ "
85
+ />
86
+ </template>
87
+ </em-input>
88
+ <em-input v-else-if="item.type === 'switch'" ref="switch" v-bind="item">
89
+ <template slot="input">
90
+ <em-switch
91
+ v-bind="item"
92
+ v-model="model[item.name]"
93
+ @change="
94
+ value => {
95
+ handleChange(item.name, value);
96
+ }
97
+ "
98
+ />
99
+ </template>
100
+ </em-input>
101
+ <em-selector
102
+ v-else-if="item.type == 'selector'"
103
+ ref="selector"
104
+ v-bind="item"
105
+ v-model="model[item.name]"
106
+ :label="item.label"
107
+ @change="
108
+ value => {
109
+ handleChange(item.name, value);
110
+ }
111
+ "
112
+ />
113
+ </div>
114
+ <div :style="`margin: 16px;text-align:${position}`">
115
+ <em-button round block type="info" v-if="btnList.length == 0" native-type="submit">提交</em-button>
116
+ <em-button v-else v-for="item in btnList[0].contents" :key="item.text" v-bind="item" :native-type="item.nativeType?item.nativeType : 'button'" @click="handleClick(item)">{{item.text}}</em-button>
117
+ </div>
118
+ <!-- </van-col>
119
+ </van-row> -->
120
+ </van-form>
121
+ </template>
122
+
123
+ <script>
124
+ export default {
125
+ name: 'EmForm',
126
+ props: {
127
+ contents: {
128
+ type: Array,
129
+ default() {
130
+ return [];
131
+ }
132
+ },
133
+ model: {
134
+ type: Object,
135
+ default: () => {}
136
+ },
137
+ position:{
138
+ type:String,
139
+ default:'center'
140
+ }
141
+ },
142
+ computed: {
143
+ btnList(){
144
+ return this.contents.filter(x => x.type === "submit")
145
+ }
146
+ },
147
+ methods: {
148
+ handleChange(key, value) {
149
+ this.$emit('change', key, value);
150
+ },
151
+ handleClick(val){
152
+ this.$emit('click',{values:this.model,btn:val})
153
+ }
154
+ }
155
+ };
156
+ </script>
157
+
158
+ <style></style>
@@ -0,0 +1,5 @@
1
+ import EmGrid from './src/main';
2
+
3
+ EmGrid.install = Vue => Vue.component(EmGrid.name, EmGrid);
4
+
5
+ export default EmGrid;
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <div class="em-grid">
3
+ <van-grid v-bind="$attrs" v-on="$listeners" >
4
+ <van-grid-item
5
+ v-bind="item"
6
+ @click="goView($event,item)"
7
+ v-show="$attrs.data && $attrs.data.length > 0"
8
+ v-for="(item, index) of $attrs.data"
9
+ :key="index"
10
+ />
11
+ <slot v-show="$attrs.data && $attrs.data.length == 0" />
12
+ </van-grid>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ export default {
18
+ name: 'EmGrid',
19
+ inheritAttrs:false,
20
+ methods:{
21
+ goView(event,val){
22
+ this.$emit('click',event,val)
23
+ },
24
+ }
25
+ };
26
+ </script>
27
+
28
+ <style></style>
@@ -0,0 +1,5 @@
1
+ import EmGridItem from './src/main';
2
+
3
+ EmGridItem.install = Vue => Vue.component(EmGridItem.name, EmGridItem);
4
+
5
+ export default EmGridItem;
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <van-grid-item v-bind="$attrs" v-on="$listeners" >
3
+ <template v-for="(index, name) in $slots" :slot="name">
4
+ <slot :name="name" />
5
+ </template>
6
+ </van-grid-item>
7
+ </template>
8
+
9
+ <script>
10
+ export default {
11
+ name: 'EmGridItem',
12
+ inheritAttrs:false,
13
+ };
14
+ </script>
15
+
16
+ <style></style>
@@ -0,0 +1,5 @@
1
+ import EmImagePreview from './src/main';
2
+
3
+ EmImagePreview.install = Vue => Vue.component(EmImagePreview.name, EmImagePreview);
4
+
5
+ export default EmImagePreview;
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <div>
3
+ <van-image-preview v-model="show" v-bind="$attrs" v-on="$listenersa">
4
+ <template v-for="(index, name) in $slots" :slot="name">
5
+ <slot :name="name" />
6
+ </template>
7
+ <template v-for="(i, name) in $scopedSlots" :slot="name" slot-scope="{ index }">
8
+ <slot :name="name" :index="index" />
9
+ </template>
10
+ </van-image-preview>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ export default {
16
+ name: 'EmImagePreview',
17
+ inheritAttrs:false,
18
+ props:{
19
+ value:String
20
+ },
21
+ computed:{
22
+ newValue:{
23
+ get(){
24
+ return this.value
25
+ },
26
+ set(val){
27
+ return val
28
+ }
29
+ }
30
+ }
31
+ };
32
+ </script>
33
+
34
+ <style></style>
@@ -0,0 +1,5 @@
1
+ import EmList from './src/main';
2
+
3
+ EmList.install = Vue => Vue.component(EmList.name, EmList);
4
+
5
+ export default EmList;
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <div class="em-list">
3
+ <van-list v-model="newValue" v-bind="$attrs" v-on="$listeners">
4
+ <template v-for="(index,name) of $slots" :slot="name">
5
+ <slot :name="name"></slot>
6
+ </template>
7
+ </van-list>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: 'EmList',
14
+ inheritAttrs:false,
15
+ props:{
16
+ value:{
17
+ type:Boolean,
18
+ }
19
+ },
20
+ computed:{
21
+ newValue:{
22
+ get(){
23
+ return this.value
24
+ },
25
+ set(val){
26
+ return ''
27
+ }
28
+ }
29
+ },
30
+
31
+ };
32
+ </script>
@@ -0,0 +1,5 @@
1
+ import EmLoading from './src/main';
2
+
3
+ EmLoading.install = Vue => Vue.component(EmLoading.name, EmLoading);
4
+
5
+ export default EmLoading;
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <div class="em-loading">
3
+ <van-loading v-bind="$attrs" >
4
+ <template>
5
+ <slot />
6
+ </template>
7
+ </van-loading>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name:'EmLoading',
14
+ inheritAttrs:false
15
+ }
16
+ </script>
17
+
18
+ <style>
19
+
20
+ </style>
@@ -0,0 +1,5 @@
1
+ import EmNavBar from './src/main';
2
+
3
+ EmNavBar.install = Vue => Vue.component(EmNavBar.name, EmNavBar);
4
+
5
+ export default EmNavBar;
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <div class="em-nav-bar">
3
+ <van-nav-bar v-bind="$attrs" v-on="$listeners">
4
+ <template v-for="(index, name) of $slots" :slot="name">
5
+ <slot :name="name"></slot>
6
+ </template>
7
+ </van-nav-bar>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: 'EmNavBar',
14
+ inheritAttrs:false,
15
+ };
16
+ </script>
@@ -0,0 +1,5 @@
1
+ import EmPagination from './src/main';
2
+
3
+ EmPagination.install = Vue => Vue.component(EmPagination.name, EmPagination);
4
+
5
+ export default EmPagination;
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <van-pagination v-model="newValue" v-bind="$attrs" v-on="$listeners" class="em-pagination">
3
+ <template v-for="(index, name) in $slots" :slot="name">
4
+ <slot :name="name" />
5
+ </template>
6
+ <template v-for="(index, name) in $scopedSlots" :slot="name" slot-scope="{ number, text, active }">
7
+ <slot :name="name" :number="number" :text="text" :active="active" />
8
+ </template>
9
+ </van-pagination>
10
+ </template>
11
+
12
+ <script>
13
+ export default {
14
+ name: 'EmPagination',
15
+ props: ['value'],
16
+ computed: {
17
+ newValue: {
18
+ get() {
19
+ return this.value;
20
+ },
21
+ set(val) {
22
+ return val;
23
+ }
24
+ }
25
+ }
26
+ };
27
+ </script>
28
+
29
+ <style></style>
@@ -0,0 +1,5 @@
1
+ import EmPicker from './src/main';
2
+
3
+ EmPicker.install = Vue => Vue.component(EmPicker.name, EmPicker);
4
+
5
+ export default EmPicker;