This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0
old
宇天 2020-02-02 22:59:14 +08:00
parent 172c9e822f
commit c3ebcf9830
2 changed files with 2 additions and 189 deletions

View File

@ -31,8 +31,9 @@
- [x] 表单组件-开关(`wc-switch`) - [x] 表单组件-开关(`wc-switch`)
- [x] 图标组件(`wc-icon`) - [x] 图标组件(`wc-icon`)
- [x] 弹层插件(`layer`、`wc-layer`) - [x] 弹层插件(`layer`、`wc-layer`)
- [ ] markdown解析器(`marked`) 待重构... - [x] markdown组件(`wc-markd`)
- [x] md5(`md5`) - [x] md5(`md5`)
- [x] crypto(`crypto`)
- [ ] md文本编辑器(`anot-meditor`) 待重构... - [ ] md文本编辑器(`anot-meditor`) 待重构...
- [x] 富文本编辑器(`wc-neditor`) - [x] 富文本编辑器(`wc-neditor`)
- [x] 分页组件(`wc-pager`) - [x] 分页组件(`wc-pager`)

View File

@ -1,188 +0,0 @@
<template>
<wc-scroll></wc-scroll>
</template>
<style lang="scss">
:host {
display: flex;
line-height: 1.5;
font-size: 13px;
color: nth($cd, 1);
}
a {
text-decoration: underline;
color: nth($ct, 2);
}
a:hover {
color: nth($ct, 1);
text-decoration: none;
}
em {
color: nth($cgr, 3);
}
strong {
color: nth($cd, 3);
}
em,
strong,
del {
padding: 0 3px;
}
p {
margin: 15px 0;
}
img {
max-width: 100%;
}
blockquote {
&.md-quote {
margin: 10px 0;
padding: 5px 10px;
border-left: 5px solid nth($ct, 1);
background: #f2f5fc;
color: nth($cgr, 1);
p {
margin: 0;
}
}
}
hr {
height: 1px;
margin: 30px 0;
line-height: 1px;
border: 0;
color: nth($cgr, 1);
background-color: nth($cgr, 1);
}
ol {
margin-left: 1em;
list-style: decimal outside none;
}
ul {
margin-left: 1em;
list-style: disc outside none;
}
li {
margin: 0.5em 0;
}
li ol {
margin-left: 1em;
}
li ul {
margin-left: 1em;
list-style-type: circle;
}
li ol ul,
li ul ul {
list-style-type: square;
}
h1,
h2,
h3,
h4,
h5,
h6 {
position: relative;
margin: 15px 0;
font-size: 16px;
span {
position: relative;
display: inline-block;
padding: 0 5px;
color: inherit;
}
a {
visibility: hidden;
position: absolute;
left: -25px;
width: 25px;
padding: 0 3px;
font-weight: bold;
text-decoration: none;
text-align: center;
}
&:hover a {
visibility: visible;
}
}
h1 {
margin: 0 0 30px;
font-size: 24px;
}
h2 {
margin: 20px 0;
font-size: 22px;
}
h3 {
margin: 20px 0 15px;
font-size: 20px;
}
h4 {
font-size: 18px;
}
table {
border-spacing: 0;
border-collapse: collapse;
tr {
border-top: 1px solid #ccc;
background-color: #fff;
}
thead tr {
background: nth($cp, 1);
}
th,
td {
padding: 6px 13px;
border: 1px solid #ddd;
}
th {
font-weight: bold;
}
tr:nth-child(2n) {
background-color: #fbfbfb;
}
}
</style>
<script>
import '../scroll/index'
import '../marked/index'
export default class Markdown {
props = {
value: ''
}
__init__() {
/* render */
}
set value(val) {
this.root.children[1].innerHTML = marked(val)
}
mounted() {
this.value = `
## hello world
> dsfksjdhf
>> dsfg
`
}
watch() {
switch (name) {
case 'value':
this.value = val
this.removeAttribute('value')
break
}
}
}
</script>