Skip to content

Commit

Permalink
增加了部分iView-UI组件的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
jaweii committed Aug 23, 2017
1 parent dcb29e9 commit a48edac
Show file tree
Hide file tree
Showing 22 changed files with 364 additions and 2,320 deletions.
2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><title>Vue-Layout - 可视化布局</title><meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><link rel=stylesheet href="https://fonts.googleapis.com/icon?family=Material+Icons"><link rel=stylesheet href=//at.alicdn.com/t/font_383130_czyo4j6dtjxos9k9.css><link rel=stylesheet type=text/css href=https://cdn.jsdelivr.net/jotted/latest/jotted.min.css><link href=./static/css/app.8f815a5217633f8b300d053f5e1a1dd7.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.817632f893907d2bff8f.js></script><script type=text/javascript src=./static/js/vendor.f389496c2cf14c167337.js></script><script type=text/javascript src=./static/js/app.82b8a3c9b7913760cfdc.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><title>Vue-Layout - 可视化布局</title><meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><link rel=stylesheet href="https://fonts.googleapis.com/icon?family=Material+Icons"><link rel=stylesheet href=//unpkg.com/iview/dist/styles/iview.css><link rel=stylesheet href=//at.alicdn.com/t/font_383130_czyo4j6dtjxos9k9.css><link rel=stylesheet type=text/css href=https://cdn.jsdelivr.net/jotted/latest/jotted.min.css><link href=./static/css/app.c01b754faf79048a7bf237cb5bcfc28d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.9f0d37751dba53df5f81.js></script><script type=text/javascript src=./static/js/vendor.a81720ac0a1c8663653b.js></script><script type=text/javascript src=./static/js/app.8bd9a65c886e68fab7cb.js></script></body></html>
6 changes: 0 additions & 6 deletions dist/static/css/app.8f815a5217633f8b300d053f5e1a1dd7.css

This file was deleted.

This file was deleted.

6 changes: 6 additions & 0 deletions dist/static/css/app.c01b754faf79048a7bf237cb5bcfc28d.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file removed dist/static/fonts/ionicons.05acfdb.woff
Binary file not shown.
Binary file removed dist/static/fonts/ionicons.24712f6.ttf
Binary file not shown.
Binary file removed dist/static/fonts/ionicons.2c2ae06.eot
Binary file not shown.
2,230 changes: 0 additions & 2,230 deletions dist/static/img/ionicons.621bd38.svg

This file was deleted.

2 changes: 0 additions & 2 deletions dist/static/js/app.82b8a3c9b7913760cfdc.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/static/js/app.82b8a3c9b7913760cfdc.js.map

This file was deleted.

2 changes: 2 additions & 0 deletions dist/static/js/app.8bd9a65c886e68fab7cb.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/static/js/app.8bd9a65c886e68fab7cb.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions dist/static/js/manifest.817632f893907d2bff8f.js

This file was deleted.

2 changes: 2 additions & 0 deletions dist/static/js/manifest.9f0d37751dba53df5f81.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions dist/static/js/vendor.a81720ac0a1c8663653b.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

75 changes: 0 additions & 75 deletions dist/static/js/vendor.f389496c2cf14c167337.js

This file was deleted.

95 changes: 95 additions & 0 deletions src/components/template/iView-UI/DatePicker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import { getTemplate, getSlotContent, getStringTypeAttr } from '@/components/template'

var handle = function(_attr, _slots) {
//定义默认属性
let attributes = {
value:{
type:'text',
value:''
},
type: {
type: 'selection',
items: ['date', 'daterange', 'datetime', 'datetimerange', 'year', 'month'],
value: ''
},
format: {
type: 'text',
value: ''
},
placement: {
type: 'selection',
items: ['toptop', 'starttop', 'endbottombottom', 'startbottom', 'endleftleft', 'startleft', 'endrightright', 'startright', 'end'],
value: ''
},
placeholder: {
type: 'text',
value: ''
},
confirm: {
type: 'boolean',
value: false
},
open: {
type: 'boolean',
value: false
},
size: {
type: 'selection',
items: ['large', 'small', ''],
value: ''
},
disabled: {
type: 'boolean',
value: false
},
clearable: {
type: 'boolean',
value: false
},
readonly: {
type: 'boolean',
value: false
},
editable: {
type: 'boolean',
value: false
},
transfer: {
type: 'boolean',
value: false
}
},
slots = {}

//覆盖默认属性
Object.assign(slots, _slots)
Object.assign(attributes, _attr)

//根据组件不同需要做的不同操作


//获取插槽模板内容
var subContent = getSlotContent(slots)
//设置当前组件的slot
if (attributes.slot && attributes.slot !== 'default') {
attributes.slot = {
type: 'text',
value: attributes.slot
}
} else {
attributes.slot = {
type: 'text',
value: ''
}
}

//字符串模板操作
let stringAttr = getStringTypeAttr(attributes)
let template = `<Date-picker
${stringAttr}>
${subContent}
</Date-picker>`

return { template, attributes, slots }
}
export default handle
84 changes: 84 additions & 0 deletions src/components/template/iView-UI/Slider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { getTemplate, getSlotContent, getStringTypeAttr } from '@/components/template'

var handle = function(_attr, _slots) {
//定义默认属性
let attributes = {
value: {
type: 'slider',
value: 0,
max: _attr.max ? _attr.max.value : 100,
min: _attr.min ? _attr.min.value : 0,
step: _attr.step ? _attr.step.value : 1,
},
max: {
type: 'number',
value: ''
},
min: {
type: 'number',
value: ''
},
step: {
type: 'number',
value: ''
},
disabled: {
type: 'boolean',
value: false
},
// range: {
// type: 'boolean',
// value: false
// },
['show-input']: {
type: 'boolean',
value: false
},
['show-stops']: {
type: 'boolean',
value: false
},
['show-tip']: {
type: 'boolean',
value: false
},
['tip-format']: {
type: 'boolean',
value: false
}

},
slots = {}

//覆盖默认属性
Object.assign(slots, _slots)
Object.assign(attributes, _attr)

//根据组件不同需要做的不同操作


//获取插槽模板内容
var subContent = getSlotContent(slots)
//设置当前组件的slot
if (attributes.slot && attributes.slot !== 'default') {
attributes.slot = {
type: 'text',
value: attributes.slot
}
} else {
attributes.slot = {
type: 'text',
value: ''
}
}

//字符串模板操作
let stringAttr = getStringTypeAttr(attributes)
let template = `<Slider
${stringAttr}>
${subContent}
</Slider>`

return { template, attributes, slots }
}
export default handle
95 changes: 95 additions & 0 deletions src/components/template/iView-UI/TimePicker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import { getTemplate, getSlotContent, getStringTypeAttr } from '@/components/template'

var handle = function(_attr, _slots) {
//定义默认属性
let attributes = {
value:{
type:'text',
value:''
},
type: {
type: 'selection',
items: ['time', 'timerange'],
value: ''
},
format: {
type: 'text',
value: ''
},
placement: {
type: 'selection',
items: ['toptop', 'starttop', 'endbottombottom', 'startbottom', 'endleftleft', 'startleft', 'endrightright', 'startright', 'end'],
value: ''
},
placeholder: {
type: 'text',
value: ''
},
confirm: {
type: 'boolean',
value: false
},
open: {
type: 'boolean',
value: false
},
size: {
type: 'selection',
items: ['large', 'small', ''],
value: ''
},
disabled: {
type: 'boolean',
value: false
},
clearable: {
type: 'boolean',
value: false
},
readonly: {
type: 'boolean',
value: false
},
editable: {
type: 'boolean',
value: false
},
transfer: {
type: 'boolean',
value: false
}
},
slots = {}

//覆盖默认属性
Object.assign(slots, _slots)
Object.assign(attributes, _attr)

//根据组件不同需要做的不同操作


//获取插槽模板内容
var subContent = getSlotContent(slots)
//设置当前组件的slot
if (attributes.slot && attributes.slot !== 'default') {
attributes.slot = {
type: 'text',
value: attributes.slot
}
} else {
attributes.slot = {
type: 'text',
value: ''
}
}

//字符串模板操作
let stringAttr = getStringTypeAttr(attributes)
let template = `<Time-picker
${stringAttr}>
${subContent}
</Time-picker>`

return { template, attributes, slots }
}
export default handle

0 comments on commit a48edac

Please sign in to comment.