tianheng-ui 0.0.7 → 0.0.11

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,144 +1,116 @@
1
1
  <template>
2
- <div>
3
- <el-skeleton :loading="loading" animated>
4
- <template slot="template">
5
- <div class="skeleton">
6
- <el-skeleton-item class="skeleton-icon" variant="image" />
7
- <div class="skeleton-content">
8
- <el-skeleton-item class="skeleton-title" variant="h4" />
9
- <el-skeleton-item class="skeleton-label" variant="text" />
10
- </div>
11
- <el-skeleton-item class="skeleton-value" variant="text" />
12
- </div>
13
- </template>
14
- </el-skeleton>
15
- <div v-if="!loading" class="th-cell" :style="customStyle">
16
- <i v-if="icon" class="th-cell-icon" :class="icon"></i>
17
- <slot v-else name="icon" />
18
- <div class="th-cell-content">
19
- <div v-if="title" class="th-cell-title">{{ title }}</div>
20
- <slot v-else name="title" />
21
- <div v-if="label" class="th-cell-label">{{ label }}</div>
22
- <slot v-else name="label" />
2
+ <div
3
+ class="th-cell"
4
+ :class="[
5
+ customClass,
6
+ center ? 'is-center' : '',
7
+ active ? cellActive : '',
8
+ hover ? cellHover : ''
9
+ ]"
10
+ :style="customStyle"
11
+ @click="handleClick"
12
+ >
13
+ <i v-if="icon" class="th-cell-icon" :class="icon"></i>
14
+ <slot v-else name="icon" />
15
+ <div class="th-cell-content">
16
+ <div
17
+ v-if="title"
18
+ class="th-cell-title"
19
+ :class="[titleClass, active ? titleActive : '', hover ? titleHover : 'title-color']"
20
+ :style="titleStyle"
21
+ >
22
+ {{ title }}
23
23
  </div>
24
- <div v-if="value" class="th-cell-value">{{ value }}</div>
25
- <slot v-else />
24
+ <slot v-else name="title" />
25
+ <div
26
+ v-if="label"
27
+ class="th-cell-label"
28
+ :class="[labelClass, active ? labelActive : '', hover ? labelHover : '']"
29
+ >
30
+ {{ label }}
31
+ </div>
32
+ <slot v-else name="label" />
33
+ </div>
34
+ <div
35
+ v-if="value"
36
+ class="th-cell-value"
37
+ :class="[valueClass, active ? valueActive : '', hover ? valueHover : '']"
38
+ >
39
+ {{ value }}
26
40
  </div>
41
+ <slot v-else />
27
42
  </div>
28
43
  </template>
29
44
 
30
45
  <script>
31
46
  export default {
32
- name:'ThCell',
47
+ name: "ThCell",
33
48
  props: {
34
- title: {
35
- type: String,
36
- default: () => {
37
- return "";
38
- },
49
+ title: Number | String,
50
+ value: Number | String,
51
+ label: String,
52
+ icon: String,
53
+
54
+ customStyle: String | Object,
55
+ titleStyle: String | Object,
56
+
57
+ customClass: String | Object,
58
+ titleClass: String | Object,
59
+ labelClass: String | Object,
60
+ valueClass: String | Object,
61
+
62
+ cellActiveClass: String | Object,
63
+ titleActiveClass: String | Object,
64
+ labelActiveClass: String | Object,
65
+ valueActiveClass: String | Object,
66
+
67
+ cellHoverClass: String | Object,
68
+ titleHoverClass: String | Object,
69
+ labelHoverClass: String | Object,
70
+ valueHoverClass: String | Object,
71
+
72
+ center: Boolean,
73
+ hover: Boolean,
74
+ active: Boolean
75
+ },
76
+ computed: {
77
+ cellActive() {
78
+ if (this.cellActiveClass) return this.cellActiveClass;
79
+ else return "is-active";
80
+ },
81
+ titleActive() {
82
+ if (this.titleActiveClass) return this.titleActiveClass;
83
+ else return "is-active";
39
84
  },
40
- value: {
41
- type: String,
42
- default: () => {
43
- return "";
44
- },
85
+ labelActive() {
86
+ if (this.labelActiveClass) return this.labelActiveClass;
87
+ else return "is-active";
45
88
  },
46
- label: {
47
- type: String,
48
- default: () => {
49
- return "";
50
- },
89
+ valueActive() {
90
+ if (this.valueActiveClass) return this.valueActiveClass;
91
+ else return "is-active";
51
92
  },
52
- icon: {
53
- type: String,
54
- default: () => {
55
- return "";
56
- },
93
+ cellHover() {
94
+ if (this.cellHoverClass) return this.cellHoverClass;
95
+ else return "is-hover";
57
96
  },
58
- customStyle: {
59
- type: String,
60
- default: () => {
61
- return "";
62
- },
97
+ titleHover() {
98
+ if (this.titleHoverClass) return this.titleHoverClass;
99
+ else return "is-hover";
63
100
  },
64
- loading: {
65
- type: Boolean,
66
- default: () => {
67
- return false;
68
- },
101
+ labelHover() {
102
+ if (this.labelHoverClass) return this.labelHoverClass;
103
+ else return "is-hover";
69
104
  },
105
+ valueHover() {
106
+ if (this.valueHoverClass) return this.valueHoverClass;
107
+ else return "is-hover";
108
+ }
70
109
  },
110
+ methods: {
111
+ handleClick(evt) {
112
+ this.$emit("click", evt);
113
+ }
114
+ }
71
115
  };
72
116
  </script>
73
-
74
- <style lang="less" scoped>
75
- .th-cell {
76
- position: relative;
77
- display: flex;
78
- align-items: center;
79
- padding: 10px 15px;
80
- border-radius: 4px;
81
- border: 1px solid #ebeef5;
82
- background-color: white;
83
- overflow: hidden;
84
- transition: 0.3s;
85
- .th-cell-icon {
86
- margin-right: 10px;
87
- font-size: 18px;
88
- }
89
- .th-cell-content {
90
- flex: 1;
91
- }
92
- &-title {
93
- font-size: 16px;
94
- color: #333333;
95
- }
96
- &-label {
97
- margin-top: 5px;
98
- font-size: 14px;
99
- color: #666666;
100
- word-wrap: break-word;
101
- word-break: break-all;
102
- }
103
- &-value {
104
- margin-left: 10px;
105
- max-width: 50%;
106
- font-size: 14px;
107
- color: #999999;
108
- word-wrap: break-word;
109
- word-break: break-all;
110
- }
111
- }
112
- .th-cell:hover {
113
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
114
- }
115
-
116
- .skeleton {
117
- display: flex;
118
- align-items: center;
119
- // height: 64px;
120
- margin-bottom: 20px;
121
- padding: 10px 15px;
122
- border-radius: 4px;
123
- border: 1px solid #ebeef5;
124
- &-icon {
125
- width: 30px;
126
- height: 30px;
127
- margin-right: 10px;
128
- font-size: 18px;
129
- }
130
- &-content {
131
- flex: 1;
132
- }
133
- &-title {
134
- width: 100px;
135
- }
136
- &-label {
137
- margin-top: 5px;
138
- }
139
- &-value {
140
- margin-left: 10px;
141
- width: 100px;
142
- }
143
- }
144
- </style>
@@ -0,0 +1,8 @@
1
+ import CodeEditor from "./index.vue";
2
+
3
+ /* istanbul ignore next */
4
+ CodeEditor.install = function(Vue) {
5
+ Vue.component(CodeEditor.name, CodeEditor);
6
+ };
7
+
8
+ export default CodeEditor;
@@ -0,0 +1,212 @@
1
+ <template>
2
+ <div class="wrap">
3
+ <div class="code-editor" :ref="generateId"></div>
4
+ <span v-if="withFullscreenBtn" title="全屏显示">
5
+ <svg-icon
6
+ class="icon-fullscreen"
7
+ icon-class="fullscreen"
8
+ :style="{ bottom: (withFooterBtns ? 47 : 10) + 'px' }"
9
+ @click.native="fullscreen"
10
+ ></svg-icon>
11
+ </span>
12
+
13
+ <el-dialog
14
+ ref="dialog"
15
+ custom-class="code-dialog"
16
+ :visible.sync="isVisible"
17
+ title="脚本编辑"
18
+ fullscreen
19
+ append-to-body
20
+ :show-footer="false"
21
+ @close="closeEditCode"
22
+ >
23
+ <code-editor v-model="dialogValue"></code-editor>
24
+ </el-dialog>
25
+ </div>
26
+ </template>
27
+ <script>
28
+ // 引入全局实例
29
+ import ace from "ace-builds";
30
+ // 主题风格,引入主题后还需要在 options 中指定主题才会生效
31
+ import "ace-builds/src-min-noconflict/theme-monokai";
32
+ import "ace-builds/src-min-noconflict/theme-dracula";
33
+ // 支持代码格式, 需要引入具体的语法高亮库才会有对应的语法高亮效果
34
+ import "ace-builds/src-min-noconflict/mode-javascript";
35
+ import "ace-builds/src-min-noconflict/mode-json";
36
+ import "ace-builds/src-min-noconflict/mode-css";
37
+ import "ace-builds/src-min-noconflict/ext-language_tools";
38
+ import jsWorkerUrl from "file-loader!ace-builds/src-noconflict/worker-javascript";
39
+ import jsonWorkerUrl from "file-loader!ace-builds/src-noconflict/worker-json";
40
+ import cssWorkerUrl from "file-loader!ace-builds/src-noconflict/worker-css";
41
+ ace.config.setModuleUrl("ace/mode/javascript_worker", jsWorkerUrl);
42
+ ace.config.setModuleUrl("ace/mode/json_worker", jsonWorkerUrl);
43
+ ace.config.setModuleUrl("ace/mode/css_worker", cssWorkerUrl);
44
+ ace.config.setModuleUrl(
45
+ "ace/snippets/javascript",
46
+ require("file-loader!ace-builds/src-noconflict/snippets/javascript.js")
47
+ );
48
+ ace.config.setModuleUrl(
49
+ "ace/snippets/css",
50
+ require("file-loader!ace-builds/src-noconflict/snippets/css.js")
51
+ );
52
+
53
+ export default {
54
+ name: "CodeEditor",
55
+ model: {
56
+ event: "change",
57
+ },
58
+ props: {
59
+ // 编辑器内容
60
+ value: String,
61
+ // 默认语言
62
+ language: {
63
+ type: String,
64
+ default: "javascript",
65
+ },
66
+ // 主题,对应主题库 JS 需要提前引入
67
+ theme: {
68
+ type: String,
69
+ default: "monokai",
70
+ },
71
+ // 是否只读
72
+ readonly: {
73
+ type: Boolean,
74
+ default: false,
75
+ },
76
+ // 最大行数
77
+ maxLines: Number,
78
+ // 是否显示全屏按钮
79
+ withFullscreenBtn: {
80
+ type: Boolean,
81
+ default: false,
82
+ },
83
+ withFooterBtns: {
84
+ type: Boolean,
85
+ default: false,
86
+ },
87
+ },
88
+ data() {
89
+ return {
90
+ editor: null,
91
+ generateId:
92
+ "id_" +
93
+ Math.random()
94
+ .toString(36)
95
+ .substr(2, 4),
96
+ isVisible: false,
97
+ dialogValue: "",
98
+ };
99
+ },
100
+ mounted() {
101
+ // 初始化
102
+ this.initEditor();
103
+ },
104
+ watch: {
105
+ value(val) {
106
+ if (this.editor.getValue() !== val) {
107
+ this.editor.setValue(val);
108
+ this.editor.clearSelection();
109
+ }
110
+ },
111
+ },
112
+ methods: {
113
+ // 初始化
114
+ initEditor() {
115
+ // 创建实例
116
+ this.editor = ace.edit(this.$refs[this.generateId], {
117
+ mode: `ace/mode/${this.language}`,
118
+ theme: `ace/theme/${this.theme}`,
119
+ fontSize: 12,
120
+ tabSize: 2,
121
+ value: this.value,
122
+ selectionStyle: "text",
123
+ maxLines: this.maxLines,
124
+ readOnly: this.readonly,
125
+ });
126
+ // 设置属性等,具体需要可根据官方参数自行设置
127
+ this.editor.setOptions({
128
+ enableBasicAutocompletion: true,
129
+ enableSnippets: true,
130
+ enableLiveAutocompletion: true,
131
+ wrap: true,
132
+ setShowPrintMargin: false,
133
+ });
134
+ // 设置值改变监听
135
+ this.editor.on("change", () => {
136
+ this.$emit("change", this.editor.getValue());
137
+ });
138
+ },
139
+ // 实例方法,高亮某一行
140
+ gotoLine(lineNumber) {
141
+ this.editor.gotoLine(lineNumber);
142
+ },
143
+ // 全屏编辑
144
+ fullscreen() {
145
+ this.dialogValue = JSON.parse(JSON.stringify(this.editor.getValue()));
146
+ this.isVisible = true;
147
+ },
148
+ closeEditCode() {
149
+ this.editor.setValue(this.dialogValue);
150
+ this.editor.clearSelection();
151
+ },
152
+ // resize编辑器
153
+ resize() {
154
+ this.editor.resize(true);
155
+ },
156
+ destroy() {
157
+ if (this.editor) {
158
+ this.editor.destroy();
159
+ this.editor = null;
160
+ }
161
+ },
162
+ },
163
+ beforeDestroy() {
164
+ this.destroy();
165
+ },
166
+ };
167
+ </script>
168
+ <style lang="scss" scoped>
169
+ .wrap {
170
+ position: relative;
171
+ .code-editor {
172
+ min-height: 150px;
173
+ height: 100%;
174
+ border: 1px solid #282f3a;
175
+ background-color: #0e1013;
176
+ }
177
+ .icon-fullscreen {
178
+ position: absolute;
179
+ // color: #fff;
180
+ right: 10px;
181
+ font-size: 16px;
182
+ z-index: 9999;
183
+ cursor: pointer;
184
+ }
185
+ }
186
+ .code-dialog {
187
+ &::before {
188
+ content: "";
189
+ position: absolute;
190
+ display: block;
191
+ top: 0;
192
+ left: 0;
193
+ right: 0;
194
+ width: 100%;
195
+ height: 2px;
196
+ background-image: linear-gradient(270deg, #00deff, #2483ff 74%);
197
+ }
198
+ display: flex;
199
+ flex-direction: column;
200
+ background-color: #303640;
201
+ .el-dialog__header {
202
+ border: none;
203
+ .el-dialog__title {
204
+ color: #ccc;
205
+ }
206
+ }
207
+ .el-dialog__body {
208
+ flex: 1 1 0;
209
+ padding-top: 10px;
210
+ }
211
+ }
212
+ </style>
@@ -5,7 +5,7 @@
5
5
  v-loading="loading"
6
6
  :data="data"
7
7
  :row-key="rowKey"
8
- stripe
8
+ :stripe="stripe"
9
9
  :highlight-current-row="selectType === 'single'"
10
10
  :tree-props="treeProps"
11
11
  @current-change="handleSingleSelect"
@@ -93,86 +93,92 @@
93
93
  import TableColumn from "./column.vue";
94
94
 
95
95
  export default {
96
- name:'ThTable',
96
+ name: "ThTable",
97
97
  components: {
98
- TableColumn,
98
+ TableColumn
99
99
  },
100
100
  props: {
101
101
  data: {
102
102
  type: Array,
103
103
  default: () => {
104
104
  return [];
105
- },
105
+ }
106
106
  },
107
107
  options: {
108
108
  type: Array,
109
109
  default: () => {
110
110
  return [];
111
- },
111
+ }
112
112
  },
113
113
  // single:单行选中 multiple:多行选中
114
114
  selectType: {
115
115
  type: String,
116
116
  default: () => {
117
117
  return "";
118
- },
118
+ }
119
119
  },
120
120
  // 行双击事件
121
121
  dblclick: {
122
122
  type: Function,
123
123
  default: () => {
124
124
  return null;
125
- },
125
+ }
126
+ },
127
+ stripe: {
128
+ type: Boolean,
129
+ default: () => {
130
+ return false;
131
+ }
126
132
  },
127
133
  treeProps: {
128
134
  type: Object,
129
135
  default: function() {
130
136
  return {};
131
- },
137
+ }
132
138
  },
133
139
  // 对象,不传表示没有分页,包含三个参数,均必填pageSize:每页展示的条数。currentPage:当前页码。pageCount:总页数
134
140
  pageInfo: {
135
141
  type: Object,
136
142
  default: function() {
137
143
  return {};
138
- },
144
+ }
139
145
  },
140
146
  loading: {
141
147
  type: Boolean,
142
148
  default: () => {
143
149
  return false;
144
- },
150
+ }
145
151
  },
146
152
  height: {
147
153
  type: String,
148
154
  default: () => {
149
155
  return "";
150
- },
156
+ }
151
157
  },
152
158
  rowKey: {
153
159
  type: String,
154
160
  default: () => {
155
161
  return "";
156
- },
162
+ }
157
163
  },
158
164
  showPage: {
159
165
  type: Boolean,
160
166
  default: () => {
161
167
  return true;
162
- },
168
+ }
163
169
  },
164
170
  emptyText: {
165
171
  type: String,
166
172
  default: () => {
167
173
  return "暂无数据";
168
- },
174
+ }
169
175
  },
170
176
  loadingText: {
171
177
  type: String,
172
178
  default: () => {
173
179
  return "加载中";
174
- },
175
- },
180
+ }
181
+ }
176
182
  },
177
183
  data() {
178
184
  return {};
@@ -229,8 +235,8 @@ export default {
229
235
  },
230
236
  getTable() {
231
237
  return this.$refs["th_table"];
232
- },
233
- },
238
+ }
239
+ }
234
240
  };
235
241
  </script>
236
242
 
@@ -1,2 +0,0 @@
1
- !function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("tianheng-ui",[],n):"object"==typeof exports?exports["tianheng-ui"]=n():e["tianheng-ui"]=n()}("undefined"!=typeof self?self:this,function(){return function(e){function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var t={};return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="/dist/",n(n.s=7)}([function(e,n){function t(e,n){var t=e[1]||"",i=e[3];if(!i)return t;if(n&&"function"==typeof btoa){var l=o(i);return[t].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([l]).join("\n")}return[t].join("\n")}function o(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var o=t(n,e);return n[2]?"@media "+n[2]+"{"+o+"}":o}).join("")},n.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},i=0;i<this.length;i++){var l=this[i][0];"number"==typeof l&&(o[l]=!0)}for(i=0;i<e.length;i++){var c=e[i];"number"==typeof c[0]&&o[c[0]]||(t&&!c[2]?c[2]=t:t&&(c[2]="("+c[2]+") and ("+t+")"),n.push(c))}},n}},function(e,n,t){function o(e){for(var n=0;n<e.length;n++){var t=e[n],o=u[t.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](t.parts[i]);for(;i<t.parts.length;i++)o.parts.push(l(t.parts[i]));o.parts.length>t.parts.length&&(o.parts.length=t.parts.length)}else{for(var c=[],i=0;i<t.parts.length;i++)c.push(l(t.parts[i]));u[t.id]={id:t.id,refs:1,parts:c}}}}function i(){var e=document.createElement("style");return e.type="text/css",d.appendChild(e),e}function l(e){var n,t,o=document.querySelector("style["+v+'~="'+e.id+'"]');if(o){if(h)return g;o.parentNode.removeChild(o)}if(b){var l=f++;o=p||(p=i()),n=c.bind(null,o,l,!1),t=c.bind(null,o,l,!0)}else o=i(),n=a.bind(null,o),t=function(){o.parentNode.removeChild(o)};return n(e),function(o){if(o){if(o.css===e.css&&o.media===e.media&&o.sourceMap===e.sourceMap)return;n(e=o)}else t()}}function c(e,n,t,o){var i=t?"":o.css;if(e.styleSheet)e.styleSheet.cssText=y(n,i);else{var l=document.createTextNode(i),c=e.childNodes;c[n]&&e.removeChild(c[n]),c.length?e.insertBefore(l,c[n]):e.appendChild(l)}}function a(e,n){var t=n.css,o=n.media,i=n.sourceMap;if(o&&e.setAttribute("media",o),m.ssrId&&e.setAttribute(v,n.id),i&&(t+="\n/*# sourceURL="+i.sources[0]+" */",t+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var s=t(12),u={},d=r&&(document.head||document.getElementsByTagName("head")[0]),p=null,f=0,h=!1,g=function(){},m=null,v="data-vue-ssr-id",b="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,n,t,i){h=t,m=i||{};var l=s(e,n);return o(l),function(n){for(var t=[],i=0;i<l.length;i++){var c=l[i],a=u[c.id];a.refs--,t.push(a)}n?(l=s(e,n),o(l)):l=[];for(var i=0;i<t.length;i++){var a=t[i];if(0===a.refs){for(var r=0;r<a.parts.length;r++)a.parts[r]();delete u[a.id]}}}};var y=function(){var e=[];return function(n,t){return e[n]=t,e.filter(Boolean).join("\n")}}()},function(e,n){e.exports=function(e,n,t,o,i,l){var c,a=e=e||{},r=typeof e.default;"object"!==r&&"function"!==r||(c=e,a=e.default);var s="function"==typeof a?a.options:a;n&&(s.render=n.render,s.staticRenderFns=n.staticRenderFns,s._compiled=!0),t&&(s.functional=!0),i&&(s._scopeId=i);var u;if(l?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(l)},s._ssrRegister=u):o&&(u=o),u){var d=s.functional,p=d?s.render:s.beforeCreate;d?(s._injectStyles=u,s.render=function(e,n){return u.call(n),p(e,n)}):s.beforeCreate=p?[].concat(p,u):[u]}return{esModule:c,exports:a,options:s}}},function(e,n,t){"use strict";n.a={name:"ThCell",props:{title:{type:String,default:function(){return""}},value:{type:String,default:function(){return""}},label:{type:String,default:function(){return""}},icon:{type:String,default:function(){return""}},customStyle:{type:String,default:function(){return""}},loading:{type:Boolean,default:function(){return!1}}}}},function(e,n,t){"use strict";n.a={name:"ThIcons",props:["value","width"],data:function(){return{icons:["el-icon-platform-eleme","el-icon-eleme","el-icon-delete-solid","el-icon-delete","el-icon-s-tools","el-icon-setting","el-icon-user-solid","el-icon-user","el-icon-phone","el-icon-phone-outline","el-icon-more","el-icon-more-outline","el-icon-star-on","el-icon-star-off","el-icon-s-goods","el-icon-goods","el-icon-warning","el-icon-warning-outline","el-icon-question","el-icon-info","el-icon-remove","el-icon-circle-plus","el-icon-success","el-icon-error","el-icon-zoom-in","el-icon-zoom-out","el-icon-remove-outline","el-icon-circle-plus-outline","el-icon-circle-check","el-icon-circle-close","el-icon-s-help","el-icon-help","el-icon-minus","el-icon-plus","el-icon-check","el-icon-close","el-icon-picture","el-icon-picture-outline","el-icon-picture-outline-round","el-icon-upload","el-icon-upload2","el-icon-download","el-icon-camera-solid","el-icon-camera","el-icon-video-camera-solid","el-icon-video-camera","el-icon-message-solid","el-icon-bell","el-icon-s-cooperation","el-icon-s-order","el-icon-s-platform","el-icon-s-fold","el-icon-s-unfold","el-icon-s-operation","el-icon-s-promotion","el-icon-s-home","el-icon-s-release","el-icon-s-ticket","el-icon-s-management","el-icon-s-open","el-icon-s-shop","el-icon-s-marketing","el-icon-s-flag","el-icon-s-comment","el-icon-s-finance","el-icon-s-claim","el-icon-s-custom","el-icon-s-opportunity","el-icon-s-data","el-icon-s-check","el-icon-s-grid","el-icon-menu","el-icon-share","el-icon-d-caret","el-icon-caret-left","el-icon-caret-right","el-icon-caret-bottom","el-icon-caret-top","el-icon-bottom-left","el-icon-bottom-right","el-icon-back","el-icon-right","el-icon-bottom","el-icon-top","el-icon-top-left","el-icon-top-right","el-icon-arrow-left","el-icon-arrow-right","el-icon-arrow-down","el-icon-arrow-up","el-icon-d-arrow-left","el-icon-d-arrow-right","el-icon-video-pause","el-icon-video-play","el-icon-refresh","el-icon-refresh-right","el-icon-refresh-left","el-icon-finished","el-icon-sort","el-icon-sort-up","el-icon-sort-down","el-icon-rank","el-icon-loading","el-icon-view","el-icon-c-scale-to-original","el-icon-date","el-icon-edit","el-icon-edit-outline","el-icon-folder","el-icon-folder-opened","el-icon-folder-add","el-icon-folder-remove","el-icon-folder-delete","el-icon-folder-checked","el-icon-tickets","el-icon-document-remove","el-icon-document-delete","el-icon-document-copy","el-icon-document-checked","el-icon-document","el-icon-document-add","el-icon-printer","el-icon-paperclip","el-icon-takeaway-box","el-icon-search","el-icon-monitor","el-icon-attract","el-icon-mobile","el-icon-scissors","el-icon-umbrella","el-icon-headset","el-icon-brush","el-icon-mouse","el-icon-coordinate","el-icon-magic-stick","el-icon-reading","el-icon-data-line","el-icon-data-board","el-icon-pie-chart","el-icon-data-analysis","el-icon-collection-tag","el-icon-film","el-icon-suitcase","el-icon-suitcase-1","el-icon-receiving","el-icon-collection","el-icon-files","el-icon-notebook-1","el-icon-notebook-2","el-icon-toilet-paper","el-icon-office-building","el-icon-school","el-icon-table-lamp","el-icon-house","el-icon-no-smoking","el-icon-smoking","el-icon-shopping-cart-full","el-icon-shopping-cart-1","el-icon-shopping-cart-2","el-icon-shopping-bag-1","el-icon-shopping-bag-2","el-icon-sold-out","el-icon-sell","el-icon-present","el-icon-box","el-icon-bank-card","el-icon-money","el-icon-coin","el-icon-wallet","el-icon-discount","el-icon-price-tag","el-icon-news","el-icon-guide","el-icon-male","el-icon-female","el-icon-thumb","el-icon-cpu","el-icon-link","el-icon-connection","el-icon-open","el-icon-turn-off","el-icon-set-up","el-icon-chat-round","el-icon-chat-line-round","el-icon-chat-square","el-icon-chat-dot-round","el-icon-chat-dot-square","el-icon-chat-line-square","el-icon-message","el-icon-postcard","el-icon-position","el-icon-turn-off-microphone","el-icon-microphone","el-icon-close-notification","el-icon-bangzhu","el-icon-time","el-icon-odometer","el-icon-crop","el-icon-aim","el-icon-switch-button","el-icon-full-screen","el-icon-copy-document","el-icon-mic","el-icon-stopwatch","el-icon-medal-1","el-icon-medal","el-icon-trophy","el-icon-trophy-1","el-icon-first-aid-kit","el-icon-discover","el-icon-place","el-icon-location","el-icon-location-outline","el-icon-location-information","el-icon-add-location","el-icon-delete-location","el-icon-map-location","el-icon-alarm-clock","el-icon-timer","el-icon-watch-1","el-icon-watch","el-icon-lock","el-icon-unlock","el-icon-key","el-icon-service","el-icon-mobile-phone","el-icon-bicycle","el-icon-truck","el-icon-ship","el-icon-basketball","el-icon-football","el-icon-soccer","el-icon-baseball","el-icon-wind-power","el-icon-light-rain","el-icon-lightning","el-icon-heavy-rain","el-icon-sunrise","el-icon-sunrise-1","el-icon-sunset","el-icon-sunny","el-icon-cloudy","el-icon-partly-cloudy","el-icon-cloudy-and-sunny","el-icon-moon","el-icon-moon-night","el-icon-dish","el-icon-dish-1","el-icon-food","el-icon-chicken","el-icon-fork-spoon","el-icon-knife-fork","el-icon-burger","el-icon-tableware","el-icon-sugar","el-icon-dessert","el-icon-ice-cream","el-icon-hot-water","el-icon-water-cup","el-icon-coffee-cup","el-icon-cold-drink","el-icon-goblet","el-icon-goblet-full","el-icon-goblet-square","el-icon-goblet-square-full","el-icon-refrigerator","el-icon-grape","el-icon-watermelon","el-icon-cherry","el-icon-apple","el-icon-pear","el-icon-orange","el-icon-coffee","el-icon-ice-tea","el-icon-ice-drink","el-icon-milk-tea","el-icon-potato-strips","el-icon-lollipop","el-icon-ice-cream-square","el-icon-ice-cream-round"]}},created:function(){},methods:{handleIconClick:function(e){this.$emit("input",e)},handleInputClear:function(){this.$emit("input","")}}}},function(e,n,t){"use strict";var o=t(23);n.a={name:"ThTable",components:{TableColumn:o.a},props:{data:{type:Array,default:function(){return[]}},options:{type:Array,default:function(){return[]}},selectType:{type:String,default:function(){return""}},dblclick:{type:Function,default:function(){return null}},treeProps:{type:Object,default:function(){return{}}},pageInfo:{type:Object,default:function(){return{}}},loading:{type:Boolean,default:function(){return!1}},height:{type:String,default:function(){return""}},rowKey:{type:String,default:function(){return""}},showPage:{type:Boolean,default:function(){return!0}},emptyText:{type:String,default:function(){return"暂无数据"}},loadingText:{type:String,default:function(){return"加载中"}}},data:function(){return{}},methods:{handleSelectionChange:function(e){e&&this.$emit("selection-change",e)},handleSingleSelect:function(e,n){e&&this.$emit("select-row-change",e)},handleSizeChange:function(e){this.pageInfo.pageSize=e,this.$emit("pageNumberChange",this.pageInfo.currentPage,this.pageInfo.pageSize)},handleCurrentChange:function(e){this.pageInfo.currentPage=e,this.$emit("pageNumberChange",this.pageInfo.currentPage,this.pageInfo.pageSize)},handlePrevClick:function(){1!==this.pageInfo.currentPage&&(this.pageInfo.currentPage-=1,this.$emit("pageNumberChange",this.pageInfo.currentPage,this.pageInfo.pageSize))},handleNextClick:function(){this.pageInfo.currentPage!==this.pageInfo.pageCount&&(this.pageInfo.currentPage+=1,this.$emit("pageNumberChange",this.pageInfo.currentPage,this.pageInfo.pageSize))},getTable:function(){return this.$refs.th_table}}}},function(e,n,t){"use strict";n.a={name:"TableColumn",props:{options:{type:Array,default:function(){return[]}}},created:function(){console.log(this.options)}}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t(8),i=t(14),l=t(19),c=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},a=[o.a,i.a,l.a],r=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];a.forEach(function(n){e.component(n.name,n)})};"undefined"!=typeof window&&window.Vue&&r(window.Vue),n.default=c({version:"0.0.7",install:r},a)},function(e,n,t){"use strict";var o=t(9);o.a.install=function(e){e.component(o.a.name,o.a)},n.a=o.a},function(e,n,t){"use strict";function o(e){t(10)}var i=t(3),l=t(13),c=t(2),a=o,r=c(i.a,l.a,!1,a,"data-v-7900d0bc",null);n.a=r.exports},function(e,n,t){var o=t(11);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);t(1)("5a987caa",o,!0,{})},function(e,n,t){n=e.exports=t(0)(!1),n.push([e.i,".th-cell[data-v-7900d0bc]{position:relative;display:flex;align-items:center;padding:10px 15px;border-radius:4px;border:1px solid #ebeef5;background-color:#fff;overflow:hidden;transition:.3s}.th-cell .th-cell-icon[data-v-7900d0bc]{margin-right:10px;font-size:18px}.th-cell .th-cell-content[data-v-7900d0bc]{flex:1}.th-cell-title[data-v-7900d0bc]{font-size:16px;color:#333}.th-cell-label[data-v-7900d0bc]{margin-top:5px;font-size:14px;color:#666;word-wrap:break-word;word-break:break-all}.th-cell-value[data-v-7900d0bc]{margin-left:10px;max-width:50%;font-size:14px;color:#999;word-wrap:break-word;word-break:break-all}.th-cell[data-v-7900d0bc]:hover{box-shadow:0 2px 12px 0 rgba(0,0,0,.1)}.skeleton[data-v-7900d0bc]{display:flex;align-items:center;margin-bottom:20px;padding:10px 15px;border-radius:4px;border:1px solid #ebeef5}.skeleton-icon[data-v-7900d0bc]{width:30px;height:30px;margin-right:10px;font-size:18px}.skeleton-content[data-v-7900d0bc]{flex:1}.skeleton-title[data-v-7900d0bc]{width:100px}.skeleton-label[data-v-7900d0bc]{margin-top:5px}.skeleton-value[data-v-7900d0bc]{margin-left:10px;width:100px}",""])},function(e,n){e.exports=function(e,n){for(var t=[],o={},i=0;i<n.length;i++){var l=n[i],c=l[0],a=l[1],r=l[2],s=l[3],u={id:e+":"+i,css:a,media:r,sourceMap:s};o[c]?o[c].parts.push(u):t.push(o[c]={id:c,parts:[u]})}return t}},function(e,n,t){"use strict";var o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("el-skeleton",{attrs:{loading:e.loading,animated:""}},[t("template",{slot:"template"},[t("div",{staticClass:"skeleton"},[t("el-skeleton-item",{staticClass:"skeleton-icon",attrs:{variant:"image"}}),e._v(" "),t("div",{staticClass:"skeleton-content"},[t("el-skeleton-item",{staticClass:"skeleton-title",attrs:{variant:"h4"}}),e._v(" "),t("el-skeleton-item",{staticClass:"skeleton-label",attrs:{variant:"text"}})],1),e._v(" "),t("el-skeleton-item",{staticClass:"skeleton-value",attrs:{variant:"text"}})],1)])],2),e._v(" "),e.loading?e._e():t("div",{staticClass:"th-cell",style:e.customStyle},[e.icon?t("i",{staticClass:"th-cell-icon",class:e.icon}):e._t("icon"),e._v(" "),t("div",{staticClass:"th-cell-content"},[e.title?t("div",{staticClass:"th-cell-title"},[e._v(e._s(e.title))]):e._t("title"),e._v(" "),e.label?t("div",{staticClass:"th-cell-label"},[e._v(e._s(e.label))]):e._t("label")],2),e._v(" "),e.value?t("div",{staticClass:"th-cell-value"},[e._v(e._s(e.value))]):e._t("default")],2)],1)},i=[],l={render:o,staticRenderFns:i};n.a=l},function(e,n,t){"use strict";var o=t(15);o.a.install=function(e){e.component(o.a.name,o.a)},n.a=o.a},function(e,n,t){"use strict";function o(e){t(16)}var i=t(4),l=t(18),c=t(2),a=o,r=c(i.a,l.a,!1,a,"data-v-7d8c5857",null);n.a=r.exports},function(e,n,t){var o=t(17);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);t(1)("a2abff02",o,!0,{})},function(e,n,t){n=e.exports=t(0)(!1),n.push([e.i,".input-prefix[data-v-7d8c5857]{height:100%;width:32px;display:flex;align-items:center}.input-prefix .icon[data-v-7d8c5857]{font-size:20px}.th-icons[data-v-7d8c5857]{height:300px;overflow-y:scroll}.th-icons .icon[data-v-7d8c5857]{padding:8px;font-size:20px;border-radius:2px}.th-icons .icon[data-v-7d8c5857]:hover{cursor:pointer;background-color:#f2f2f2}",""])},function(e,n,t){"use strict";var o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("el-popover",{attrs:{placement:"bottom-start",title:"Element图标库",width:e.width||400,trigger:"click"}},[t("el-input",{attrs:{slot:"reference",value:e.value,placeholder:"请选择图标",clearable:""},on:{clear:e.handleInputClear},slot:"reference"},[e.value?t("div",{staticClass:"input-prefix",attrs:{slot:"prefix"},slot:"prefix"},[t("i",{staticClass:"icon",class:e.value})]):e._e()]),e._v(" "),t("div",{staticClass:"th-icons"},e._l(e.icons,function(n,o){return t("i",{key:o,staticClass:"icon",class:n,on:{click:function(t){return e.handleIconClick(n)}}})}),0)],1)],1)},i=[],l={render:o,staticRenderFns:i};n.a=l},function(e,n,t){"use strict";var o=t(20);o.a.install=function(e){e.component(o.a.name,o.a)},n.a=o.a},function(e,n,t){"use strict";function o(e){t(21)}var i=t(5),l=t(27),c=t(2),a=o,r=c(i.a,l.a,!1,a,"data-v-47ddb3be",null);n.a=r.exports},function(e,n,t){var o=t(22);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);t(1)("7dff0719",o,!0,{})},function(e,n,t){n=e.exports=t(0)(!1),n.push([e.i,".th-table[data-v-47ddb3be]{position:relative;width:100%}.th-table .pagination[data-v-47ddb3be]{margin-top:20px}.th-table-more[data-v-47ddb3be]{position:absolute;top:13px;right:5px;cursor:pointer}",""])},function(e,n,t){"use strict";function o(e){t(24)}var i=t(6),l=t(26),c=t(2),a=o,r=c(i.a,l.a,!1,a,null,null);n.a=r.exports},function(e,n,t){var o=t(25);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);t(1)("0f315418",o,!0,{})},function(e,n,t){n=e.exports=t(0)(!1),n.push([e.i,"",""])},function(e,n,t){"use strict";var o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[e._l(e.options,function(n,o){return[n.hide?e._e():[n.type?t("el-table-column",{key:o,attrs:{type:n.type,label:n.label,width:"50"}}):n.children?t("el-table-column",{key:o,attrs:{prop:n.prop,label:n.label,width:n.width,align:n.align,fixed:n.fixed,sortable:n.sortable,"sort-method":n.sortMethod,"show-overflow-tooltip":""}},[t("TableColumn",{key:o,attrs:{options:n.children}})],1):t("el-table-column",{key:o,attrs:{prop:n.prop,label:n.label,width:n.width,align:n.align,fixed:n.fixed,sortable:n.sortable,"sort-method":n.sortMethod,"show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(o){return[n.slot?e._t("slot",null,{scope:o,option:n}):t("div",[e._v(e._s(o.row[n.prop]))])]}}],null,!0)})]]})],2)},i=[],l={render:o,staticRenderFns:i};n.a=l},function(e,n,t){"use strict";var o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",{staticClass:"th-table"},[t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"th_table",attrs:{data:e.data,"row-key":e.rowKey,stripe:"","highlight-current-row":"single"===e.selectType,"tree-props":e.treeProps},on:{"current-change":e.handleSingleSelect,"row-dblclick":e.dblclick,"selection-change":e.handleSelectionChange},scopedSlots:e._u([{key:"empty",fn:function(){return[t("div",[e._v("\n "+e._s(e.loading?e.loadingText||"加载中":e.emptyText||"暂无数据")+"\n ")])]},proxy:!0}])},[e._l(e.options,function(n,o){return[n.hide?e._e():[n.type?t("el-table-column",{key:o,attrs:{type:n.type,label:n.label,width:"50"}}):n.children?t("el-table-column",{key:o,attrs:{prop:n.prop,label:n.label,width:n.width,align:n.align||"left",fixed:n.fixed||null,sortable:n.sortable,"sort-method":n.sortMethod,"show-overflow-tooltip":""}},[t("table-column",{attrs:{options:n.children}})],1):t("el-table-column",{key:o,attrs:{prop:n.prop,label:n.label,width:n.width,align:n.align||"left",fixed:n.fixed||null,sortable:n.sortable,"sort-method":n.sortMethod,"show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(o){return[n.slot?e._t(n.slot,null,{scope:o,option:n}):t("div",[e._v(e._s(o.row[n.prop]))])]}}],null,!0)})]]})],2),e._v(" "),Object.keys(e.pageInfo).length>0&&e.showPage?t("div",{staticClass:"pagination"},[t("el-pagination",{attrs:{"current-page":e.pageInfo.currentPage,"page-sizes":e.pageInfo.sizes,"page-size":e.pageInfo.pageSize,layout:"total, prev, pager, next, sizes",total:e.pageInfo.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange,"prev-click":e.handlePrevClick,"next-click":e.handleNextClick}})],1):e._e()],1)},i=[],l={render:o,staticRenderFns:i};n.a=l}])});
2
- //# sourceMappingURL=tianheng-ui.js.map