mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
feat: add color picker
添加颜色选择盘
This commit is contained in:
parent
bc32f78279
commit
c522ce0646
@ -41,9 +41,6 @@ html, body {
|
|||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
|
||||||
|
|
||||||
.top {
|
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,9 @@ let app = new Vue({
|
|||||||
{ label: '淡绿', value: 'lightgreen', author: '#42B983'},
|
{ label: '淡绿', value: 'lightgreen', author: '#42B983'},
|
||||||
{ label: '暗青', value: 'darkcyan', author: '#008B8B'}
|
{ label: '暗青', value: 'darkcyan', author: '#008B8B'}
|
||||||
],
|
],
|
||||||
|
colorOption: [
|
||||||
|
{ label: '淡绿', value: 'rgba(66, 185, 131, 0.9)' },
|
||||||
|
],
|
||||||
styleThemes: {
|
styleThemes: {
|
||||||
orange: orangeTheme,
|
orange: orangeTheme,
|
||||||
lightgreen: lightgreenTheme,
|
lightgreen: lightgreenTheme,
|
||||||
@ -42,6 +45,7 @@ let app = new Vue({
|
|||||||
d.currentFont = d.builtinFonts[0].value;
|
d.currentFont = d.builtinFonts[0].value;
|
||||||
d.currentSize = d.sizeOption[0].value;
|
d.currentSize = d.sizeOption[0].value;
|
||||||
d.currentTheme = d.themeOption[1].value;
|
d.currentTheme = d.themeOption[1].value;
|
||||||
|
d.currentColor = d.colorOption[0].value;
|
||||||
return d;
|
return d;
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -112,6 +116,9 @@ let app = new Vue({
|
|||||||
});
|
});
|
||||||
this.refresh()
|
this.refresh()
|
||||||
},
|
},
|
||||||
|
colorChanged: function (color) {
|
||||||
|
// TODO
|
||||||
|
},
|
||||||
// 刷新右侧预览
|
// 刷新右侧预览
|
||||||
refresh: function () {
|
refresh: function () {
|
||||||
this.output = this.renderWeChat(this.editor.getValue(0))
|
this.output = this.renderWeChat(this.editor.getValue(0))
|
||||||
|
@ -73,6 +73,7 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-color-picker v-model="currentColor" size="mini" show-alpha @change="colorChanged"></el-color-picker>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button class="about" @click="aboutDialogVisible = true">关于</el-button>
|
<el-button class="about" @click="aboutDialogVisible = true">关于</el-button>
|
||||||
</el-header>
|
</el-header>
|
||||||
|
Loading…
Reference in New Issue
Block a user