Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hel-developer-guide
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Spencer Chang
hel-developer-guide
Commits
d06f5846
Commit
d06f5846
authored
Aug 02, 2017
by
custom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deletes 前端组件/HlsDatePicker.md
Auto commit by GitBook Editor
parent
eb1ae75e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
247 deletions
+11
-247
HlsCombobox.md
前端组件/HlsCombobox.md
+0
-139
HlsDatePicker.md
前端组件/HlsDatePicker.md
+0
-97
hlsTlEdit.md
前端组件/hlsTlEdit.md
+11
-11
No files found.
前端组件/HlsCombobox.md
deleted
100644 → 0
View file @
eb1ae75e
# hlsCombobox标签
ComboBox下拉列表组件,通常数据源以code - meaning形式出现,用户操作的是meaning,实际保存的是code。
```
xml
<h:hlsCombobox
name=
"hlsCombobox"
id=
"hlsCombobox"
bind=
"enabled: isEnabled,source: sdDataSource, value:data.code"
colspan=
"3"
dataTextField=
"meaning"
dataValueField=
"code"
placeholder=
"hlsCombobox"
prompt=
"hlsCombobox"
promptColspan=
"1"
valuePrimitive=
"true"
style=
"width:100%"
/>
```
### **主要属性**
属性名 | 类型
-------- | ---
id | String
promptColspan | String
promptClassName | String
promptImage | String
prompt | String
colspan | String
hlsClassName | String
animation | Boolean
autoBind | Boolean
autoWidth | Boolean
cascadeFrom| String
cascadeFromField | String
clearButton| Boolean
dataSource | DataSource
dataTextField | String
dataValueField| String
delay | Number
enable | Boolean
enforceMinLength| Boolean
filter | String
fixedGroupTemplate| String
\|
Function
footerTemplate| String
\|
Function
groupTemplate| String
\|
Function
height| Number
highlightFirst| Boolean
ignoreCase| Boolean
index| Number
minLength| Number
noDataTemplate| String
\|
Function
placeholder | String
suggest| Boolean
headerTemplate| String
\|
Function
template| String
\|
Function
text| String
value| String
valuePrimitive| Boolean
virtual| Boolean
change| Function
close| Function
dataBound | Function
filtering| Function
open| Function
select| Function
cascade| Function
> 属性用法请参考KendoUI文档 [http://docs.telerik.com/kendo-ui/api/javascript/ui/combobox](http://docs.telerik.com/kendo-ui/api/javascript/ui/combobox)
### **用法示例*
```
javascript
//对于系统定义好的数据源
<
script
src
=
"${base.contextPath}/common/code?sdDataSource=FND.CODING_RULE_TYPE"
type
=
"text/javascript"
><
/script
>
//自定义静态数据源sdDataSource
var
sdDataSource
=
new
kendo
.
data
.
DataSource
({
data
:[
"one"
,
"two"
]
});
//自定义动态查询到的数据源sdDataSource
$
.
ajax
({
type
:
'GET'
,
url
:
url
,
async
:
false
,
contentType
:
"application/json; charset=utf-8"
,
success
:
function
(
datas
)
{
viewModel
.
set
(
"sdDataSource,"
,
datas
.
rows
);
}
});
//需要注意,bind中写dataSource,需要在viewModel中定义
var
viewModel
=
kendo
.
observable
({
enabled
:
true
,
isEnabled
:
false
,
data
:
{},
sdDataSource
:
sdDataSource
,
});
//下拉列表渲染函数
var
itemTemplate
=
function
(){
//...
}
//选中某一个列表选项后触发
function
onComboboxChange
(
e
){
var
value
=
this
.
value
();
// Use the value of the widget.
}
//以上两种函数定义方法皆可
```
```
xml
<h:hlsCombobox
name=
"hlsCombobox"
id=
"hlsCombobox"
bind=
"enabled: isEnabled,source: sdDataSource, value:data.code"
colspan=
"3"
dataTextField=
"meaning"
dataValueField=
"code"
placeholder=
"hlsCombobox"
prompt=
"hlsCombobox"
promptColspan=
"1"
valuePrimitive=
"true"
style=
"width:100
change="
onComboboxChange"
template=
"fn:itemTemplate"
/>
```
#### 特别注意 valuePrimitive="true" 如果该值为false,选中的值将不会匹配给dataTextField和dataValueField
dataValueField
> **提示:** 某些属性类型为**String \| Function** 时,表明它可以定义为字符串或者函数。因此当需要定义为Function时需要增加前缀**fn:**来区分(例如函数template="fn:itemTemplate" )
前端组件/HlsDatePicker.md
deleted
100644 → 0
View file @
eb1ae75e
# hlsDatePicker标签
日期选择器(不包含时分秒)
xml配置
```
<!--基本用法-->
<h:hlsDatePicker id="hlsDatePickerId" bind="enabled:isEnabled,value:data.value" placeholder="hlsDatePicker"/>
```
### **主要属性**
属性名 | 类型
-------- | -----
promptColspan | Integer
promptClassName | String
promptImage | String
prompt | String
colspan | Integer
hlsClassName | String
animation | Boolean
ARIATemplate| String
culture | String
depth| String
footer| String & Function
format| String
max| String
min| String
start| String
value | String
name | String
bind | Function
required | Boolean
change | Function
close| Function
open | Function
placeholder | String
interval |Integer
timeFormat |String
> **提示:** 属性用法请参考kendoui API文档 http://docs.telerik.com/kendo-ui/api/javascript/ui/datetimepicker
### **用法示例**
```
javascript
//注意是写在script标签内的
var
viewModel
=
kendo
.
observable
({
data
:{},
isEnabled
:
true
});
function
open
(){
//...
}
function
change
(
e
){
//...
}
```
```
xml
<h:hlsDatePicker
id=
"hlsDatePickerId"
bind=
"enabled: isEnabled,value:data.value"
style=
"width:200px;"
max=
"2016-6-6"
placeholder=
"hlsDatePicker"
open=
"open"
required=
"true"
change=
"change"
prompt=
"日期选择器:"
/>
id:可写可不写;
bind:属性里面包含配置两个选项:
(1)enabled配置日期选择器是否可以编辑,值为Boolean类型的变量,在viewModel里面配置。
(2)value配置日期选择器与变量关联,默认是在ViewModel下面的变量;
max:可选择日期的上限值;
style可改变该控件的样式;
open:点击控件调用的方法;
change:选择日期之后的事件;
prompt:为控件添加一个label,该属性一般和
<h:hlsForm>
、
<h:hlsHBox>
一起使用;
```
> **提示:**
> - 上述所有属性直接添加在标签内即可,(**[属性名] = "..."**),对于既是**String**类型又是**Function**类型的属性,只需要加**fn:**前缀区分即可,(**fn:函数名**)
> - 对于**max min**等本该是**时间类型**的属性,改为日期字符串,且连接符号为"**-**"
前端组件/hlsTlEdit.md
View file @
d06f5846
## TlEdit
##
hls
TlEdit
多语言编辑
多语言编辑
...
@@ -11,16 +11,16 @@
...
@@ -11,16 +11,16 @@
#### **一般属性**
#### **一般属性**
| 属性名 | 类型 |
| 属性名 | 类型 |
说明 |
| --- | --- |
| --- | --- |
--- |
| id
Field | String
|
| id
| String | 唯一英文标识
|
|
field | String
|
|
promptColspan | number | 该数字将会与col-sm-?进行拼接,替代问号,生成对应bootstrap的css样式,渲染描述的样式
|
|
dto | String
|
|
promptClassName | String | 描述的样式名称,会将对应的样式添加到描述中
|
|
model | Function
|
|
promptImage | String | 描述前面的一个文本图像,在设置为必填的时候会出现一个红色的
*
|
|
open | Function
|
|
prompt | String | 中文描述
|
| c
lose | Function
|
| c
olspan| number | 该数字会与col-sm-?进行拼接,替代问号,生成对应bootStrap的css样式,渲染文本框的样式
|
|
placeholder | String
|
|
hlsClassName | String | 标签的样式名称
|
| bind | Function |
用法示例:
用法示例:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment