fix 81427
This commit is contained in:
+86
-82
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<a-config-provider :locale="locale">
|
||||
<div id="app">
|
||||
<!-- <template v-for="item in data">
|
||||
<insert-text :title="item.title" :key="item.title" :list="item.list" />
|
||||
@@ -19,24 +20,24 @@
|
||||
/>
|
||||
</template>
|
||||
<a-divider>初始化</a-divider>
|
||||
<Init/>
|
||||
<Init />
|
||||
<a-divider>正文</a-divider>
|
||||
<chapterData/>
|
||||
<first-level-listing/>
|
||||
<SaicFunc/>
|
||||
<chapterData />
|
||||
<first-level-listing />
|
||||
<SaicFunc />
|
||||
<!-- <a-divider>正文</a-divider>-->
|
||||
<!-- <contentOne />-->
|
||||
<!-- <a-divider>列项</a-divider>-->
|
||||
<!-- <a-divider>函数</a-divider>-->
|
||||
<a-divider>表格、图片</a-divider>
|
||||
<SaicTable/>
|
||||
<SaicImg/>
|
||||
<SaicTable />
|
||||
<SaicImg />
|
||||
<!-- <a-divider>图</a-divider>-->
|
||||
<!-- <SaicImg/>-->
|
||||
<!-- <insert-image />-->
|
||||
<a-divider>脚注、注、示例</a-divider>
|
||||
<add-footnote/>
|
||||
<SaicExample/>
|
||||
<add-footnote />
|
||||
<SaicExample />
|
||||
<!-- <InsertNotes />-->
|
||||
<!-- <a-divider>示例</a-divider>-->
|
||||
<!-- <SaicExample/>-->
|
||||
@@ -45,35 +46,37 @@
|
||||
<!-- <a-divider>修订信息</a-divider>-->
|
||||
<!-- <RevisInformation />-->
|
||||
<a-divider>附录</a-divider>
|
||||
<Appendix/>
|
||||
<Appendix />
|
||||
<!-- <insert-table-row />-->
|
||||
<!-- <hello-world />-->
|
||||
</div>
|
||||
</a-config-provider>
|
||||
</template>
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import {SEPARATOR_TYPE} from '@/pages/page1/common/utils'
|
||||
import InsertTableRow from './components/InsertTableRow.vue'
|
||||
import InsertGuideText from './components/InsertGuideText.vue'
|
||||
import FirstLevelListing from './components/FirstLevelListing.vue'
|
||||
import AddFootnote from './components/AddFootnote.vue'
|
||||
import InsertImage from './components/InsertImage.vue'
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
import Init from './saicComponents/Init'
|
||||
import contentOne from './saicComponents/Content'
|
||||
import SaicFunc from './saicComponents/SaicFunc'
|
||||
import SaicTable from './saicComponents/SaicTable'
|
||||
import SaicImg from './components/InsertImage'
|
||||
import InsertNotes from './saicComponents/InsertNotes'
|
||||
import SaicExample from './saicComponents/SaicExample'
|
||||
import SaicFile from './saicComponents/SaicFile'
|
||||
import RevisInformation from './saicComponents/RevisInformation'
|
||||
import Appendix from './saicComponents/Appendix'
|
||||
import chapterData from './saicComponents/chapterData'
|
||||
import Chapter from './saicComponents/Chapter'
|
||||
import _axios from '@/plugins/axios2'
|
||||
import Vue from 'vue'
|
||||
import { SEPARATOR_TYPE } from '@/pages/page1/common/utils'
|
||||
import InsertTableRow from './components/InsertTableRow.vue'
|
||||
import InsertGuideText from './components/InsertGuideText.vue'
|
||||
import FirstLevelListing from './components/FirstLevelListing.vue'
|
||||
import AddFootnote from './components/AddFootnote.vue'
|
||||
import InsertImage from './components/InsertImage.vue'
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
import Init from './saicComponents/Init'
|
||||
import contentOne from './saicComponents/Content'
|
||||
import SaicFunc from './saicComponents/SaicFunc'
|
||||
import SaicTable from './saicComponents/SaicTable'
|
||||
import SaicImg from './components/InsertImage'
|
||||
import InsertNotes from './saicComponents/InsertNotes'
|
||||
import SaicExample from './saicComponents/SaicExample'
|
||||
import SaicFile from './saicComponents/SaicFile'
|
||||
import RevisInformation from './saicComponents/RevisInformation'
|
||||
import Appendix from './saicComponents/Appendix'
|
||||
import chapterData from './saicComponents/chapterData'
|
||||
import Chapter from './saicComponents/Chapter'
|
||||
import _axios from '@/plugins/axios2'
|
||||
import zh_CN from 'ant-design-vue/lib/locale/zh_CN'
|
||||
|
||||
export default {
|
||||
export default {
|
||||
components: {
|
||||
InsertTableRow,
|
||||
InsertGuideText,
|
||||
@@ -94,10 +97,10 @@
|
||||
chapterData,
|
||||
Chapter
|
||||
},
|
||||
data() {
|
||||
data () {
|
||||
let Ps
|
||||
|
||||
function updateScroll() {
|
||||
function updateScroll () {
|
||||
Ps.update()
|
||||
}
|
||||
|
||||
@@ -126,10 +129,11 @@
|
||||
}
|
||||
],
|
||||
isDisplay: false,
|
||||
num: 0
|
||||
num: 0,
|
||||
locale: zh_CN
|
||||
}
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
window.Asc.plugin.init = function () {
|
||||
Vue.prototype.ctx = this
|
||||
// console.log(this)
|
||||
@@ -148,45 +152,45 @@
|
||||
const oTextPr9 = oHeading1Style6.GetParaPr()
|
||||
oTextPr9.SetSpacingAfter(10)
|
||||
|
||||
var oHeading1Style = oDocument.CreateStyle("Heading 1");
|
||||
const oTextPr = oHeading1Style.GetTextPr();
|
||||
oTextPr.SetFontFamily("黑体");
|
||||
var oHeading1Style = oDocument.CreateStyle('Heading 1')
|
||||
const oTextPr = oHeading1Style.GetTextPr()
|
||||
oTextPr.SetFontFamily('黑体')
|
||||
oTextPr.SetFontSize(21)
|
||||
oTextPr.SetColor(0, 0, 0);
|
||||
oTextPr.SetColor(0, 0, 0)
|
||||
//
|
||||
//
|
||||
var oHeading1Style1 = oDocument.CreateStyle("Heading 2");
|
||||
const oTextPr1 = oHeading1Style1.GetTextPr();
|
||||
oTextPr1.SetFontFamily("黑体");
|
||||
var oHeading1Style1 = oDocument.CreateStyle('Heading 2')
|
||||
const oTextPr1 = oHeading1Style1.GetTextPr()
|
||||
oTextPr1.SetFontFamily('黑体')
|
||||
oTextPr1.SetFontSize(21)
|
||||
oTextPr1.SetColor(0, 0, 0);
|
||||
oTextPr1.SetColor(0, 0, 0)
|
||||
//
|
||||
//
|
||||
var oHeading1Style2 = oDocument.CreateStyle("Heading 3");
|
||||
const oTextPr2 = oHeading1Style2.GetTextPr();
|
||||
oTextPr2.SetFontFamily("黑体");
|
||||
var oHeading1Style2 = oDocument.CreateStyle('Heading 3')
|
||||
const oTextPr2 = oHeading1Style2.GetTextPr()
|
||||
oTextPr2.SetFontFamily('黑体')
|
||||
oTextPr2.SetFontSize(21)
|
||||
oTextPr2.SetColor(0, 0, 0);
|
||||
oTextPr2.SetColor(0, 0, 0)
|
||||
//
|
||||
//
|
||||
var oHeading1Style3 = oDocument.CreateStyle("Heading 4");
|
||||
const oTextPr3 = oHeading1Style3.GetTextPr();
|
||||
oTextPr3.SetFontFamily("黑体");
|
||||
var oHeading1Style3 = oDocument.CreateStyle('Heading 4')
|
||||
const oTextPr3 = oHeading1Style3.GetTextPr()
|
||||
oTextPr3.SetFontFamily('黑体')
|
||||
oTextPr3.SetFontSize(21)
|
||||
// oTextPr3.SetColor(0, 0, 0);
|
||||
//
|
||||
//
|
||||
var oHeading1Style4 = oDocument.CreateStyle("Heading 5");
|
||||
const oTextPr4 = oHeading1Style4.GetTextPr();
|
||||
oTextPr4.SetFontFamily("黑体");
|
||||
var oHeading1Style4 = oDocument.CreateStyle('Heading 5')
|
||||
const oTextPr4 = oHeading1Style4.GetTextPr()
|
||||
oTextPr4.SetFontFamily('黑体')
|
||||
oTextPr4.SetFontSize(21)
|
||||
oTextPr4.SetColor(0, 0, 0);
|
||||
oTextPr4.SetColor(0, 0, 0)
|
||||
//
|
||||
var oHeading1Style5 = oDocument.CreateStyle("Heading 6");
|
||||
const oTextPr5 = oHeading1Style5.GetTextPr();
|
||||
oTextPr5.SetFontFamily("黑体");
|
||||
var oHeading1Style5 = oDocument.CreateStyle('Heading 6')
|
||||
const oTextPr5 = oHeading1Style5.GetTextPr()
|
||||
oTextPr5.SetFontFamily('黑体')
|
||||
oTextPr5.SetFontSize(21)
|
||||
oTextPr5.SetColor(0, 0, 0);
|
||||
oTextPr5.SetColor(0, 0, 0)
|
||||
|
||||
|
||||
var oNormalStyle = oDocument.GetDefaultStyle('numbering')
|
||||
@@ -213,7 +217,7 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
param2Obj(url) {
|
||||
param2Obj (url) {
|
||||
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
|
||||
if (!search) {
|
||||
return {}
|
||||
@@ -233,7 +237,7 @@
|
||||
})
|
||||
return obj
|
||||
},
|
||||
save() {
|
||||
save () {
|
||||
|
||||
let documentCallbackUrl = window.Asc.plugin.info.documentCallbackUrl
|
||||
let query = this.param2Obj(documentCallbackUrl)
|
||||
@@ -262,46 +266,46 @@
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
#app {
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: left;
|
||||
color: #2c3e50;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
#app {
|
||||
#app {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
* {
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5 {
|
||||
h1, h2, h3, h4, h5 {
|
||||
color: rgba(0, 0, 0, .85);
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC,
|
||||
Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif,
|
||||
Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
|
||||
font-variant: tabular-nums;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-btn-group {
|
||||
display: block!important;
|
||||
}
|
||||
.ant-btn-group {
|
||||
display: block !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.ant-drawer-index {
|
||||
.ant-drawer-index {
|
||||
width: 210px;
|
||||
height: 40px;
|
||||
text-align: center;
|
||||
@@ -314,15 +318,15 @@
|
||||
transform: translate(-50%, -50%);
|
||||
border-radius: 6px;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-drawer-text {
|
||||
.ant-drawer-text {
|
||||
width: 10px;
|
||||
display: inline-block;
|
||||
color: #ffff00;
|
||||
}
|
||||
}
|
||||
|
||||
.app-header {
|
||||
.app-header {
|
||||
width: 100%;
|
||||
height: 46px;
|
||||
position: fixed;
|
||||
@@ -334,11 +338,11 @@
|
||||
background: #f1f1f1;
|
||||
z-index: 100;
|
||||
border-bottom: 1px #e8e8e8 solid;
|
||||
}
|
||||
}
|
||||
|
||||
.app-header-button {
|
||||
.app-header-button {
|
||||
background: #66b1ff;
|
||||
border-color: #66b1ff;
|
||||
color: #FFF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -548,11 +548,13 @@ export default {
|
||||
beforeUpload (file) {
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'
|
||||
if (!isJpgOrPng) {
|
||||
this.$message.error('You can only upload JPG file!')
|
||||
this.$message.error('只能上传图片')
|
||||
return false
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 2
|
||||
if (!isLt2M) {
|
||||
this.$message.error('Image must smaller than 2MB!')
|
||||
this.$message.error('图片大小不能超过2MB')
|
||||
return false
|
||||
}
|
||||
return isJpgOrPng && isLt2M
|
||||
},
|
||||
@@ -654,4 +656,11 @@ export default {
|
||||
margin-top: 8px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.ant-upload-select-picture-card {
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user