web-component-gallery 1.3.12 → 2.0.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/dist/923.umd.js +1 -0
- package/dist/index.umd.js +1 -12252
- package/dist/js.umd.js +1 -0
- package/dist/style.css +17 -0
- package/dist/style.umd.js +1 -0
- package/{method → extensions}/AMap.js +1 -5
- package/{plugins/method → extensions}/Dialog.js +2 -2
- package/{lib/lazy_use.js → extensions/index.js} +16 -2
- package/lib/{amap/components/AmapSearch/index.jsx → amap-comp/AmapSearch.jsx} +3 -5
- package/lib/amap-comp/index.js +18 -0
- package/{plugins/lib/amap/components/AmapSearch/index.less → lib/amap-comp/style/AmapSearch.less} +5 -3
- package/lib/amap-comp/style/index.js +1 -0
- package/lib/amap-comp/style/index.less +1 -0
- package/lib/{amap/AmapDraw.jsx → amap-draw/index.jsx} +2 -4
- package/lib/amap-draw/style/index.js +1 -0
- package/lib/{amap/AmapDraw.less → amap-draw/style/index.less} +6 -3
- package/lib/browse/index.jsx +0 -2
- package/lib/browse/style/index.js +1 -0
- package/lib/button/Button.js +1 -3
- package/lib/button/style/index.js +1 -0
- package/{plugins/lib/dateTime → lib/date-time}/index.vue +3 -13
- package/lib/date-time/style/index.js +1 -0
- package/lib/date-time/style/index.less +7 -0
- package/lib/{descriptions → descriptions-list}/index.jsx +1 -3
- package/lib/descriptions-list/style/index.js +1 -0
- package/{plugins/lib/tree → lib/directory}/Directory.js +4 -21
- package/lib/directory/index.js +8 -0
- package/lib/directory/style/index.js +1 -0
- package/lib/{tree/style/Directory.less → directory/style/index.less} +3 -4
- package/{plugins/lib/form/components → lib/form-comp}/ACascaderMultiple.vue +1 -106
- package/lib/form-comp/ARadio.vue +70 -0
- package/lib/{form/components → form-comp}/ARangePicker.vue +9 -20
- package/lib/{form/components → form-comp}/ASelectCustom.vue +1 -8
- package/lib/form-comp/ATagsInput.vue +88 -0
- package/lib/form-comp/ATimePicker.vue +127 -0
- package/lib/{form/components → form-comp}/AUpload.vue +2 -17
- package/lib/form-comp/index.js +37 -0
- package/lib/form-comp/style/ACascaderMultiple.less +117 -0
- package/lib/form-comp/style/ARadio.less +0 -0
- package/lib/form-comp/style/ARangePicker.less +11 -0
- package/lib/form-comp/style/ASelectCustom.less +4 -0
- package/lib/form-comp/style/ATagsInput.less +24 -0
- package/lib/form-comp/style/ATimePicker.less +8 -0
- package/lib/form-comp/style/AUpload.less +15 -0
- package/lib/form-comp/style/index.js +1 -0
- package/lib/form-comp/style/index.less +7 -0
- package/lib/index.js +60 -45
- package/lib/modal/index.jsx +4 -6
- package/lib/modal/style/index.js +1 -0
- package/lib/modal/{index.less → style/index.less} +6 -7
- package/{plugins/lib/form → lib/model}/Model.js +1 -3
- package/lib/model/index.js +7 -0
- package/lib/model/style/index.js +1 -0
- package/lib/{form/style/Model.less → model/style/index.less} +10 -10
- package/{plugins/lib/form → lib/model}/utils/render.js +1 -1
- package/lib/{form → model}/utils/resetFields.js +1 -1
- package/lib/no-data/directive.js +65 -0
- package/lib/no-data/index.js +21 -0
- package/lib/no-data/index.vue +35 -0
- package/lib/no-data/style/index.js +1 -0
- package/lib/no-data/style/index.less +15 -0
- package/lib/search/index.js +7 -0
- package/{plugins/lib/form/Search.vue → lib/search/index.vue} +3 -6
- package/lib/search/style/index.js +1 -0
- package/{plugins/lib/form/style/Search.less → lib/search/style/index.less} +7 -8
- package/lib/style/mixins.less +1 -1
- package/lib/{svgIcon → svg-icon}/index.vue +1 -17
- package/lib/svg-icon/style/index.js +1 -0
- package/lib/svg-icon/style/index.less +15 -0
- package/lib/table/index.vue +4 -8
- package/lib/table/style/index.js +1 -0
- package/lib/table/style/index.less +12 -13
- package/lib/tree/index.js +2 -11
- package/{plugins/lib/tree/Tree.vue → lib/tree/index.vue} +2 -5
- package/lib/tree/style/index.js +1 -0
- package/{plugins/lib/tree/style/Tree.less → lib/tree/style/index.less} +4 -4
- package/lib/weather/index.vue +1 -9
- package/lib/weather/style/index.js +1 -0
- package/lib/weather/style/index.less +7 -0
- package/package.json +16 -34
- package/utils/Axios.js +91 -82
- package/utils/Postcss.js +12 -8
- package/README.md +0 -24
- package/dist/amap.umd.js +0 -12252
- package/dist/avatar.umd.js +0 -5337
- package/dist/button.umd.js +0 -5845
- package/dist/dateTime.umd.js +0 -1287
- package/dist/form.umd.js +0 -9981
- package/dist/multiTab.umd.js +0 -5556
- package/dist/svgIcon.umd.js +0 -1167
- package/dist/table.umd.js +0 -6306
- package/dist/tree.umd.js +0 -5393
- package/dist/weather.umd.js +0 -1167
- package/lib/amap/components/AmapSearch/index.less +0 -16
- package/lib/amap/index.js +0 -13
- package/lib/avatar/index.js +0 -7
- package/lib/avatar/index.vue +0 -47
- package/lib/basic/404.vue +0 -24
- package/lib/dateTime/index.vue +0 -43
- package/lib/form/Model.js +0 -153
- package/lib/form/Search.vue +0 -159
- package/lib/form/components/ACascaderMultiple.vue +0 -766
- package/lib/form/components/ARadio.vue +0 -74
- package/lib/form/components/ATagsInput.vue +0 -93
- package/lib/form/components/ATimePicker.vue +0 -73
- package/lib/form/index.js +0 -55
- package/lib/form/style/Search.less +0 -34
- package/lib/form/utils/render.js +0 -85
- package/lib/iframe/events.js +0 -2
- package/lib/iframe/index.jsx +0 -234
- package/lib/iframe/index.less +0 -19
- package/lib/multiTab/APIEnums.js +0 -17
- package/lib/multiTab/MultiTab.jsx +0 -237
- package/lib/multiTab/RouteAPI.js +0 -71
- package/lib/multiTab/RouteContent.jsx +0 -90
- package/lib/multiTab/RouteKeepAlive.js +0 -183
- package/lib/multiTab/events.js +0 -2
- package/lib/multiTab/index.js +0 -15
- package/lib/multiTab/index.less +0 -73
- package/lib/style/index.less +0 -2
- package/lib/tree/Directory.js +0 -428
- package/lib/tree/Tree.vue +0 -181
- package/lib/tree/style/Tree.less +0 -52
- package/method/Dialog.js +0 -134
- package/method/index.js +0 -12
- package/plugins/lib/amap/AmapDraw.jsx +0 -349
- package/plugins/lib/amap/AmapDraw.less +0 -45
- package/plugins/lib/amap/components/AmapSearch/index.jsx +0 -73
- package/plugins/lib/amap/index.js +0 -13
- package/plugins/lib/avatar/index.js +0 -7
- package/plugins/lib/avatar/index.vue +0 -47
- package/plugins/lib/basic/404.vue +0 -24
- package/plugins/lib/browse/index.jsx +0 -76
- package/plugins/lib/browse/index.less +0 -4
- package/plugins/lib/button/Button.js +0 -89
- package/plugins/lib/button/index.js +0 -7
- package/plugins/lib/dateTime/index.js +0 -7
- package/plugins/lib/descriptions/index.jsx +0 -108
- package/plugins/lib/descriptions/index.less +0 -15
- package/plugins/lib/form/components/ARadio.vue +0 -74
- package/plugins/lib/form/components/ARangePicker.vue +0 -129
- package/plugins/lib/form/components/ASelectCustom.vue +0 -226
- package/plugins/lib/form/components/ATagsInput.vue +0 -93
- package/plugins/lib/form/components/ATimePicker.vue +0 -73
- package/plugins/lib/form/components/AUpload.vue +0 -183
- package/plugins/lib/form/components/RenderComp.vue +0 -69
- package/plugins/lib/form/index.js +0 -55
- package/plugins/lib/form/style/Model.less +0 -53
- package/plugins/lib/form/utils/resetFields.js +0 -16
- package/plugins/lib/iframe/events.js +0 -2
- package/plugins/lib/iframe/index.jsx +0 -234
- package/plugins/lib/iframe/index.less +0 -19
- package/plugins/lib/index.js +0 -72
- package/plugins/lib/lazy_use.js +0 -40
- package/plugins/lib/modal/index.jsx +0 -53
- package/plugins/lib/modal/index.less +0 -50
- package/plugins/lib/multiTab/APIEnums.js +0 -17
- package/plugins/lib/multiTab/MultiTab.jsx +0 -237
- package/plugins/lib/multiTab/RouteAPI.js +0 -71
- package/plugins/lib/multiTab/RouteContent.jsx +0 -90
- package/plugins/lib/multiTab/RouteKeepAlive.js +0 -183
- package/plugins/lib/multiTab/events.js +0 -2
- package/plugins/lib/multiTab/index.js +0 -15
- package/plugins/lib/multiTab/index.less +0 -73
- package/plugins/lib/style/index.less +0 -2
- package/plugins/lib/style/mixins.less +0 -79
- package/plugins/lib/svgIcon/index.js +0 -7
- package/plugins/lib/svgIcon/index.vue +0 -77
- package/plugins/lib/table/index.js +0 -7
- package/plugins/lib/table/index.vue +0 -217
- package/plugins/lib/table/style/index.less +0 -50
- package/plugins/lib/tree/index.js +0 -17
- package/plugins/lib/tree/style/Directory.less +0 -119
- package/plugins/lib/weather/index.js +0 -7
- package/plugins/lib/weather/index.vue +0 -58
- package/plugins/method/AMap.js +0 -368
- package/plugins/method/PageLoading.jsx +0 -106
- package/plugins/method/Theme.js +0 -88
- package/plugins/method/index.js +0 -12
- package/plugins/store/auth.js +0 -31
- package/plugins/store/cache.js +0 -56
- package/plugins/store/chat.js +0 -74
- package/plugins/store/project.js +0 -46
- package/plugins/utils/Axios.js +0 -105
- package/plugins/utils/Base64.js +0 -314
- package/plugins/utils/Filter.js +0 -249
- package/plugins/utils/PostMessage.js +0 -16
- package/plugins/utils/Postcss.js +0 -9
- package/plugins/utils/Rem.js +0 -24
- package/plugins/utils/Request.js +0 -38
- package/plugins/utils/Storage.js +0 -73
- package/plugins/utils/Tree.js +0 -169
- package/plugins/utils/Utils.js +0 -51
- package/plugins/utils/Validate.js +0 -33
- package/plugins/utils/Websocket.js +0 -186
- package/utils/PostMessage.js +0 -16
- package/utils/Request.js +0 -38
- /package/{method → extensions}/PageLoading.jsx +0 -0
- /package/{method → extensions}/Theme.js +0 -0
- /package/{plugins/font → font}/DS-DIGI-1.ttf +0 -0
- /package/{plugins/font → font}/DS-DIGIB-2.ttf +0 -0
- /package/{plugins/font → font}/DS-DIGII-3.ttf +0 -0
- /package/{plugins/font → font}/DS-DIGIT-4.ttf +0 -0
- /package/{plugins/font → font}/Orbitron-Black.ttf +0 -0
- /package/{plugins/font → font}/Orbitron-Bold.ttf +0 -0
- /package/{plugins/font → font}/Orbitron-Medium.ttf +0 -0
- /package/{plugins/font → font}/Orbitron-Regular.ttf +0 -0
- /package/{plugins/font → font}/PANGMENZHENGDAOBIAOTITI-1.TTF +0 -0
- /package/{plugins/font → font}/PingFang SC.ttf +0 -0
- /package/{plugins/font → font}/YouSheBiaoTiHei.ttf +0 -0
- /package/{plugins/font → font}/font.css +0 -0
- /package/{plugins/font → font}//345/255/227/351/255/20235/345/217/267-/347/273/217/345/205/270/351/233/205/351/273/221.ttf" +0 -0
- /package/lib/browse/{index.less → style/index.less} +0 -0
- /package/{dist/css/index.css → lib/button/style/index.less} +0 -0
- /package/lib/{dateTime → date-time}/index.js +0 -0
- /package/lib/{descriptions → descriptions-list/style}/index.less +0 -0
- /package/lib/{form/components → form-comp}/RenderComp.vue +0 -0
- /package/lib/{svgIcon → svg-icon}/index.js +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="TAntdTags" v-on="$listeners">
|
|
3
|
+
<Tooltip
|
|
4
|
+
v-for="(child, i) in displayTags"
|
|
5
|
+
:key="`tag-${i}-${child[valueKey]}`"
|
|
6
|
+
:title="child[labelKey]"
|
|
7
|
+
>
|
|
8
|
+
<Tag
|
|
9
|
+
closable
|
|
10
|
+
@close="() => tagsClose(child[valueKey])"
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
>
|
|
13
|
+
<span>{{ child[labelKey] }}</span>
|
|
14
|
+
</Tag>
|
|
15
|
+
</Tooltip>
|
|
16
|
+
|
|
17
|
+
<Tag v-if="hiddenCount > 0" color="blue">
|
|
18
|
+
+{{ hiddenCount }}
|
|
19
|
+
</Tag>
|
|
20
|
+
|
|
21
|
+
<span v-if="!selectChecked.length" class="placeholder">
|
|
22
|
+
{{ placeholder }}
|
|
23
|
+
</span>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import { Tag, Tooltip } from 'ant-design-vue'
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: 'ATagsInput',
|
|
32
|
+
components: { Tag, Tooltip },
|
|
33
|
+
model: {
|
|
34
|
+
prop: 'value',
|
|
35
|
+
event: 'update:tagsInput'
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
value: {
|
|
39
|
+
type: Array,
|
|
40
|
+
default: () => []
|
|
41
|
+
},
|
|
42
|
+
valueKey: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'value'
|
|
45
|
+
},
|
|
46
|
+
labelKey: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'label'
|
|
49
|
+
},
|
|
50
|
+
placeholder: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: '请点击进行选择'
|
|
53
|
+
},
|
|
54
|
+
maxDisplay: {
|
|
55
|
+
type: Number,
|
|
56
|
+
default: 0
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
computed: {
|
|
60
|
+
selectChecked: {
|
|
61
|
+
get() {
|
|
62
|
+
return this.value || []
|
|
63
|
+
},
|
|
64
|
+
set(val) {
|
|
65
|
+
this.$emit('update:tagsInput', val)
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
displayTags() {
|
|
69
|
+
return this.maxDisplay > 0
|
|
70
|
+
? this.selectChecked.slice(0, this.maxDisplay)
|
|
71
|
+
: this.selectChecked
|
|
72
|
+
},
|
|
73
|
+
hiddenCount() {
|
|
74
|
+
return this.maxDisplay > 0
|
|
75
|
+
? Math.max(0, this.selectChecked.length - this.maxDisplay)
|
|
76
|
+
: 0
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
methods: {
|
|
80
|
+
tagsClose(checked) {
|
|
81
|
+
const selectChecked = this.selectChecked.filter(
|
|
82
|
+
node => node[this.valueKey] !== checked
|
|
83
|
+
)
|
|
84
|
+
this.$emit('update:tagsInput', selectChecked)
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</script>
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ATimePicker">
|
|
3
|
+
<TimePicker
|
|
4
|
+
:format="format"
|
|
5
|
+
v-model="startTime"
|
|
6
|
+
placeholder="开始时间"
|
|
7
|
+
:value-format="valueFormat"
|
|
8
|
+
:disabled-hours="disabledHours"
|
|
9
|
+
:disabled-minutes="disabledMinutes"
|
|
10
|
+
:disabled-seconds="disabledSeconds"
|
|
11
|
+
@change="handleStartTimeChange"
|
|
12
|
+
/>
|
|
13
|
+
<span>~</span>
|
|
14
|
+
<TimePicker
|
|
15
|
+
:format="format"
|
|
16
|
+
v-model="endTime"
|
|
17
|
+
placeholder="结束时间"
|
|
18
|
+
:value-format="valueFormat"
|
|
19
|
+
:disabled-hours="() => getDisabledHours(startTime)"
|
|
20
|
+
:disabled-minutes="(h) => getDisabledMinutes(startTime, h)"
|
|
21
|
+
:disabled-seconds="(h, m) => getDisabledSeconds(startTime, h, m)"
|
|
22
|
+
@change="handleEndTimeChange"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import { TimePicker } from 'ant-design-vue'
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: 'ATimePicker',
|
|
32
|
+
components: {
|
|
33
|
+
TimePicker
|
|
34
|
+
},
|
|
35
|
+
model: {
|
|
36
|
+
prop: 'value',
|
|
37
|
+
event: 'update:timePicker'
|
|
38
|
+
},
|
|
39
|
+
props: {
|
|
40
|
+
value: {
|
|
41
|
+
type: Array,
|
|
42
|
+
default: () => []
|
|
43
|
+
},
|
|
44
|
+
format: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: 'HH:mm:ss'
|
|
47
|
+
},
|
|
48
|
+
valueFormat: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: 'HH:mm:ss'
|
|
51
|
+
},
|
|
52
|
+
// 是否允许跨天时间范围
|
|
53
|
+
allowCrossDay: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
data() {
|
|
59
|
+
return {
|
|
60
|
+
startTime: null,
|
|
61
|
+
endTime: null,
|
|
62
|
+
internalChange: false
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
watch: {
|
|
66
|
+
value: {
|
|
67
|
+
immediate: true,
|
|
68
|
+
handler(newVal) {
|
|
69
|
+
if (this.internalChange) {
|
|
70
|
+
this.internalChange = false
|
|
71
|
+
return
|
|
72
|
+
}
|
|
73
|
+
this.startTime = newVal[0] || null
|
|
74
|
+
this.endTime = newVal[1] || null
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
methods: {
|
|
79
|
+
handleStartTimeChange(time) {
|
|
80
|
+
this.startTime = time
|
|
81
|
+
this.emitChange()
|
|
82
|
+
},
|
|
83
|
+
handleEndTimeChange(time) {
|
|
84
|
+
this.endTime = time
|
|
85
|
+
this.emitChange()
|
|
86
|
+
},
|
|
87
|
+
emitChange() {
|
|
88
|
+
this.internalChange = true
|
|
89
|
+
const timeRange = this.startTime && this.endTime
|
|
90
|
+
? [this.startTime, this.endTime]
|
|
91
|
+
: []
|
|
92
|
+
this.$emit('update:timePicker', timeRange)
|
|
93
|
+
},
|
|
94
|
+
getDisabledHours(startTime) {
|
|
95
|
+
if (!startTime || !this.allowCrossDay) return []
|
|
96
|
+
const hours = []
|
|
97
|
+
const startHour = parseInt(startTime.split(':')[0])
|
|
98
|
+
for (let i = 0; i < startHour; i++) {
|
|
99
|
+
hours.push(i)
|
|
100
|
+
}
|
|
101
|
+
return hours
|
|
102
|
+
},
|
|
103
|
+
getDisabledMinutes(startTime, selectedHour) {
|
|
104
|
+
if (!startTime || !this.allowCrossDay) return []
|
|
105
|
+
const [startHour, startMinute] = startTime.split(':').map(Number)
|
|
106
|
+
if (selectedHour !== startHour) return []
|
|
107
|
+
|
|
108
|
+
const minutes = []
|
|
109
|
+
for (let i = 0; i < startMinute; i++) {
|
|
110
|
+
minutes.push(i)
|
|
111
|
+
}
|
|
112
|
+
return minutes
|
|
113
|
+
},
|
|
114
|
+
getDisabledSeconds(startTime, selectedHour, selectedMinute) {
|
|
115
|
+
if (!startTime || !this.allowCrossDay) return []
|
|
116
|
+
const [startHour, startMinute, startSecond] = startTime.split(':').map(Number)
|
|
117
|
+
if (selectedHour !== startHour || selectedMinute !== startMinute) return []
|
|
118
|
+
|
|
119
|
+
const seconds = []
|
|
120
|
+
for (let i = 0; i < startSecond; i++) {
|
|
121
|
+
seconds.push(i)
|
|
122
|
+
}
|
|
123
|
+
return seconds
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
</script>
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
import { Icon, Button, Upload } from 'ant-design-vue'
|
|
33
33
|
|
|
34
34
|
export default {
|
|
35
|
+
name: 'AUpload',
|
|
35
36
|
model: {
|
|
36
37
|
prop: 'value',
|
|
37
38
|
event: 'handleFileUpload'
|
|
@@ -164,20 +165,4 @@ export default {
|
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
|
-
</script>
|
|
168
|
-
<style lang="less" scoped>
|
|
169
|
-
.TAntdUpload {
|
|
170
|
-
.tips {
|
|
171
|
-
width: 100%;
|
|
172
|
-
display: flex;
|
|
173
|
-
justify-content: flex-end;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
:deep(.ant-upload) {
|
|
177
|
-
background: transparent;
|
|
178
|
-
}
|
|
179
|
-
:deep(.ant-upload-picture-card-wrapper) {
|
|
180
|
-
display: flex;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
</style>
|
|
168
|
+
</script>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* 下拉多选框(可支持树结构 */
|
|
2
|
+
import ACascaderMultiple from './ACascaderMultiple.vue'
|
|
3
|
+
/* 下拉单选及分页框 */
|
|
4
|
+
import ASelectCustom from './ASelectCustom.vue'
|
|
5
|
+
/* 单选框(可支持配置button形式 */
|
|
6
|
+
import ARadio from './ARadio.vue'
|
|
7
|
+
/* (已下需优化修改) */
|
|
8
|
+
/* tag多项展示框(需修改 */
|
|
9
|
+
import ATagsInput from './ATagsInput.vue'
|
|
10
|
+
/* 日期选择框 */
|
|
11
|
+
import ARangePicker from './ARangePicker.vue'
|
|
12
|
+
/* 时间区间框(只单进行一天中的时间段选择 */
|
|
13
|
+
import ATimePicker from './ATimePicker.vue'
|
|
14
|
+
/* 文件上传选择器 */
|
|
15
|
+
import AUpload from './AUpload.vue'
|
|
16
|
+
|
|
17
|
+
const components = {
|
|
18
|
+
ACascaderMultiple,
|
|
19
|
+
ASelectCustom,
|
|
20
|
+
ARadio,
|
|
21
|
+
ATagsInput,
|
|
22
|
+
ARangePicker,
|
|
23
|
+
ATimePicker,
|
|
24
|
+
AUpload
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const install = function (Vue) {
|
|
28
|
+
if (install.installed) return
|
|
29
|
+
Object.keys(components).forEach(component => {
|
|
30
|
+
Vue.component(components[component].name, components[component])
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
install,
|
|
36
|
+
...components
|
|
37
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
@import '~ant-design-vue/lib/style/themes/default.less';
|
|
2
|
+
@import '../../style/mixins.less';
|
|
3
|
+
|
|
4
|
+
.gb-ant-select-multiple-cascader {
|
|
5
|
+
.ant-select-dropdown-menu-item {
|
|
6
|
+
display: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cascader-content-item {
|
|
10
|
+
.checkbox-text {
|
|
11
|
+
padding-left: @padding-xs;
|
|
12
|
+
font-size: @font-size-sm;
|
|
13
|
+
color: @text-color;
|
|
14
|
+
cursor: default;
|
|
15
|
+
flex: 1;
|
|
16
|
+
text-align: left;
|
|
17
|
+
.ellipsis();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.cascader-content-item-active {
|
|
21
|
+
background-color: @item-active-bg;
|
|
22
|
+
|
|
23
|
+
.checkbox-text {
|
|
24
|
+
color: @primary-color;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ant-checkbox-wrapper {
|
|
29
|
+
.ant-checkbox-indeterminate {
|
|
30
|
+
.ant-checkbox-inner {
|
|
31
|
+
&:after {
|
|
32
|
+
background-color: @primary-color;
|
|
33
|
+
left: 48%;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ant-checkbox-inner {
|
|
39
|
+
background-color: @white;
|
|
40
|
+
border-color: @border-color-base;
|
|
41
|
+
.square(14px);
|
|
42
|
+
|
|
43
|
+
&:after {
|
|
44
|
+
border-color: @border-color-split;
|
|
45
|
+
left: 20%;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ant-select-dropdown--multiple {
|
|
52
|
+
min-width: auto !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.multiple-cascader-outside {
|
|
56
|
+
.ant-select-arrow {
|
|
57
|
+
transform: rotate(180deg);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ant-select-arrow {
|
|
62
|
+
margin-top: -@padding-xs;
|
|
63
|
+
transition: transform 0.3s;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ant-select-dropdown-menu-root {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.cascader-content-right {
|
|
71
|
+
.right-wrap {
|
|
72
|
+
.ant-checkbox {
|
|
73
|
+
top: 0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.gb-ant-select-multiple-cascader {
|
|
80
|
+
position: relative;
|
|
81
|
+
|
|
82
|
+
.cascader-content-wrap {
|
|
83
|
+
height: 100%;
|
|
84
|
+
|
|
85
|
+
.cascader-content-container {
|
|
86
|
+
.flex-layout();
|
|
87
|
+
|
|
88
|
+
.cascader-content-list {
|
|
89
|
+
list-style: none;
|
|
90
|
+
padding: 0;
|
|
91
|
+
margin: 0;
|
|
92
|
+
width: 153px;
|
|
93
|
+
box-sizing: border-box;
|
|
94
|
+
padding: @padding-sm 0;
|
|
95
|
+
max-height: 160px;
|
|
96
|
+
border-right: 1px solid @border-color-split;
|
|
97
|
+
.scrollbarStyle();
|
|
98
|
+
|
|
99
|
+
.cascader-content-item {
|
|
100
|
+
padding: @padding-xs - 2 @padding-md;
|
|
101
|
+
margin-top: @padding-xs - 2;
|
|
102
|
+
align-items: center;
|
|
103
|
+
line-height: 1;
|
|
104
|
+
.flex-layout();
|
|
105
|
+
|
|
106
|
+
&:hover {
|
|
107
|
+
background-color: @item-active-bg;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.cascader-not-content {
|
|
115
|
+
padding: @padding-xs + 2;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@import '~ant-design-vue/lib/style/themes/default.less';
|
|
2
|
+
@import '../../style/mixins.less';
|
|
3
|
+
|
|
4
|
+
.TAntdTags {
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
.layout(100%, auto);
|
|
7
|
+
|
|
8
|
+
.ant-tag {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
|
|
13
|
+
span {
|
|
14
|
+
display: inline-block;
|
|
15
|
+
max-width: 100px;
|
|
16
|
+
overflow-x: hidden;
|
|
17
|
+
.ellipsis();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.placeholder {
|
|
22
|
+
color: @input-placeholder-color;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./index.less');
|
package/lib/index.js
CHANGED
|
@@ -1,72 +1,87 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import FormComp
|
|
7
|
-
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import
|
|
1
|
+
// lib/index.js
|
|
2
|
+
import SvgIcon from './svg-icon'
|
|
3
|
+
// form
|
|
4
|
+
import Model from './model'
|
|
5
|
+
import Search from './search'
|
|
6
|
+
import FormComp from './form-comp'
|
|
7
|
+
// tree
|
|
8
|
+
import Tree from './tree'
|
|
9
|
+
import Directory from './directory'
|
|
10
|
+
// modal
|
|
11
|
+
import Modal from './modal'
|
|
12
|
+
// table
|
|
13
|
+
import Table from './table'
|
|
14
|
+
// time
|
|
15
|
+
import DateTime from './date-time'
|
|
16
|
+
// weather
|
|
12
17
|
import Weather from './weather'
|
|
13
|
-
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
// browse
|
|
19
|
+
import Browse from './browse'
|
|
20
|
+
// amap
|
|
21
|
+
import AmapDraw from './amap-draw'
|
|
22
|
+
import AmapComp from './amap-comp'
|
|
23
|
+
// button
|
|
24
|
+
import Button from './button'
|
|
25
|
+
// descriptions-list
|
|
26
|
+
import DescriptionsList from './descriptions-list'
|
|
27
|
+
// no-data
|
|
28
|
+
import { NoData, NoDataDirective } from './no-data'
|
|
29
|
+
|
|
30
|
+
// 新增指令导入 / 导出
|
|
31
|
+
export const Directives = {
|
|
32
|
+
'no-data': NoDataDirective
|
|
33
|
+
}
|
|
34
|
+
|
|
20
35
|
const components = {
|
|
21
|
-
|
|
36
|
+
SvgIcon,
|
|
22
37
|
Model,
|
|
23
38
|
Search,
|
|
24
39
|
FormComp,
|
|
25
|
-
Button,
|
|
26
|
-
Avatar,
|
|
27
|
-
SvgIcon,
|
|
28
40
|
Tree,
|
|
29
41
|
Directory,
|
|
42
|
+
Modal,
|
|
43
|
+
Table,
|
|
30
44
|
DateTime,
|
|
31
45
|
Weather,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Modal,
|
|
35
|
-
AmapComp,
|
|
46
|
+
Browse,
|
|
47
|
+
DescriptionsList,
|
|
36
48
|
AmapDraw,
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
AmapComp,
|
|
50
|
+
Button,
|
|
51
|
+
NoData
|
|
39
52
|
}
|
|
40
53
|
|
|
41
54
|
const install = function (Vue) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
55
|
+
if (install.installed) return
|
|
56
|
+
Object.keys(components).forEach(component => {
|
|
57
|
+
Vue.component(components[component].name, components[component])
|
|
58
|
+
})
|
|
59
|
+
// 指令注册
|
|
60
|
+
Object.keys(Directives).forEach(key => {
|
|
61
|
+
Vue.directive(key, Directives[key](Vue))
|
|
62
|
+
})
|
|
46
63
|
}
|
|
47
64
|
|
|
48
65
|
export {
|
|
49
|
-
|
|
66
|
+
SvgIcon,
|
|
50
67
|
Model,
|
|
51
|
-
Search,
|
|
68
|
+
Search,
|
|
52
69
|
FormComp,
|
|
53
|
-
Button,
|
|
54
|
-
Avatar,
|
|
55
|
-
SvgIcon,
|
|
56
70
|
Tree,
|
|
57
71
|
Directory,
|
|
72
|
+
Modal,
|
|
73
|
+
Table,
|
|
58
74
|
DateTime,
|
|
59
75
|
Weather,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
Modal,
|
|
63
|
-
AmapComp,
|
|
76
|
+
Browse,
|
|
77
|
+
DescriptionsList,
|
|
64
78
|
AmapDraw,
|
|
65
|
-
|
|
66
|
-
|
|
79
|
+
AmapComp,
|
|
80
|
+
Button,
|
|
81
|
+
NoData
|
|
67
82
|
}
|
|
68
83
|
|
|
69
|
-
export default {
|
|
70
|
-
install,
|
|
84
|
+
export default {
|
|
85
|
+
install,
|
|
71
86
|
...components
|
|
72
87
|
}
|
package/lib/modal/index.jsx
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'ant-design-vue/es/_util/vue-types'
|
|
2
|
-
|
|
3
2
|
import Modal from 'ant-design-vue/es/modal'
|
|
4
|
-
import './index.less'
|
|
5
3
|
|
|
6
4
|
const ModalProps = {
|
|
7
5
|
mode: PropTypes.string.def('small'),
|
|
@@ -9,10 +7,10 @@ const ModalProps = {
|
|
|
9
7
|
visible: PropTypes.bool.def(false),
|
|
10
8
|
cancelHandle: PropTypes.func,
|
|
11
9
|
attrs: PropTypes.object.def({})
|
|
12
|
-
}
|
|
10
|
+
}
|
|
13
11
|
|
|
14
12
|
const ModalComp = {
|
|
15
|
-
name: '
|
|
13
|
+
name: 'WModal',
|
|
16
14
|
props: ModalProps,
|
|
17
15
|
functional: true,
|
|
18
16
|
render(h, content) {
|
|
@@ -31,8 +29,8 @@ const ModalComp = {
|
|
|
31
29
|
props.mode == 'screen' && delete props.title
|
|
32
30
|
|
|
33
31
|
return (
|
|
34
|
-
<Modal
|
|
35
|
-
{...{ props, attrs, on: { cancel: props.cancelHandle } }}
|
|
32
|
+
<Modal
|
|
33
|
+
{...{ props, attrs, on: { cancel: props.cancelHandle } }}
|
|
36
34
|
wrapClassName={`AntModal__${props.mode}`}
|
|
37
35
|
>
|
|
38
36
|
{ children }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./index.less');
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '~ant-design-vue/lib/style/themes/default.less';
|
|
2
|
+
@import '../../style/mixins.less';
|
|
2
3
|
|
|
3
4
|
.AntModal__small {
|
|
4
5
|
.ant-modal {
|
|
5
6
|
.layout( 712px, 640px );
|
|
6
7
|
}
|
|
7
|
-
}
|
|
8
|
+
}
|
|
8
9
|
|
|
9
10
|
.AntModal__middle {
|
|
10
11
|
.ant-modal {
|
|
@@ -20,16 +21,16 @@
|
|
|
20
21
|
|
|
21
22
|
.AntModal__max {
|
|
22
23
|
.ant-modal {
|
|
23
|
-
.layout( 100%, 100% );
|
|
24
24
|
top: 0;
|
|
25
|
+
.layout();
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
.AntModal__screen {
|
|
29
30
|
.ant-modal {
|
|
30
|
-
.layout( 100%, 100% );
|
|
31
31
|
top: 0;
|
|
32
32
|
padding: 0;
|
|
33
|
+
.layout();
|
|
33
34
|
|
|
34
35
|
&-body {
|
|
35
36
|
padding: 0;
|
|
@@ -39,12 +40,10 @@
|
|
|
39
40
|
|
|
40
41
|
.ant-modal {
|
|
41
42
|
&-content {
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: column;
|
|
44
43
|
height: 100%;
|
|
44
|
+
.flex-layout(column);
|
|
45
45
|
}
|
|
46
46
|
&-body {
|
|
47
47
|
flex: 1;
|
|
48
|
-
// padding: 0;
|
|
49
48
|
}
|
|
50
49
|
}
|