Skip to content

Commit

Permalink
Merge pull request hinesboy#712 from wangsongc/next
Browse files Browse the repository at this point in the history
support vue-next
  • Loading branch information
ygj6 authored Sep 16, 2021
2 parents a920f09 + b71836c commit 0a9c4b9
Show file tree
Hide file tree
Showing 39 changed files with 11,660 additions and 8,896 deletions.
2 changes: 1 addition & 1 deletion dist/css/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed dist/katex/fonts/KaTeX_AMS-Regular.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Caligraphic-Bold.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Caligraphic-Regular.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Fraktur-Bold.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Fraktur-Regular.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Main-Bold.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Main-Italic.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Main-Regular.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Math-BoldItalic.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Math-Italic.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Math-Regular.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Math-Regular.ttf
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Math-Regular.woff
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Math-Regular.woff2
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_SansSerif-Bold.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_SansSerif-Italic.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_SansSerif-Regular.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Script-Regular.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Size1-Regular.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Size2-Regular.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Size3-Regular.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Size4-Regular.eot
Binary file not shown.
Binary file removed dist/katex/fonts/KaTeX_Typewriter-Regular.eot
Binary file not shown.
23 changes: 22 additions & 1 deletion dist/mavon-editor.js

Large diffs are not rendered by default.

39 changes: 20 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"xss": "^1.0.6"
},
"devDependencies": {
"@vue/compiler-sfc": "^3.1.1",
"@vue/test-utils": "^1.1.2",
"auto-textarea": "^1.4.0",
"autoprefixer": "^8.3.0",
Expand All @@ -48,27 +49,27 @@
"babel-preset-env": "^1.6.0",
"babel-preset-stage-2": "^6.24.1",
"copy-webpack-plugin": "^4.2.3",
"css-loader": "^0.28.1",
"css-loader": "^3.1.0",
"eslint": "^4.11.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-html": "^4.0.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.11.1",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^1",
"github-markdown-css": "^2.6.0",
"html-loader": "^0.4.5",
"html-webpack-plugin": "^2.28.0",
"html-loader": "^1.3.2",
"html-webpack-plugin": "^4.5.2",
"identity-obj-proxy": "^3.0.0",
"jest": "^23.6.0",
"jest-raw-loader": "^1.0.1",
"jest-serializer-vue": "^2.0.2",
"katex": "^0.11.1",
"keycode": "^2.1.9",
"less": "^2.7.2",
"less-loader": "^4.0.4",
"less": "^3.5.0",
"less-loader": "^7",
"markdown-it": "^10.0.0",
"markdown-it-abbr": "^1.0.4",
"markdown-it-container": "^2.0.0",
Expand All @@ -87,15 +88,15 @@
"markdown-it-toc": "^1.1.0",
"merges-utils": "^1.0.2",
"optimize-css-assets-webpack-plugin": "^1.3.1",
"postcss": "^5.0.10",
"postcss": "^8.3.6",
"postcss-advanced-variables": "1.2.2",
"postcss-atroot": "^0.1.2",
"postcss-color-function": "^3.0.0",
"postcss-custom-media": "^5.0.0",
"postcss-custom-properties": "^5.0.0",
"postcss-custom-selectors": "^3.0.0",
"postcss-extend": "^1.0.1",
"postcss-loader": "^1.3.3",
"postcss-loader": "^4",
"postcss-media-minmax": "^2.1.0",
"postcss-mixins": "^5.4.1",
"postcss-nested": "^1.0.0",
Expand All @@ -106,18 +107,18 @@
"postcss-selector-matches": "^2.0.0",
"postcss-selector-not": "^2.0.0",
"raw-loader": "^0.5.1",
"style-loader": "^0.17.0",
"stylus": "^0.54.5",
"stylus-loader": "^2.4.0",
"url-loader": "^0.5.8",
"vue": "^2.3.4",
"style-loader": "2",
"stylus": "^0.54.8",
"stylus-loader": "^4",
"url-loader": "^1",
"vue": "^3.1.1",
"vue-jest": "^3.0.7",
"vue-loader": "^12.0.3",
"vue-style-loader": "^3.0.0",
"vue-template-compiler": "^2.2.1",
"webpack": "^2.4.1",
"vue-loader": "16",
"vue-style-loader": "^4.1.3",
"webpack": "^4.36.1",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-dev-server": "^2.11.5",
"webpack-cli": "^3.3.6",
"webpack-dev-server": "^3",
"webpack-md5-hash": "^0.0.5"
}
}
119 changes: 119 additions & 0 deletions src/components/auto-textarea.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<template>
<div :style="{fontSize: fontSize , lineHeight: lineHeight, height: fullHeight ? '100%': 'auto'}" class="auto-textarea-wrapper">
<pre :style="{fontSize: fontSize , lineHeight: lineHeight, minHeight: fullHeight ? '100%': 'auto'}" class="auto-textarea-block"><br/>{{temp_value}} </pre>
<textarea ref="vTextarea" :autofocus="s_autofocus" @keyup="change" spellcheck="false" :placeholder="placeholder" v-model="temp_value" :style="{fontSize: fontSize , lineHeight: lineHeight}" :class="{'no-border': !border , 'no-resize': !resize}" class="auto-textarea-input">
</textarea>
</div>
</template>

<script type="text/ecmascript-6">
export default {
emits: ["update:modelValue"],
data() {
return {
temp_value: (() => {
return this.modelValue;
})(),
s_autofocus: (() => {
if (this.autofocus) {
return 'autofocus'
}
})()
};
},
created() {
},
props: {
fullHeight: {
type: Boolean,
default: false
},
autofocus: {
type: Boolean,
default: false
},
modelValue: {
type: String,
default: ''
},
placeholder: {
type: String,
default: ''
},
border: {
type: Boolean,
default: false
},
resize: {
type: Boolean,
default: false
},
onchange: {
type: Function,
default: null
},
fontSize: {
type: String,
default: '14px'
},
lineHeight: {
type: String,
default: '18px'
}
},
methods: {
change($event) {
if (this.onchange) {
this.onchange(this.temp_value , $event)
}
}
},
watch: {
modelValue: function (val, oldVal) {
this.temp_value = val
},
temp_value: function (val, oldVal) {
this.$emit('update:modelValue' , val)
}
}
};
</script>
<style lang="stylus" rel="stylesheet/stylus">
.auto-textarea-wrapper
position relative
width 100%
margin 0
padding 0
line-height normal
.auto-textarea-block
display block
white-space pre-wrap
word-wrap break-word !important
visibility hidden
overflow hidden
margin 0
padding 0
box-sizing border-box
font-size 100%
.auto-textarea-input
font-family Menlo, "Ubuntu Mono", Consolas, "Courier New", "Microsoft Yahei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif
position absolute
width 100%
height 100%
top 0
left 0
margin 0
padding 0
overflow-y hidden
color #2C3E50
&.no-border
outline 0 none
border none !important
&.no-resize
resize none
</style>
Loading

0 comments on commit 0a9c4b9

Please sign in to comment.