bri-components 1.0.3 → 1.1.0
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/lib/0.bri-components.min.js +1 -1
- package/lib/1.bri-components.min.js +1 -1
- package/lib/2.bri-components.min.js +1 -1
- package/lib/3.bri-components.min.js +1 -1
- package/lib/4.bri-components.min.js +1 -1
- package/lib/5.bri-components.min.js +1 -1
- package/lib/6.bri-components.min.js +1 -1
- package/lib/7.bri-components.min.js +1 -0
- package/lib/8.bri-components.min.js +1 -0
- package/lib/9.bri-components.min.js +1 -0
- package/lib/bri-components.min.js +16 -6
- package/lib/styles/bundle.css +0 -2
- package/package.json +121 -120
- package/src/components/controls/base/BriLabels.vue +117 -0
- package/src/components/controls/base/DshCascader.vue +23 -38
- package/src/components/controls/base/DshCascaderMultiple.vue +1 -1
- package/src/components/controls/base/DshCheckbox.vue +14 -4
- package/src/components/controls/base/DshCoordinates.vue +5 -9
- package/src/components/controls/base/DshDate.vue +10 -34
- package/src/components/controls/base/DshDivider.vue +1 -1
- package/src/components/controls/base/DshEditor.vue +52 -44
- package/src/components/controls/base/DshInput.vue +18 -45
- package/src/components/controls/base/DshLabels.vue +8 -4
- package/src/components/controls/base/DshNumber/DshNumber.vue +6 -20
- package/src/components/controls/base/DshNumberange.vue +1 -1
- package/src/components/controls/base/DshPackage.vue +7 -1
- package/src/components/controls/base/DshSelect.vue +15 -5
- package/src/components/controls/base/DshSwitch.vue +2 -6
- package/src/components/controls/base/YSerialNumber.vue +0 -1
- package/src/components/controls/base/ZUpload/index.vue +16 -10
- package/src/components/controls/base/ZUpload/upload-list.vue +17 -12
- package/src/components/controls/base/ZUpload/uploadMixin.js +1 -5
- package/src/components/controls/base/controlShow.vue +52 -0
- package/src/components/controls/base/textMultiple/DshTextMultiple.vue +1 -1
- package/src/components/controls/controlMap.js +4 -0
- package/src/components/controls/controlMixin.js +21 -20
- package/src/components/controls/senior/cascaderTable.vue +188 -0
- package/src/components/controls/senior/flatTable.vue +131 -0
- package/src/components/form/DshForm.vue +0 -5
- package/src/components/list/BriFlatTable.vue +430 -0
- package/src/components/list/BriTable.vue +184 -0
- package/src/components/list/DshBox/DshPanel.vue +63 -79
- package/src/components/list/DshBox/DshTable.vue +29 -39
- package/src/components/list/DshCascaderTable.vue +6 -11
- package/src/components/list/DshFlatTable.vue +9 -17
- package/src/components/other/BriTransfer.vue +71 -0
- package/src/components/small/BriButton.vue +65 -0
- package/src/components/small/BriTree.vue +42 -0
- package/src/components/small/Ctooltip.vue +1 -1
- package/src/components/small/DshButtons.vue +12 -42
- package/src/components/unit/DshFormItem.vue +11 -6
- package/src/components/unit/DshUnit.vue +1 -3
- package/src/components/unit/unitMixin.js +4 -1
- package/src/index.js +24 -4
- package/src/styles/bundle.css +0 -2
- package/src/styles/common/common.less +2 -2
- package/src/styles/common/control.less +53 -0
- package/src/styles/common/index.less +1 -0
- package/src/styles/components/controls/BriLabels.less +23 -0
- package/src/styles/components/controls/DshCascader.less +3 -3
- package/src/styles/components/controls/DshCheckbox.less +1 -1
- package/src/styles/components/controls/DshCoordinates.less +3 -3
- package/src/styles/components/controls/DshDate.less +54 -0
- package/src/styles/components/controls/DshDaterange.less +1 -1
- package/src/styles/components/controls/DshEditor.less +27 -9
- package/src/styles/components/controls/DshInput.less +5 -5
- package/src/styles/components/controls/DshLabels.less +1 -1
- package/src/styles/components/controls/DshSelect.less +46 -30
- package/src/styles/components/controls/ZUpload.less +82 -91
- package/src/styles/components/controls/cascaderTable.less +33 -0
- package/src/styles/components/controls/controlShow.less +12 -0
- package/src/styles/components/controls/flatTable.less +33 -0
- package/src/styles/components/form/DshAdvSearchForm.less +6 -6
- package/src/styles/components/index.less +10 -0
- package/src/styles/components/list/BriFlatTable.less +8 -0
- package/src/styles/components/list/BriTable.less +155 -0
- package/src/styles/components/list/DshFlatTable.less +3 -8
- package/src/styles/components/list/evTable.less +1 -1
- package/src/styles/components/other/BriTransfer.less +65 -0
- package/src/styles/components/other/DshEditPanel.less +2 -2
- package/src/styles/components/other/DshMenuNav.less +5 -5
- package/src/styles/components/other/ZGantt.less +5 -5
- package/src/styles/components/small/BriButton.less +259 -0
- package/src/styles/components/small/BriTree.less +57 -0
- package/src/styles/components/small/Ctooltip.less +14 -0
- package/src/styles/components/small/DshButtons.less +1 -1
- package/src/styles/components/small/DshControlDefine.less +2 -2
- package/src/styles/components/small/DshDropdown.less +1 -1
- package/src/styles/components/small/DshPage.less +1 -1
- package/src/styles/components/small/DshTabs.less +2 -2
- package/src/styles/components/unit/DshFormItem.less +5 -6
- package/src/styles/index.less +1 -5
- package/src/styles/plugin/easytable.less +22 -0
- package/src/styles/plugin/index.less +2 -0
- package/src/styles/plugin/iview.less +33 -0
- package/src/styles/variables.less +71 -88
- package/src/utils/table.js +72 -978
- package/src/styles/define.less +0 -374
- package/src/styles/view_reset.less +0 -452
package/lib/styles/bundle.css
CHANGED
package/package.json
CHANGED
|
@@ -1,122 +1,123 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
2
|
+
"name": "bri-components",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"author": "dengshanghui",
|
|
5
|
+
"description": "a component lib for vue project",
|
|
6
|
+
"main": "src/index.js",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"editor",
|
|
9
|
+
"tinymce"
|
|
10
|
+
],
|
|
11
|
+
"files": [
|
|
12
|
+
"lib",
|
|
13
|
+
"src"
|
|
14
|
+
],
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"directories": {
|
|
17
|
+
"test": "test"
|
|
18
|
+
},
|
|
19
|
+
"private": false,
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
|
|
22
|
+
"start": "npm run dev",
|
|
23
|
+
"unit": "jest --config test/unit/jest.conf.js --coverage",
|
|
24
|
+
"e2e": "node test/e2e/runner.js",
|
|
25
|
+
"test": "npm run unit && npm run e2e",
|
|
26
|
+
"lint": "eslint --fix --ext .js,.vue src example build config",
|
|
27
|
+
"build": "node build/build.js",
|
|
28
|
+
"lib:style": "gulp --gulpfile build/build-style.js",
|
|
29
|
+
"lib:dev": "webpack --config build/webpack.lib.dev.config.js",
|
|
30
|
+
"lib:prod": "webpack --config build/webpack.lib.prod.config.js"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"axios": "^0.23.0",
|
|
34
|
+
"bri-datas": "^1.0.8-0",
|
|
35
|
+
"jshint": "^2.12.0",
|
|
36
|
+
"minio": "^7.0.26",
|
|
37
|
+
"stream": "^0.0.2",
|
|
38
|
+
"view-design": "^4.6.0",
|
|
39
|
+
"viewerjs": "^1.10.2",
|
|
40
|
+
"vue-codemirror": "^4.0.6",
|
|
41
|
+
"vue-cropperjs": "^4.1.0",
|
|
42
|
+
"vue-easytable": "^2.21.9",
|
|
43
|
+
"vuedraggable": "^2.24.1",
|
|
44
|
+
"wangeditor": "^4.7.5"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"autoprefixer": "^7.1.2",
|
|
48
|
+
"babel-core": "^6.22.1",
|
|
49
|
+
"babel-eslint": "^8.2.1",
|
|
50
|
+
"babel-helper-vue-jsx-merge-props": "^2.0.3",
|
|
51
|
+
"babel-jest": "^21.0.2",
|
|
52
|
+
"babel-loader": "^7.1.1",
|
|
53
|
+
"babel-plugin-dynamic-import-node": "^1.2.0",
|
|
54
|
+
"babel-plugin-syntax-jsx": "^6.18.0",
|
|
55
|
+
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
|
|
56
|
+
"babel-plugin-transform-runtime": "^6.22.0",
|
|
57
|
+
"babel-plugin-transform-vue-jsx": "^3.5.0",
|
|
58
|
+
"babel-preset-env": "^1.3.2",
|
|
59
|
+
"babel-preset-stage-2": "^6.22.0",
|
|
60
|
+
"babel-register": "^6.22.0",
|
|
61
|
+
"chalk": "^2.0.1",
|
|
62
|
+
"chromedriver": "^2.27.2",
|
|
63
|
+
"compression-webpack-plugin": "^1.1.12",
|
|
64
|
+
"copy-webpack-plugin": "^4.0.1",
|
|
65
|
+
"cross-spawn": "^5.0.1",
|
|
66
|
+
"css": "^3.0.0",
|
|
67
|
+
"css-loader": "^0.28.11",
|
|
68
|
+
"eslint": "^4.15.0",
|
|
69
|
+
"eslint-config-standard": "^10.2.1",
|
|
70
|
+
"eslint-friendly-formatter": "^3.0.0",
|
|
71
|
+
"eslint-loader": "^1.7.1",
|
|
72
|
+
"eslint-plugin-import": "^2.22.1",
|
|
73
|
+
"eslint-plugin-node": "^5.2.0",
|
|
74
|
+
"eslint-plugin-promise": "^3.4.0",
|
|
75
|
+
"eslint-plugin-standard": "^3.0.1",
|
|
76
|
+
"eslint-plugin-vue": "^4.0.0",
|
|
77
|
+
"extract-text-webpack-plugin": "^3.0.0",
|
|
78
|
+
"file-loader": "^1.1.4",
|
|
79
|
+
"friendly-errors-webpack-plugin": "^1.6.1",
|
|
80
|
+
"gulp": "^4.0.2",
|
|
81
|
+
"gulp-clean-css": "^4.3.0",
|
|
82
|
+
"gulp-less": "^5.0.0",
|
|
83
|
+
"gulp-rename": "^2.0.0",
|
|
84
|
+
"html-webpack-plugin": "^2.30.1",
|
|
85
|
+
"jest": "^22.0.4",
|
|
86
|
+
"jest-serializer-vue": "^0.3.0",
|
|
87
|
+
"less": "^3.13.1",
|
|
88
|
+
"less-loader": "^5.0.0",
|
|
89
|
+
"nightwatch": "^0.9.12",
|
|
90
|
+
"node-notifier": "^5.1.2",
|
|
91
|
+
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
|
92
|
+
"ora": "^1.2.0",
|
|
93
|
+
"portfinder": "^1.0.13",
|
|
94
|
+
"postcss-import": "^11.0.0",
|
|
95
|
+
"postcss-loader": "^2.0.8",
|
|
96
|
+
"postcss-url": "^7.2.1",
|
|
97
|
+
"rimraf": "^2.6.0",
|
|
98
|
+
"selenium-server": "^3.0.1",
|
|
99
|
+
"semver": "^5.3.0",
|
|
100
|
+
"shelljs": "^0.7.6",
|
|
101
|
+
"uglifyjs-webpack-plugin": "^1.3.0",
|
|
102
|
+
"url-loader": "^0.5.8",
|
|
103
|
+
"vue": "^2.5.2",
|
|
104
|
+
"vue-jest": "^1.0.2",
|
|
105
|
+
"vue-loader": "^13.3.0",
|
|
106
|
+
"vue-router": "^3.0.1",
|
|
107
|
+
"vue-style-loader": "^3.0.1",
|
|
108
|
+
"vue-template-compiler": "^2.5.2",
|
|
109
|
+
"webpack": "^3.6.0",
|
|
110
|
+
"webpack-bundle-analyzer": "^2.9.0",
|
|
111
|
+
"webpack-dev-server": "^2.9.1",
|
|
112
|
+
"webpack-merge": "^4.1.0"
|
|
113
|
+
},
|
|
114
|
+
"engines": {
|
|
115
|
+
"node": ">= 6.0.0",
|
|
116
|
+
"npm": ">= 3.0.0"
|
|
117
|
+
},
|
|
118
|
+
"browserslist": [
|
|
119
|
+
"> 1%",
|
|
120
|
+
"last 2 versions",
|
|
121
|
+
"not ie <= 8"
|
|
122
|
+
]
|
|
122
123
|
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<!-- 动态标签 -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="BriLabels">
|
|
4
|
+
<Dropdown
|
|
5
|
+
class="BriLabels-dropdown"
|
|
6
|
+
trigger="custom"
|
|
7
|
+
placement="bottom-start"
|
|
8
|
+
transfer
|
|
9
|
+
:visible="listVisible"
|
|
10
|
+
@on-clickoutside="clickInput"
|
|
11
|
+
>
|
|
12
|
+
<Input
|
|
13
|
+
class="BriLabels-dropdown-input"
|
|
14
|
+
:value="showValStr"
|
|
15
|
+
:suffix="inputIcon"
|
|
16
|
+
readonly
|
|
17
|
+
@click.native="clickInput"
|
|
18
|
+
>
|
|
19
|
+
</Input>
|
|
20
|
+
<template #list>
|
|
21
|
+
<DropdownMenu>
|
|
22
|
+
<DropdownItem
|
|
23
|
+
v-for="item in listData"
|
|
24
|
+
:key="item._key"
|
|
25
|
+
:class="{
|
|
26
|
+
'BriLabels-dropdown-item':true,
|
|
27
|
+
'BriLabels-dropdown-item-active':!!val.find(i=>i._key == item._key)
|
|
28
|
+
}"
|
|
29
|
+
>
|
|
30
|
+
{{item.name}}
|
|
31
|
+
</DropdownItem>
|
|
32
|
+
</DropdownMenu>
|
|
33
|
+
</template>
|
|
34
|
+
</Dropdown>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
import controlMixin from "../controlMixin.js";
|
|
40
|
+
|
|
41
|
+
export default {
|
|
42
|
+
name: "BriLabels",
|
|
43
|
+
mixins: [controlMixin],
|
|
44
|
+
data () {
|
|
45
|
+
return {
|
|
46
|
+
listData: [],
|
|
47
|
+
listVisible: false,
|
|
48
|
+
inputIcon: "ios-arrow-down"
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
computed: {
|
|
52
|
+
selfPropsObj () {
|
|
53
|
+
return {
|
|
54
|
+
...this.propsObj,
|
|
55
|
+
...this.commonDealPropsObj
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
modKey () {
|
|
59
|
+
return this.propsObj.modKey;
|
|
60
|
+
},
|
|
61
|
+
val: {
|
|
62
|
+
get () {
|
|
63
|
+
return this.value[this.propsObj._key] || [];
|
|
64
|
+
},
|
|
65
|
+
set (val) {
|
|
66
|
+
this.value[this.propsObj._key] = val;
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
showValStr () {
|
|
70
|
+
let valArr = this.val && this.val.map(item => item.name);
|
|
71
|
+
return valArr && valArr.join("、");
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
created () {
|
|
75
|
+
this.init();
|
|
76
|
+
},
|
|
77
|
+
methods: {
|
|
78
|
+
init () {
|
|
79
|
+
this.getListData();
|
|
80
|
+
},
|
|
81
|
+
getListData () {
|
|
82
|
+
this.$https({
|
|
83
|
+
url: {
|
|
84
|
+
module: "sheet",
|
|
85
|
+
name: "memberAll"
|
|
86
|
+
},
|
|
87
|
+
params: {
|
|
88
|
+
search: {
|
|
89
|
+
entityKey: this.entityKey, // 当前工作表关联的数据表Key
|
|
90
|
+
modKey: this.modKey,
|
|
91
|
+
name: this.curVal,
|
|
92
|
+
fieldKey: this.selfPropsObj._key === "_default" ? this.value._key : (this.selfPropsObj.__realKey__ || this.selfPropsObj._key), // 当前字段Key
|
|
93
|
+
labelType: this.selfPropsObj._labelType
|
|
94
|
+
},
|
|
95
|
+
pagination: {
|
|
96
|
+
page: 1,
|
|
97
|
+
pagesize: 999
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
callback: data => {
|
|
101
|
+
this.listData = data.list;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
clickInput () {
|
|
106
|
+
this.listVisible = !this.listVisible;
|
|
107
|
+
if (this.listVisible) {
|
|
108
|
+
this.inputIcon = "ios-arrow-up";
|
|
109
|
+
} else {
|
|
110
|
+
this.inputIcon = "ios-arrow-down";
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
watch: {
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="`DshCascader
|
|
3
|
-
<!--
|
|
4
|
-
<template v-if="finalCanEdit">
|
|
2
|
+
<div :class="`DshCascader`">
|
|
3
|
+
<!-- 编辑和disabled模式 -->
|
|
4
|
+
<template v-if="finalCanEdit || $isDisabled(canEdit, selfPropsObj)">
|
|
5
5
|
<!-- 多选 多选模式的filterable必须是false,不然出bug -->
|
|
6
6
|
<template v-if="useMultiple === true">
|
|
7
7
|
<Cascader
|
|
@@ -86,17 +86,16 @@
|
|
|
86
86
|
v-else
|
|
87
87
|
style="width: 100%;"
|
|
88
88
|
:class="{
|
|
89
|
-
'DshCascader-readonly': $isReadonly(canEdit, selfPropsObj),
|
|
90
89
|
'DshCascader-disabled': $isDisabled(canEdit, selfPropsObj)
|
|
91
90
|
}"
|
|
92
91
|
:value="value[controlKey]"
|
|
93
92
|
:data="renderCascaderData"
|
|
94
93
|
:placeholder="selfPropsObj._placeholder"
|
|
95
|
-
:disabled="
|
|
94
|
+
:disabled="$isDisabled(canEdit, selfPropsObj)"
|
|
96
95
|
:change-on-select="selfPropsObj._changeOnSelect"
|
|
97
96
|
:clearable="selfPropsObj._clearable"
|
|
98
97
|
:size="selfPropsObj._size"
|
|
99
|
-
:filterable="selfPropsObj._filterable"
|
|
98
|
+
:filterable="selfPropsObj._filterable && !$isDisabled(canEdit, selfPropsObj)"
|
|
100
99
|
:transfer="selfPropsObj._transfer"
|
|
101
100
|
:transfer-class-name="selfPropsObj._transferClassName"
|
|
102
101
|
:load-data="loadData"
|
|
@@ -107,29 +106,13 @@
|
|
|
107
106
|
</template>
|
|
108
107
|
</template>
|
|
109
108
|
|
|
110
|
-
<!--
|
|
111
|
-
<
|
|
109
|
+
<!-- 查看模式 -->
|
|
110
|
+
<control-show
|
|
112
111
|
v-else
|
|
113
|
-
|
|
114
|
-
:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
:class="commonClass"
|
|
118
|
-
>
|
|
119
|
-
<span
|
|
120
|
-
v-if="showVal"
|
|
121
|
-
class="dsh-ellipsis hb-show-text"
|
|
122
|
-
:class="`control-${mode}-text`"
|
|
123
|
-
>
|
|
124
|
-
{{ showVal }}
|
|
125
|
-
</span>
|
|
126
|
-
<div
|
|
127
|
-
v-else
|
|
128
|
-
class="hb-nodata-text dsh-ellipsis"
|
|
129
|
-
>
|
|
130
|
-
<span>暂无内容</span>
|
|
131
|
-
</div>
|
|
132
|
-
</Ctooltip>
|
|
112
|
+
:showVal="showVal"
|
|
113
|
+
:propsObj="selfPropsObj"
|
|
114
|
+
:isUnit="isUnit"
|
|
115
|
+
></control-show>
|
|
133
116
|
</div>
|
|
134
117
|
</template>
|
|
135
118
|
|
|
@@ -303,16 +286,18 @@
|
|
|
303
286
|
|
|
304
287
|
/* ----------- 单选使用 ---------- */
|
|
305
288
|
clickInput () {
|
|
306
|
-
if (
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
289
|
+
if (this.finalCanEdit) {
|
|
290
|
+
if (
|
|
291
|
+
["cascader"].includes(this.selfPropsObj._type) &&
|
|
292
|
+
this.selfPropsObj._filterable === true &&
|
|
293
|
+
this.renderDataFlag === true &&
|
|
294
|
+
this.clickInputFlag === true
|
|
295
|
+
) {
|
|
296
|
+
this.clickInputFlag = false; // 这个处理其实觉大概率没必要,有没有不受影响
|
|
297
|
+
setTimeout(() => {
|
|
298
|
+
this.renderDataFlag = false;
|
|
299
|
+
}, 0);
|
|
300
|
+
}
|
|
316
301
|
}
|
|
317
302
|
},
|
|
318
303
|
// 展开和关闭弹窗时触发
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
|
|
3
|
+
class="DshCheckbox"
|
|
4
4
|
ref="dshCheckboxRef"
|
|
5
5
|
>
|
|
6
6
|
<template v-if="canEdit">
|
|
@@ -87,11 +87,13 @@
|
|
|
87
87
|
:transfer="true"
|
|
88
88
|
maxWidth="200"
|
|
89
89
|
:content="showVal"
|
|
90
|
-
:class="commonClass"
|
|
91
90
|
>
|
|
92
91
|
<div
|
|
93
92
|
v-if="showVal"
|
|
94
93
|
class="DshCheckbox-value-wrapper"
|
|
94
|
+
:style="{
|
|
95
|
+
justifyContent: flatShowAlign
|
|
96
|
+
}"
|
|
95
97
|
>
|
|
96
98
|
<span
|
|
97
99
|
v-for="col in colData"
|
|
@@ -105,9 +107,14 @@
|
|
|
105
107
|
</div>
|
|
106
108
|
<div
|
|
107
109
|
v-else
|
|
108
|
-
class="
|
|
110
|
+
class="control-nodata-text dsh-ellipsis"
|
|
109
111
|
>
|
|
110
|
-
<
|
|
112
|
+
<template v-if="isUnit">
|
|
113
|
+
-
|
|
114
|
+
</template>
|
|
115
|
+
<template v-else>
|
|
116
|
+
暂无内容
|
|
117
|
+
</template>
|
|
111
118
|
</div>
|
|
112
119
|
</Ctooltip>
|
|
113
120
|
|
|
@@ -169,6 +176,9 @@
|
|
|
169
176
|
// 选项数据
|
|
170
177
|
colData () {
|
|
171
178
|
return this.listData.filter(item => (this.value[this.controlKey] || []).includes(item._key));
|
|
179
|
+
},
|
|
180
|
+
flatShowAlign () {
|
|
181
|
+
return !this.propsObj._align || this.propsObj._align == "left" || !this.isUnit ? "flex-start" : this.propsObj._align == "right" ? "flex-end" : "center";
|
|
172
182
|
}
|
|
173
183
|
},
|
|
174
184
|
created () {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div class="DshCoordinates">
|
|
3
3
|
<Ctooltip
|
|
4
4
|
placement="top"
|
|
5
5
|
:transfer="true"
|
|
6
6
|
maxWidth="200"
|
|
7
|
-
:content="
|
|
8
|
-
:class="commonClass"
|
|
7
|
+
:content="currentVal"
|
|
9
8
|
>
|
|
10
9
|
<!-- 编辑模式 -->
|
|
11
10
|
<div
|
|
@@ -38,11 +37,8 @@
|
|
|
38
37
|
</div>
|
|
39
38
|
|
|
40
39
|
<!-- 查看模式 -->
|
|
41
|
-
<span
|
|
42
|
-
|
|
43
|
-
:class="[`dsh-ellipsis control-${mode}-text`, showVal ? 'hb-show-text' : 'hb-nodata-text']"
|
|
44
|
-
>
|
|
45
|
-
<span>{{ showVal || '暂无内容' }}</span>
|
|
40
|
+
<span v-else :class="commonClass">
|
|
41
|
+
{{ showText }}
|
|
46
42
|
</span>
|
|
47
43
|
</Ctooltip>
|
|
48
44
|
|
|
@@ -177,7 +173,7 @@
|
|
|
177
173
|
this.value[this.controlKey] = val;
|
|
178
174
|
}
|
|
179
175
|
},
|
|
180
|
-
|
|
176
|
+
currentVal () {
|
|
181
177
|
return this.curVal && this.curVal.name;
|
|
182
178
|
},
|
|
183
179
|
curLnglat: {
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="show"
|
|
4
|
-
|
|
4
|
+
class="DshDate"
|
|
5
5
|
>
|
|
6
|
-
<template v-if="finalCanEdit">
|
|
6
|
+
<template v-if="finalCanEdit || $isDisabled(canEdit, selfPropsObj)">
|
|
7
7
|
<template v-if="['time'].includes(subType)">
|
|
8
8
|
<TimePicker
|
|
9
9
|
style="width: 100%;"
|
|
10
10
|
:class="{
|
|
11
|
-
'DshDate-time-readonly': $isReadonly(canEdit, selfPropsObj),
|
|
12
11
|
'DshDate-time-disabled': $isDisabled(canEdit, selfPropsObj)
|
|
13
12
|
}"
|
|
14
13
|
v-model="val"
|
|
15
14
|
:type="subType"
|
|
16
15
|
:placeholder="selfPropsObj._placeholder"
|
|
17
|
-
:disabled="
|
|
16
|
+
:disabled="$isDisabled(canEdit, selfPropsObj)"
|
|
18
17
|
:clearable="selfPropsObj._clearable"
|
|
19
18
|
:transfer="selfPropsObj._transfer"
|
|
20
19
|
@on-change="change"
|
|
@@ -25,13 +24,12 @@
|
|
|
25
24
|
<DatePicker
|
|
26
25
|
style="width: 100%;"
|
|
27
26
|
:class="{
|
|
28
|
-
'DshDate-date-readonly': $isReadonly(canEdit, selfPropsObj),
|
|
29
27
|
'DshDate-date-disabled': $isDisabled(canEdit, selfPropsObj)
|
|
30
28
|
}"
|
|
31
29
|
v-model="val"
|
|
32
30
|
:type="subType"
|
|
33
31
|
:placeholder="selfPropsObj._placeholder"
|
|
34
|
-
:disabled="
|
|
32
|
+
:disabled="$isDisabled(canEdit, selfPropsObj)"
|
|
35
33
|
:clearable="selfPropsObj._clearable"
|
|
36
34
|
:options="options"
|
|
37
35
|
:transfer="selfPropsObj._transfer"
|
|
@@ -40,29 +38,13 @@
|
|
|
40
38
|
</template>
|
|
41
39
|
</template>
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
<!-- 查看模式 -->
|
|
42
|
+
<control-show
|
|
44
43
|
v-else
|
|
45
|
-
|
|
46
|
-
:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
:class="commonClass"
|
|
50
|
-
>
|
|
51
|
-
<span
|
|
52
|
-
v-if="showVal"
|
|
53
|
-
class="dsh-ellipsis hb-show-text"
|
|
54
|
-
:class="`control-${mode}-text`"
|
|
55
|
-
>
|
|
56
|
-
{{ showVal }}
|
|
57
|
-
</span>
|
|
58
|
-
<span
|
|
59
|
-
v-else
|
|
60
|
-
class="hb-nodata-text dsh-ellipsis"
|
|
61
|
-
:class="`control-${mode}-text`"
|
|
62
|
-
>
|
|
63
|
-
<span>暂无内容</span>
|
|
64
|
-
</span>
|
|
65
|
-
</Ctooltip>
|
|
44
|
+
:showVal="showVal"
|
|
45
|
+
:propsObj="selfPropsObj"
|
|
46
|
+
:isUnit="isUnit"
|
|
47
|
+
></control-show>
|
|
66
48
|
</div>
|
|
67
49
|
</template>
|
|
68
50
|
|
|
@@ -140,9 +122,3 @@
|
|
|
140
122
|
}
|
|
141
123
|
};
|
|
142
124
|
</script>
|
|
143
|
-
|
|
144
|
-
<style lang="less">
|
|
145
|
-
.DshDate {
|
|
146
|
-
width: 100%;
|
|
147
|
-
}
|
|
148
|
-
</style>
|