Commit 09792e7a authored by liujiangnan's avatar liujiangnan

添加字体修改按钮

parent 1266ad0b
......@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>h5-template-generator</title>
<title>OhMyTeacher</title>
<script type="text/javascript" src="../lib/js/jquery-1.12.3.min.js"></script>
<script type="text/javascript" src="../lib/js/vue.js"></script>
......@@ -14,6 +14,29 @@
<script src="../lib/js/element-ui/index.js"></script>
<script type="text/javascript" src="http://teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"></script>
<style>
@font-face{
font-family: 'simsun';
src:url('../lib/font/simsun.ttf');
}
@font-face{
font-family: 'simhei';
src:url('../lib/font/simhei.ttf');
}
@font-face{
font-family: 'simkai';
src:url('../lib/font/simkai.ttf');
}
@font-face{
font-family: '幼圆';
src:url('../lib/font/youyuan.TTF');
}
@font-face{
font-family: 'Times New Roman';
src:url('../lib/font/TimesNewRoman.ttf');
}
</style>
</head>
<body>
......@@ -36,18 +59,18 @@
<div v-if="imgText" align="left" style="position: relative;top: 2px;">
<el-dropdown trigger="click" @command="handleTextStyle">
<el-button size="small" type="primary">
Aa字体<i class="el-icon-arrow-down el-icon--right"></i>
字体<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="Arial">Arial</el-dropdown-item>
<el-dropdown-item command="Microsoft YaHei">Microsoft YaHei</el-dropdown-item>
<el-dropdown-item command="SimHei">黑体</el-dropdown-item>
<el-dropdown-item command="SimSun">宋体</el-dropdown-item>
<el-dropdown-item command="sans-serif">sans-serif</el-dropdown-item>
<el-dropdown-item command="Times New Roman">Times New Roman</el-dropdown-item>
<el-dropdown-item command="simkai">楷体</el-dropdown-item>
<el-dropdown-item command="simhei">黑体</el-dropdown-item>
<el-dropdown-item command="simsun">宋体</el-dropdown-item>
<el-dropdown-item command="幼圆">幼圆</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button size="small" type="primary" @click="handleTextSize">Tt字号</el-button>
<el-button size="small" type="primary" @click="handleTextStrong"><span style="font-weight: 800;">B</span></el-button>
<el-button size="small" type="primary" @click="handleTextSize">字号</el-button>
<el-button size="small" type="primary" @click="handleTextStrong">加粗</el-button>
<el-button size="small" type="primary" @click="handleTextColor">颜色</el-button>
<el-color-picker v-if="showColor" v-model="textcolor" size="mini"> </el-color-picker>
</div>
......@@ -64,6 +87,7 @@
<template v-else>
<img :src="playView" style="width: 100%;"/>
<span class="el-icon-close close-view" @click="hidePlay"></span>
<span class="info-view">* 长按图片保存到手机</span>
</template>
</div>
</body>
......@@ -238,6 +262,11 @@ new Vue({
right: 5px;
font-size: 25px;
}
.info-view{
position: absolute;
bottom: 5px;
right: 5px;
}
</style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment