zydx-plus 1.30.168 → 1.30.170
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
|
@@ -401,8 +401,7 @@ export default {
|
|
|
401
401
|
// 标题
|
|
402
402
|
if(data.key === 'titleMenu') {
|
|
403
403
|
const html = butJson(this.editor,this.menusText)[data.key].html[key.key]
|
|
404
|
-
|
|
405
|
-
if(r === -1) this.editor.chain().focus().insertContentAt(this.selection(),html).run()
|
|
404
|
+
this.editor.chain().focus().insertContentAt(this.selection(),html).run()
|
|
406
405
|
}
|
|
407
406
|
// 正文
|
|
408
407
|
if(data.key === 'textMenu') {
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @描述: 上下插槽组件,可以有多个层级, 最下层带滚动
|
|
3
|
+
* @创建时间: 2022-08-19 9:00:00
|
|
4
|
+
*/
|
|
5
|
+
<template>
|
|
6
|
+
<div class="lesson_template_main_div">
|
|
7
|
+
<template v-if="!readonly">
|
|
8
|
+
<div v-if="topText !== ''" class="title_box display_flex">
|
|
9
|
+
<div style="width: 100%">{{topText}}</div>
|
|
10
|
+
<div class="z-button" @click="clearSelectAction">清空已选</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="main_center_div select_margin">
|
|
13
|
+
<template v-if="selectActionSort.length != 0">
|
|
14
|
+
<div v-for="(item, index) in selectActionSort" @click="cancel(item)" :key="index" class="item_div select_item_margin display_flex">
|
|
15
|
+
<div class="width70">{{item[viewName]}}</div>
|
|
16
|
+
<div class="display_flex flex_center">
|
|
17
|
+
<div class="x_style">+</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
<template v-else>
|
|
22
|
+
<div class="tip_text">暂未添加{{tipText}},现在添加吧...</div>
|
|
23
|
+
</template>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<div v-if="allText !== ''" class="title_box">{{allText}}</div>
|
|
27
|
+
<div class="main_center_div">
|
|
28
|
+
<div v-for="(item, index) in dataList" :key="index" class="item_div all_item width70" :class="isIncludeItem(item)? '' : 'select_item'" @click="save(item)" >{{item[viewName]}}</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
export default {
|
|
36
|
+
name: 'zydx-lesson-template',
|
|
37
|
+
model: {
|
|
38
|
+
prop: "selectDataList",
|
|
39
|
+
event: "update:modelValue"
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
selectDataList: {
|
|
43
|
+
type: Array,
|
|
44
|
+
default: () => []
|
|
45
|
+
},
|
|
46
|
+
dataList: {
|
|
47
|
+
type: Array,
|
|
48
|
+
default: () => []
|
|
49
|
+
},
|
|
50
|
+
topText: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ''
|
|
53
|
+
},
|
|
54
|
+
allText: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ''
|
|
57
|
+
},
|
|
58
|
+
sortName: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: ''
|
|
61
|
+
},
|
|
62
|
+
viewName: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ''
|
|
65
|
+
},
|
|
66
|
+
tipText: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: ''
|
|
69
|
+
},
|
|
70
|
+
readonly: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: false
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
computed: {
|
|
76
|
+
selectActionSort () {
|
|
77
|
+
let _that = this
|
|
78
|
+
if (this.sortName != '' && this.selectAction.length != 0) {
|
|
79
|
+
return _that.selectAction.sort(function(a, b){
|
|
80
|
+
return parseInt(a[_that.sortName]) > parseInt(b[_that.sortName]) ? 1: -1
|
|
81
|
+
})
|
|
82
|
+
}
|
|
83
|
+
return this.selectAction;
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
data () {
|
|
87
|
+
return {
|
|
88
|
+
selectAction: this.selectDataList
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
watch: {
|
|
92
|
+
selectActionSort: {
|
|
93
|
+
deep: true,
|
|
94
|
+
handler(newValue) {
|
|
95
|
+
this.$emit('update:modelValue', this.selectAction)
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
methods: {
|
|
100
|
+
cancel (param) {
|
|
101
|
+
this.selectAction.splice(this.selectAction.indexOf(param),1)
|
|
102
|
+
},
|
|
103
|
+
save (param) {
|
|
104
|
+
if (!this.readonly && this.isIncludeItem(param) == -1) {
|
|
105
|
+
this.selectAction.push(param)
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
clearSelectAction () {
|
|
109
|
+
this.selectAction = []
|
|
110
|
+
},
|
|
111
|
+
isIncludeItem (item) {
|
|
112
|
+
if (this.readonly) {
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
return JSON.stringify(this.selectDataList).indexOf(JSON.stringify(item)) === -1;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<style scoped>
|
|
122
|
+
.lesson_template_main_div {
|
|
123
|
+
width: 100%;
|
|
124
|
+
}
|
|
125
|
+
.select_margin {
|
|
126
|
+
padding: 10px 2px 10px 7px !important;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.main_center_div {
|
|
130
|
+
width: 100%;
|
|
131
|
+
display: flex;
|
|
132
|
+
padding: 7px 4px;
|
|
133
|
+
flex-direction: row;
|
|
134
|
+
align-content: center;
|
|
135
|
+
border: 1px solid #cccccc;
|
|
136
|
+
flex-wrap: wrap;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.item_div {
|
|
140
|
+
border: 1px solid rgba(204, 204, 204, 1);
|
|
141
|
+
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2);
|
|
142
|
+
cursor: pointer;
|
|
143
|
+
border-radius: 2px;
|
|
144
|
+
height: 32px;
|
|
145
|
+
line-height: 32px;
|
|
146
|
+
border: 1px solid #cccccc;
|
|
147
|
+
text-align: center;
|
|
148
|
+
}
|
|
149
|
+
.display_flex {
|
|
150
|
+
display: flex;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.select_item_margin {
|
|
154
|
+
width: 86px;
|
|
155
|
+
margin: 3px 5px 3px 0px;
|
|
156
|
+
|
|
157
|
+
}
|
|
158
|
+
.all_item {
|
|
159
|
+
width: 70px;
|
|
160
|
+
margin: 3px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.width70 {
|
|
164
|
+
width: 70px;
|
|
165
|
+
font-size: 14px;
|
|
166
|
+
font-weight: 400;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.title_box {
|
|
170
|
+
font-size: 16px;
|
|
171
|
+
font-weight: 400;
|
|
172
|
+
width: 100%;
|
|
173
|
+
margin: 5px 0px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
.select_item {
|
|
180
|
+
background: rgba(255, 255, 255, 1);
|
|
181
|
+
color: #cccccc;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.tip_text {
|
|
185
|
+
font-size: 16px;
|
|
186
|
+
font-weight: 400;
|
|
187
|
+
color: rgba(0, 0, 0, 0.6);
|
|
188
|
+
text-align: center;
|
|
189
|
+
width: 100%;
|
|
190
|
+
}
|
|
191
|
+
.z-button {
|
|
192
|
+
margin: 1px;
|
|
193
|
+
width: auto;
|
|
194
|
+
min-width: 60px;
|
|
195
|
+
max-width: 60px;
|
|
196
|
+
text-overflow: ellipsis;
|
|
197
|
+
white-space: nowrap;
|
|
198
|
+
overflow: hidden;
|
|
199
|
+
height: 20px;
|
|
200
|
+
background-color: #FFFFFF;
|
|
201
|
+
color: #000000;
|
|
202
|
+
border: #000000 1px solid;
|
|
203
|
+
line-height: 18px;
|
|
204
|
+
border-radius: 3px;
|
|
205
|
+
font-size: 12px !important;
|
|
206
|
+
letter-spacing: 0px !important;
|
|
207
|
+
text-align: center;
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
padding: 0 5px;
|
|
210
|
+
font-weight: normal;
|
|
211
|
+
box-sizing: border-box;
|
|
212
|
+
}
|
|
213
|
+
.flex_center {
|
|
214
|
+
display: flex;
|
|
215
|
+
justify-content: center;
|
|
216
|
+
align-items: center;
|
|
217
|
+
}
|
|
218
|
+
.x_style {
|
|
219
|
+
transform: rotate(45deg);
|
|
220
|
+
height: 8px;
|
|
221
|
+
line-height: 8px;
|
|
222
|
+
width: 8px;
|
|
223
|
+
}
|
|
224
|
+
</style>
|
package/src/index.js
CHANGED
|
@@ -29,6 +29,7 @@ import choice from './components/choice/index';
|
|
|
29
29
|
import word from './components/word/index';
|
|
30
30
|
import sketchpad from './components/sketchpad/index';
|
|
31
31
|
import pictureViewer from './components/pictureViewer/index';
|
|
32
|
+
import lessonTemplate from './components/lesson_template/index';
|
|
32
33
|
|
|
33
34
|
const components = [
|
|
34
35
|
Calendar,
|
|
@@ -59,7 +60,8 @@ const components = [
|
|
|
59
60
|
choice,
|
|
60
61
|
word,
|
|
61
62
|
sketchpad,
|
|
62
|
-
pictureViewer
|
|
63
|
+
pictureViewer,
|
|
64
|
+
lessonTemplate
|
|
63
65
|
];
|
|
64
66
|
|
|
65
67
|
function install(app) {
|
|
@@ -71,7 +73,7 @@ function install(app) {
|
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
export default {
|
|
74
|
-
version: '1.30.
|
|
76
|
+
version: '1.30.170',
|
|
75
77
|
install,
|
|
76
78
|
Calendar,
|
|
77
79
|
Message,
|
|
@@ -103,6 +105,7 @@ export default {
|
|
|
103
105
|
choice,
|
|
104
106
|
word,
|
|
105
107
|
sketchpad,
|
|
106
|
-
pictureViewer
|
|
108
|
+
pictureViewer,
|
|
109
|
+
lessonTemplate
|
|
107
110
|
};
|
|
108
111
|
|