forked from sparrow-js/sparrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be3fc94
commit 2555f19
Showing
7 changed files
with
505 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ export default { | |
width: 80px; | ||
} | ||
&__body { | ||
flex: 1; | ||
} | ||
} | ||
</style> |
80 changes: 80 additions & 0 deletions
80
packages/sparrow-client/src/components/CssPanel/Font/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<template> | ||
<div> | ||
<css-item label="字符"> | ||
<div> | ||
<div> | ||
<el-select v-model="value" placeholder="请选择"> | ||
<el-option | ||
v-for="item in fontWeightOptions" | ||
:key="item.value" | ||
:label="item.label" | ||
:value="item.value" | ||
> | ||
</el-option> | ||
</el-select> | ||
<el-input-number | ||
v-model="num" | ||
controls-position="right" | ||
:min="0" | ||
:max="1000" | ||
></el-input-number> | ||
</div> | ||
<div> | ||
<el-input placeholder="请输入内容" v-model="input2"> | ||
<template slot="append"> | ||
<el-popover placement="bottom" width="225" trigger="click"> | ||
<chrome-picker v-model="fontForm.color"></chrome-picker> | ||
<span slot="reference">color</span> | ||
</el-popover> | ||
</template> | ||
</el-input> | ||
<el-input v-model="fontForm.lineHeight" placeholder="行距"></el-input> | ||
</div> | ||
</div> | ||
</css-item> | ||
<css-item label="透明度"> | ||
<div> | ||
<el-slider min="0" max="100" v-model="fontForm.opacity" show-input> </el-slider> | ||
</div> | ||
</css-item> | ||
</div> | ||
</template> | ||
<script> | ||
import CssItem from '../CssItem'; | ||
import { Chrome } from 'vue-color'; | ||
export default { | ||
components: { | ||
CssItem, | ||
ChromePicker: Chrome | ||
}, | ||
data() { | ||
return { | ||
fontForm: { | ||
fontWeight: '', | ||
fontSize: '', | ||
color: '#000000', | ||
lineHeight: '', | ||
textAlign: '', | ||
verticalAlign: '', | ||
opacity: 1 | ||
}, | ||
fontWeightOptions: [ | ||
{ | ||
value: 'normal', | ||
label: '正常' | ||
}, | ||
{ | ||
value: 'bold', | ||
label: '粗体' | ||
}, | ||
{ | ||
value: 'lighter', | ||
label: '细体' | ||
} | ||
] | ||
}; | ||
} | ||
}; | ||
</script> | ||
<style lang="scss" scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
packages/sparrow-client/src/components/CssPanel/Location/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<template> | ||
<div> | ||
<css-item label="定位类型"> | ||
<el-select v-model="locationForm.position" clearable placeholder="请选择"> | ||
<el-option | ||
v-for="item in positionOptions" | ||
:key="item.value" | ||
:label="item.label" | ||
:value="item.value" | ||
> | ||
</el-option> | ||
</el-select> | ||
</css-item> | ||
<css-item> | ||
<position-model></position-model> | ||
</css-item> | ||
<css-item label="清除位置"> | ||
<el-input-number | ||
v-model="locationForm.zIndex" | ||
controls-position="right" | ||
></el-input-number> | ||
</css-item> | ||
<css-item label="浮动"> | ||
<s-radio-group :list="floatList"></s-radio-group> | ||
</css-item> | ||
<css-item label="清除浮动"> | ||
<s-radio-group :list="clearList"></s-radio-group> | ||
</css-item> | ||
</div> | ||
</template> | ||
<script> | ||
import CssItem from '../CssItem'; | ||
import SRadioGroup from '../RadioGroup'; | ||
import PositionModel from '../PositionModel'; | ||
import CssItem from '../CssItem.vue'; | ||
import CssItem from '../CssItem.vue'; | ||
export default { | ||
components: { | ||
CssItem, | ||
SRadioGroup, | ||
PositionModel | ||
CssItem | ||
CssItem | ||
}, | ||
data() { | ||
return { | ||
locationForm: { | ||
position: '', | ||
zIndex: '', | ||
float: '', | ||
clear: '' | ||
}, | ||
positionOptions: [ | ||
{ | ||
label: '无定位 Static', | ||
value: 'static' | ||
}, | ||
{ | ||
label: '相对定位 Relative', | ||
value: 'relative' | ||
}, | ||
{ | ||
label: '绝对定位 Absolute', | ||
value: 'absolute' | ||
}, | ||
{ | ||
label: '固定定位 Fixed', | ||
value: 'fixed' | ||
}, | ||
{ | ||
label: '粘性定位 sticky', | ||
value: 'sticky' | ||
} | ||
], | ||
floatList: [ | ||
{ | ||
label: 'none', | ||
icon: '', | ||
value: 'none', | ||
}, | ||
{ | ||
label: 'left', | ||
icon: '', | ||
value: 'left', | ||
}, | ||
{ | ||
label: 'right', | ||
icon: '', | ||
value: 'right', | ||
} | ||
], | ||
clearList: [ | ||
{ | ||
label: 'none', | ||
icon: '', | ||
value: 'none', | ||
}, | ||
{ | ||
label: 'left', | ||
icon: '', | ||
value: 'left', | ||
}, | ||
{ | ||
label: 'right', | ||
icon: '', | ||
value: 'right', | ||
}, | ||
{ | ||
label: 'both', | ||
icon: '', | ||
value: 'both', | ||
}, | ||
] | ||
}; | ||
} | ||
}; | ||
</script> |
Oops, something went wrong.