-
Notifications
You must be signed in to change notification settings - Fork 69
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 #16 from vipshop/develop
v0.20.2
- Loading branch information
Showing
113 changed files
with
1,129 additions
and
432 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
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
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,33 @@ | ||
export default { | ||
buttonField1: { | ||
ctx: 'edit', | ||
type: 'form', | ||
resource: { | ||
fields: { | ||
text: { | ||
type: 'text', | ||
label: '输入', | ||
props: { | ||
inline: true | ||
} | ||
}, | ||
buttonA: { | ||
type: 'button', | ||
label: '按钮', | ||
labelWidth: '0', | ||
tooltip: '点击触发事件', | ||
props: { | ||
inline: true, | ||
type: 'primary' | ||
}, | ||
event: 'pop' | ||
} | ||
} | ||
}, | ||
actions: { | ||
pop() { | ||
this.$alert('你输入了:'+ this.data.text) | ||
} | ||
} | ||
} | ||
}; |
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,40 @@ | ||
<template> | ||
<el-card shadow="hover" class="demo demo-card"> | ||
<ams-block v-if="init" :name="blockName" class="demo-card-preview"/> | ||
<div :class="`demo-card-config ${showConfig ? 'open': ''}`"> | ||
<highlight-code lang="javascript"> | ||
{{ configCode }} | ||
</highlight-code> | ||
</div> | ||
<div class="demo-card-config-btn" @click="toggleDemoCofig"> | ||
<i :class="`el-icon-caret-${showConfig ? 'top': 'bottom'}`"></i> | ||
{{ showConfig ? '隐藏' : '显示'}}配置 | ||
<el-link v-if="onlineDemo" :href="onlineDemo" target="_blank" type="success">在线运行</el-link> | ||
</div> | ||
</el-card> | ||
</template> | ||
|
||
<script> | ||
import demoMixins from '../../demo/demo-mixin' | ||
import block from './block' | ||
import stringify from '@ams-team/json-stringify' | ||
import beautify from 'js-beautify' | ||
export default { | ||
mixins: [demoMixins], | ||
mounted(){ | ||
const stringConfig = stringify(block[this.blockName]) | ||
this.configCode = beautify(stringConfig, { indent_size: 2, space_in_empty_paren: true }) | ||
// 如果已经注册过则不再注册 | ||
if (ams && ams.blocks && ams.blocks[this.blockName]) { | ||
this.init = true; | ||
return; | ||
} | ||
ams.block(this.blockName, block[this.blockName]) | ||
this.init = true | ||
} | ||
} | ||
</script> |
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
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
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.