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
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { FormModel } from 'ant-design-vue'
|
|
2
2
|
import { getFormWidth, setFormItemRule, setFormItem } from './utils/render'
|
|
3
3
|
|
|
4
|
-
import './style/Model.less'
|
|
5
|
-
|
|
6
4
|
export default {
|
|
7
|
-
name: '
|
|
5
|
+
name: 'WModel',
|
|
8
6
|
model: {
|
|
9
7
|
prop: 'value',
|
|
10
8
|
event: 'Change:Model'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./index.less');
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
@import '../../form-comp/style/index.less';
|
|
1
2
|
|
|
2
3
|
.FormModel {
|
|
3
4
|
display: flex;
|
|
4
|
-
flex-wrap: wrap;
|
|
5
|
+
flex-wrap: wrap;
|
|
5
6
|
|
|
6
7
|
&__LabelTips {
|
|
7
8
|
width: 100%;
|
|
@@ -10,37 +11,36 @@
|
|
|
10
11
|
.ant-select,
|
|
11
12
|
.ant-input-number,
|
|
12
13
|
.ant-calendar-picker {
|
|
13
|
-
width: 100
|
|
14
|
+
width: 100%;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
.ant-form-item-children {
|
|
17
18
|
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
+
align-items: center;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
.FormLine {
|
|
22
23
|
display: flex;
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
.ant-form-item-label {
|
|
25
26
|
width: 85px;
|
|
26
27
|
text-align: right;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
.ant-form-item-control-wrapper {
|
|
30
31
|
width: calc(100% - 85px);
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
.FormLineVertical {
|
|
35
|
-
|
|
36
|
-
flex-direction: column;
|
|
36
|
+
.flex-layout(column);
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
text-align: left;
|
|
38
|
+
.ant-form-item-label {
|
|
40
39
|
width: 100%;
|
|
40
|
+
text-align: left;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
.ant-form-item-control-wrapper {
|
|
44
44
|
width: 100%;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import NoData from './index.vue'
|
|
2
|
+
|
|
3
|
+
// <!-- 基础用法 -->
|
|
4
|
+
// <div v-no-data="list"></div>
|
|
5
|
+
// <!-- 指定描述内容 -->
|
|
6
|
+
// <div v-no-data:暂无="list"></div>
|
|
7
|
+
// <!-- 指定图标类型 -->
|
|
8
|
+
// <div v-no-data.error="list"></div>
|
|
9
|
+
// <!-- 既指定描述内容, 也指定图标类型 -->
|
|
10
|
+
// <div v-no-data:暂无数据.error="list"></div>
|
|
11
|
+
|
|
12
|
+
const isEmpty = value => {
|
|
13
|
+
return value === null ||
|
|
14
|
+
value === undefined ||
|
|
15
|
+
(Array.isArray(value) && !value.length) ||
|
|
16
|
+
(typeof value === 'object' && !Object.keys(value).length)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default function(Vue) {
|
|
20
|
+
const createNoDataInstance = (el, binding) => {
|
|
21
|
+
const modifierType = Object.keys(binding.modifiers)[0] || 'zanwushuju'
|
|
22
|
+
|
|
23
|
+
const instance = new (Vue.extend(NoData))({
|
|
24
|
+
propsData: {
|
|
25
|
+
text: binding.arg || '暂无数据',
|
|
26
|
+
type: modifierType
|
|
27
|
+
}
|
|
28
|
+
}).$mount()
|
|
29
|
+
|
|
30
|
+
el._noDataInstance = instance
|
|
31
|
+
el.parentNode.insertBefore(instance.$el, el)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const removeNoDataInstance = (el) => {
|
|
35
|
+
if (el._noDataInstance) {
|
|
36
|
+
el.parentNode.removeChild(el._noDataInstance.$el)
|
|
37
|
+
el._noDataInstance.$destroy()
|
|
38
|
+
el._noDataInstance = null
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
inserted(el, binding) {
|
|
44
|
+
if (isEmpty(binding.value)) {
|
|
45
|
+
createNoDataInstance(el, binding)
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
update(el, binding) {
|
|
49
|
+
if (binding.oldValue !== binding.value) {
|
|
50
|
+
if (isEmpty(binding.value)) {
|
|
51
|
+
if (!el._noDataInstance) {
|
|
52
|
+
createNoDataInstance(el, binding)
|
|
53
|
+
} else {
|
|
54
|
+
const modifierType = Object.keys(binding.modifiers)[0] || 'zanwushuju'
|
|
55
|
+
el._noDataInstance.text = binding.arg || '暂无数据'
|
|
56
|
+
el._noDataInstance.type = modifierType
|
|
57
|
+
}
|
|
58
|
+
} else {
|
|
59
|
+
removeNoDataInstance(el)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
unbind: removeNoDataInstance
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// 主入口文件 index.js
|
|
2
|
+
import NoData from './index.vue'
|
|
3
|
+
import NoDataDirective from './directive'
|
|
4
|
+
|
|
5
|
+
const install = (Vue) => {
|
|
6
|
+
Vue.component(NoData.name, NoData)
|
|
7
|
+
Vue.directive('no-data', NoDataDirective(Vue))
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// 全量导出
|
|
11
|
+
export default {
|
|
12
|
+
install,
|
|
13
|
+
component: NoData,
|
|
14
|
+
directive: NoDataDirective
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// 单独导出
|
|
18
|
+
export {
|
|
19
|
+
NoData,
|
|
20
|
+
NoDataDirective
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Empty
|
|
3
|
+
:description="text"
|
|
4
|
+
class="no-data-container"
|
|
5
|
+
>
|
|
6
|
+
<div slot="image">
|
|
7
|
+
<IconFont :type="`icon-${type}`" />
|
|
8
|
+
</div>
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</Empty>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
|
|
15
|
+
import { Icon, Empty } from 'ant-design-vue'
|
|
16
|
+
|
|
17
|
+
const IconFont = Icon.createFromIconfontCN({
|
|
18
|
+
scriptUrl: '//at.alicdn.com/t/c/font_4641025_6uucxf9fvta.js'
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: 'NoData',
|
|
23
|
+
components: { Empty, IconFont },
|
|
24
|
+
props: {
|
|
25
|
+
text: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: '暂无数据'
|
|
28
|
+
},
|
|
29
|
+
type: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: 'zanwushuju'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./index.less');
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
<script>
|
|
31
31
|
|
|
32
|
-
import resetFields from '
|
|
33
|
-
import RenderComp from '
|
|
32
|
+
import resetFields from '../model/utils/resetFields'
|
|
33
|
+
import RenderComp from '../form-comp/RenderComp.vue'
|
|
34
34
|
import { Icon, Button, FormModel } from 'ant-design-vue'
|
|
35
35
|
|
|
36
36
|
export default {
|
|
37
|
-
name: '
|
|
37
|
+
name: 'WSearch',
|
|
38
38
|
components: {
|
|
39
39
|
Icon,
|
|
40
40
|
Button,
|
|
@@ -154,6 +154,3 @@ export default {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
</script>
|
|
157
|
-
<style lang="less" scoped>
|
|
158
|
-
@import url('./style/Search.less');
|
|
159
|
-
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./index.less');
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
@import url('../../style/mixins.less');
|
|
1
|
+
@import '../../form-comp/style/index.less';
|
|
3
2
|
|
|
4
3
|
.WebComponentFormSearch {
|
|
5
4
|
gap: 16px 0;
|
|
@@ -9,20 +8,20 @@
|
|
|
9
8
|
display: inline-flex;
|
|
10
9
|
margin-right: unset;
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
.ant-form-item-label {
|
|
13
12
|
min-width: 70px;
|
|
14
13
|
max-width: 100px;
|
|
15
14
|
text-align: right;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
.ant-form-item-control-wrapper {
|
|
19
18
|
flex: 1;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
width: 100
|
|
21
|
+
.ant-select,
|
|
22
|
+
.ant-input-number,
|
|
23
|
+
.ant-calendar-picker {
|
|
24
|
+
width: 100%;
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
|
package/lib/style/mixins.less
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<script>
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
name: "
|
|
12
|
+
name: "SvgIcon",
|
|
13
13
|
props: {
|
|
14
14
|
iconClass: {
|
|
15
15
|
type: String,
|
|
@@ -59,19 +59,3 @@ export default {
|
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
</script>
|
|
62
|
-
|
|
63
|
-
<style scoped lang="less">
|
|
64
|
-
.svg-icon {
|
|
65
|
-
width: 90px;
|
|
66
|
-
height: 90px;
|
|
67
|
-
vertical-align: -0.15em;
|
|
68
|
-
fill: currentColor;
|
|
69
|
-
overflow: hidden;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.svg-external-icon {
|
|
73
|
-
background-color: currentColor;
|
|
74
|
-
mask-size: cover;
|
|
75
|
-
display: inline-block;
|
|
76
|
-
}
|
|
77
|
-
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./index.less');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@import '~ant-design-vue/lib/style/themes/default.less';
|
|
2
|
+
@import '../../style/mixins.less';
|
|
3
|
+
|
|
4
|
+
.svg-icon {
|
|
5
|
+
vertical-align: -0.15em;
|
|
6
|
+
fill: currentColor;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
.square(24px);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.svg-external-icon {
|
|
12
|
+
background-color: currentColor;
|
|
13
|
+
mask-size: cover;
|
|
14
|
+
display: inline-block;
|
|
15
|
+
}
|
package/lib/table/index.vue
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
v-on="$listeners"
|
|
13
13
|
v-bind="setAttrs"
|
|
14
14
|
class="WebComponentTable__List"
|
|
15
|
-
>
|
|
15
|
+
>
|
|
16
16
|
<!-- 下次更改一下title的传递方式 -->
|
|
17
17
|
<div class="WebComponentTable__List__Title" ref="TableListTitle" slot="title">
|
|
18
18
|
<slot name="ATableTitle" />
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<template #customRender="text, record, i, column">
|
|
27
27
|
<slot :name="column.dataIndex" :customProps="record" :text="text" :index="i" />
|
|
28
28
|
</template>
|
|
29
|
-
</Table>
|
|
29
|
+
</Table>
|
|
30
30
|
|
|
31
31
|
<div class="WebComponentTable__Pagination" ref="TablePagination">
|
|
32
32
|
<slot name="ATablePagination">
|
|
@@ -62,7 +62,7 @@ export default {
|
|
|
62
62
|
Table,
|
|
63
63
|
Pagination
|
|
64
64
|
},
|
|
65
|
-
name: '
|
|
65
|
+
name: 'WTable',
|
|
66
66
|
data() {
|
|
67
67
|
return {
|
|
68
68
|
pagination: {
|
|
@@ -210,8 +210,4 @@ export default {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
</script>
|
|
214
|
-
|
|
215
|
-
<style lang="less" scoped>
|
|
216
|
-
@import url('./style/index.less');
|
|
217
|
-
</style>
|
|
213
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./index.less');
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
/* 混入样式 */
|
|
2
|
-
@import url('../../style/mixins.less');
|
|
3
1
|
@import '~ant-design-vue/lib/style/themes/default.less';
|
|
2
|
+
@import '../../style/mixins.less';
|
|
4
3
|
|
|
5
4
|
.WebComponentTable {
|
|
6
5
|
.layout();
|
|
7
|
-
.flex-layout(
|
|
8
|
-
|
|
9
|
-
&__Head {
|
|
10
|
-
|
|
11
|
-
}
|
|
6
|
+
.flex-layout(column, @padding-md 0);
|
|
12
7
|
|
|
13
8
|
&__List {
|
|
9
|
+
flex: 1;
|
|
14
10
|
|
|
15
11
|
&__Title {
|
|
16
12
|
display: flex;
|
|
@@ -18,9 +14,8 @@
|
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
&__Empty {
|
|
21
|
-
gap: 16px 0;
|
|
22
17
|
height: 120px;
|
|
23
|
-
.flex-mixins(
|
|
18
|
+
.flex-mixins(column, @gap: @padding-md 0);
|
|
24
19
|
|
|
25
20
|
i {
|
|
26
21
|
font-size: 80px;
|
|
@@ -31,20 +26,24 @@
|
|
|
31
26
|
}
|
|
32
27
|
}
|
|
33
28
|
|
|
34
|
-
|
|
29
|
+
.ant-table-title {
|
|
35
30
|
padding: 0;
|
|
36
31
|
margin-bottom: @padding-sm;
|
|
37
32
|
}
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
.ant-table-header {
|
|
35
|
+
overflow-y: hidden !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ant-table-body {
|
|
40
39
|
.scrollbarStyle();
|
|
41
|
-
}
|
|
40
|
+
}
|
|
42
41
|
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
&__Pagination {
|
|
46
45
|
display: flex;
|
|
47
|
-
justify-content:
|
|
46
|
+
justify-content: center;
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
}
|
package/lib/tree/index.js
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
/* 查询tree穿梭 */
|
|
2
|
-
import Tree from './
|
|
3
|
-
/* treeMenu树形菜单目录 */
|
|
4
|
-
import Directory from './Directory.js'
|
|
2
|
+
import Tree from './index.vue'
|
|
5
3
|
|
|
6
4
|
Tree.install = function (Vue) {
|
|
7
5
|
Vue.component(Tree.name, Tree)
|
|
8
6
|
}
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
Vue.component(Directory.name, Directory)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
Tree,
|
|
16
|
-
Directory
|
|
17
|
-
}
|
|
8
|
+
export default Tree
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script>
|
|
39
|
-
import { Tree, Checkbox, Input } from 'ant-design-vue'
|
|
40
39
|
|
|
40
|
+
import { Tree, Checkbox, Input } from 'ant-design-vue'
|
|
41
41
|
import { getTreeKey, findCheckNodes } from '../../utils/Tree'
|
|
42
42
|
|
|
43
43
|
export default {
|
|
44
|
-
name: '
|
|
44
|
+
name: 'WTree',
|
|
45
45
|
components: {
|
|
46
46
|
Tree,
|
|
47
47
|
InputSearch: Input.Search,
|
|
@@ -176,6 +176,3 @@ export default {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
</script>
|
|
179
|
-
<style lang="less" scoped>
|
|
180
|
-
@import url('./style/Tree.less');
|
|
181
|
-
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./index.less');
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
@import '~ant-design-vue/lib/style/themes/default.less';
|
|
2
2
|
@import '../../style/mixins.less';
|
|
3
|
-
@import 'ant-design-vue/lib/style/themes/default.less';
|
|
4
3
|
|
|
5
4
|
.publicTreeCheck {
|
|
6
5
|
display: flex;
|
|
@@ -17,6 +16,7 @@
|
|
|
17
16
|
|
|
18
17
|
.TreeSelect {
|
|
19
18
|
border-right: 1px solid @border-color-split;
|
|
19
|
+
box-sizing: border-box;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.TreeReveal {
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
|
|
36
36
|
.TreeListPage {
|
|
37
37
|
.scrollbarStyle();
|
|
38
|
-
|
|
38
|
+
.ant-checkbox-group {
|
|
39
39
|
width: 100%;
|
|
40
40
|
.flex-layout( column );
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
.ant-checkbox-group-item {
|
|
43
43
|
height: 40px;
|
|
44
44
|
display: flex;
|
|
45
45
|
align-items: center;
|
package/lib/weather/index.vue
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<script>
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
name: '
|
|
12
|
+
name: 'Weather',
|
|
13
13
|
props: {
|
|
14
14
|
/** 当前城市高德code编码 */
|
|
15
15
|
adCode: String,
|
|
@@ -48,11 +48,3 @@ export default {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
</script>
|
|
51
|
-
|
|
52
|
-
<style scoped lang="less">
|
|
53
|
-
.weather {
|
|
54
|
-
display: flex;
|
|
55
|
-
gap: 0 14px;
|
|
56
|
-
font-size: 16px;
|
|
57
|
-
}
|
|
58
|
-
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./index.less');
|
package/package.json
CHANGED
|
@@ -1,66 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-component-gallery",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.2",
|
|
4
|
+
"description": "基础vue、antdvue、less实现的私有组件库",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
8
|
-
"
|
|
8
|
+
"extensions",
|
|
9
|
+
"font",
|
|
9
10
|
"lib",
|
|
10
|
-
"utils"
|
|
11
|
-
"method"
|
|
11
|
+
"utils"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
+
"build": "webpack --config ./webpack.config.js",
|
|
14
15
|
"serve": "vue-cli-service serve",
|
|
15
|
-
"
|
|
16
|
-
"lint": "vue-cli-service lint",
|
|
17
|
-
"build:js": "webpack --config ./webpack.config.js",
|
|
18
|
-
"build:css": "npx gulp",
|
|
19
|
-
"build:lib": "npm run build:js && npm run build:css"
|
|
16
|
+
"lint": "vue-cli-service lint"
|
|
20
17
|
},
|
|
21
18
|
"peerDependencies": {
|
|
22
|
-
"@amap/amap-jsapi-loader": "^1.0.1"
|
|
23
|
-
"ant-design-vue": "1.7.8",
|
|
24
|
-
"vue": "^2.6.14"
|
|
19
|
+
"@amap/amap-jsapi-loader": "^1.0.1"
|
|
25
20
|
},
|
|
26
21
|
"dependencies": {
|
|
27
|
-
"
|
|
28
|
-
"
|
|
22
|
+
"core-js": "^3.8.3",
|
|
23
|
+
"vue": "^2.6.14"
|
|
29
24
|
},
|
|
30
25
|
"devDependencies": {
|
|
31
|
-
"@
|
|
26
|
+
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
27
|
+
"@babel/core": "^7.28.0",
|
|
32
28
|
"@babel/eslint-parser": "^7.12.16",
|
|
33
|
-
"@
|
|
29
|
+
"@babel/preset-env": "^7.28.0",
|
|
30
|
+
"@vue/babel-preset-jsx": "^1.4.0",
|
|
34
31
|
"@vue/cli-plugin-babel": "~5.0.0",
|
|
35
32
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
|
36
|
-
"@vue/cli-plugin-router": "~5.0.0",
|
|
37
|
-
"@vue/cli-plugin-vuex": "~5.0.0",
|
|
38
33
|
"@vue/cli-service": "~5.0.0",
|
|
39
34
|
"ant-design-vue": "1.7.8",
|
|
40
35
|
"babel-loader": "^9.1.3",
|
|
41
|
-
"babel-plugin-import": "^1.13.8",
|
|
42
36
|
"clean-webpack-plugin": "^4.0.0",
|
|
43
|
-
"css-loader": "^5.2.6",
|
|
44
37
|
"eslint": "^7.32.0",
|
|
45
38
|
"eslint-plugin-vue": "^8.0.3",
|
|
46
|
-
"gulp": "^5.0.0",
|
|
47
|
-
"gulp-clean-css": "^4.3.0",
|
|
48
|
-
"gulp-less": "^5.0.0",
|
|
49
39
|
"less": "^3.13.1",
|
|
50
40
|
"less-loader": "^10.0.0",
|
|
51
41
|
"mini-css-extract-plugin": "2.4.5",
|
|
52
|
-
"
|
|
53
|
-
"style-loader": "^3.0.0",
|
|
54
|
-
"style-resources-loader": "^1.5.0",
|
|
55
|
-
"through2": "^4.0.2",
|
|
56
|
-
"url-loader": "^4.1.1",
|
|
57
|
-
"vue": "^2.6.14",
|
|
58
|
-
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
42
|
+
"terser-webpack-plugin": "^5.3.14",
|
|
59
43
|
"vue-loader": "^15.10.1",
|
|
60
44
|
"vue-template-compiler": "^2.6.14",
|
|
61
|
-
"
|
|
62
|
-
"webpack-cli": "^5.1.4",
|
|
63
|
-
"webpack-merge": "5.0.0"
|
|
45
|
+
"webpack-cli": "^6.0.1"
|
|
64
46
|
},
|
|
65
47
|
"eslintConfig": {
|
|
66
48
|
"root": true,
|