mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-11 03:33:12 +08:00
refactoring
This commit is contained in:
parent
8c72e01372
commit
3668a59455
@ -65,12 +65,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import Icon from 'Components/Icon'
|
import Icon from 'Components/Icon'
|
||||||
import { Editor } from 'tiptap'
|
import { Editor } from 'tiptap'
|
||||||
// import tiptap from 'tiptap'
|
|
||||||
// import tiptap from '../dist/tiptap.min.js'
|
|
||||||
import MentionPlugin from './plugins/Mention.js'
|
import MentionPlugin from './plugins/Mention.js'
|
||||||
|
|
||||||
// console.log(tiptap)
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Editor,
|
Editor,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="icon" :class="[`icon--${name}`, `icon--${size}`, modifierClasses('icon'), { 'has-align-fix': fixAlign }]">
|
<div class="icon" :class="[`icon--${name}`, `icon--${size}`, { 'has-align-fix': fixAlign }]">
|
||||||
<svg class="icon__svg">
|
<svg class="icon__svg">
|
||||||
<use xmlns:xlink="http://www.w3.org/1999/xlink" :xlink:href="'#icon--' + name"></use>
|
<use xmlns:xlink="http://www.w3.org/1999/xlink" :xlink:href="'#icon--' + name"></use>
|
||||||
</svg>
|
</svg>
|
||||||
|
@ -8,20 +8,6 @@ svgSpriteLoader(__svg__.filename)
|
|||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
Vue.mixin({
|
|
||||||
methods: {
|
|
||||||
modifierClasses(base, modifier = this.modifier) {
|
|
||||||
const classList = [modifier].flatten()
|
|
||||||
|
|
||||||
if (classList.length === 0) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
return `${base}--${classList.join(` ${base}--`)}`
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
render: h => h(App),
|
render: h => h(App),
|
||||||
}).$mount('#app')
|
}).$mount('#app')
|
||||||
|
Loading…
Reference in New Issue
Block a user