classcard-ui 0.2.257 → 0.2.261
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/dist/classcard-ui.common.js +88 -79
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.css +1 -1
- package/dist/classcard-ui.umd.js +88 -79
- package/dist/classcard-ui.umd.js.map +1 -1
- package/dist/classcard-ui.umd.min.js +1 -1
- package/dist/classcard-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CEditor/CEditor.vue +17 -16
- package/src/components/CGroupedSelect/CGroupedSelect.vue +8 -0
- package/src/components/CMultiselect/CMultiselect.vue +1 -1
- package/src/stories/CEditor.stories.js +1 -0
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
<quill-editor
|
|
8
8
|
class="mt-1 text-sm"
|
|
9
|
-
|
|
9
|
+
:value="content"
|
|
10
10
|
:options="editorOption"
|
|
11
11
|
@change="onChange($event)"
|
|
12
12
|
></quill-editor>
|
|
@@ -42,27 +42,25 @@ export default {
|
|
|
42
42
|
onEditorChange: {
|
|
43
43
|
type: Function,
|
|
44
44
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
editorOption: {
|
|
49
|
-
modules: {
|
|
50
|
-
toolbar: {
|
|
51
|
-
container: this.toolbarOptions,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
editorText: this.content,
|
|
56
|
-
};
|
|
45
|
+
placeholder: {
|
|
46
|
+
type: String,
|
|
47
|
+
},
|
|
57
48
|
},
|
|
58
49
|
methods: {
|
|
59
50
|
onChange(params) {
|
|
60
51
|
this.$emit("onEditorChange", params);
|
|
61
52
|
},
|
|
62
53
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
computed: {
|
|
55
|
+
editorOption() {
|
|
56
|
+
return {
|
|
57
|
+
modules: {
|
|
58
|
+
toolbar: {
|
|
59
|
+
container: this.toolbarOptions,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
placeholder: this.placeholder,
|
|
63
|
+
};
|
|
66
64
|
},
|
|
67
65
|
},
|
|
68
66
|
};
|
|
@@ -82,4 +80,7 @@ export default {
|
|
|
82
80
|
.ql-editor {
|
|
83
81
|
@apply text-sm text-gray-900;
|
|
84
82
|
}
|
|
83
|
+
.ql-editor.ql-blank::before {
|
|
84
|
+
@apply text-gray-500 not-italic;
|
|
85
|
+
}
|
|
85
86
|
</style>
|
|
@@ -145,6 +145,9 @@
|
|
|
145
145
|
<!-- More items... -->
|
|
146
146
|
</ul>
|
|
147
147
|
</div>
|
|
148
|
+
<p v-if="isError" class="mt-2 text-sm text-red-600">
|
|
149
|
+
{{ errorMessage }}
|
|
150
|
+
</p>
|
|
148
151
|
</div>
|
|
149
152
|
</template>
|
|
150
153
|
|
|
@@ -159,6 +162,11 @@ export default {
|
|
|
159
162
|
value: Object,
|
|
160
163
|
placeholder: String,
|
|
161
164
|
isSearching: Boolean,
|
|
165
|
+
isError: { type: Boolean, default: false },
|
|
166
|
+
errorMessage: {
|
|
167
|
+
type: String,
|
|
168
|
+
default: "This field cannot be empty",
|
|
169
|
+
},
|
|
162
170
|
},
|
|
163
171
|
data() {
|
|
164
172
|
return {
|