eoss-mobiles 0.4.0 → 0.4.2
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/CHANGELOG.md +95 -0
- package/lib/button-group.js +2 -2
- package/lib/button.js +2 -2
- package/lib/calendar.js +2 -2
- package/lib/cell.js +2 -2
- package/lib/checkbox.js +2 -2
- package/lib/circle.js +2 -2
- package/lib/count-down.js +2 -2
- package/lib/empty.js +2 -2
- package/lib/eoss-mobile.common.js +542 -93
- package/lib/field.js +2 -2
- package/lib/flow-btn.js +2 -2
- package/lib/flow.js +8 -8
- package/lib/form.js +593 -144
- package/lib/grid-item.js +2 -2
- package/lib/grid.js +2 -2
- package/lib/index.js +1 -1
- package/lib/list.js +2 -2
- package/lib/loading.js +85 -85
- package/lib/nav-bar.js +2 -2
- package/lib/picker.js +12 -11
- package/lib/popover.js +2 -2
- package/lib/radio.js +8 -7
- package/lib/search.js +2 -2
- package/lib/selector.js +28 -28
- package/lib/switch.js +2 -2
- package/lib/tab.js +2 -2
- package/lib/table-column.js +3 -2
- package/lib/tabs.js +2 -2
- package/lib/tag.js +2 -2
- package/lib/theme-chalk/fonts/iconfont.scss +98 -98
- package/lib/theme-chalk/fonts/iconfont1.scss +90 -90
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/uploader.js +3 -2
- package/package.json +1 -1
- package/packages/action-sheet/index.js +5 -5
- package/packages/action-sheet/src/main.vue +32 -32
- package/packages/button/index.js +5 -5
- package/packages/button/src/main.vue +15 -15
- package/packages/button-group/index.js +5 -5
- package/packages/button-group/src/main.vue +80 -80
- package/packages/calendar/index.js +5 -5
- package/packages/calendar/src/main.vue +34 -34
- package/packages/cascader/index.js +5 -5
- package/packages/cascader/src/main.vue +39 -39
- package/packages/cell/index.js +5 -5
- package/packages/cell/src/main.vue +77 -77
- package/packages/checkbox/index.js +5 -5
- package/packages/checkbox/src/main.vue +232 -232
- package/packages/circle/index.js +5 -5
- package/packages/circle/src/main.vue +27 -27
- package/packages/count-down/index.js +5 -5
- package/packages/count-down/src/main.vue +27 -27
- package/packages/date/index.js +5 -5
- package/packages/date/src/date-time.vue +290 -290
- package/packages/date/src/main.vue +401 -401
- package/packages/empty/index.js +5 -5
- package/packages/empty/src/main.vue +16 -16
- package/packages/esign/index.js +5 -5
- package/packages/esign/src/main.vue +144 -144
- package/packages/field/index.js +5 -5
- package/packages/flow/index.js +5 -5
- package/packages/flow/src/components/Circulate.vue +595 -595
- package/packages/flow/src/components/Handle.vue +2404 -2404
- package/packages/flow/src/components/Message.vue +208 -208
- package/packages/flow/src/components/ProcessSettings.vue +342 -342
- package/packages/flow/src/components/TaskRead.vue +1 -1
- package/packages/flow/src/components/supervise.vue +139 -139
- package/packages/flow/src/flowMix.js +288 -288
- package/packages/flow/src/main.vue +116 -116
- package/packages/flow-btn/index.js +5 -5
- package/packages/flow-btn/src/main.vue +494 -494
- package/packages/flow-list/index.js +5 -5
- package/packages/flow-list/src/main.vue +248 -248
- package/packages/form/index.js +5 -5
- package/packages/form/src/CustomCard.vue +201 -0
- package/packages/form/src/main.vue +32 -19
- package/packages/grid/index.js +5 -5
- package/packages/grid/src/main.vue +486 -486
- package/packages/grid-item/index.js +5 -5
- package/packages/grid-item/src/main.vue +16 -16
- package/packages/image/index.js +5 -5
- package/packages/image/src/main.vue +12 -12
- package/packages/image-preview/index.js +5 -5
- package/packages/list/index.js +5 -5
- package/packages/list/src/main.vue +32 -32
- package/packages/loading/index.js +5 -5
- package/packages/loading/src/main.vue +19 -19
- package/packages/nav-bar/index.js +5 -5
- package/packages/nav-bar/src/main.vue +24 -24
- package/packages/notice-bar/index.js +5 -5
- package/packages/notice-bar/src/main.vue +15 -15
- package/packages/pagination/index.js +5 -5
- package/packages/pagination/src/main.vue +73 -73
- package/packages/picker/index.js +5 -5
- package/packages/picker/src/main.vue +604 -604
- package/packages/popover/index.js +5 -5
- package/packages/popover/src/main.vue +32 -32
- package/packages/popup/index.js +5 -5
- package/packages/popup/src/main.vue +27 -27
- package/packages/pull-refresh/index.js +5 -5
- package/packages/pull-refresh/src/main.vue +31 -31
- package/packages/radio/index.js +5 -5
- package/packages/radio/src/main.vue +179 -179
- package/packages/rate/index.js +5 -5
- package/packages/rate/src/main.vue +26 -26
- package/packages/retrial-auth/index.js +5 -5
- package/packages/retrial-auth/src/main.vue +257 -257
- package/packages/search/index.js +5 -5
- package/packages/search/src/main.vue +39 -39
- package/packages/selector/index.js +5 -5
- package/packages/selector/src/main.vue +186 -186
- package/packages/selector/src/selector-tree.vue +1117 -1117
- package/packages/selector/src/tree.vue +405 -405
- package/packages/skeleton/index.js +5 -5
- package/packages/skeleton/src/main.vue +17 -17
- package/packages/stepper/index.js +5 -5
- package/packages/stepper/src/main.vue +25 -25
- package/packages/swipe/index.js +5 -5
- package/packages/swipe/src/main.vue +42 -42
- package/packages/switch/index.js +5 -5
- package/packages/switch/src/main.vue +38 -38
- package/packages/tab/index.js +5 -5
- package/packages/tab/src/main.vue +16 -16
- package/packages/table/index.js +5 -5
- package/packages/table/src/main.vue +1006 -1006
- package/packages/table-column/index.js +5 -5
- package/packages/table-column/src/main.vue +931 -931
- package/packages/table-column/src/mixins/table.js +12 -12
- package/packages/tabs/index.js +5 -5
- package/packages/tabs/src/main.vue +34 -34
- package/packages/tag/index.js +5 -5
- package/packages/tag/src/main.vue +16 -16
- package/packages/theme-chalk/lib/action-sheet.css +0 -0
- package/packages/theme-chalk/lib/base.css +1 -0
- package/packages/theme-chalk/lib/button-group.css +1 -0
- package/packages/theme-chalk/lib/button.css +1 -0
- package/packages/theme-chalk/lib/calendar.css +1 -0
- package/packages/theme-chalk/lib/cascader.css +1 -0
- package/packages/theme-chalk/lib/cell.css +1 -0
- package/packages/theme-chalk/lib/checkbox.css +1 -0
- package/packages/theme-chalk/lib/circle.css +1 -0
- package/packages/theme-chalk/lib/count-down.css +0 -0
- package/packages/theme-chalk/lib/date.css +0 -0
- package/packages/theme-chalk/lib/empty.css +0 -0
- package/packages/theme-chalk/lib/esign.css +1 -0
- package/packages/theme-chalk/lib/field.css +1 -0
- package/packages/theme-chalk/lib/flow-btn.css +1 -0
- package/packages/theme-chalk/lib/flow-list-task-read.css +1 -0
- package/packages/theme-chalk/lib/flow-list.css +1 -0
- package/packages/theme-chalk/lib/flow.css +1 -0
- package/packages/theme-chalk/lib/fonts/iconfont.scss +98 -0
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont1.scss +90 -0
- package/packages/theme-chalk/lib/form.css +1 -0
- package/packages/theme-chalk/lib/grid-item.css +1 -0
- package/packages/theme-chalk/lib/grid.css +1 -0
- package/packages/theme-chalk/lib/icon.css +1 -0
- package/packages/theme-chalk/lib/image-preview.css +0 -0
- package/packages/theme-chalk/lib/image.css +0 -0
- package/packages/theme-chalk/lib/index.css +1 -0
- package/packages/theme-chalk/lib/list.css +0 -0
- package/packages/theme-chalk/lib/loading.css +0 -0
- package/packages/theme-chalk/lib/nav-bar.css +0 -0
- package/packages/theme-chalk/lib/navbar.css +1 -0
- package/packages/theme-chalk/lib/notice-bar.css +0 -0
- package/packages/theme-chalk/lib/pagination.css +1 -0
- package/packages/theme-chalk/lib/picker.css +1 -0
- package/packages/theme-chalk/lib/popover.css +0 -0
- package/packages/theme-chalk/lib/popup.css +0 -0
- package/packages/theme-chalk/lib/pull-refresh.css +0 -0
- package/packages/theme-chalk/lib/radio.css +1 -0
- package/packages/theme-chalk/lib/rate.css +0 -0
- package/packages/theme-chalk/lib/retrial-auth.css +1 -0
- package/packages/theme-chalk/lib/search.css +0 -0
- package/packages/theme-chalk/lib/selector.css +1 -0
- package/packages/theme-chalk/lib/skeleton.css +0 -0
- package/packages/theme-chalk/lib/stepper.css +1 -0
- package/packages/theme-chalk/lib/swipe.css +0 -0
- package/packages/theme-chalk/lib/switch.css +1 -0
- package/packages/theme-chalk/lib/tab.css +0 -0
- package/packages/theme-chalk/lib/table-column.css +0 -0
- package/packages/theme-chalk/lib/table.css +1 -0
- package/packages/theme-chalk/lib/tabs.css +1 -0
- package/packages/theme-chalk/lib/tag.css +1 -0
- package/packages/theme-chalk/lib/theme.css +0 -0
- package/packages/theme-chalk/lib/tree.css +1 -0
- package/packages/theme-chalk/lib/uploader.css +0 -0
- package/packages/theme-chalk/src/base.scss +195 -195
- package/packages/theme-chalk/src/button-group.scss +25 -25
- package/packages/theme-chalk/src/button.scss +2 -2
- package/packages/theme-chalk/src/calendar.scss +11 -11
- package/packages/theme-chalk/src/cascader.scss +11 -11
- package/packages/theme-chalk/src/cell.scss +14 -14
- package/packages/theme-chalk/src/checkbox.scss +9 -9
- package/packages/theme-chalk/src/circle.scss +6 -6
- package/packages/theme-chalk/src/common/var.scss +1525 -1525
- package/packages/theme-chalk/src/esign.scss +51 -51
- package/packages/theme-chalk/src/field.scss +98 -98
- package/packages/theme-chalk/src/flow-btn.scss +99 -99
- package/packages/theme-chalk/src/flow-list.scss +122 -122
- package/packages/theme-chalk/src/fonts/iconfont.scss +98 -98
- package/packages/theme-chalk/src/fonts/iconfont1.scss +90 -90
- package/packages/theme-chalk/src/form.scss +107 -33
- package/packages/theme-chalk/src/grid-item.scss +16 -16
- package/packages/theme-chalk/src/grid.scss +46 -46
- package/packages/theme-chalk/src/icon.scss +1661 -1661
- package/packages/theme-chalk/src/mixins/color.scss +117 -117
- package/packages/theme-chalk/src/navbar.scss +5 -5
- package/packages/theme-chalk/src/pagination.scss +12 -12
- package/packages/theme-chalk/src/picker.scss +31 -31
- package/packages/theme-chalk/src/radio.scss +6 -6
- package/packages/theme-chalk/src/retrial-auth.scss +28 -28
- package/packages/theme-chalk/src/selector.scss +247 -247
- package/packages/theme-chalk/src/stepper.scss +9 -9
- package/packages/theme-chalk/src/switch.scss +5 -5
- package/packages/theme-chalk/src/table.scss +86 -86
- package/packages/theme-chalk/src/tabs.scss +31 -31
- package/packages/theme-chalk/src/tag.scss +12 -12
- package/packages/theme-chalk/src/theme.scss +1 -1
- package/packages/theme-chalk/src/tree.scss +127 -127
- package/packages/uploader/index.js +5 -5
- package/src/config/api.js +190 -190
- package/src/index.js +1 -1
- package/src/utils/axios.js +217 -217
- package/src/utils/date-util.js +312 -312
- package/src/utils/http.js +106 -106
- package/src/utils/rules.js +18 -18
- package/src/utils/store.js +21 -21
- package/packages/theme-chalk/gulpfile.js +0 -25
package/lib/uploader.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 29);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -2213,7 +2213,8 @@ module.exports = require("vant");
|
|
|
2213
2213
|
/* 25 */,
|
|
2214
2214
|
/* 26 */,
|
|
2215
2215
|
/* 27 */,
|
|
2216
|
-
/* 28
|
|
2216
|
+
/* 28 */,
|
|
2217
|
+
/* 29 */
|
|
2217
2218
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2218
2219
|
|
|
2219
2220
|
"use strict";
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EmActionSheet from './src/main';
|
|
2
|
-
|
|
3
|
-
EmActionSheet.install = Vue => Vue.component(EmActionSheet.name, EmActionSheet);
|
|
4
|
-
|
|
5
|
-
export default EmActionSheet;
|
|
1
|
+
import EmActionSheet from './src/main';
|
|
2
|
+
|
|
3
|
+
EmActionSheet.install = Vue => Vue.component(EmActionSheet.name, EmActionSheet);
|
|
4
|
+
|
|
5
|
+
export default EmActionSheet;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="em-action-sheet">
|
|
3
|
-
<van-action-sheet v-model="newValue" v-bind="$attrs" v-on="$listeners">
|
|
4
|
-
<template v-for="(index, name) in $slots" :slot="name">
|
|
5
|
-
<slot :name="name" />
|
|
6
|
-
</template>
|
|
7
|
-
</van-action-sheet>
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
export default {
|
|
13
|
-
name: 'EmActionSheet',
|
|
14
|
-
inheritAttrs: false,
|
|
15
|
-
props:{
|
|
16
|
-
value:{
|
|
17
|
-
type:Boolean,
|
|
18
|
-
default:false
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
computed:{
|
|
22
|
-
newValue:{
|
|
23
|
-
get(){
|
|
24
|
-
return this.value
|
|
25
|
-
},
|
|
26
|
-
set(val){}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<style></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="em-action-sheet">
|
|
3
|
+
<van-action-sheet v-model="newValue" v-bind="$attrs" v-on="$listeners">
|
|
4
|
+
<template v-for="(index, name) in $slots" :slot="name">
|
|
5
|
+
<slot :name="name" />
|
|
6
|
+
</template>
|
|
7
|
+
</van-action-sheet>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: 'EmActionSheet',
|
|
14
|
+
inheritAttrs: false,
|
|
15
|
+
props:{
|
|
16
|
+
value:{
|
|
17
|
+
type:Boolean,
|
|
18
|
+
default:false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
computed:{
|
|
22
|
+
newValue:{
|
|
23
|
+
get(){
|
|
24
|
+
return this.value
|
|
25
|
+
},
|
|
26
|
+
set(val){}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style></style>
|
package/packages/button/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EmButton from './src/main';
|
|
2
|
-
|
|
3
|
-
EmButton.install = Vue => Vue.component(EmButton.name, EmButton);
|
|
4
|
-
|
|
5
|
-
export default EmButton;
|
|
1
|
+
import EmButton from './src/main';
|
|
2
|
+
|
|
3
|
+
EmButton.install = Vue => Vue.component(EmButton.name, EmButton);
|
|
4
|
+
|
|
5
|
+
export default EmButton;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<van-button class="em-button" v-bind="$attrs" v-on="$listeners">
|
|
3
|
-
<!-- <i :class="icon" v-if="icon"></i> -->
|
|
4
|
-
<template v-for="(index, name) in $slots" :slot="name">
|
|
5
|
-
<slot :name="name" />
|
|
6
|
-
</template>
|
|
7
|
-
</van-button>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
export default {
|
|
12
|
-
name: 'EmButton',
|
|
13
|
-
inheritAttrs:false,
|
|
14
|
-
};
|
|
15
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<van-button class="em-button" v-bind="$attrs" v-on="$listeners">
|
|
3
|
+
<!-- <i :class="icon" v-if="icon"></i> -->
|
|
4
|
+
<template v-for="(index, name) in $slots" :slot="name">
|
|
5
|
+
<slot :name="name" />
|
|
6
|
+
</template>
|
|
7
|
+
</van-button>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
name: 'EmButton',
|
|
13
|
+
inheritAttrs:false,
|
|
14
|
+
};
|
|
15
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EmButtonGroup from './src/main';
|
|
2
|
-
|
|
3
|
-
EmButtonGroup.install = Vue => Vue.component(EmButtonGroup.name, EmButtonGroup);
|
|
4
|
-
|
|
5
|
-
export default EmButtonGroup;
|
|
1
|
+
import EmButtonGroup from './src/main';
|
|
2
|
+
|
|
3
|
+
EmButtonGroup.install = Vue => Vue.component(EmButtonGroup.name, EmButtonGroup);
|
|
4
|
+
|
|
5
|
+
export default EmButtonGroup;
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="em-button-group">
|
|
3
|
-
<em-button
|
|
4
|
-
v-show="index < maxCount - 1"
|
|
5
|
-
v-for="(item, index) of btns"
|
|
6
|
-
v-bind="item"
|
|
7
|
-
:size="item.size || size"
|
|
8
|
-
:key="index"
|
|
9
|
-
@click="handleClick(item, true)"
|
|
10
|
-
/>
|
|
11
|
-
<em-button
|
|
12
|
-
class="em-button-group-more"
|
|
13
|
-
v-if="btns.length > maxCount - 1"
|
|
14
|
-
@click="handleClick(btns.length == maxCount && btns[maxCount - 1])"
|
|
15
|
-
v-bind="btns.length == maxCount && btns[maxCount - 1]"
|
|
16
|
-
:size="btns[maxCount - 1].size || size"
|
|
17
|
-
:icon="btns.length > maxCount ? 'ellipsis' :''"
|
|
18
|
-
>{{ btns.length == maxCount ? btns[maxCount - 1].text : '' }}</em-button
|
|
19
|
-
>
|
|
20
|
-
<em-popover
|
|
21
|
-
v-if="btns.length > maxCount"
|
|
22
|
-
v-model="showBtn"
|
|
23
|
-
trigger="click"
|
|
24
|
-
theme="dark"
|
|
25
|
-
:actions="btns.slice(maxCount - 1)"
|
|
26
|
-
@select="handleClick($event, true)"
|
|
27
|
-
>
|
|
28
|
-
</em-popover>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script>
|
|
33
|
-
export default {
|
|
34
|
-
name: 'EmButtonGroup',
|
|
35
|
-
inheritAttrs:false,
|
|
36
|
-
props: {
|
|
37
|
-
data: Object,
|
|
38
|
-
contents: { type: Array, default: [] },
|
|
39
|
-
size: String,
|
|
40
|
-
rules: Function,
|
|
41
|
-
maxCount:{
|
|
42
|
-
type:[Number,String],
|
|
43
|
-
default:3
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
data() {
|
|
47
|
-
return {
|
|
48
|
-
showBtn: false
|
|
49
|
-
};
|
|
50
|
-
},
|
|
51
|
-
computed: {
|
|
52
|
-
btns() {
|
|
53
|
-
return this.getBtns();
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
methods: {
|
|
57
|
-
getBtns() {
|
|
58
|
-
let arry = this.contents.filter(item => {
|
|
59
|
-
if (Object.prototype.hasOwnProperty.call(item, 'rules')) {
|
|
60
|
-
return item.rules(this.data);
|
|
61
|
-
}
|
|
62
|
-
if (this.rules !== undefined) {
|
|
63
|
-
return this.rules(this.data);
|
|
64
|
-
}
|
|
65
|
-
return true;
|
|
66
|
-
});
|
|
67
|
-
return arry;
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
handleClick(res, noMore) {
|
|
71
|
-
if (this.btns.length > this.maxCount && !noMore) {
|
|
72
|
-
this.showBtn = !this.showBtn;
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
this.$emit('click', this.data ? { row: this.data, handle: res } : res);
|
|
76
|
-
this.showBtn = false;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="em-button-group">
|
|
3
|
+
<em-button
|
|
4
|
+
v-show="index < maxCount - 1"
|
|
5
|
+
v-for="(item, index) of btns"
|
|
6
|
+
v-bind="item"
|
|
7
|
+
:size="item.size || size"
|
|
8
|
+
:key="index"
|
|
9
|
+
@click="handleClick(item, true)"
|
|
10
|
+
/>
|
|
11
|
+
<em-button
|
|
12
|
+
class="em-button-group-more"
|
|
13
|
+
v-if="btns.length > maxCount - 1"
|
|
14
|
+
@click="handleClick(btns.length == maxCount && btns[maxCount - 1])"
|
|
15
|
+
v-bind="btns.length == maxCount && btns[maxCount - 1]"
|
|
16
|
+
:size="btns[maxCount - 1].size || size"
|
|
17
|
+
:icon="btns.length > maxCount ? 'ellipsis' :''"
|
|
18
|
+
>{{ btns.length == maxCount ? btns[maxCount - 1].text : '' }}</em-button
|
|
19
|
+
>
|
|
20
|
+
<em-popover
|
|
21
|
+
v-if="btns.length > maxCount"
|
|
22
|
+
v-model="showBtn"
|
|
23
|
+
trigger="click"
|
|
24
|
+
theme="dark"
|
|
25
|
+
:actions="btns.slice(maxCount - 1)"
|
|
26
|
+
@select="handleClick($event, true)"
|
|
27
|
+
>
|
|
28
|
+
</em-popover>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
export default {
|
|
34
|
+
name: 'EmButtonGroup',
|
|
35
|
+
inheritAttrs:false,
|
|
36
|
+
props: {
|
|
37
|
+
data: Object,
|
|
38
|
+
contents: { type: Array, default: [] },
|
|
39
|
+
size: String,
|
|
40
|
+
rules: Function,
|
|
41
|
+
maxCount:{
|
|
42
|
+
type:[Number,String],
|
|
43
|
+
default:3
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
showBtn: false
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
computed: {
|
|
52
|
+
btns() {
|
|
53
|
+
return this.getBtns();
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
methods: {
|
|
57
|
+
getBtns() {
|
|
58
|
+
let arry = this.contents.filter(item => {
|
|
59
|
+
if (Object.prototype.hasOwnProperty.call(item, 'rules')) {
|
|
60
|
+
return item.rules(this.data);
|
|
61
|
+
}
|
|
62
|
+
if (this.rules !== undefined) {
|
|
63
|
+
return this.rules(this.data);
|
|
64
|
+
}
|
|
65
|
+
return true;
|
|
66
|
+
});
|
|
67
|
+
return arry;
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
handleClick(res, noMore) {
|
|
71
|
+
if (this.btns.length > this.maxCount && !noMore) {
|
|
72
|
+
this.showBtn = !this.showBtn;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this.$emit('click', this.data ? { row: this.data, handle: res } : res);
|
|
76
|
+
this.showBtn = false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EmCalendar from './src/main';
|
|
2
|
-
|
|
3
|
-
EmCalendar.install = Vue => Vue.component(EmCalendar.name, EmCalendar);
|
|
4
|
-
|
|
5
|
-
export default EmCalendar;
|
|
1
|
+
import EmCalendar from './src/main';
|
|
2
|
+
|
|
3
|
+
EmCalendar.install = Vue => Vue.component(EmCalendar.name, EmCalendar);
|
|
4
|
+
|
|
5
|
+
export default EmCalendar;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<van-calendar class="em-calendar" v-model="newValue" v-bind="$attrs" v-on="$listeners" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
export default {
|
|
7
|
-
inheritAttrs:false,
|
|
8
|
-
name: 'EmCalendar',
|
|
9
|
-
data(){
|
|
10
|
-
return{
|
|
11
|
-
show:false,
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
props:{
|
|
16
|
-
value:Boolean
|
|
17
|
-
},
|
|
18
|
-
computed:{
|
|
19
|
-
newValue:{
|
|
20
|
-
get(){
|
|
21
|
-
return this.value
|
|
22
|
-
},
|
|
23
|
-
set(val){
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
methods:{
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<style></style>
|
|
1
|
+
<template>
|
|
2
|
+
<van-calendar class="em-calendar" v-model="newValue" v-bind="$attrs" v-on="$listeners" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
inheritAttrs:false,
|
|
8
|
+
name: 'EmCalendar',
|
|
9
|
+
data(){
|
|
10
|
+
return{
|
|
11
|
+
show:false,
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
props:{
|
|
16
|
+
value:Boolean
|
|
17
|
+
},
|
|
18
|
+
computed:{
|
|
19
|
+
newValue:{
|
|
20
|
+
get(){
|
|
21
|
+
return this.value
|
|
22
|
+
},
|
|
23
|
+
set(val){
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
methods:{
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style></style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EmCascader from './src/main';
|
|
2
|
-
|
|
3
|
-
EmCascader.install = Vue => Vue.component(EmCascader.name, EmCascader);
|
|
4
|
-
|
|
5
|
-
export default EmCascader;
|
|
1
|
+
import EmCascader from './src/main';
|
|
2
|
+
|
|
3
|
+
EmCascader.install = Vue => Vue.component(EmCascader.name, EmCascader);
|
|
4
|
+
|
|
5
|
+
export default EmCascader;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="em-cascader">
|
|
3
|
-
<van-cascader
|
|
4
|
-
v-model="newValue"
|
|
5
|
-
v-bind="$attrs"
|
|
6
|
-
v-on="$listeners"
|
|
7
|
-
>
|
|
8
|
-
<template v-for="(index, name) in $slots" :slot="name">
|
|
9
|
-
<slot :name="name" />
|
|
10
|
-
</template>
|
|
11
|
-
<template v-for="(index, name) in $scopedSlots" :slot="name" slot-scope="{ option:Option, selected }">
|
|
12
|
-
<slot :name="name" :option="Option" :selected="selected" />
|
|
13
|
-
</template>
|
|
14
|
-
</van-cascader>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
export default {
|
|
20
|
-
name:'EmCascader',
|
|
21
|
-
inheritAttrs:false,
|
|
22
|
-
props:{
|
|
23
|
-
value:String
|
|
24
|
-
},
|
|
25
|
-
computed:{
|
|
26
|
-
newValue:{
|
|
27
|
-
get(){
|
|
28
|
-
return this.value
|
|
29
|
-
},
|
|
30
|
-
set(val){
|
|
31
|
-
return val
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<style>
|
|
39
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="em-cascader">
|
|
3
|
+
<van-cascader
|
|
4
|
+
v-model="newValue"
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
v-on="$listeners"
|
|
7
|
+
>
|
|
8
|
+
<template v-for="(index, name) in $slots" :slot="name">
|
|
9
|
+
<slot :name="name" />
|
|
10
|
+
</template>
|
|
11
|
+
<template v-for="(index, name) in $scopedSlots" :slot="name" slot-scope="{ option:Option, selected }">
|
|
12
|
+
<slot :name="name" :option="Option" :selected="selected" />
|
|
13
|
+
</template>
|
|
14
|
+
</van-cascader>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
export default {
|
|
20
|
+
name:'EmCascader',
|
|
21
|
+
inheritAttrs:false,
|
|
22
|
+
props:{
|
|
23
|
+
value:String
|
|
24
|
+
},
|
|
25
|
+
computed:{
|
|
26
|
+
newValue:{
|
|
27
|
+
get(){
|
|
28
|
+
return this.value
|
|
29
|
+
},
|
|
30
|
+
set(val){
|
|
31
|
+
return val
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style>
|
|
39
|
+
|
|
40
40
|
</style>
|
package/packages/cell/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EmCell from './src/main';
|
|
2
|
-
|
|
3
|
-
EmCell.install = Vue => Vue.component(EmCell.name, EmCell);
|
|
4
|
-
|
|
5
|
-
export default EmCell;
|
|
1
|
+
import EmCell from './src/main';
|
|
2
|
+
|
|
3
|
+
EmCell.install = Vue => Vue.component(EmCell.name, EmCell);
|
|
4
|
+
|
|
5
|
+
export default EmCell;
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="em-cell">
|
|
3
|
-
<van-cell-group
|
|
4
|
-
:inset="inset"
|
|
5
|
-
:title="title"
|
|
6
|
-
:border="border"
|
|
7
|
-
v-if="isGroup"
|
|
8
|
-
>
|
|
9
|
-
<van-cell
|
|
10
|
-
v-for="(item,index) in data"
|
|
11
|
-
:key="index"
|
|
12
|
-
v-bind="item"
|
|
13
|
-
@click="handleClick($event,item)"
|
|
14
|
-
>
|
|
15
|
-
</van-cell>
|
|
16
|
-
</van-cell-group>
|
|
17
|
-
<van-cell
|
|
18
|
-
v-bind="$attrs"
|
|
19
|
-
v-on="$listeners"
|
|
20
|
-
:title="title"
|
|
21
|
-
:border="border"
|
|
22
|
-
v-else
|
|
23
|
-
>
|
|
24
|
-
|
|
25
|
-
<template
|
|
26
|
-
v-for="(index, name) in $slots"
|
|
27
|
-
:slot="name"
|
|
28
|
-
>
|
|
29
|
-
<slot :name="name" />
|
|
30
|
-
</template>
|
|
31
|
-
</van-cell>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script>
|
|
36
|
-
export default {
|
|
37
|
-
name: 'EmCell',
|
|
38
|
-
inheritAttrs: false,
|
|
39
|
-
data() {
|
|
40
|
-
return {};
|
|
41
|
-
},
|
|
42
|
-
props: {
|
|
43
|
-
// 单元数据
|
|
44
|
-
data: {
|
|
45
|
-
type: Array,
|
|
46
|
-
default: () => []
|
|
47
|
-
},
|
|
48
|
-
// 卡片风格
|
|
49
|
-
inset: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: false
|
|
52
|
-
},
|
|
53
|
-
// 是否展示外边框
|
|
54
|
-
border: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: true
|
|
57
|
-
},
|
|
58
|
-
// 标题
|
|
59
|
-
title: {
|
|
60
|
-
type: [Number,String],
|
|
61
|
-
default: ''
|
|
62
|
-
},
|
|
63
|
-
// 是否使用组
|
|
64
|
-
isGroup: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: true
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
mounted(){
|
|
70
|
-
},
|
|
71
|
-
methods:{
|
|
72
|
-
handleClick(event,item){
|
|
73
|
-
this.$emit('click',event,item)
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="em-cell">
|
|
3
|
+
<van-cell-group
|
|
4
|
+
:inset="inset"
|
|
5
|
+
:title="title"
|
|
6
|
+
:border="border"
|
|
7
|
+
v-if="isGroup"
|
|
8
|
+
>
|
|
9
|
+
<van-cell
|
|
10
|
+
v-for="(item,index) in data"
|
|
11
|
+
:key="index"
|
|
12
|
+
v-bind="item"
|
|
13
|
+
@click="handleClick($event,item)"
|
|
14
|
+
>
|
|
15
|
+
</van-cell>
|
|
16
|
+
</van-cell-group>
|
|
17
|
+
<van-cell
|
|
18
|
+
v-bind="$attrs"
|
|
19
|
+
v-on="$listeners"
|
|
20
|
+
:title="title"
|
|
21
|
+
:border="border"
|
|
22
|
+
v-else
|
|
23
|
+
>
|
|
24
|
+
|
|
25
|
+
<template
|
|
26
|
+
v-for="(index, name) in $slots"
|
|
27
|
+
:slot="name"
|
|
28
|
+
>
|
|
29
|
+
<slot :name="name" />
|
|
30
|
+
</template>
|
|
31
|
+
</van-cell>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
export default {
|
|
37
|
+
name: 'EmCell',
|
|
38
|
+
inheritAttrs: false,
|
|
39
|
+
data() {
|
|
40
|
+
return {};
|
|
41
|
+
},
|
|
42
|
+
props: {
|
|
43
|
+
// 单元数据
|
|
44
|
+
data: {
|
|
45
|
+
type: Array,
|
|
46
|
+
default: () => []
|
|
47
|
+
},
|
|
48
|
+
// 卡片风格
|
|
49
|
+
inset: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false
|
|
52
|
+
},
|
|
53
|
+
// 是否展示外边框
|
|
54
|
+
border: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: true
|
|
57
|
+
},
|
|
58
|
+
// 标题
|
|
59
|
+
title: {
|
|
60
|
+
type: [Number,String],
|
|
61
|
+
default: ''
|
|
62
|
+
},
|
|
63
|
+
// 是否使用组
|
|
64
|
+
isGroup: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: true
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
mounted(){
|
|
70
|
+
},
|
|
71
|
+
methods:{
|
|
72
|
+
handleClick(event,item){
|
|
73
|
+
this.$emit('click',event,item)
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import EmCheckboxGroup from './src/main';
|
|
2
|
-
|
|
3
|
-
EmCheckboxGroup.install = Vue => Vue.component(EmCheckboxGroup.name, EmCheckboxGroup);
|
|
4
|
-
|
|
5
|
-
export default EmCheckboxGroup;
|
|
1
|
+
import EmCheckboxGroup from './src/main';
|
|
2
|
+
|
|
3
|
+
EmCheckboxGroup.install = Vue => Vue.component(EmCheckboxGroup.name, EmCheckboxGroup);
|
|
4
|
+
|
|
5
|
+
export default EmCheckboxGroup;
|