-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from ffan-fe/dev
Dev
- Loading branch information
Showing
95 changed files
with
7,844 additions
and
441 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
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,11 @@ | ||
import template from './Breadcrumb.html'; | ||
import controller from './Breadcrumb.controller'; | ||
import './Breadcrumb.less'; | ||
|
||
export default { | ||
restrict: 'E', | ||
bindings: {}, | ||
template, | ||
controller, | ||
controllerAs: 'vm' | ||
}; |
37 changes: 37 additions & 0 deletions
37
example/app/components/Breadcrumb/Breadcrumb.controller.js
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,37 @@ | ||
/** | ||
* @description xxxx | ||
* | ||
* @author XXXXX@wandan.cn | ||
* @date Wed Apr 19 2017 11:18:31 GMT+0800 (CST) | ||
* @example: http://www.fancyui.org/#/zh-cn/component/Breadcrumb | ||
*/ | ||
|
||
import Base from '../../base'; | ||
export default class BreadcrumbController extends Base{ | ||
constructor($state,$translate) { | ||
'ngInject'; | ||
super($state,$translate) | ||
|
||
this.datasource = [ | ||
{ | ||
name: 'Home', | ||
icon: '<span class="glyphicon glyphicon-home"></span>' | ||
}, | ||
{ | ||
name: 'Application Center', | ||
icon: '' | ||
}, | ||
{ | ||
name: 'Application List', | ||
icon: '' | ||
}, | ||
{ | ||
name: 'An Application', | ||
icon: '' | ||
}, | ||
]; | ||
this.onClick = item => { | ||
console.log(item); | ||
}; | ||
} | ||
} |
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,72 @@ | ||
<section class="intro-content"> | ||
<h1 translate='{{vm.$state.current.name}}'></h1> | ||
</section> | ||
|
||
<section class="intro-content"> | ||
<h2>{{'Install' | translate}}</h2> | ||
</section> | ||
|
||
<div class="example-block"> | ||
<div class="highlight" hljs hljs-language="bash"> | ||
npm install fancyui --save</div> | ||
</div> | ||
|
||
<section class="intro-content"> | ||
<h2>{{'Inject_Module' | translate}}</h2> | ||
</section> | ||
|
||
<div class="example-block"> | ||
<div class="highlight no-border" hljs hljs-language="javascript"> | ||
import {Breadcrumb} from 'fancyui'; | ||
|
||
export default angular.module('BreadcrumbDemo', [ | ||
Breadcrumb.name | ||
]) | ||
|
||
</div> | ||
</div> | ||
|
||
<!--示例--> | ||
<h2>{{'Example'|translate}}</h2> | ||
<div class="example-block"> | ||
<div class="bs-example pop-confirm-example"> | ||
<f-breadcrumb datasource="vm.datasource" on-click="vm.onClick" separator=">"></f-breadcrumb> | ||
</div> | ||
</div> | ||
|
||
<!--基础用法--> | ||
<h2>{{'Basic_Usage'|translate}}</h2> | ||
<h3>View</h3> | ||
<div class="example-block"> | ||
<div class="highlight no-border" hljs hljs-language="html"> | ||
<f-breadcrumb datasource="vm.datasource" on-click="vm.onClick" separator=">"></f-breadcrumb> | ||
</div> | ||
</div> | ||
|
||
<h3>controller</h3> | ||
|
||
<div class="example-block"> | ||
<div class="highlight no-border" hljs hljs-language="javascript"> | ||
this.datasource = [ | ||
{ | ||
name: 'Home', | ||
icon: '<span class="glyphicon glyphicon-home"></span>' | ||
}, | ||
{ | ||
name: 'Application Center', | ||
icon: '' | ||
}, | ||
{ | ||
name: 'Application List', | ||
icon: '' | ||
}, | ||
{ | ||
name: 'An Application', | ||
icon: '' | ||
}, | ||
]; | ||
this.onClick = item => { | ||
console.log(item); | ||
}; | ||
</div> | ||
</div> |
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,7 @@ | ||
import Breadcrumb from '../../../../lib/Breadcrumb/index.js'; | ||
|
||
import BreadcrumbComponent from './Breadcrumb.component'; | ||
export default angular.module('Breadcrumb', [ | ||
Breadcrumb.name | ||
]) | ||
.component('breadcrumb', BreadcrumbComponent); |
Empty file.
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,3 @@ | ||
body { | ||
font-size: 14px!important; | ||
} |
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,11 @@ | ||
import template from './OmniTable.html'; | ||
import controller from './OmniTable.controller'; | ||
import './OmniTable.less'; | ||
|
||
export default { | ||
restrict: 'E', | ||
bindings: {}, | ||
template, | ||
controller, | ||
controllerAs: 'vm' | ||
}; |
145 changes: 145 additions & 0 deletions
145
example/app/components/omniTable/OmniTable.controller.js
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,145 @@ | ||
/** | ||
* @description xxxx | ||
* | ||
* @author XXXXX@wandan.cn | ||
* @date Mon Mar 20 2017 16:54:25 GMT+0800 (CST) | ||
* @example: http://www.fancyui.org/#/zh-cn/component/OmniTable | ||
*/ | ||
|
||
import Base from '../../base'; | ||
export default class OmniTableController extends Base { | ||
constructor($state, $translate, $timeout) { | ||
'ngInject'; | ||
super($state, $translate) | ||
|
||
const columns = [{ | ||
title: 'Name', | ||
dataIndex: 'name', | ||
key: 'name', | ||
render: text => `<a href="#">${text}</a>`, | ||
}, | ||
{ | ||
title: 'Age', | ||
dataIndex: 'age', | ||
key: 'age', | ||
}, { | ||
title: 'Address', | ||
dataIndex: 'address', | ||
key: 'address', | ||
}, | ||
{ | ||
title: 'Action', | ||
key: 'action', | ||
render: (text, record) => ` | ||
<span> | ||
<a href="#">Action 一 ${record.name}</a> | ||
</span>` | ||
}]; | ||
const data = null; | ||
// rowSelection object indicates the need for row selection | ||
const rowSelection = { | ||
onSelect: (record, selected, selectedRowKeys, selectedRows) => { | ||
console.log(record, selected, selectedRowKeys, selectedRows); | ||
}, | ||
getCheckboxProps: record => ({ | ||
disabled: record.name === 'Disabled User' // Column configuration not to be checked | ||
}), | ||
defaultSelectedRowKeys: ['1', '2'] | ||
}; | ||
|
||
const search = [ | ||
{ | ||
label: '门店名称', | ||
type: 'text', | ||
name: 'storeName' | ||
/*tpl: `<input type="text" | ||
placeholder="{{field.placeholder}}" | ||
ng-model="vm.query[field.name]" | ||
class="f-input f-input-lg">`*/ | ||
}, | ||
{ | ||
label: '商户名称', | ||
name: 'merchantName' | ||
}, | ||
{ | ||
type: 'text', | ||
label: '品牌名称', | ||
name: 'brandNames' | ||
}, | ||
{ | ||
type: 'text', | ||
label: '商圈名称', | ||
name: 'plazaName' | ||
}, | ||
{ | ||
label: '门店名称1', | ||
name: 'storeName1' | ||
}, | ||
{ | ||
label: '商户名称1', | ||
name: 'merchantName1' | ||
}, | ||
{ | ||
type: 'text', | ||
label: '品牌名称1', | ||
name: 'brandNames1' | ||
}, | ||
{ | ||
type: 'text', | ||
label: '商圈名称1', | ||
name: 'plazaName1' | ||
} | ||
]; | ||
const pagination = { | ||
total: 500, | ||
pageSize: 10, | ||
showQuickJumper: true, | ||
defaultCurrent: 45 | ||
}; | ||
|
||
this.columns = columns; | ||
this.data = data; | ||
this.rowSelection = rowSelection; | ||
this.search = search; | ||
|
||
this.dataconfig = { | ||
keyField: 'key' | ||
}; | ||
|
||
this.pagination = null; | ||
|
||
this.onChange = (page, pageSize, query) => { | ||
console.log(page, pageSize, query); | ||
}; | ||
|
||
this.onSwitchChange = val => { | ||
this.loading = val; | ||
}; | ||
this.loading = true; | ||
$timeout(() => { | ||
this.data = [{ | ||
key: '1', | ||
name: 'John Brown', | ||
age: 32, | ||
address: 'New York No. 1 Lake Park', | ||
}, { | ||
key: '2', | ||
name: 'Jim Green', | ||
age: 42, | ||
address: 'London No. 1 Lake Park', | ||
}, { | ||
key: '3', | ||
name: 'Joe Black', | ||
age: 32, | ||
address: 'Sidney No. 1 Lake Park', | ||
}, { | ||
key: '4', | ||
name: 'Disabled User', | ||
age: 99, | ||
address: 'Sidney No. 1 Lake Park', | ||
}]; | ||
this.loading = false; | ||
this.pagination = pagination | ||
}, 5000) | ||
} | ||
} |
Oops, something went wrong.