@leevan/jtui 2.0.0 → 2.0.3

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": "@leevan/jtui",
3
- "version": "2.0.0",
3
+ "version": "2.0.3",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -8,14 +8,14 @@
8
8
  "lib": "vue-cli-service build --target lib --name jtui --dest lib packages/index.js"
9
9
  },
10
10
  "description": "jt Components",
11
- "homepage": "http://jtgit.scsqzx.com/lww/jtui-pc",
11
+ "homepage": "http://jtgitlab.scsqzx.com/jtxa/jtui-pc",
12
12
  "license": "MIT",
13
13
  "bugs": {
14
- "url": "http://jtgit.scsqzx.com/lww/jtui-pc/issues"
14
+ "url": "http://jtgitlab.scsqzx.com/jtxa/jtui-pc/issues"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "git+http://jtgit.scsqzx.com/lww/jtui-pc.git"
18
+ "url": "git+http://jtgitlab.scsqzx.com/jtxa/jtui-pc.git"
19
19
  },
20
20
  "contributors": [
21
21
  "leevan",
@@ -319,6 +319,10 @@
319
319
  chartObj() {
320
320
  return this.myChart;
321
321
  },
322
+ disposeChart () {
323
+ this.myChart.dispose();
324
+ this.myChart = this.echarts.init(document.getElementById(this.ID));
325
+ },
322
326
  setEchartsOption() {
323
327
 
324
328
  console.log(this.echartsData.option, "this.echartsData.option");
@@ -58,8 +58,8 @@
58
58
  :style="{width:item.width ? item.width === 'auto' ? item.width : item.width + 'px' : '200px'}"
59
59
  v-if="item.type === 'iNumber'"
60
60
  :disabled="item.disabled ? item.disabled : false"
61
- :min="item.min ? item.min : -1.7976931348623157E+10308"
62
- :max="item.max ? item.max : 1.7976931348623157E+10308"
61
+ :min="item.min!=undefined ? item.min : -1.7976931348623157E+10308"
62
+ :max="item.max!=undefined ? item.max : 1.7976931348623157E+10308"
63
63
  controls-position="right"></el-input-number>
64
64
  <!-- 选择器 -->
65
65
  <el-select
@@ -1,53 +1,68 @@
1
1
  <template>
2
- <div>
3
- <el-radio-group v-model="radio_value" size="mini" @change="btnsClick">
4
- <el-radio-button
5
- v-for="(item,index) in fullData"
6
- :key="index"
7
- :label="item.value">{{item.label}}</el-radio-button>
8
- </el-radio-group>
2
+ <div>
3
+ <el-radio-group v-model="radio_value" size="mini" @change="btnsClick" v-if="dataType !== 'string'">
4
+ <el-radio-button
5
+ v-for="(item, index) in fullData"
6
+ :key="index"
7
+ :label="item.value"
8
+ >{{ item.label }}</el-radio-button
9
+ >
10
+ </el-radio-group>
11
+ <div v-else>
12
+ {{rowData}}
9
13
  </div>
14
+ </div>
10
15
  </template>
11
16
 
12
17
  <script>
13
- export default {
14
- name:'TabsBtn',
15
- data(){
16
- return {
17
- radio_value:"",
18
- fullData:[],
19
- oldValue:""
20
- }
21
- },
22
- props: {
23
- params: Object
24
- },
25
- created(){
26
- this.load();
27
- },
28
- methods:{
29
- load(){
30
- const { row , column } = this.params;
31
- if(row && row[column.property] && row[column.property].enum){
32
- this.fullData = row[column.property].enum
33
- this.radio_value = row[column.property].selected
34
- this.oldValue = row[column.property].selected;
35
- }
36
- },
37
- async btnsClick(val){
38
- const { row , column } = this.params;
39
- const { events , parentRow } = this.$attrs;
40
- const result = await events.radioChange({row,property:column.property,val,params:parentRow});
41
- if(result){
42
- this.oldValue = val;
43
- }else{
44
- this.radio_value = this.oldValue;
45
- }
46
- }
47
- }
48
- }
18
+ export default {
19
+ name: "TabsBtn",
20
+ data() {
21
+ return {
22
+ radio_value: "",
23
+ fullData: [],
24
+ oldValue: "",
25
+ dataType: '',
26
+ rowData: ''
27
+ };
28
+ },
29
+ props: {
30
+ params: Object,
31
+ },
32
+ created() {
33
+ this.load();
34
+ },
35
+ methods: {
36
+ load() {
37
+ const { row, column } = this.params;
38
+ if (row) {
39
+ this.rowData = row[column.property];
40
+ this.dataType = typeof this.rowData;
41
+ }
42
+ if (this.rowData && this.rowData.enum) {
43
+ this.fullData = this.rowData.enum;
44
+ this.radio_value = this.rowData.selected;
45
+ this.oldValue = this.rowData.selected;
46
+ }
47
+ },
48
+ async btnsClick(val) {
49
+ const { row, column } = this.params;
50
+ const { events, parentRow } = this.$attrs;
51
+ const result = await events.radioChange({
52
+ row,
53
+ property: column.property,
54
+ val,
55
+ params: parentRow,
56
+ });
57
+ if (result) {
58
+ this.oldValue = val;
59
+ } else {
60
+ this.radio_value = this.oldValue;
61
+ }
62
+ },
63
+ },
64
+ };
49
65
  </script>
50
66
 
51
67
  <style lang="scss" scoped>
52
-
53
68
  </style>