tianheng-ui 0.0.47 → 0.0.50
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/README.md +11 -11
- package/lib/iconfont.svg +155 -155
- package/lib/index.js +3 -3
- package/lib/tianheng-ui.js +3 -3
- package/package.json +1 -1
- package/packages/dialog/index.vue +4 -1
- package/packages/formMaking/Container.vue +591 -601
- package/packages/formMaking/CusDialog.vue +134 -134
- package/packages/formMaking/FormConfig.vue +40 -40
- package/packages/formMaking/GenerateForm.vue +176 -184
- package/packages/formMaking/GenerateFormItem.vue +203 -17
- package/packages/formMaking/Upload/index.vue +572 -572
- package/packages/formMaking/WidgetConfig.vue +212 -34
- package/packages/formMaking/WidgetForm.vue +134 -268
- package/packages/formMaking/WidgetFormItem.vue +382 -30
- package/packages/formMaking/componentsConfig.js +159 -14
- package/packages/formMaking/generateCode.js +163 -155
- package/packages/formMaking/iconfont/demo.css +539 -539
- package/packages/formMaking/iconfont/demo_index.html +1159 -1159
- package/packages/formMaking/iconfont/iconfont.css +189 -189
- package/packages/formMaking/iconfont/iconfont.svg +155 -155
- package/packages/formMaking/index.js +77 -77
- package/packages/formMaking/lang/en-US.js +187 -187
- package/packages/formMaking/lang/zh-CN.js +187 -187
- package/packages/formMaking/styles/cover.scss +3 -3
- package/packages/formMaking/styles/index.scss +768 -746
- package/packages/formMaking/util/index.js +32 -32
- package/packages/formMaking/util/request.js +28 -28
- package/packages/table/search.vue +46 -37
@@ -1,33 +1,33 @@
|
|
1
|
-
export const loadJs = (url) => {
|
2
|
-
return new Promise((resolve, reject) => {
|
3
|
-
const script = document.createElement('script')
|
4
|
-
script.src = url
|
5
|
-
script.type = 'text/javascript'
|
6
|
-
document.body.appendChild(script)
|
7
|
-
script.onload = () => {
|
8
|
-
resolve()
|
9
|
-
}
|
10
|
-
})
|
11
|
-
}
|
12
|
-
|
13
|
-
export const loadCss = (url) => {
|
14
|
-
return new Promise((resolve, reject) => {
|
15
|
-
const link = document.createElement('link')
|
16
|
-
link.rel = 'stylesheet'
|
17
|
-
link.href = url
|
18
|
-
document.head.appendChild(link)
|
19
|
-
link.onload = () => {
|
20
|
-
resolve()
|
21
|
-
}
|
22
|
-
})
|
23
|
-
}
|
24
|
-
|
25
|
-
export const generateUUID = () => {
|
26
|
-
var d = new Date().getTime();
|
27
|
-
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
28
|
-
var r = (d + Math.random()*16)%16 | 0;
|
29
|
-
d = Math.floor(d/16);
|
30
|
-
return (c=='x' ? r : (r&0x7|0x8)).toString(16);
|
31
|
-
});
|
32
|
-
return uuid;
|
1
|
+
export const loadJs = (url) => {
|
2
|
+
return new Promise((resolve, reject) => {
|
3
|
+
const script = document.createElement('script')
|
4
|
+
script.src = url
|
5
|
+
script.type = 'text/javascript'
|
6
|
+
document.body.appendChild(script)
|
7
|
+
script.onload = () => {
|
8
|
+
resolve()
|
9
|
+
}
|
10
|
+
})
|
11
|
+
}
|
12
|
+
|
13
|
+
export const loadCss = (url) => {
|
14
|
+
return new Promise((resolve, reject) => {
|
15
|
+
const link = document.createElement('link')
|
16
|
+
link.rel = 'stylesheet'
|
17
|
+
link.href = url
|
18
|
+
document.head.appendChild(link)
|
19
|
+
link.onload = () => {
|
20
|
+
resolve()
|
21
|
+
}
|
22
|
+
})
|
23
|
+
}
|
24
|
+
|
25
|
+
export const generateUUID = () => {
|
26
|
+
var d = new Date().getTime();
|
27
|
+
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
28
|
+
var r = (d + Math.random()*16)%16 | 0;
|
29
|
+
d = Math.floor(d/16);
|
30
|
+
return (c=='x' ? r : (r&0x7|0x8)).toString(16);
|
31
|
+
});
|
32
|
+
return uuid;
|
33
33
|
}
|
@@ -1,28 +1,28 @@
|
|
1
|
-
import axios from 'axios'
|
2
|
-
|
3
|
-
const request = axios.create({
|
4
|
-
withCredentials: false
|
5
|
-
})
|
6
|
-
|
7
|
-
request.interceptors.request.use(
|
8
|
-
config => {
|
9
|
-
return config
|
10
|
-
},
|
11
|
-
error => {
|
12
|
-
console.log('error', error)
|
13
|
-
return Promise.reject(new Error(error).message)
|
14
|
-
}
|
15
|
-
)
|
16
|
-
|
17
|
-
request.interceptors.response.use(
|
18
|
-
response => {
|
19
|
-
console.log('.....', response)
|
20
|
-
return response.data
|
21
|
-
},
|
22
|
-
error => {
|
23
|
-
console.log('error', error)
|
24
|
-
return Promise.reject(new Error(error).message)
|
25
|
-
}
|
26
|
-
)
|
27
|
-
|
28
|
-
export default request
|
1
|
+
import axios from 'axios'
|
2
|
+
|
3
|
+
const request = axios.create({
|
4
|
+
withCredentials: false
|
5
|
+
})
|
6
|
+
|
7
|
+
request.interceptors.request.use(
|
8
|
+
config => {
|
9
|
+
return config
|
10
|
+
},
|
11
|
+
error => {
|
12
|
+
console.log('error', error)
|
13
|
+
return Promise.reject(new Error(error).message)
|
14
|
+
}
|
15
|
+
)
|
16
|
+
|
17
|
+
request.interceptors.response.use(
|
18
|
+
response => {
|
19
|
+
console.log('.....', response)
|
20
|
+
return response.data
|
21
|
+
},
|
22
|
+
error => {
|
23
|
+
console.log('error', error)
|
24
|
+
return Promise.reject(new Error(error).message)
|
25
|
+
}
|
26
|
+
)
|
27
|
+
|
28
|
+
export default request
|
@@ -1,40 +1,54 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="th-table-search">
|
3
|
-
<
|
4
|
-
|
5
|
-
|
3
|
+
<div
|
4
|
+
class="th-table-search-item"
|
5
|
+
v-for="(item, index) in options"
|
6
|
+
:key="index"
|
7
|
+
>
|
8
|
+
<span class="th-table-search-item-title">{{ item.options.name }}:</span>
|
9
|
+
<el-input
|
6
10
|
v-if="item.type === 'input'"
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
clearable
|
16
|
-
></el-input>
|
17
|
-
</div>
|
18
|
-
<div
|
19
|
-
class="th-table-search-item"
|
11
|
+
v-model="params[item.options.prop]"
|
12
|
+
:style="{ width: item.options.width + 'px' }"
|
13
|
+
:placeholder="item.options.placeholder || '请输入'"
|
14
|
+
:size="item.options.size"
|
15
|
+
:disabled="item.options.disabled"
|
16
|
+
clearable
|
17
|
+
></el-input>
|
18
|
+
<el-date-picker
|
20
19
|
v-if="item.type === 'date'"
|
21
|
-
|
20
|
+
v-model="params[item.options.prop]"
|
21
|
+
:style="{ width: item.options.width + 'px' }"
|
22
|
+
:type="item.options.dateType || 'date'"
|
23
|
+
:format="item.options.format"
|
24
|
+
:value-format="item.options.valueFormat"
|
25
|
+
:size="item.options.size"
|
26
|
+
range-separator="至"
|
27
|
+
start-placeholder="开始日期"
|
28
|
+
end-placeholder="结束日期"
|
22
29
|
>
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
</el-date-picker>
|
31
|
+
<el-select
|
32
|
+
v-if="item.type === 'select'"
|
33
|
+
v-model="params[item.options.prop]"
|
34
|
+
:style="{ width: item.options.width + 'px' }"
|
35
|
+
:placeholder="item.options.placeholder || '请选择'"
|
36
|
+
:size="item.options.size"
|
37
|
+
:multiple="item.options.multiple"
|
38
|
+
:multiple-limit="item.options.multipleLimit"
|
39
|
+
:filterable="item.options.filterable"
|
40
|
+
:disabled="item.options.disabled"
|
41
|
+
clearable
|
42
|
+
>
|
43
|
+
<el-option
|
44
|
+
v-for="option in item.options.options"
|
45
|
+
:key="option.value"
|
46
|
+
:label="option.label"
|
47
|
+
:value="option.value"
|
34
48
|
>
|
35
|
-
</el-
|
36
|
-
</
|
37
|
-
</
|
49
|
+
</el-option>
|
50
|
+
</el-select>
|
51
|
+
</div>
|
38
52
|
|
39
53
|
<el-button type="primary" icon="el-icon-search" plain @click="doSearch"
|
40
54
|
>查询</el-button
|
@@ -94,15 +108,10 @@ export default {
|
|
94
108
|
|
95
109
|
<style lang="less" scoped>
|
96
110
|
.th-table-search {
|
97
|
-
|
98
|
-
align-items: center;
|
99
|
-
margin-bottom: 20px;
|
111
|
+
margin-bottom: 10px;
|
100
112
|
&-item {
|
101
113
|
display: inline-block;
|
102
114
|
margin-right: 15px;
|
103
115
|
}
|
104
|
-
.th-table-search-item:last-child {
|
105
|
-
margin-right: 20px !important;
|
106
|
-
}
|
107
116
|
}
|
108
117
|
</style>
|