This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Showing
16 changed files
with
293 additions
and
350 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 |
---|---|---|
|
@@ -76,4 +76,5 @@ Temporary Items | |
!.vscode/launch.json | ||
|
||
dist/* | ||
output/* | ||
bin/* |
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 |
---|---|---|
@@ -1,10 +1,8 @@ | ||
<template> | ||
<div> | ||
<xmp is="ms-form" :widget="{$form: @$form}"> | ||
<ms-form-item :widget="{label:'名字'}"> | ||
<ms-input :widget="{id:'test-value',col:'name',value:@value,$rules:{required:true,message:'请输入名字'}}"></ms-input> | ||
</ms-form-item> | ||
</xmp> | ||
<pre>{{@json}}</pre> | ||
</div> | ||
</template> | ||
<div> | ||
<xmp is="ms-form" :widget="{$form: @$form}"> | ||
<ms-form-item :widget="{label:'名字'}"> | ||
<ms-input :widget="{id:'test-value',col:'name',value:@value,$rules:{required:true,message:'请输入名字'}}"></ms-input> | ||
</ms-form-item> | ||
</xmp> | ||
<pre>{{@json}}</pre> | ||
</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
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 |
---|---|---|
@@ -1,34 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> | ||
<title>Document</title> | ||
<link href="../../../node_modules/bootstrap/dist/css/bootstrap.css" rel="stylesheet"> | ||
<link href="../../../node_modules/font-awesome/css/font-awesome.css" rel="stylesheet"> | ||
<script src="../../../tests/mod.js"></script> | ||
</head> | ||
<body> | ||
<div :controller="test"> | ||
<div> | ||
<xmp is="ms-select" :widget="{showSearch:true,mode:'multiple'}"> | ||
<div> | ||
<xmp is="ms-form" :widget="{$form: @$form}"> | ||
<ms-form-item :widget="{label:'想看的动漫'}"> | ||
<ms-select :widget="{col:'comic',showSearch:true,mode:'multiple'}"> | ||
<ms-select-option :widget="{value:'onepiece'}">海贼王</ms-select-option> | ||
<ms-select-option :widget="{value:'conna'}">名侦探柯南</ms-select-option> | ||
<ms-select-option :widget="{value:'titan'}">进击的巨人</ms-select-option> | ||
<ms-select-option :widget="{value:'disabled', disabled:true}">禁用</ms-select-option> | ||
<ms-select-option :widget="{value:'onepunchman'}">一拳超人</ms-select-option> | ||
</xmp> | ||
</div> | ||
</div> | ||
<script> | ||
require(['../../../tests/index.js'], function () { | ||
require('../'); | ||
|
||
var vm = avalon.define({ | ||
$id: 'test' | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> | ||
</ms-select> | ||
</ms-form-item> | ||
</xmp> | ||
<pre>{{@json}}</pre> | ||
</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,19 @@ | ||
import * as avalon from 'avalon2'; | ||
import { createForm } from '../../ms-form/create-form'; | ||
import '../../ms-form'; | ||
import '../'; | ||
|
||
export const name = 'component-demo-select'; | ||
|
||
avalon.component(name, { | ||
template: require('./ms-select.test.html'), | ||
defaults: { | ||
json: '', | ||
$form: createForm(), | ||
onInit() { | ||
this.$form.onFieldsChange = (fields, record) => { | ||
this.json = JSON.stringify(record); | ||
} | ||
} | ||
} | ||
}); |
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
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
Oops, something went wrong.