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.
@@ -1,134 +1,134 @@
1
- <template>
2
- <el-dialog
3
- class="cus-dialog-container"
4
- :title="title"
5
- :visible.sync="dialogVisible"
6
- :close-on-click-modal="false"
7
- append-to-body
8
- center
9
- :width="width"
10
- ref="elDialog"
11
- :id="id"
12
- >
13
- <span v-if="show">
14
- <slot></slot>
15
- </span>
16
-
17
- <span v-if="action" slot="footer" class="dialog-footer" v-loading="loading"
18
- :element-loading-text="loadingText">
19
- <slot name="action">
20
- <el-button @click="close">取 消</el-button>
21
- <el-button type="primary" @click="submit" >确 定</el-button>
22
- </slot>
23
- </span>
24
- </el-dialog>
25
- </template>
26
-
27
- <script>
28
- export default {
29
- props: {
30
- visible: Boolean,
31
- loadingText: {
32
- type: String,
33
- default: ''
34
- },
35
- title: {
36
- type: String,
37
- default: ''
38
- },
39
- width: {
40
- type: String,
41
- default: '600px'
42
- },
43
- form: {
44
- type: Boolean,
45
- default: true
46
- },
47
- action: {
48
- type: Boolean,
49
- default: true
50
- }
51
- },
52
- computed: {
53
- show () {
54
- if (this.form) {
55
- return this.showForm
56
- } else {
57
- return true
58
- }
59
- }
60
- },
61
- data () {
62
- return {
63
- loading: false,
64
- dialogVisible: this.visible,
65
- id: 'dialog_' + new Date().getTime(),
66
- showForm: false
67
- }
68
- },
69
- methods: {
70
- close () {
71
- this.dialogVisible = false
72
- },
73
- submit () {
74
- this.loading = true
75
-
76
- this.$emit('on-submit')
77
- },
78
- end () {
79
- this.loading = false
80
- }
81
- },
82
- mounted () {
83
- },
84
- watch: {
85
- dialogVisible (val) {
86
- if (!val) {
87
- this.loading = false
88
- this.$emit('on-close')
89
- setTimeout(() => {
90
- this.showForm = false
91
- }, 300)
92
- } else {
93
- this.showForm = true
94
- }
95
- },
96
- visible (val) {
97
- this.dialogVisible = val
98
- }
99
- }
100
- }
101
- </script>
102
-
103
- <style lang="scss">
104
- .cus-dialog-container{
105
- .el-dialog__footer{
106
- margin: 0 20px;
107
- // border-top: 1px dashed #ccc;
108
- padding: 15px 0 16px;
109
- text-align: center;
110
- position: relative;
111
-
112
- .dialog-footer{
113
- display: block;
114
-
115
- .circular{
116
- display: inline-block;
117
- vertical-align: middle;
118
- margin-right: 5px;
119
- width: 24px;
120
- height: 24px;
121
- }
122
-
123
- .el-loading-text{
124
- display: inline-block;
125
- vertical-align: middle;
126
- }
127
-
128
- .el-loading-spinner{
129
- margin-top: -12px;
130
- }
131
- }
132
- }
133
- }
134
- </style>
1
+ <template>
2
+ <el-dialog
3
+ class="cus-dialog-container"
4
+ :title="title"
5
+ :visible.sync="dialogVisible"
6
+ :close-on-click-modal="false"
7
+ append-to-body
8
+ center
9
+ :width="width"
10
+ ref="elDialog"
11
+ :id="id"
12
+ >
13
+ <span v-if="show">
14
+ <slot></slot>
15
+ </span>
16
+
17
+ <span v-if="action" slot="footer" class="dialog-footer" v-loading="loading"
18
+ :element-loading-text="loadingText">
19
+ <slot name="action">
20
+ <el-button @click="close">取 消</el-button>
21
+ <el-button type="primary" @click="submit" >确 定</el-button>
22
+ </slot>
23
+ </span>
24
+ </el-dialog>
25
+ </template>
26
+
27
+ <script>
28
+ export default {
29
+ props: {
30
+ visible: Boolean,
31
+ loadingText: {
32
+ type: String,
33
+ default: ''
34
+ },
35
+ title: {
36
+ type: String,
37
+ default: ''
38
+ },
39
+ width: {
40
+ type: String,
41
+ default: '600px'
42
+ },
43
+ form: {
44
+ type: Boolean,
45
+ default: true
46
+ },
47
+ action: {
48
+ type: Boolean,
49
+ default: true
50
+ }
51
+ },
52
+ computed: {
53
+ show () {
54
+ if (this.form) {
55
+ return this.showForm
56
+ } else {
57
+ return true
58
+ }
59
+ }
60
+ },
61
+ data () {
62
+ return {
63
+ loading: false,
64
+ dialogVisible: this.visible,
65
+ id: 'dialog_' + new Date().getTime(),
66
+ showForm: false
67
+ }
68
+ },
69
+ methods: {
70
+ close () {
71
+ this.dialogVisible = false
72
+ },
73
+ submit () {
74
+ this.loading = true
75
+
76
+ this.$emit('on-submit')
77
+ },
78
+ end () {
79
+ this.loading = false
80
+ }
81
+ },
82
+ mounted () {
83
+ },
84
+ watch: {
85
+ dialogVisible (val) {
86
+ if (!val) {
87
+ this.loading = false
88
+ this.$emit('on-close')
89
+ setTimeout(() => {
90
+ this.showForm = false
91
+ }, 300)
92
+ } else {
93
+ this.showForm = true
94
+ }
95
+ },
96
+ visible (val) {
97
+ this.dialogVisible = val
98
+ }
99
+ }
100
+ }
101
+ </script>
102
+
103
+ <style lang="scss">
104
+ .cus-dialog-container{
105
+ .el-dialog__footer{
106
+ margin: 0 20px;
107
+ // border-top: 1px dashed #ccc;
108
+ padding: 15px 0 16px;
109
+ text-align: center;
110
+ position: relative;
111
+
112
+ .dialog-footer{
113
+ display: block;
114
+
115
+ .circular{
116
+ display: inline-block;
117
+ vertical-align: middle;
118
+ margin-right: 5px;
119
+ width: 24px;
120
+ height: 24px;
121
+ }
122
+
123
+ .el-loading-text{
124
+ display: inline-block;
125
+ vertical-align: middle;
126
+ }
127
+
128
+ .el-loading-spinner{
129
+ margin-top: -12px;
130
+ }
131
+ }
132
+ }
133
+ }
134
+ </style>
@@ -1,40 +1,40 @@
1
- <template>
2
- <div class="form-config-container">
3
- <el-form label-position="top">
4
- <el-form-item label="表单标题">
5
- <el-input v-model="data.title"></el-input>
6
- </el-form-item>
7
-
8
- <el-form-item label="标签对齐方式">
9
- <el-radio-group v-model="data.labelPosition">
10
- <el-radio-button label="left">左对齐</el-radio-button>
11
- <el-radio-button label="right">右对齐</el-radio-button>
12
- <el-radio-button label="top">顶部对齐</el-radio-button>
13
- </el-radio-group>
14
- </el-form-item>
15
-
16
- <el-form-item label="表单标签宽度">
17
- <el-input-number
18
- v-model="data.labelWidth"
19
- :min="0"
20
- :max="200"
21
- :step="10"
22
- ></el-input-number>
23
- </el-form-item>
24
-
25
- <el-form-item label="组件尺寸">
26
- <el-radio-group v-model="data.size">
27
- <el-radio-button label="medium">medium</el-radio-button>
28
- <el-radio-button label="small">small</el-radio-button>
29
- <el-radio-button label="mini">mini</el-radio-button>
30
- </el-radio-group>
31
- </el-form-item>
32
- </el-form>
33
- </div>
34
- </template>
35
-
36
- <script>
37
- export default {
38
- props: ["data"]
39
- };
40
- </script>
1
+ <template>
2
+ <div class="form-config-container">
3
+ <el-form label-position="top">
4
+ <el-form-item label="表单标题">
5
+ <el-input v-model="data.title"></el-input>
6
+ </el-form-item>
7
+
8
+ <el-form-item label="标签对齐方式">
9
+ <el-radio-group v-model="data.labelPosition">
10
+ <el-radio-button label="left">左对齐</el-radio-button>
11
+ <el-radio-button label="right">右对齐</el-radio-button>
12
+ <el-radio-button label="top">顶部对齐</el-radio-button>
13
+ </el-radio-group>
14
+ </el-form-item>
15
+
16
+ <el-form-item label="表单标签宽度">
17
+ <el-input-number
18
+ v-model="data.labelWidth"
19
+ :min="0"
20
+ :max="200"
21
+ :step="10"
22
+ ></el-input-number>
23
+ </el-form-item>
24
+
25
+ <el-form-item label="组件尺寸">
26
+ <el-radio-group v-model="data.size">
27
+ <el-radio-button label="medium">medium</el-radio-button>
28
+ <el-radio-button label="small">small</el-radio-button>
29
+ <el-radio-button label="mini">mini</el-radio-button>
30
+ </el-radio-group>
31
+ </el-form-item>
32
+ </el-form>
33
+ </div>
34
+ </template>
35
+
36
+ <script>
37
+ export default {
38
+ props: ["data"]
39
+ };
40
+ </script>