zydx-plus 1.32.240 → 1.32.242

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": "zydx-plus",
3
- "version": "1.32.240",
3
+ "version": "1.32.242",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -21,7 +21,7 @@
21
21
  "author": "",
22
22
  "dependencies": {
23
23
  "vue-draggable-next": "^2.1.1",
24
- "pdfjs-dist": "^2.0.943",
24
+ "pdfjs-dist": "^3.11.174",
25
25
  "snabbdom": "^3.5.1",
26
26
  "katex": "^0.15.6",
27
27
  "simple-mind-map": "^0.6.14",
@@ -97,7 +97,7 @@ export default {
97
97
  },
98
98
  methods: {
99
99
  flipLeft(e,v) {
100
- if(e >= this.pdfPages) {
100
+ if(e > this.pdfPages) {
101
101
  this.pageIndex = this.pdfPages
102
102
  return
103
103
  }else {
@@ -135,7 +135,11 @@ export default {
135
135
  if(that.imgArr[that.pageIndex - 1] !== undefined) {
136
136
  that.oneShow = that.pageIndex !== 1
137
137
  }
138
- const loadingTask = PdfJs.getDocument(this.source)
138
+ const loadingTask = PdfJs.getDocument({
139
+ url: this.source,
140
+ cMapUrl: "https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/cmaps/",
141
+ cMapPacked: true
142
+ })
139
143
  loadingTask.promise.then((pdf) => {
140
144
  that.pdfPages = pdf.numPages // 获取pdf文件的总页数
141
145
  pdf.getPage(that.pageIndex).then(function (page) {
@@ -93,7 +93,11 @@ export default {
93
93
  },
94
94
  init() {
95
95
  let that = this
96
- const loadingTask = PdfJs.getDocument(this.url)
96
+ const loadingTask = PdfJs.getDocument({
97
+ url: this.url,
98
+ cMapUrl: "https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/cmaps/",
99
+ cMapPacked: true
100
+ })
97
101
  loadingTask.promise.then((pdf) => {
98
102
  that.pdfPages = pdf.numPages // 获取pdf文件的总页数
99
103
  let page = pdf.numPages
@@ -1,138 +1,159 @@
1
1
  <template>
2
- <div class="list">
3
- <div class="list-cont" v-if="list.length > 0">
4
- <div class="list-li" :style="{'border-bottom': (link)? '1px solid #ccc': '0', 'color': (active === index)? activeColor : '#333'}" @click="listTap(item,index)" v-for="(item,index) in list" :key="index">
5
- <div class="list-title">
6
- <span :style="{'font-size': column[0].fontSize + 'px', 'font-weight': column[0].fontWeight}">{{ index + 1 }}. {{ (angleBrackets)? '《': '' }} {{ item[column[0].label] }} {{ (angleBrackets)? '》': '' }}</span>
7
- <button v-if="delShow" @click="del(item)">{{ delText }}</button>
8
- </div>
9
- <div class="list-cont" v-if="open">
10
- <div class="list-li-cont">
11
- <p v-for="(it,ind) in column.slice(1, column.length)" :key="ind">{{ it.name }}:{{ item[it.label] }}</p>
12
- </div>
13
- </div>
14
- <div class="list-cont" v-else>
15
- <div class="list-li-cont" v-if="active === index">
16
- <p v-for="(it,ind) in column.slice(1, column.length)" :key="ind">{{ it.name }}:{{ item[it.label] }}</p>
2
+ <div class="list">
3
+ <div class="list-cont" v-if="list.length > 0">
4
+ <div class="list-li"
5
+ :style="{'border-bottom': (link)? '1px solid #ccc': '0', 'color': (active === index)? activeColor : '#333'}"
6
+ @click="listTap(item,index)" v-for="(item,index) in list" :key="index">
7
+ <div class="list-title">
8
+ <span :style="{'font-size': column[0].fontSize + 'px', 'font-weight': column[0].fontWeight}">{{
9
+ index + 1
10
+ }}. {{ (angleBrackets) ? '《' : '' }} {{ item[column[0].label] }} {{
11
+ (angleBrackets) ? '》' : ''
12
+ }}</span>
13
+ <button v-if="delShow" @click="del(item)">{{ delText }}</button>
14
+ </div>
15
+ <div class="list-cont" v-if="open">
16
+ <div class="list-li-cont">
17
+ <p v-for="(it,ind) in column.slice(1, column.length)" :key="ind">{{ it.name }}:{{
18
+ item[it.label]
19
+ }}</p>
20
+ </div>
21
+ </div>
22
+ <div class="list-cont" v-else>
23
+ <div class="list-li-cont" v-if="active === index">
24
+ <p v-for="(it,ind) in column.slice(1, column.length)" :key="ind">{{ it.name }}:{{
25
+ item[it.label]
26
+ }}</p>
27
+ </div>
28
+ </div>
17
29
  </div>
18
- </div>
19
- </div>
30
+ </div>
31
+ <div v-else class="wu">暂无数据</div>
20
32
  </div>
21
- <div v-else class="wu">暂无数据</div>
22
- </div>
23
33
  </template>
24
34
 
25
35
  <script>
26
36
  export default {
27
- name: "zydx-tree-list",
28
- data() {
29
- return {
30
- active: this.actives,
31
- }
32
- },
33
- props: {
34
- list: { // 数据列表
35
- type: Array,
36
- default: () => []
37
- },
38
- column: { // 数据列表
39
- type: Array,
40
- default: () => []
41
- },
42
- delShow: { //是否显示取消按钮
43
- type: Boolean,
44
- default: false
37
+ name: "zydx-tree-list",
38
+ data() {
39
+ return {
40
+ active: this.actives,
41
+ }
45
42
  },
46
- angleBrackets: {
47
- type: Boolean,
48
- default: false
43
+ props: {
44
+ list: { // 数据列表
45
+ type: Array,
46
+ default: () => []
47
+ },
48
+ column: { // 数据列表
49
+ type: Array,
50
+ default: () => []
51
+ },
52
+ delShow: { //是否显示取消按钮
53
+ type: Boolean,
54
+ default: false
55
+ },
56
+ angleBrackets: {
57
+ type: Boolean,
58
+ default: false
59
+ },
60
+ open: {
61
+ type: Boolean,
62
+ default: false
63
+ },
64
+ link: {
65
+ type: Boolean,
66
+ default: false
67
+ },
68
+ activeColor: {
69
+ type: String,
70
+ default: '#e20808'
71
+ },
72
+ actives: {
73
+ type: Number,
74
+ default: 0
75
+ },
76
+ delText: {
77
+ type: String,
78
+ default: '删除'
79
+ }
49
80
  },
50
- open: {
51
- type: Boolean,
52
- default: false
81
+ watch: {
82
+ actives(val) {
83
+ if (val === -1) return
84
+ this.active = val
85
+ }
53
86
  },
54
- link: {
55
- type: Boolean,
56
- default: false
57
- },
58
- activeColor: {
59
- type: String,
60
- default: '#e20808'
61
- },
62
- actives: {
63
- type: Number,
64
- default: 0
65
- },
66
- delText: {
67
- type: String,
68
- default: '删除'
87
+ methods: {
88
+ del(data) {
89
+ this.$emit('del', data)
90
+ },
91
+ listTap(data, index) {
92
+ this.active = index
93
+ this.$emit('confirm', data)
94
+ },
69
95
  }
70
- },
71
- watch: {
72
- actives(val) {
73
- if(val === -1) return
74
- this.active = val
75
- }
76
- },
77
- methods: {
78
- del(data) {
79
- this.$emit('del',data)
80
- },
81
- listTap(data,index) {
82
- this.active = index
83
- this.$emit('confirm',data)
84
- },
85
- }
86
96
  }
87
97
  </script>
88
98
 
89
99
  <style scoped>
90
- .wu{
91
- text-align: center;
92
- font-size: 18px;
93
- padding: 40px 0;
100
+ .wu {
101
+ text-align: center;
102
+ font-size: 18px;
103
+ padding: 40px 0;
104
+ }
105
+
106
+ .list-title {
107
+ display: flex;
108
+ justify-content: center;
109
+ line-height: 30px;
94
110
  }
95
- .list-title{
96
- display: flex;
97
- justify-content: center;
98
- line-height: 30px;
111
+
112
+ .list-title > span {
113
+ flex: 1;
114
+ overflow: hidden;
115
+ white-space: nowrap;
116
+ text-overflow: ellipsis;
117
+ height: 30px;
118
+ font-size: 16px;
99
119
  }
100
- .list-title>span{
101
- flex: 1;
102
- overflow: hidden;
103
- white-space: nowrap;
104
- text-overflow: ellipsis;
105
- height: 30px;
120
+
121
+ .list-title > button {
122
+ margin-left: 5px;
123
+ margin-top: 4px;
124
+ font-size: 12px;
125
+ background-color: transparent;
126
+ border: 1px solid #000;
127
+ border-radius: 3px;
128
+ padding: 2px 5px;
129
+ cursor: pointer;
130
+ height: 22px;
131
+ min-width: 60px;
106
132
  }
107
- .list-title>button{
108
- margin-left: 5px;
109
- margin-top: 4px;
110
- font-size: 12px;
111
- background-color: transparent;
112
- border: 1px solid #000;
113
- border-radius: 3px;
114
- padding: 2px 5px;
115
- cursor: pointer;
116
- height: 22px;
117
- min-width: 60px;
133
+
134
+ .list {
135
+ padding: 0 10px;
136
+ cursor: pointer;
118
137
  }
119
- .list{
120
- padding: 0 10px;
121
- cursor: pointer;
138
+ .list-li{
139
+ padding-bottom: 10px;
122
140
  }
123
- .list-li>span{
124
- font-size: 16px;
125
- line-height: 30px;
141
+ .list-li > span {
142
+ font-size: 16px;
143
+ line-height: 30px;
126
144
  }
127
- .list-li-cont{
128
- font-size: 14px;
129
- padding-left: 18px;
145
+
146
+ .list-li-cont {
147
+ font-size: 14px;
148
+ padding-left: 18px;
130
149
  }
131
- .list-li-cont>p{
132
- height: 26px;
133
- line-height: 26px;
134
- overflow: hidden;
135
- white-space: nowrap;
136
- text-overflow: ellipsis;
150
+
151
+ .list-li-cont > p {
152
+ height: 25px;
153
+ line-height: 25px;
154
+ overflow: hidden;
155
+ white-space: nowrap;
156
+ text-overflow: ellipsis;
157
+ font-size: 14px;
137
158
  }
138
159
  </style>
package/src/index.js CHANGED
@@ -79,7 +79,7 @@ function install(app) {
79
79
  }
80
80
 
81
81
  export default {
82
- version: '1.32.240',
82
+ version: '1.32.242',
83
83
  install,
84
84
  Calendar,
85
85
  Message,