xianniu-ui 0.8.9 → 0.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xianniu-ui",
3
- "version": "0.8.9",
3
+ "version": "0.8.11",
4
4
  "private": false,
5
5
  "main": "lib/xianniu-ui.umd.min.js",
6
6
  "scripts": {
@@ -17,8 +17,7 @@ export default {
17
17
  },
18
18
  content: {
19
19
  type: String,
20
- default:
21
- "阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的阿三大苏打实打实的啊啊实打实的",
20
+ default:"",
22
21
  },
23
22
  expandText: {
24
23
  type: String,
@@ -315,7 +315,6 @@ export default {
315
315
  for (let i = 0; i < list.length; i++) {
316
316
  const item = list[i];
317
317
  if (keys.includes(item.prop)) {
318
- console.log(item, key[item.prop]);
319
318
  item.modelVal = key[item.prop];
320
319
  }
321
320
  }
@@ -18,8 +18,4 @@
18
18
 
19
19
 
20
20
 
21
- @import './theme/variables.scss';
22
- @import './theme/mixin.scss';
23
- @import './theme/transition.scss';
24
- @import './theme/sidebar.scss';
25
- @import './theme/element-ui.scss';
21
+ @import './theme/index.scss';
@@ -3,6 +3,7 @@
3
3
  v-bind="$attrs"
4
4
  v-on="$listeners"
5
5
  v-if="isShowColumn($attrs)"
6
+ :show-overflow-tooltip="showOverflowTooltip($attrs)"
6
7
  >
7
8
  <template v-if="$attrs.labelMsg">
8
9
  <template slot="header">
@@ -101,6 +102,12 @@ export default {
101
102
  },
102
103
  },
103
104
  computed: {
105
+ showOverflowTooltip(){
106
+ return (attrs)=>{
107
+ const showTip = (attrs['showOverflowTooltip'] != undefined && attrs['showOverflowTooltip'] !== true) || (attrs['show-overflow-tooltip'] != undefined && attrs['show-overflow-tooltip'] !== true)
108
+ return attrs.more ? false : showTip ? !showTip : true
109
+ }
110
+ },
104
111
  label() {
105
112
  return (itemBtn, row) => {
106
113
  return typeof itemBtn.label === "function"
@@ -81,7 +81,12 @@
81
81
  align="center"
82
82
  :selectable="handleSelectable"
83
83
  ></el-table-column>
84
- <el-table-column v-bind="$attrs" v-if="isRadio" width="40px" align="center">
84
+ <el-table-column
85
+ v-bind="$attrs"
86
+ v-if="isRadio"
87
+ width="40px"
88
+ align="center"
89
+ >
85
90
  <template slot-scope="{ row }">
86
91
  <el-radio v-model="radioSelected" :label="row[idKey]"
87
92
  >&nbsp;</el-radio
@@ -142,9 +147,9 @@ export default {
142
147
  type: Array,
143
148
  default: () => [],
144
149
  },
145
- type:{
150
+ type: {
146
151
  type: String,
147
- default:'',
152
+ default: "",
148
153
  },
149
154
  stripe: Boolean,
150
155
  selection: Boolean,
@@ -195,12 +200,12 @@ export default {
195
200
  };
196
201
  },
197
202
  computed: {
198
- isSelection(){
199
- return this.type === 'selection' || this.selection
203
+ isSelection() {
204
+ return this.type === "selection" || this.selection;
205
+ },
206
+ isRadio() {
207
+ return this.type === "radio" || this.radio;
200
208
  },
201
- isRadio(){
202
- return this.type === 'radio' || this.radio
203
- }
204
209
  },
205
210
  created() {},
206
211
  updated() {
@@ -260,35 +265,35 @@ export default {
260
265
  typeof this.$attrs.selectable === "function"
261
266
  ) {
262
267
  return this.$attrs.selectable(row, idx);
263
- }
268
+ }
264
269
  const list = this.disabledList;
265
- const filter = this.filterQuery;
266
- if (
267
- list &&
268
- list.length &&
269
- this.disabledKey &&
270
- list.includes(row[this.disabledKey])
271
- ) {
272
- return 0;
273
- } else if (Object.keys(filter).length) {
274
- let step = 0;
275
- Object.keys(filter).forEach((key) => {
276
- if (filter[key].test(row[key])) {
277
- step = step + 1;
278
- }
279
- });
270
+ const filter = this.filterQuery;
271
+ if (
272
+ list &&
273
+ list.length &&
274
+ this.disabledKey &&
275
+ list.includes(row[this.disabledKey])
276
+ ) {
277
+ return 0;
278
+ } else if (Object.keys(filter).length) {
279
+ let step = 0;
280
+ Object.keys(filter).forEach((key) => {
281
+ if (filter[key].test(row[key])) {
282
+ step = step + 1;
283
+ }
284
+ });
280
285
 
281
- if (step >= Object.keys(filter).length) {
282
- /* if (isChange) {
286
+ if (step >= Object.keys(filter).length) {
287
+ /* if (isChange) {
283
288
  this.key = Date.parse(new Date());
284
289
  } */
285
- return 1;
286
- } else {
287
- return 0;
288
- }
289
- } else {
290
290
  return 1;
291
+ } else {
292
+ return 0;
291
293
  }
294
+ } else {
295
+ return 1;
296
+ }
292
297
  },
293
298
  },
294
299
  };
@@ -135,6 +135,24 @@ const reset = (obj) => {
135
135
  }
136
136
  return obj
137
137
  }
138
+
139
+
140
+
141
+ export const toCamelCase = (string)=> {
142
+ var words = string.split('-'); // 步1
143
+ var camelCaseWords = [words[0]];
144
+
145
+ for (var i = 1; i < words.length; i++) {
146
+ var word = words[i];
147
+ var capitalizedWord = word.charAt(0).toUpperCase() + word.slice(1); // 步骤2
148
+ camelCaseWords.push(capitalizedWord);
149
+ }
150
+
151
+ var camelCaseString = camelCaseWords.join(''); // 步骤3
152
+ return camelCaseString;
153
+ }
154
+
155
+
138
156
  export default {
139
157
  isEmpty,
140
158
  isImg,
@@ -142,5 +160,6 @@ export default {
142
160
  download,
143
161
  arrMerge,
144
162
  reset,
145
- isBlank
163
+ isBlank,
164
+ toCamelCase
146
165
  }