forked from fanruan/fineui
guy
7 years ago
1681 changed files with 979061 additions and 5134 deletions
@ -1,23 +0,0 @@
|
||||
--- |
||||
engines: |
||||
csslint: |
||||
enabled: false |
||||
duplication: |
||||
enabled: false |
||||
config: |
||||
languages: |
||||
- javascript |
||||
eslint: |
||||
enabled: true |
||||
fixme: |
||||
enabled: true |
||||
ratings: |
||||
paths: |
||||
- "src/**.js" |
||||
exclude_paths: |
||||
- node_modules/**/* |
||||
- test/**/* |
||||
- tutorials/**/* |
||||
- components/**/* |
||||
- perf/**/* |
||||
- dist/**/* |
@ -1,2 +0,0 @@
|
||||
service_name: travis-ci |
||||
repo_token: 7PbHs1UhR24n9sP01rhKsHLXHaU4rUCvU |
@ -1,213 +0,0 @@
|
||||
ecmaFeatures: |
||||
modules: true |
||||
jsx: true |
||||
|
||||
env: |
||||
amd: true |
||||
browser: true |
||||
es6: true |
||||
jquery: true |
||||
node: true |
||||
|
||||
# http://eslint.org/docs/rules/ |
||||
rules: |
||||
# Possible Errors |
||||
comma-dangle: [2, never] |
||||
no-cond-assign: 2 |
||||
no-console: 0 |
||||
no-constant-condition: 2 |
||||
no-control-regex: 2 |
||||
no-debugger: 2 |
||||
no-dupe-args: 2 |
||||
no-dupe-keys: 2 |
||||
no-duplicate-case: 2 |
||||
no-empty: 2 |
||||
no-empty-character-class: 2 |
||||
no-ex-assign: 2 |
||||
no-extra-boolean-cast: 2 |
||||
no-extra-parens: 0 |
||||
no-extra-semi: 2 |
||||
no-func-assign: 2 |
||||
no-inner-declarations: [2, functions] |
||||
no-invalid-regexp: 2 |
||||
no-irregular-whitespace: 2 |
||||
no-negated-in-lhs: 2 |
||||
no-obj-calls: 2 |
||||
no-regex-spaces: 2 |
||||
no-sparse-arrays: 2 |
||||
no-unexpected-multiline: 2 |
||||
no-unreachable: 2 |
||||
use-isnan: 2 |
||||
valid-jsdoc: 0 |
||||
valid-typeof: 2 |
||||
|
||||
# Best Practices |
||||
accessor-pairs: 2 |
||||
block-scoped-var: 0 |
||||
complexity: [2, 6] |
||||
consistent-return: 0 |
||||
curly: 0 |
||||
default-case: 0 |
||||
dot-location: 0 |
||||
dot-notation: 0 |
||||
eqeqeq: 2 |
||||
guard-for-in: 2 |
||||
no-alert: 2 |
||||
no-caller: 2 |
||||
no-case-declarations: 2 |
||||
no-div-regex: 2 |
||||
no-else-return: 0 |
||||
no-empty-label: 2 |
||||
no-empty-pattern: 2 |
||||
no-eq-null: 2 |
||||
no-eval: 2 |
||||
no-extend-native: 2 |
||||
no-extra-bind: 2 |
||||
no-fallthrough: 2 |
||||
no-floating-decimal: 0 |
||||
no-implicit-coercion: 0 |
||||
no-implied-eval: 2 |
||||
no-invalid-this: 0 |
||||
no-iterator: 2 |
||||
no-labels: 0 |
||||
no-lone-blocks: 2 |
||||
no-loop-func: 2 |
||||
no-magic-number: 0 |
||||
no-multi-spaces: 0 |
||||
no-multi-str: 0 |
||||
no-native-reassign: 2 |
||||
no-new-func: 2 |
||||
no-new-wrappers: 2 |
||||
no-new: 2 |
||||
no-octal-escape: 2 |
||||
no-octal: 2 |
||||
no-proto: 2 |
||||
no-redeclare: 2 |
||||
no-return-assign: 2 |
||||
no-script-url: 2 |
||||
no-self-compare: 2 |
||||
no-sequences: 0 |
||||
no-throw-literal: 0 |
||||
no-unused-expressions: 2 |
||||
no-useless-call: 2 |
||||
no-useless-concat: 2 |
||||
no-void: 2 |
||||
no-warning-comments: 0 |
||||
no-with: 2 |
||||
radix: 2 |
||||
vars-on-top: 0 |
||||
wrap-iife: 2 |
||||
yoda: 0 |
||||
|
||||
# Strict |
||||
strict: 0 |
||||
|
||||
# Variables |
||||
init-declarations: 0 |
||||
no-catch-shadow: 2 |
||||
no-delete-var: 2 |
||||
no-label-var: 2 |
||||
no-shadow-restricted-names: 2 |
||||
no-shadow: 0 |
||||
no-undef-init: 2 |
||||
no-undef: 0 |
||||
no-undefined: 0 |
||||
no-unused-vars: 0 |
||||
no-use-before-define: 0 |
||||
|
||||
# Node.js and CommonJS |
||||
callback-return: 2 |
||||
global-require: 2 |
||||
handle-callback-err: 2 |
||||
no-mixed-requires: 0 |
||||
no-new-require: 0 |
||||
no-path-concat: 2 |
||||
no-process-exit: 2 |
||||
no-restricted-modules: 0 |
||||
no-sync: 0 |
||||
|
||||
# Stylistic Issues |
||||
array-bracket-spacing: 0 |
||||
block-spacing: 0 |
||||
brace-style: 0 |
||||
camelcase: 0 |
||||
comma-spacing: 0 |
||||
comma-style: 0 |
||||
computed-property-spacing: 0 |
||||
consistent-this: 0 |
||||
eol-last: 0 |
||||
func-names: 0 |
||||
func-style: 0 |
||||
id-length: 0 |
||||
id-match: 0 |
||||
indent: 0 |
||||
jsx-quotes: 0 |
||||
key-spacing: 0 |
||||
linebreak-style: 0 |
||||
lines-around-comment: 0 |
||||
max-depth: 0 |
||||
max-len: 0 |
||||
max-nested-callbacks: 0 |
||||
max-params: 0 |
||||
max-statements: [2, 30] |
||||
new-cap: 0 |
||||
new-parens: 0 |
||||
newline-after-var: 0 |
||||
no-array-constructor: 0 |
||||
no-bitwise: 0 |
||||
no-continue: 0 |
||||
no-inline-comments: 0 |
||||
no-lonely-if: 0 |
||||
no-mixed-spaces-and-tabs: 0 |
||||
no-multiple-empty-lines: 0 |
||||
no-negated-condition: 0 |
||||
no-nested-ternary: 0 |
||||
no-new-object: 0 |
||||
no-plusplus: 0 |
||||
no-restricted-syntax: 0 |
||||
no-spaced-func: 0 |
||||
no-ternary: 0 |
||||
no-trailing-spaces: 0 |
||||
no-underscore-dangle: 0 |
||||
no-unneeded-ternary: 0 |
||||
object-curly-spacing: 0 |
||||
one-var: 0 |
||||
operator-assignment: 0 |
||||
operator-linebreak: 0 |
||||
padded-blocks: 0 |
||||
quote-props: 0 |
||||
quotes: 0 |
||||
require-jsdoc: 0 |
||||
semi-spacing: 0 |
||||
semi: 0 |
||||
sort-vars: 0 |
||||
space-after-keywords: 0 |
||||
space-before-blocks: 0 |
||||
space-before-function-paren: 0 |
||||
space-before-keywords: 0 |
||||
space-in-parens: 0 |
||||
space-infix-ops: 0 |
||||
space-return-throw-case: 0 |
||||
space-unary-ops: 0 |
||||
spaced-comment: 0 |
||||
wrap-regex: 0 |
||||
|
||||
# ECMAScript 6 |
||||
arrow-body-style: 0 |
||||
arrow-parens: 0 |
||||
arrow-spacing: 0 |
||||
constructor-super: 0 |
||||
generator-star-spacing: 0 |
||||
no-arrow-condition: 0 |
||||
no-class-assign: 0 |
||||
no-const-assign: 0 |
||||
no-dupe-class-members: 0 |
||||
no-this-before-super: 0 |
||||
no-var: 0 |
||||
object-shorthand: 0 |
||||
prefer-arrow-callback: 0 |
||||
prefer-const: 0 |
||||
prefer-reflect: 0 |
||||
prefer-spread: 0 |
||||
prefer-template: 0 |
||||
require-yield: 0 |
@ -1 +1,5 @@
|
||||
node_modules/ |
||||
/.idea/ |
||||
#demo.js |
||||
#demo.css |
||||
.DS_Store |
||||
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<module type="WEB_MODULE" version="4"> |
||||
<component name="NewModuleRootManager"> |
||||
<content url="file://$MODULE_DIR$"> |
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" /> |
||||
<excludeFolder url="file://$MODULE_DIR$/dist" /> |
||||
<excludeFolder url="file://$MODULE_DIR$/temp" /> |
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" /> |
||||
</content> |
||||
<orderEntry type="inheritedJdk" /> |
||||
<orderEntry type="sourceFolder" forTests="false" /> |
||||
</component> |
||||
</module> |
@ -1,72 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="MarkdownProjectSettings"> |
||||
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true"> |
||||
<PanelProvider> |
||||
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" /> |
||||
</PanelProvider> |
||||
</PreviewSettings> |
||||
<ParserSettings gitHubSyntaxChange="false"> |
||||
<PegdownExtensions> |
||||
<option name="ABBREVIATIONS" value="false" /> |
||||
<option name="ANCHORLINKS" value="true" /> |
||||
<option name="ASIDE" value="false" /> |
||||
<option name="ATXHEADERSPACE" value="true" /> |
||||
<option name="AUTOLINKS" value="true" /> |
||||
<option name="DEFINITIONS" value="false" /> |
||||
<option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" /> |
||||
<option name="FENCED_CODE_BLOCKS" value="true" /> |
||||
<option name="FOOTNOTES" value="false" /> |
||||
<option name="HARDWRAPS" value="false" /> |
||||
<option name="HTML_DEEP_PARSER" value="false" /> |
||||
<option name="INSERTED" value="false" /> |
||||
<option name="QUOTES" value="false" /> |
||||
<option name="RELAXEDHRULES" value="true" /> |
||||
<option name="SMARTS" value="false" /> |
||||
<option name="STRIKETHROUGH" value="true" /> |
||||
<option name="SUBSCRIPT" value="false" /> |
||||
<option name="SUPERSCRIPT" value="false" /> |
||||
<option name="SUPPRESS_HTML_BLOCKS" value="false" /> |
||||
<option name="SUPPRESS_INLINE_HTML" value="false" /> |
||||
<option name="TABLES" value="true" /> |
||||
<option name="TASKLISTITEMS" value="true" /> |
||||
<option name="TOC" value="false" /> |
||||
<option name="WIKILINKS" value="true" /> |
||||
</PegdownExtensions> |
||||
<ParserOptions> |
||||
<option name="COMMONMARK_LISTS" value="true" /> |
||||
<option name="DUMMY" value="false" /> |
||||
<option name="EMOJI_SHORTCUTS" value="true" /> |
||||
<option name="FLEXMARK_FRONT_MATTER" value="false" /> |
||||
<option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" /> |
||||
<option name="GFM_TABLE_RENDERING" value="true" /> |
||||
<option name="GITBOOK_URL_ENCODING" value="false" /> |
||||
<option name="GITHUB_EMOJI_URL" value="false" /> |
||||
<option name="GITHUB_LISTS" value="false" /> |
||||
<option name="GITHUB_WIKI_LINKS" value="true" /> |
||||
<option name="JEKYLL_FRONT_MATTER" value="false" /> |
||||
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" /> |
||||
</ParserOptions> |
||||
</ParserSettings> |
||||
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true"> |
||||
<GeneratorProvider> |
||||
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" /> |
||||
</GeneratorProvider> |
||||
<headerTop /> |
||||
<headerBottom /> |
||||
<bodyTop /> |
||||
<bodyBottom /> |
||||
</HtmlSettings> |
||||
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true"> |
||||
<StylesheetProvider> |
||||
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" /> |
||||
</StylesheetProvider> |
||||
<ScriptProviders /> |
||||
<cssText /> |
||||
</CssSettings> |
||||
<HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" /> |
||||
<LinkMapSettings> |
||||
<textMaps /> |
||||
</LinkMapSettings> |
||||
</component> |
||||
</project> |
@ -1,3 +0,0 @@
|
||||
<component name="MarkdownNavigator.ProfileManager"> |
||||
<settings default="" pdf-export="" /> |
||||
</component> |
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="JavaScriptSettings"> |
||||
<option name="languageLevel" value="JSX" /> |
||||
</component> |
||||
</project> |
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="ProjectModuleManager"> |
||||
<modules> |
||||
<module fileurl="file://$PROJECT_DIR$/.idea/fineui-future.iml" filepath="$PROJECT_DIR$/.idea/fineui-future.iml" /> |
||||
</modules> |
||||
</component> |
||||
</project> |
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="PreferredVcsStorage"> |
||||
<preferredVcsName>Git</preferredVcsName> |
||||
</component> |
||||
</project> |
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="VcsDirectoryMappings"> |
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" /> |
||||
</component> |
||||
</project> |
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="ProjectTasksOptions" suppressed-tasks="Babel" /> |
||||
</project> |
@ -1,30 +0,0 @@
|
||||
language: node_js |
||||
node_js: |
||||
- 6 |
||||
branches: |
||||
only: |
||||
- master |
||||
cache: |
||||
directories: |
||||
- node_modules |
||||
before_script: |
||||
- export CHROME_BIN=chromium-browser |
||||
- export DISPLAY=:99.0 |
||||
- sh -e /etc/init.d/xvfb start |
||||
install: |
||||
- npm install |
||||
- npm run buildAvalon |
||||
script: |
||||
- npm run build |
||||
|
||||
addons: |
||||
code_climate: |
||||
repo_token: cecb8ec105dc8e4b3f298312502f078a646f46ff |
||||
after_success: |
||||
- bash <(curl -s https://codecov.io/bash) |
||||
- codeclimate-test-reporter < lcov.info |
||||
env: |
||||
global: |
||||
- CODECOV_TOKEN: 31e8c855-5499-473e-b2b6-ba1d142fbb9e |
||||
- secure: oteqj2CHMOma5RCv4YM/QPhqMfEzDtoibgsCT+ABjTUoj36T7HDxQfgiUspv0Iv33i7TmqHBHAPFVSsF+vz00NOTejMaaFfELUuRn4BTZ5zDuz6e6VXy0jgF/7is7dVAf6cqVaQ0Fo+X+XCLg63/CaX23S3IlqS1jyfuX+fpNh8QfaIOIXlaZ8yy6pyfqb+lMfOj4TTwpyFIoyono0qSGLdaSG9BDdZK0skBPeBP3sFiwtptMmY8Mhn7lLiulU0NHl0WSfJMH9FMe9mHdhqsSrFwACKT58JbXCkKdTLjszpMv1gkl+gynzyLOV3f1WqBv/calW65PBWu7uNKNgBILGW5L3THL4Qs6unvzVngeFcZ6jf9B4dtxpS22K3Pq7SkhJOgXNiEa6RavFQm6OFSjBjILiQvMSkWA2PcAxbqDr9oEbe/snUoeK+BbYli2kV3b5TR+wyKBgn6Wms8+QbTr2N8OnAMwhgmPS4if7uqyKNPCfMy4J2HZ3OEbAPTUUYtSSWaEhXAtV5aAXI0/LWTsXsVtvnxcHGdPtN6GKJyKDqAxKWECdCU9Je6fxGcXaEzU3VTlm9HmXuC3UpTERU7Pq9vrpqxYaWtt/M1r0WAeBrPPdZ+XOpL1Qn4fWV9B259+jKI8GNg5+07H54crDBXaV04kLZODPmTe+n8Sq7PsS8= |
||||
- secure: QpQKoIDD6GlDglfXBxzuAxM/qLhEAyNO2TwzzeEG7PstLaYo94K+j4gbkiFkwbb2Oj5R/0Jtro1tSXM733DLieVZNyV7VrMkcwkkisR1KfWBynfToDHCkHqM6Rca3PiiVRFHqAh6KmkGZ7EAXXdPbjF49ZqOQMjikD5WKoMkAqagH4dREArBw+Al2qCn41JuLm+uKCJ8YpZysULTSxRoyFqvvXgxDUn6/NjM08Mo5BVmKvANKLO73qjW8y6MeXoAMuQ11YWKz6Wu++GCQvkg9/qy6P6RcOYY5C2+zjmscyI+lZZ9XWEfPNLTUhMxHX+M3LV4dlGcs46q2TX5XItnUKlRqZ2FtjI33nF+kNDD+ts7oD+H/HvsvkZC3wg4KU15XtTe2OP2oxQgOtW2S3j66IHeiWMI+5fj/nVKtmQx9Or41dDCSQQ2+7ieZA+gF4cfVkDMVJcF2joB5Wbzl4E/UoCN7lo1uLdMSPZqW6ePUtBoGlc70/oUj0w6Ct1wqYhIBwX/2P7QLjNLuwW6e0SPOsQDaa3Svqog3/mZL6lae7ARrCjLYh31E6I0mDcz2ea5Y5bzXmgXfViGaGbrN6nlWP+hpHsPvdW+yVyxfHCXDFuHJdGMxErEnIAlEA2dqPtGz8GwV03L0a7z7Vv4bomFnxf5HAtuUwQ1tJToANEGexk= |
@ -0,0 +1,281 @@
|
||||
module.exports = function (grunt) { |
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({ |
||||
pkg: grunt.file.readJSON('package.json'), |
||||
concat: { |
||||
options: { |
||||
separator: '' |
||||
}, |
||||
polyfillJs: { |
||||
src: ['src/polyfill/**/*.js'], |
||||
dest: 'dist/polyfill.js' |
||||
}, |
||||
coreJs: { |
||||
src: [ |
||||
'src/core/jquery.js', |
||||
'src/core/underscore.js', |
||||
'src/core/foundation.js', |
||||
// 'src/core/mvc/**/*.js',
|
||||
'src/core/base.js', |
||||
'src/core/ob.js', |
||||
'src/core/widget.js', |
||||
// 'src/core/model.js',
|
||||
// 'src/core/view.js',
|
||||
'src/core/shortcut.js', |
||||
'src/core/utils/*.js', |
||||
'src/core/behavior/behavior.js', |
||||
'src/core/wrapper/layout.js', |
||||
'src/core/**/*.js', |
||||
|
||||
'src/data/data.js', |
||||
'src/data/**/*.js' |
||||
], |
||||
dest: 'dist/core.js' |
||||
}, |
||||
|
||||
//最基础的控件
|
||||
baseJs: { |
||||
src: [ |
||||
'src/third/**/*.js', |
||||
'src/base/pane.js', |
||||
'src/base/single/single.js', |
||||
'src/base/single/text.js', |
||||
'src/base/single/button/button.basic.js', |
||||
'src/base/single/button/button.node.js', |
||||
'src/base/single/tip/tip.js', |
||||
'src/base/combination/group.button.js', |
||||
'src/base/combination/tree.button.js', |
||||
'src/base/combination/map.button.js', |
||||
'src/base/tree/treeview.js', |
||||
'src/base/tree/asynctree.js', |
||||
'src/base/tree/parttree.js', |
||||
'src/base/**/*.js' |
||||
], |
||||
dest: 'dist/base.js' |
||||
}, |
||||
//实现好的一些基础实例
|
||||
caseJs: { |
||||
src: [ |
||||
'src/case/combo/popup.bubble.js', |
||||
'src/case/**/*.js' |
||||
], |
||||
dest: 'dist/case.js' |
||||
}, |
||||
widgetJs: { |
||||
src: [ |
||||
'src/widget/paramsettingcombo/popup.param.js', |
||||
'src/widget/sequencetable/treenumber.sequencetable.js', |
||||
'src/widget/**/*.js', |
||||
'src/component/**/*.js' |
||||
], |
||||
dest: 'dist/widget.js' |
||||
}, |
||||
chartJs: { |
||||
src: [ |
||||
'src/addons/chart/chart.js', |
||||
'src/addons/chart/chart.combine.js', |
||||
'src/addons/chart/factory.charts.js', |
||||
'src/addons/chart/**/*.js' |
||||
], |
||||
dest: 'dist/chart.js' |
||||
}, |
||||
coreCss: { |
||||
src: ['src/css/core/**/*.css', 'src/css/theme/**/*.css'], |
||||
dest: 'dist/core.css' |
||||
}, |
||||
baseCss: { |
||||
src: ['src/css/base/**/*.css'], |
||||
dest: 'dist/base.css' |
||||
}, |
||||
widgetCss: { |
||||
src: ['src/css/widget/**/*.css'], |
||||
dest: 'dist/widget.css' |
||||
}, |
||||
resourceCss: { |
||||
src: ['src/css/resource/**/*.css'], |
||||
dest: 'dist/resource.css' |
||||
}, |
||||
|
||||
bundleJs: { |
||||
src: ['dist/core.js', 'dist/base.js', 'dist/case.js', 'dist/widget.js', 'public/js/**/*.js', 'public/js/index.js'], |
||||
dest: 'dist/bundle.js' |
||||
}, |
||||
|
||||
bundleCss: { |
||||
src: ['dist/core.css', 'dist/base.css', 'dist/widget.css', 'public/css/app.css', 'public/css/**/*.css'], |
||||
dest: 'dist/bundle.css' |
||||
}, |
||||
|
||||
configJs: { |
||||
src: ['demo/version.js'], |
||||
dest: 'dist/config.js' |
||||
}, |
||||
demoJs: { |
||||
src: ['demo/app.js', 'demo/js/**/*.js', ' demo/config.js'], |
||||
dest: 'dist/demo.js' |
||||
}, |
||||
demoCss: { |
||||
src: ['demo/css/**/*.css'], |
||||
dest: 'dist/demo.css' |
||||
}, |
||||
|
||||
bi_polyfillJs: { |
||||
src: ['src/polyfill/**/*.js'], |
||||
dest: 'bi/polyfill.js' |
||||
}, |
||||
|
||||
bi_coreJs: { |
||||
src: [ |
||||
'src/core/jquery.js', |
||||
'src/core/underscore.js', |
||||
'src/core/foundation.js', |
||||
// 'src/core/mvc/**/*.js',
|
||||
'src/core/base.js', |
||||
'src/core/ob.js', |
||||
'src/core/widget.js', |
||||
// 'src/core/model.js',
|
||||
// 'src/core/view.js',
|
||||
'src/core/shortcut.js', |
||||
'src/core/utils/*.js', |
||||
'src/core/behavior/behavior.js', |
||||
'src/core/wrapper/layout.js', |
||||
'src/core/**/*.js', |
||||
|
||||
'src/data/data.js', |
||||
'src/data/**/*.js', |
||||
'src/config.js' |
||||
], |
||||
dest: 'bi/core.js' |
||||
}, |
||||
//最基础的控件
|
||||
bi_baseJs: { |
||||
src: [ |
||||
'src/third/**/*.js', |
||||
'src/base/pane.js', |
||||
'src/base/single/single.js', |
||||
'src/base/single/text.js', |
||||
'src/base/single/button/button.basic.js', |
||||
'src/base/single/button/button.node.js', |
||||
'src/base/single/tip/tip.js', |
||||
'src/base/combination/group.button.js', |
||||
'src/base/combination/tree.button.js', |
||||
'src/base/combination/map.button.js', |
||||
'src/base/tree/treeview.js', |
||||
'src/base/tree/asynctree.js', |
||||
'src/base/tree/parttree.js', |
||||
'src/base/**/*.js' |
||||
], |
||||
dest: 'bi/base.js' |
||||
}, |
||||
//实现好的一些基础实例
|
||||
bi_caseJs: { |
||||
src: [ |
||||
'src/case/combo/popup.bubble.js', |
||||
'src/case/**/*.js' |
||||
], |
||||
dest: 'bi/case.js' |
||||
}, |
||||
bi_widgetJs: { |
||||
src: [ |
||||
'src/widget/paramsettingcombo/popup.param.js', |
||||
'src/widget/sequencetable/treenumber.sequencetable.js', |
||||
'src/widget/**/*.js', |
||||
'src/component/**/*.js' |
||||
], |
||||
dest: 'bi/widget.js' |
||||
}, |
||||
bi_chartJs: { |
||||
src: [ |
||||
'src/addons/chart/chart.js', |
||||
'src/addons/chart/chart.combine.js', |
||||
'src/addons/chart/factory.charts.js', |
||||
'src/addons/chart/**/*.js' |
||||
], |
||||
dest: 'bi/chart.js' |
||||
}, |
||||
bi_coreCss: { |
||||
src: ['src/css/core/**/*.css', 'src/css/theme/**/*.css'], |
||||
dest: 'bi/core.css' |
||||
}, |
||||
bi_baseCss: { |
||||
src: ['src/css/base/**/*.css'], |
||||
dest: 'bi/base.css' |
||||
}, |
||||
bi_widgetCss: { |
||||
src: ['src/css/widget/**/*.css'], |
||||
dest: 'bi/widget.css' |
||||
} |
||||
}, |
||||
|
||||
less: { |
||||
demo: { |
||||
expand: true, |
||||
cwd: 'demo/less', |
||||
src: ['**/*.less'], |
||||
dest: 'demo/css/', |
||||
ext: '.css' |
||||
}, |
||||
dev: { |
||||
options: { |
||||
compress: true, |
||||
yuicompress: false |
||||
} |
||||
} |
||||
}, |
||||
|
||||
uglify: { |
||||
options: { |
||||
banner: '/*! <%= pkg.name %> */\n' |
||||
}, |
||||
dist: { |
||||
files: { |
||||
'dist/bundle.min.js': ['<%= concat.bundleJs.dest %>'], |
||||
} |
||||
} |
||||
}, |
||||
|
||||
cssmin: { |
||||
|
||||
bundleCss: { |
||||
|
||||
src: '<%= concat.bundleCss.dest %>', |
||||
|
||||
dest: 'dist/bundle.min.css' |
||||
|
||||
}, |
||||
}, |
||||
|
||||
jshint: { |
||||
files: ['Gruntfile.js', 'src/**/*.js'], |
||||
options: { |
||||
globals: { |
||||
jQuery: true, |
||||
console: true, |
||||
module: true, |
||||
document: true |
||||
} |
||||
} |
||||
}, |
||||
watch: { |
||||
scripts: { |
||||
files: ['src/**/*.js', 'demo/js/**/*.js', 'demo/version.js', 'demo/config.js', 'demo/less/**/*.less'], |
||||
tasks: ['less', 'concat'], |
||||
options: { |
||||
spanw: true, |
||||
interrupt: true |
||||
} |
||||
} |
||||
} |
||||
}); |
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify'); |
||||
grunt.loadNpmTasks('grunt-contrib-jshint'); |
||||
grunt.loadNpmTasks('grunt-contrib-less'); |
||||
grunt.loadNpmTasks('grunt-contrib-watch'); |
||||
grunt.loadNpmTasks('grunt-contrib-concat'); |
||||
grunt.loadNpmTasks('grunt-contrib-cssmin'); |
||||
|
||||
grunt.registerTask('default', ['less', 'concat', 'watch']); |
||||
grunt.registerTask('min', ['less', 'concat', 'uglify', 'cssmin']); |
||||
}; |
@ -0,0 +1,201 @@
|
||||
Apache License |
||||
Version 2.0, January 2004 |
||||
http://www.apache.org/licenses/ |
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
||||
|
||||
1. Definitions. |
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, |
||||
and distribution as defined by Sections 1 through 9 of this document. |
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by |
||||
the copyright owner that is granting the License. |
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all |
||||
other entities that control, are controlled by, or are under common |
||||
control with that entity. For the purposes of this definition, |
||||
"control" means (i) the power, direct or indirect, to cause the |
||||
direction or management of such entity, whether by contract or |
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
||||
outstanding shares, or (iii) beneficial ownership of such entity. |
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity |
||||
exercising permissions granted by this License. |
||||
|
||||
"Source" form shall mean the preferred form for making modifications, |
||||
including but not limited to software source code, documentation |
||||
source, and configuration files. |
||||
|
||||
"Object" form shall mean any form resulting from mechanical |
||||
transformation or translation of a Source form, including but |
||||
not limited to compiled object code, generated documentation, |
||||
and conversions to other media types. |
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or |
||||
Object form, made available under the License, as indicated by a |
||||
copyright notice that is included in or attached to the work |
||||
(an example is provided in the Appendix below). |
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object |
||||
form, that is based on (or derived from) the Work and for which the |
||||
editorial revisions, annotations, elaborations, or other modifications |
||||
represent, as a whole, an original work of authorship. For the purposes |
||||
of this License, Derivative Works shall not include works that remain |
||||
separable from, or merely link (or bind by name) to the interfaces of, |
||||
the Work and Derivative Works thereof. |
||||
|
||||
"Contribution" shall mean any work of authorship, including |
||||
the original version of the Work and any modifications or additions |
||||
to that Work or Derivative Works thereof, that is intentionally |
||||
submitted to Licensor for inclusion in the Work by the copyright owner |
||||
or by an individual or Legal Entity authorized to submit on behalf of |
||||
the copyright owner. For the purposes of this definition, "submitted" |
||||
means any form of electronic, verbal, or written communication sent |
||||
to the Licensor or its representatives, including but not limited to |
||||
communication on electronic mailing lists, source code control systems, |
||||
and issue tracking systems that are managed by, or on behalf of, the |
||||
Licensor for the purpose of discussing and improving the Work, but |
||||
excluding communication that is conspicuously marked or otherwise |
||||
designated in writing by the copyright owner as "Not a Contribution." |
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity |
||||
on behalf of whom a Contribution has been received by Licensor and |
||||
subsequently incorporated within the Work. |
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of |
||||
this License, each Contributor hereby grants to You a perpetual, |
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
copyright license to reproduce, prepare Derivative Works of, |
||||
publicly display, publicly perform, sublicense, and distribute the |
||||
Work and such Derivative Works in Source or Object form. |
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of |
||||
this License, each Contributor hereby grants to You a perpetual, |
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
(except as stated in this section) patent license to make, have made, |
||||
use, offer to sell, sell, import, and otherwise transfer the Work, |
||||
where such license applies only to those patent claims licensable |
||||
by such Contributor that are necessarily infringed by their |
||||
Contribution(s) alone or by combination of their Contribution(s) |
||||
with the Work to which such Contribution(s) was submitted. If You |
||||
institute patent litigation against any entity (including a |
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work |
||||
or a Contribution incorporated within the Work constitutes direct |
||||
or contributory patent infringement, then any patent licenses |
||||
granted to You under this License for that Work shall terminate |
||||
as of the date such litigation is filed. |
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the |
||||
Work or Derivative Works thereof in any medium, with or without |
||||
modifications, and in Source or Object form, provided that You |
||||
meet the following conditions: |
||||
|
||||
(a) You must give any other recipients of the Work or |
||||
Derivative Works a copy of this License; and |
||||
|
||||
(b) You must cause any modified files to carry prominent notices |
||||
stating that You changed the files; and |
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works |
||||
that You distribute, all copyright, patent, trademark, and |
||||
attribution notices from the Source form of the Work, |
||||
excluding those notices that do not pertain to any part of |
||||
the Derivative Works; and |
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its |
||||
distribution, then any Derivative Works that You distribute must |
||||
include a readable copy of the attribution notices contained |
||||
within such NOTICE file, excluding those notices that do not |
||||
pertain to any part of the Derivative Works, in at least one |
||||
of the following places: within a NOTICE text file distributed |
||||
as part of the Derivative Works; within the Source form or |
||||
documentation, if provided along with the Derivative Works; or, |
||||
within a display generated by the Derivative Works, if and |
||||
wherever such third-party notices normally appear. The contents |
||||
of the NOTICE file are for informational purposes only and |
||||
do not modify the License. You may add Your own attribution |
||||
notices within Derivative Works that You distribute, alongside |
||||
or as an addendum to the NOTICE text from the Work, provided |
||||
that such additional attribution notices cannot be construed |
||||
as modifying the License. |
||||
|
||||
You may add Your own copyright statement to Your modifications and |
||||
may provide additional or different license terms and conditions |
||||
for use, reproduction, or distribution of Your modifications, or |
||||
for any such Derivative Works as a whole, provided Your use, |
||||
reproduction, and distribution of the Work otherwise complies with |
||||
the conditions stated in this License. |
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, |
||||
any Contribution intentionally submitted for inclusion in the Work |
||||
by You to the Licensor shall be under the terms and conditions of |
||||
this License, without any additional terms or conditions. |
||||
Notwithstanding the above, nothing herein shall supersede or modify |
||||
the terms of any separate license agreement you may have executed |
||||
with Licensor regarding such Contributions. |
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade |
||||
names, trademarks, service marks, or product names of the Licensor, |
||||
except as required for reasonable and customary use in describing the |
||||
origin of the Work and reproducing the content of the NOTICE file. |
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or |
||||
agreed to in writing, Licensor provides the Work (and each |
||||
Contributor provides its Contributions) on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
||||
implied, including, without limitation, any warranties or conditions |
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
||||
PARTICULAR PURPOSE. You are solely responsible for determining the |
||||
appropriateness of using or redistributing the Work and assume any |
||||
risks associated with Your exercise of permissions under this License. |
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, |
||||
whether in tort (including negligence), contract, or otherwise, |
||||
unless required by applicable law (such as deliberate and grossly |
||||
negligent acts) or agreed to in writing, shall any Contributor be |
||||
liable to You for damages, including any direct, indirect, special, |
||||
incidental, or consequential damages of any character arising as a |
||||
result of this License or out of the use or inability to use the |
||||
Work (including but not limited to damages for loss of goodwill, |
||||
work stoppage, computer failure or malfunction, or any and all |
||||
other commercial damages or losses), even if such Contributor |
||||
has been advised of the possibility of such damages. |
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing |
||||
the Work or Derivative Works thereof, You may choose to offer, |
||||
and charge a fee for, acceptance of support, warranty, indemnity, |
||||
or other liability obligations and/or rights consistent with this |
||||
License. However, in accepting such obligations, You may act only |
||||
on Your own behalf and on Your sole responsibility, not on behalf |
||||
of any other Contributor, and only if You agree to indemnify, |
||||
defend, and hold each Contributor harmless for any liability |
||||
incurred by, or claims asserted against, such Contributor by reason |
||||
of your accepting any such warranty or additional liability. |
||||
|
||||
END OF TERMS AND CONDITIONS |
||||
|
||||
APPENDIX: How to apply the Apache License to your work. |
||||
|
||||
To apply the Apache License to your work, attach the following |
||||
boilerplate notice, with the fields enclosed by brackets "{}" |
||||
replaced with your own identifying information. (Don't include |
||||
the brackets!) The text should be enclosed in the appropriate |
||||
comment syntax for the file format. We also recommend that a |
||||
file or class name and description of purpose be included on the |
||||
same "printed page" as the copyright notice for easier |
||||
identification within third-party archives. |
||||
|
||||
Copyright {yyyy} {name of copyright owner} |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
@ -1,34 +0,0 @@
|
||||
Copyright RubyLouvre(司徒正美) and other contributors |
||||
|
||||
http://avalonjs.github.io/ |
||||
|
||||
The following license applies to all parts of this software except as |
||||
documented below: |
||||
|
||||
==== |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining |
||||
a copy of this software and associated documentation files (the |
||||
"Software"), to deal in the Software without restriction, including |
||||
without limitation the rights to use, copy, modify, merge, publish, |
||||
distribute, sublicense, and/or sell copies of the Software, and to |
||||
permit persons to whom the Software is furnished to do so, subject to |
||||
the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be |
||||
included in all copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||
|
||||
==== |
||||
|
||||
All files located in the node_modules and external directories are |
||||
externally maintained libraries used by this software which have their |
||||
own licenses; we recommend you read them, as their terms may differ from |
||||
the terms above. |
@ -0,0 +1,23 @@
|
||||
FineUI |
||||
============ |
||||
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) |
||||
> UI Framework used in FineBI and FineReport |
||||
|
||||
For more details, see the website [http://www.fanruan.com](http://www.fanruan.com). |
||||
|
||||
Documentation |
||||
============= |
||||
|
||||
GithubPages: [https://fanruan.github.io/fineui](https://fanruan.github.io/fineui) |
||||
|
||||
CodingPages: [http://fanruan.coding.me/fineui](http://fanruan.coding.me/fineui) |
||||
|
||||
Demo |
||||
============= |
||||
|
||||
CodingPages: [http://fanruan.coding.me/fineui/dist/index.html](http://fanruan.coding.me/fineui/dist/index.html) |
||||
|
||||
|
||||
License |
||||
============ |
||||
Please refer to [LICENSE](https://github.com/fanruan/fineui/blob/master/LICENSE) file. |
@ -0,0 +1,175 @@
|
||||
// Production steps of ECMA-262, Edition 5, 15.4.4.14
|
||||
// Reference: http://es5.github.io/#x15.4.4.14
|
||||
if (!Array.prototype.indexOf) { |
||||
Array.prototype.indexOf = function (searchElement, fromIndex) { |
||||
|
||||
var k; |
||||
|
||||
// 1. Let o be the result of calling ToObject passing
|
||||
// the this value as the argument.
|
||||
if (this == null) { |
||||
throw new TypeError('"this" is null or not defined'); |
||||
} |
||||
|
||||
var o = Object(this); |
||||
|
||||
// 2. Let lenValue be the result of calling the Get
|
||||
// internal method of o with the argument "length".
|
||||
// 3. Let len be ToUint32(lenValue).
|
||||
var len = o.length >>> 0; |
||||
|
||||
// 4. If len is 0, return -1.
|
||||
if (len === 0) { |
||||
return -1; |
||||
} |
||||
|
||||
// 5. If argument fromIndex was passed let n be
|
||||
// ToInteger(fromIndex); else let n be 0.
|
||||
var n = fromIndex | 0; |
||||
|
||||
// 6. If n >= len, return -1.
|
||||
if (n >= len) { |
||||
return -1; |
||||
} |
||||
|
||||
// 7. If n >= 0, then Let k be n.
|
||||
// 8. Else, n<0, Let k be len - abs(n).
|
||||
// If k is less than 0, then let k be 0.
|
||||
k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); |
||||
|
||||
// 9. Repeat, while k < len
|
||||
while (k < len) { |
||||
// a. Let Pk be ToString(k).
|
||||
// This is implicit for LHS operands of the in operator
|
||||
// b. Let kPresent be the result of calling the
|
||||
// HasProperty internal method of o with argument Pk.
|
||||
// This step can be combined with c
|
||||
// c. If kPresent is true, then
|
||||
// i. Let elementK be the result of calling the Get
|
||||
// internal method of o with the argument ToString(k).
|
||||
// ii. Let same be the result of applying the
|
||||
// Strict Equality Comparison Algorithm to
|
||||
// searchElement and elementK.
|
||||
// iii. If same is true, return k.
|
||||
if (k in o && o[k] === searchElement) { |
||||
return k; |
||||
} |
||||
k++; |
||||
} |
||||
return -1; |
||||
}; |
||||
} |
||||
if (!Array.prototype.lastIndexOf) { |
||||
Array.prototype.lastIndexOf = function (searchElement /*, fromIndex*/) { |
||||
'use strict'; |
||||
|
||||
if (this === void 0 || this === null) { |
||||
throw new TypeError(); |
||||
} |
||||
|
||||
var n, k, |
||||
t = Object(this), |
||||
len = t.length >>> 0; |
||||
if (len === 0) { |
||||
return -1; |
||||
} |
||||
|
||||
n = len - 1; |
||||
if (arguments.length > 1) { |
||||
n = Number(arguments[1]); |
||||
if (n != n) { |
||||
n = 0; |
||||
} |
||||
else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) { |
||||
n = (n > 0 || -1) * Math.floor(Math.abs(n)); |
||||
} |
||||
} |
||||
|
||||
for (k = n >= 0 |
||||
? Math.min(n, len - 1) |
||||
: len - Math.abs(n); k >= 0; k--) { |
||||
if (k in t && t[k] === searchElement) { |
||||
return k; |
||||
} |
||||
} |
||||
return -1; |
||||
}; |
||||
} |
||||
/** |
||||
* 特殊情况 |
||||
* Created by wang on 15/6/23. |
||||
*/ |
||||
//解决console未定义问题 guy
|
||||
window.console = window.console || (function () { |
||||
var c = {}; |
||||
c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile |
||||
= c.clear = c.exception = c.trace = c.assert = function () { |
||||
}; |
||||
return c; |
||||
})(); |
||||
/* |
||||
* 前端缓存 |
||||
*/ |
||||
window.localStorage || (window.localStorage = { |
||||
items: {}, |
||||
setItem: function (k, v) { |
||||
BI.Cache.addCookie(k, v); |
||||
}, |
||||
getItem: function (k) { |
||||
return BI.Cache.getCookie(k); |
||||
}, |
||||
removeItem: function (k) { |
||||
BI.Cache.deleteCookie(k); |
||||
}, |
||||
key: function () { |
||||
|
||||
}, |
||||
clear: function () { |
||||
this.items = {}; |
||||
} |
||||
});if (typeof Set !== 'undefined' && Set.toString().match(/native code/)) { |
||||
|
||||
} else { |
||||
Set = function () { |
||||
this.set = {} |
||||
}; |
||||
Set.prototype.has = function (key) { |
||||
return this.set[key] !== undefined; |
||||
}; |
||||
Set.prototype.add = function (key) { |
||||
this.set[key] = 1 |
||||
}; |
||||
Set.prototype.clear = function () { |
||||
this.set = {} |
||||
}; |
||||
}//修复ie9下sort方法的bug
|
||||
;!function (window) { |
||||
var ua = window.navigator.userAgent.toLowerCase(), |
||||
reg = /msie|applewebkit.+safari/; |
||||
if (reg.test(ua)) { |
||||
var _sort = Array.prototype.sort; |
||||
Array.prototype.sort = function (fn) { |
||||
if (!!fn && typeof fn === 'function') { |
||||
if (this.length < 2) { |
||||
return this; |
||||
} |
||||
var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0; |
||||
for (; i < l; i++) { |
||||
for (j = i + 1; j < l; j++) { |
||||
t = fn.call(this, this[i], this[j]); |
||||
r = (typeof t === 'number' ? t : |
||||
!!t ? 1 : 0) > 0; |
||||
if (r === true) { |
||||
tmp = this[i]; |
||||
this[i] = this[j]; |
||||
this[j] = tmp; |
||||
} |
||||
} |
||||
} |
||||
return this; |
||||
} else { |
||||
return _sort.call(this); |
||||
} |
||||
}; |
||||
} |
||||
}(window); |
@ -0,0 +1,374 @@
|
||||
.bi-arrangement .arrangement-helper { |
||||
background: #3f8ce8; |
||||
z-index: 1000000000; |
||||
} |
||||
.bi-arrangement .arrangement-block { |
||||
z-index: 1000000000; |
||||
} |
||||
.bi-arrangement .arrangement-drop-container { |
||||
z-index: 1000000000; |
||||
} |
||||
.bi-arrangement .arrangement-drop-container .arrangement-drop-region { |
||||
overflow: hidden; |
||||
} |
||||
.bi-arrangement .arrangement-drop-container .drop-devider { |
||||
z-index: 1000000001; |
||||
background: #3f8ce8; |
||||
} |
||||
.bi-arrangement .arrangement-drop-container .top-left, |
||||
.bi-arrangement .arrangement-drop-container .top-right, |
||||
.bi-arrangement .arrangement-drop-container .bottom-left, |
||||
.bi-arrangement .arrangement-drop-container .bottom-right, |
||||
.bi-arrangement .arrangement-drop-container .top-left-second, |
||||
.bi-arrangement .arrangement-drop-container .top-right-second, |
||||
.bi-arrangement .arrangement-drop-container .bottom-left-second, |
||||
.bi-arrangement .arrangement-drop-container .bottom-right-second, |
||||
.bi-arrangement .arrangement-drop-container .top-center, |
||||
.bi-arrangement .arrangement-drop-container .bottom-center, |
||||
.bi-arrangement .arrangement-drop-container .left-center, |
||||
.bi-arrangement .arrangement-drop-container .right-center, |
||||
.bi-arrangement .arrangement-drop-container .top-center-second, |
||||
.bi-arrangement .arrangement-drop-container .bottom-center-second, |
||||
.bi-arrangement .arrangement-drop-container .left-center-second, |
||||
.bi-arrangement .arrangement-drop-container .right-center-second { |
||||
z-index: 1000000001; |
||||
background: #3f8ce8; |
||||
} |
||||
.bi-arrangement-droppable { |
||||
z-index: 100000; |
||||
} |
||||
.bi-date-trigger { |
||||
-webkit-border-radius: 2px; |
||||
-moz-border-radius: 2px; |
||||
border-radius: 2px; |
||||
} |
||||
.bi-down-list-popup .list-group-item-text { |
||||
max-width: 203px; |
||||
} |
||||
.bi-down-list-popup .bi-down-list-item .list-item-text { |
||||
max-width: 203px; |
||||
} |
||||
.bi-excel-table > div.bottom-right > div > div > table { |
||||
border-right: 1px solid #d4dadd; |
||||
} |
||||
.bi-theme-dark .bi-excel-table > div.bottom-right > div > div > table { |
||||
border-right: 1px solid #525466; |
||||
} |
||||
.bi-excel-table-header-cell { |
||||
font-weight: bold; |
||||
} |
||||
.bi-file-manager-nav-button .file-manager-nav-button-text { |
||||
max-width: 200px; |
||||
} |
||||
.bi-file-manager-nav-button .file-manager-nav-button-text.active { |
||||
background-color: #eff1f4; |
||||
color: #999999; |
||||
} |
||||
.bi-file-manager-nav-button .file-manager-nav-button-triangle { |
||||
z-index: 1; |
||||
} |
||||
.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active { |
||||
background-color: #191b2b; |
||||
color: #999999; |
||||
} |
||||
.bi-interactive-arrangement .interactive-arrangement-dragtag-line { |
||||
z-index: 1000000000; |
||||
background-color: #f07d0a; |
||||
} |
||||
.bi-interactive-arrangement .interactive-arrangement-dragtag-icon { |
||||
z-index: 1000000000; |
||||
} |
||||
.bi-interval-slider { |
||||
min-height: 70px; |
||||
} |
||||
.bi-interval-slider-label { |
||||
min-height: 50px; |
||||
} |
||||
.bi-month-trigger { |
||||
-webkit-border-radius: 2px; |
||||
-moz-border-radius: 2px; |
||||
border-radius: 2px; |
||||
} |
||||
.bi-multidate-combo { |
||||
-webkit-border-radius: 2px; |
||||
-moz-border-radius: 2px; |
||||
border-radius: 2px; |
||||
} |
||||
.bi-multidate-popup .multidate-popup-label { |
||||
color: #3f8ce8; |
||||
font-size: 14px; |
||||
} |
||||
.bi-multidate-popup .multidate-popup-item:active, |
||||
.bi-multidate-popup .multidate-popup-item.active { |
||||
background-color: #3f8ce8; |
||||
color: #ffffff; |
||||
-webkit-border-radius: 2px 2px 0 0; |
||||
-moz-border-radius: 2px 2px 0 0; |
||||
border-radius: 2px 2px 0 0; |
||||
} |
||||
.bi-multidate-popup .multidate-popup-button { |
||||
color: #3f8ce8; |
||||
font-size: 14px; |
||||
} |
||||
.bi-multidate-segment .bi-multidate-editor { |
||||
font-size: 14px; |
||||
} |
||||
.bi-multi-select-check-pane .multi-select-check-selected { |
||||
text-decoration: underline; |
||||
} |
||||
.bi-multi-select-combo .multi-select-trigger-icon-button { |
||||
font-size: 16px; |
||||
} |
||||
.bi-multi-select-insert-combo .multi-select-trigger-icon-button { |
||||
font-size: 16px; |
||||
} |
||||
.bi-multi-select-trigger { |
||||
-webkit-border-radius: 2px 2px 2px 2px; |
||||
-moz-border-radius: 2px 2px 2px 2px; |
||||
border-radius: 2px 2px 2px 2px; |
||||
} |
||||
.bi-multi-select-search-pane .multi-select-toolbar { |
||||
color: #e85050; |
||||
} |
||||
.bi-multi-select-check-selected-button { |
||||
z-index: 1; |
||||
} |
||||
.bi-multi-tree-check-pane .multi-tree-check-selected { |
||||
color: #3f8ce8; |
||||
} |
||||
.bi-multi-tree-combo .multi-select-trigger-icon-button { |
||||
font-size: 16px; |
||||
} |
||||
.bi-multi-tree-popup .popup-view-tree { |
||||
min-height: 170px; |
||||
} |
||||
.bi-multi-tree-check-selected-button .trigger-check-selected { |
||||
color: #3f8ce8; |
||||
z-index: 1; |
||||
} |
||||
.bi-number-editor { |
||||
-webkit-border-radius: 2px; |
||||
-moz-border-radius: 2px; |
||||
border-radius: 2px; |
||||
} |
||||
.bi-number-interval .number-interval-small-editor { |
||||
-moz-border-radius-topleft: 2px; |
||||
-webkit-border-top-left-radius: 2px; |
||||
-moz-border-radius-bottomleft: 2px; |
||||
-webkit-border-bottom-left-radius: 2px; |
||||
border-top-left-radius: 2px; |
||||
border-bottom-left-radius: 2px; |
||||
} |
||||
.bi-number-interval .number-interval-big-editor { |
||||
-moz-border-radius-topright: 2px; |
||||
-webkit-border-top-right-radius: 2px; |
||||
-moz-border-radius-bottomright: 2px; |
||||
-webkit-border-bottom-right-radius: 2px; |
||||
border-top-right-radius: 2px; |
||||
border-bottom-right-radius: 2px; |
||||
} |
||||
.bi-number-interval .number-interval-big-combo { |
||||
-moz-border-radius-topleft: 2px; |
||||
-webkit-border-top-left-radius: 2px; |
||||
-moz-border-radius-bottomleft: 2px; |
||||
-webkit-border-bottom-left-radius: 2px; |
||||
border-top-left-radius: 2px; |
||||
border-bottom-left-radius: 2px; |
||||
} |
||||
.bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { |
||||
font-size: 14px; |
||||
} |
||||
.bi-number-interval .number-interval-small-combo { |
||||
-moz-border-radius-topright: 2px; |
||||
-webkit-border-top-right-radius: 2px; |
||||
-moz-border-radius-bottomright: 2px; |
||||
-webkit-border-bottom-right-radius: 2px; |
||||
border-top-right-radius: 2px; |
||||
border-bottom-right-radius: 2px; |
||||
} |
||||
.bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { |
||||
font-size: 14px; |
||||
} |
||||
.bi-number-interval.number-error .bi-input { |
||||
color: #e85050 !important; |
||||
} |
||||
.bi-page-table-cell { |
||||
-webkit-user-select: text; |
||||
-khtml-user-select: text; |
||||
-moz-user-select: text; |
||||
-ms-user-select: text; |
||||
-o-user-select: text; |
||||
user-select: text; |
||||
} |
||||
.bi-path-chooser .path-chooser-radio { |
||||
z-index: 1; |
||||
} |
||||
.bi-path-region .path-region-label { |
||||
z-index: 1; |
||||
} |
||||
.bi-preview-table-cell { |
||||
min-height: 25px; |
||||
min-width: 80px; |
||||
max-width: 220px; |
||||
} |
||||
.bi-preview-table { |
||||
-webkit-user-select: text; |
||||
-khtml-user-select: text; |
||||
-moz-user-select: text; |
||||
-ms-user-select: text; |
||||
-o-user-select: text; |
||||
user-select: text; |
||||
} |
||||
.bi-preview-table > div > table > thead > tr.odd, |
||||
.bi-preview-table > div > div > div > table > thead > tr.odd { |
||||
background-color: #eff1f4; |
||||
} |
||||
.bi-theme-dark .bi-preview-table > div > table > thead > tr.odd, |
||||
.bi-theme-dark .bi-preview-table > div > div > div > table > thead > tr.odd { |
||||
background-color: #191b2b; |
||||
} |
||||
.bi-preview-table-header-cell { |
||||
font-weight: bold; |
||||
min-height: 25px; |
||||
min-width: 80px; |
||||
max-width: 220px; |
||||
} |
||||
.bi-quarter-trigger { |
||||
-webkit-border-radius: 2px; |
||||
-moz-border-radius: 2px; |
||||
border-radius: 2px; |
||||
} |
||||
.bi-relation-view-region .relation-view-region-container { |
||||
z-index: 1; |
||||
-webkit-border-radius: 2px; |
||||
-moz-border-radius: 2px; |
||||
border-radius: 2px; |
||||
} |
||||
.bi-relation-view-region .relation-view-region-container.other-package { |
||||
border-style: dashed; |
||||
} |
||||
.bi-sequence-table-dynamic-number .sequence-table-title-cell { |
||||
overflow: hidden; |
||||
overflow-x: hidden; |
||||
overflow-y: hidden; |
||||
-webkit-box-sizing: border-box; |
||||
/*Safari3.2+*/ |
||||
-moz-box-sizing: border-box; |
||||
/*Firefox3.5+*/ |
||||
-ms-box-sizing: border-box; |
||||
/*IE8*/ |
||||
box-sizing: border-box; |
||||
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ |
||||
} |
||||
.bi-sequence-table-dynamic-number .sequence-table-number-cell { |
||||
-webkit-box-sizing: border-box; |
||||
/*Safari3.2+*/ |
||||
-moz-box-sizing: border-box; |
||||
/*Firefox3.5+*/ |
||||
-ms-box-sizing: border-box; |
||||
/*IE8*/ |
||||
box-sizing: border-box; |
||||
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ |
||||
} |
||||
.bi-sequence-table-list-number .sequence-table-title-cell { |
||||
overflow: hidden; |
||||
overflow-x: hidden; |
||||
overflow-y: hidden; |
||||
-webkit-box-sizing: border-box; |
||||
/*Safari3.2+*/ |
||||
-moz-box-sizing: border-box; |
||||
/*Firefox3.5+*/ |
||||
-ms-box-sizing: border-box; |
||||
/*IE8*/ |
||||
box-sizing: border-box; |
||||
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ |
||||
} |
||||
.bi-sequence-table-list-number .sequence-table-number-cell { |
||||
-webkit-box-sizing: border-box; |
||||
/*Safari3.2+*/ |
||||
-moz-box-sizing: border-box; |
||||
/*Firefox3.5+*/ |
||||
-ms-box-sizing: border-box; |
||||
/*IE8*/ |
||||
box-sizing: border-box; |
||||
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ |
||||
} |
||||
.bi-sequence-table-tree-number .sequence-table-title-cell { |
||||
overflow: hidden; |
||||
overflow-x: hidden; |
||||
overflow-y: hidden; |
||||
-webkit-box-sizing: border-box; |
||||
/*Safari3.2+*/ |
||||
-moz-box-sizing: border-box; |
||||
/*Firefox3.5+*/ |
||||
-ms-box-sizing: border-box; |
||||
/*IE8*/ |
||||
box-sizing: border-box; |
||||
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ |
||||
} |
||||
.bi-sequence-table-tree-number .sequence-table-number-cell { |
||||
-webkit-box-sizing: border-box; |
||||
/*Safari3.2+*/ |
||||
-moz-box-sizing: border-box; |
||||
/*Firefox3.5+*/ |
||||
-ms-box-sizing: border-box; |
||||
/*IE8*/ |
||||
box-sizing: border-box; |
||||
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ |
||||
} |
||||
.bi-single-slider-label { |
||||
min-height: 50px; |
||||
} |
||||
.bi-single-slider-normal { |
||||
min-height: 30px; |
||||
} |
||||
.bi-single-slider { |
||||
min-height: 50px; |
||||
} |
||||
.bi-single-slider-button .slider-button { |
||||
cursor: ew-resize; |
||||
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); |
||||
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); |
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); |
||||
-webkit-border-radius: 7px; |
||||
-moz-border-radius: 7px; |
||||
border-radius: 7px; |
||||
} |
||||
.bi-slider-track .gray-track { |
||||
background-color: rgba(153, 153, 153, 0.3); |
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999,endColorstr=#4d999999); |
||||
-webkit-border-radius: 3px; |
||||
-moz-border-radius: 3px; |
||||
border-radius: 3px; |
||||
} |
||||
.bi-slider-track .blue-track { |
||||
-webkit-border-radius: 3px; |
||||
-moz-border-radius: 3px; |
||||
border-radius: 3px; |
||||
} |
||||
.bi-param-time-interval.time-error .bi-input { |
||||
color: #e85050; |
||||
} |
||||
.bi-param-time-interval.time-error .sign-editor-text { |
||||
color: #e85050; |
||||
} |
||||
.bi-year-popup .year-popup-navigation { |
||||
line-height: 30px; |
||||
} |
||||
.bi-year-popup .year-popup-navigation > .center-element { |
||||
border-left: 1px solid #d4dadd; |
||||
} |
||||
.bi-year-popup .year-popup-navigation > .first-element { |
||||
border-left: none; |
||||
} |
||||
.bi-theme-dark .bi-year-popup .year-popup-navigation > .center-element { |
||||
border-left: 1px solid #525466; |
||||
} |
||||
.bi-theme-dark .bi-year-popup .year-popup-navigation > .first-element { |
||||
border-left: none; |
||||
} |
||||
.bi-year-trigger { |
||||
-webkit-border-radius: 2px; |
||||
-moz-border-radius: 2px; |
||||
border-radius: 2px; |
||||
} |
@ -1,8 +0,0 @@
|
||||
var array = [ |
||||
require('./buildIE8'), |
||||
] |
||||
Promise.all(array).then(function() { |
||||
console.log('build complete!!!') |
||||
}).catch(function() { |
||||
console.log('build error!!!') |
||||
}) |
@ -1,66 +0,0 @@
|
||||
var rollup = require('rollup'); |
||||
var fs = require('fs'); |
||||
var babel = require("babel-core"); |
||||
var transform = require('es3ify').transform; |
||||
var less = function(a) { return a } //require('semicolon-less')
|
||||
|
||||
// used to track the cache for subsequent bundles
|
||||
var cache; |
||||
var json = require('./package.json') |
||||
var v = 'version:' + JSON.stringify(json.version) |
||||
var sourcemaps = require('rollup-plugin-sourcemaps') |
||||
var buble = require('rollup-plugin-buble') |
||||
|
||||
module.exports = rollup.rollup({ |
||||
// The bundle's starting point. This file will be
|
||||
// included, along with the minimum necessary code
|
||||
// from its dependencies
|
||||
|
||||
entry: 'demo/index.js', |
||||
// If you have a bundle you want to re-use (e.g., when using a watcher to rebuild as files change),
|
||||
// you can tell rollup use a previous bundle as its starting point.
|
||||
// This is entirely optional!
|
||||
cache: cache, |
||||
|
||||
plugins: [ |
||||
buble({ |
||||
jsx: 'h', |
||||
transforms: { |
||||
modules: false |
||||
} |
||||
}), |
||||
sourcemaps() |
||||
] |
||||
}).then(function(bundle) { |
||||
// Generate bundle + sourcemap
|
||||
var result = bundle.generate({ |
||||
sourceMap: true, |
||||
format: 'umd', |
||||
moduleName: 'h' |
||||
}); |
||||
// Cache our bundle for later use (optional)
|
||||
cache = bundle; |
||||
result.code = result.code.replace( |
||||
/Object\.defineProperty\(exports,\s*'__esModule',\s*\{\s*value:\s*true\s*\}\);/, |
||||
"exports.__esModule = true"). |
||||
|
||||
replace(/version\:\s*1/, v) |
||||
|
||||
|
||||
result = babel.transform(result.code, { |
||||
presets: ['avalon'], |
||||
compact: false |
||||
}) |
||||
|
||||
var code = transform(result.code). |
||||
replace(/\}\)\(undefined,/, '})(this,'). |
||||
replace(/h\$\d/g, 'h') |
||||
|
||||
//这个不需要了
|
||||
// replace(/'use strict';?/g, '')
|
||||
fs.writeFileSync('./dist/h.js', less(code)); |
||||
|
||||
|
||||
}).catch(function(e) { |
||||
console.log('error', e) |
||||
}) |
@ -1,19 +0,0 @@
|
||||
import {shortcut} from "../src/h"; |
||||
import {Component} from "../src/component"; |
||||
|
||||
class Label extends Component { |
||||
constructor(props, context) { |
||||
super(props, context); |
||||
this.state = {count: 0} |
||||
this._onClick = () => { |
||||
this.setState({ |
||||
count: ++this.state.count |
||||
}) |
||||
}; |
||||
} |
||||
|
||||
render() { |
||||
return <div onClick={this._onClick}>{this.state.count}</div>; |
||||
} |
||||
} |
||||
shortcut("bi-label", Label) |
@ -1,13 +1,12 @@
|
||||
import {Component} from "../src/component"; |
||||
|
||||
class App extends Component { |
||||
constructor(props, context) { |
||||
super(props, context); |
||||
} |
||||
|
||||
render() { |
||||
return <bi-label></bi-label>; |
||||
} |
||||
} |
||||
|
||||
export default App; |
||||
$(function () { |
||||
var ref; |
||||
BI.createWidget({ |
||||
type: "demo.main", |
||||
ref: function (_ref) { |
||||
console.log(_ref); |
||||
ref = _ref; |
||||
}, |
||||
element: '#wrapper' |
||||
}); |
||||
// ref.destroy();
|
||||
}); |
File diff suppressed because one or more lines are too long
@ -0,0 +1,3 @@
|
||||
.demo-face .face-config .config-label { |
||||
font-size: 14px; |
||||
} |
@ -0,0 +1,77 @@
|
||||
.layout-bg-white { |
||||
background-color: #ffffff; |
||||
} |
||||
.layout-bg-gray { |
||||
background-color: #eeeeee; |
||||
} |
||||
.layout-bg1 { |
||||
color: #ffffff; |
||||
background-color: #0088cc; |
||||
} |
||||
.layout-bg2 { |
||||
color: #ffffff; |
||||
background-color: #008B8B; |
||||
} |
||||
.layout-bg3 { |
||||
color: #ffffff; |
||||
background-color: #6495ED; |
||||
} |
||||
.layout-bg4 { |
||||
color: #ffffff; |
||||
background-color: #ff69b4; |
||||
} |
||||
.layout-bg5 { |
||||
color: #ffffff; |
||||
background-color: #B8860B; |
||||
} |
||||
.layout-bg6 { |
||||
color: #ffffff; |
||||
background-color: #d9534f; |
||||
} |
||||
.layout-bg7 { |
||||
color: #ffffff; |
||||
background-color: #ea4738; |
||||
} |
||||
.layout-bg8 { |
||||
color: #ffffff; |
||||
background-color: #6495ed; |
||||
} |
||||
.demo-main .bg1 { |
||||
background-color: #178cdf; |
||||
} |
||||
body { |
||||
background-color: #eff1f4; |
||||
} |
||||
.bi-theme-dark body { |
||||
background-color: #191B2B; |
||||
} |
||||
.demo-editor { |
||||
border: 1px solid #cccccc; |
||||
} |
||||
.demo-clolor { |
||||
color: #1a1a1a; |
||||
} |
||||
.bi-progress-bar-processor { |
||||
transition: all 0.5s ease; |
||||
-webkit-transition: all 0.5s ease; |
||||
-moz-transition: all 0.5s ease; |
||||
-o-transition: all 0.5s ease; |
||||
background: #3f8ce8; |
||||
-webkit-border-radius: 20px; |
||||
-moz-border-radius: 20px; |
||||
border-radius: 20px; |
||||
overflow: hidden; |
||||
overflow-x: hidden; |
||||
overflow-y: hidden; |
||||
} |
||||
.bi-progress-text-bar-processor { |
||||
transition: all 0.5s ease; |
||||
-webkit-transition: all 0.5s ease; |
||||
-moz-transition: all 0.5s ease; |
||||
-o-transition: all 0.5s ease; |
||||
} |
||||
.bi-progress-bar-bar { |
||||
-webkit-border-radius: 20px; |
||||
-moz-border-radius: 20px; |
||||
border-radius: 20px; |
||||
} |
@ -0,0 +1,10 @@
|
||||
.demo-north { |
||||
background-color: #3c8dbc; |
||||
} |
||||
.demo-north .logo { |
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; |
||||
color: #ffffff; |
||||
background-color: #367fa9; |
||||
font-size: 20px; |
||||
font-weight: 300; |
||||
} |
@ -0,0 +1,102 @@
|
||||
.mvc-button:hover, |
||||
.mvc-button.hover { |
||||
opacity: 0.5; |
||||
filter: alpha(opacity=50); |
||||
} |
||||
.mvc-button.active, |
||||
.mvc-button:active { |
||||
opacity: 0.5; |
||||
filter: alpha(opacity=50); |
||||
} |
||||
.bi-set-get .left-title, |
||||
.bi-set-get .right-title { |
||||
background: #0088cc; |
||||
color: #ffffff; |
||||
} |
||||
.bi-set-get .left-nav { |
||||
border-bottom: 1px solid #cccccc; |
||||
} |
||||
.bi-set-get .left-nav.active, |
||||
.bi-set-get .left-nav:active { |
||||
color: #ffffff; |
||||
background-color: #d9534f; |
||||
} |
||||
.bi-local .top-button { |
||||
background-color: #448eea; |
||||
color: #ffffff; |
||||
} |
||||
.bi-local .bottom-label { |
||||
background-color: #EA4738; |
||||
color: #ffffff; |
||||
} |
||||
.bi-local .delete-button { |
||||
background-color: #008B8B; |
||||
color: #ffffff; |
||||
} |
||||
.bi-local .vessel-border { |
||||
border-left: 1px solid #cccccc; |
||||
border-bottom: 1px solid #cccccc; |
||||
border-right: 1px solid #cccccc; |
||||
} |
||||
.bi-event .title { |
||||
background: #0088cc; |
||||
color: #ffffff; |
||||
} |
||||
.bi-event .front { |
||||
background: #ADD8E6; |
||||
} |
||||
.bi-event .nav { |
||||
border: 1px solid #cccccc; |
||||
} |
||||
.bi-skip-to { |
||||
color: #ffffff; |
||||
} |
||||
.bi-skip-to .red-pane { |
||||
background-color: #0088cc; |
||||
} |
||||
.bi-skip-to .blue-pane { |
||||
background-color: #6495ED; |
||||
} |
||||
.bi-skip-to .green-pane { |
||||
background-color: #008B8B; |
||||
} |
||||
.bi-skip-to .yellow-pane { |
||||
background-color: #B8860B; |
||||
} |
||||
.bi-change .outer-text { |
||||
background-color: #0088cc; |
||||
color: #ffffff; |
||||
} |
||||
.bi-change .inner { |
||||
border-left: 1px solid #cccccc; |
||||
border-bottom: 1px solid #cccccc; |
||||
border-right: 1px solid #cccccc; |
||||
} |
||||
.bi-change .type-first { |
||||
background-color: #008B8B; |
||||
} |
||||
.bi-change .type-second { |
||||
background-color: #6495ED; |
||||
} |
||||
.bi-change .type-third { |
||||
background-color: #0088cc; |
||||
} |
||||
.bi-tmp .tmp-button { |
||||
color: #ffffff; |
||||
background: #0088cc; |
||||
} |
||||
.bi-splice-duplicate .superiors-label { |
||||
color: white; |
||||
background-color: #008B8B; |
||||
} |
||||
.bi-splice-duplicate .sd-child { |
||||
border: 1px solid #cccccc; |
||||
} |
||||
.bi-splice-duplicate .sd-child .right-button-add { |
||||
color: white; |
||||
background-color: #0088cc; |
||||
} |
||||
.bi-splice-duplicate .sd-child .right-button-del { |
||||
color: white; |
||||
background-color: #d9534f; |
||||
} |
@ -1,5 +0,0 @@
|
||||
import React from "../src/preact"; |
||||
import './Label' |
||||
import App from "./App"; |
||||
|
||||
React.render(<App />, document.getElementById("app")); |
@ -0,0 +1,195 @@
|
||||
Demo.Button = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-button" |
||||
}, |
||||
render: function () { |
||||
var items = [ |
||||
{ |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '一般按钮', |
||||
level: 'common', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '表示成功状态按钮', |
||||
level: 'success', |
||||
height: 30 |
||||
} |
||||
}, |
||||
{ |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '表示警告状态的按钮', |
||||
level: 'warning', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '表示忽略状态的按钮', |
||||
level: 'ignore', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '普通灰化按钮', |
||||
disabled: true, |
||||
level: 'success', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '忽略状态灰化按钮', |
||||
disabled: true, |
||||
level: 'ignore', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '带图标的按钮', |
||||
//level: 'ignore',
|
||||
iconClass: "close-font", |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '一般按钮', |
||||
block: true, |
||||
level: 'common', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '表示成功状态按钮', |
||||
block: true, |
||||
level: 'success', |
||||
height: 30 |
||||
} |
||||
}, |
||||
{ |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '表示警告状态的按钮', |
||||
block: true, |
||||
level: 'warning', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '表示忽略状态的按钮', |
||||
block: true, |
||||
level: 'ignore', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '普通灰化按钮', |
||||
block: true, |
||||
disabled: true, |
||||
level: 'success', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '忽略状态灰化按钮', |
||||
block: true, |
||||
disabled: true, |
||||
level: 'ignore', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '带图标的按钮', |
||||
block: true, |
||||
//level: 'ignore',
|
||||
iconClass: "close-font", |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '一般按钮', |
||||
clear: true, |
||||
level: 'common', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '表示成功状态按钮', |
||||
clear: true, |
||||
level: 'success', |
||||
height: 30 |
||||
} |
||||
}, |
||||
{ |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '表示警告状态的按钮', |
||||
clear: true, |
||||
level: 'warning', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '表示忽略状态的按钮', |
||||
clear: true, |
||||
level: 'ignore', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '普通灰化按钮', |
||||
clear: true, |
||||
disabled: true, |
||||
level: 'success', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '忽略状态灰化按钮', |
||||
clear: true, |
||||
disabled: true, |
||||
level: 'ignore', |
||||
height: 30 |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '带图标的按钮', |
||||
clear: true, |
||||
//level: 'ignore',
|
||||
iconClass: "close-font", |
||||
height: 30 |
||||
} |
||||
} |
||||
]; |
||||
BI.each(items, function (i, item) { |
||||
item.el.handler = function () { |
||||
BI.Msg.alert('按钮', this.options.text); |
||||
} |
||||
}); |
||||
return { |
||||
type: "bi.left", |
||||
vgap: 100, |
||||
hgap: 20, |
||||
items: items |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.button", Demo.Button); |
@ -0,0 +1,24 @@
|
||||
Demo.Button = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-button" |
||||
}, |
||||
render: function () { |
||||
var items = [ |
||||
{ |
||||
el: { |
||||
type: 'bi.icon_button', |
||||
cls: "close-ha-font", |
||||
width: 20, |
||||
height: 20 |
||||
} |
||||
} |
||||
]; |
||||
return { |
||||
type: "bi.left", |
||||
vgap: 200, |
||||
hgap: 20, |
||||
items: items |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.icon_button", Demo.Button); |
@ -0,0 +1,24 @@
|
||||
Demo.Button = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-button" |
||||
}, |
||||
render: function () { |
||||
var items = [ |
||||
{ |
||||
el: { |
||||
type: 'bi.image_button', |
||||
src: "http://www.easyicon.net/api/resizeApi.php?id=1206741&size=128", |
||||
width: 100, |
||||
height: 100 |
||||
} |
||||
} |
||||
]; |
||||
return { |
||||
type: "bi.left", |
||||
vgap: 200, |
||||
hgap: 20, |
||||
items: items |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.image_button", Demo.Button); |
@ -0,0 +1,23 @@
|
||||
Demo.Button = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-button" |
||||
}, |
||||
render: function () { |
||||
var items = [ |
||||
{ |
||||
el: { |
||||
type: 'bi.text_button', |
||||
text: '文字按钮', |
||||
height: 30 |
||||
} |
||||
} |
||||
]; |
||||
return { |
||||
type: "bi.left", |
||||
vgap: 200, |
||||
hgap: 20, |
||||
items: items |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.text_button", Demo.Button); |
@ -0,0 +1,48 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
render: function () { |
||||
|
||||
var canvas = BI.createWidget({ |
||||
type: "bi.canvas", |
||||
width: 500, |
||||
height: 600 |
||||
}); |
||||
canvas.rect(0, 0, 80, 100, "#7dbd2f"); |
||||
|
||||
canvas.line(80, 0, 100, 100, 200, 100, 300, 0, { |
||||
strokeStyle: "red", |
||||
lineWidth: 2 |
||||
}); |
||||
|
||||
canvas.circle(150, 50, 20, "green"); |
||||
|
||||
//渐变矩形
|
||||
canvas.rect(0, 120, 80, 100, canvas.gradient(0, 120, 80, 220, "#FF0000", "#00FF00")); |
||||
|
||||
//空心图形
|
||||
canvas.hollow(100, 120, 100, 220, 200, 120, { |
||||
strokeStyle: "blue" |
||||
}); |
||||
|
||||
//实心图形
|
||||
canvas.solid(100, 240, 200, 240, 150, 280, 200, 320, 100, 320, { |
||||
strokeStyle: "yellow", |
||||
fillStyle: "pink" |
||||
}); |
||||
|
||||
canvas.stroke(); |
||||
|
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: canvas, |
||||
left: 100, |
||||
top: 50 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.canvas", Demo.Func); |
@ -0,0 +1,138 @@
|
||||
Demo.Label = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-label" |
||||
}, |
||||
render: function () { |
||||
return { |
||||
type: "bi.vertical", |
||||
items: [{ |
||||
type: "bi.label", |
||||
cls: "layout-bg6", |
||||
text: "这是一个label控件,默认居中", |
||||
textAlign: "center" |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg1", |
||||
text: "这是一个label控件, 高度为30,默认居中", |
||||
textAlign: "center", |
||||
height: 30 |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg3", |
||||
text: "这是一个label控件,使用水平居左", |
||||
textAlign: "left", |
||||
height: 30 |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg2", |
||||
text: "这是一个label控件,whiteSpace是normal,不设置高度,为了演示这个是真的是normal的,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数", |
||||
whiteSpace: "normal" |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg5", |
||||
text: "这是一个label控件,whiteSpace是默认的nowrap,不设置高度,为了演示这个是真的是nowrap的,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数" |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg7", |
||||
text: "这是一个label控件,whiteSpace是默认的nowrap,高度为30,为了演示这个是真的是nowrap的,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数", |
||||
height: 30 |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg3", |
||||
text: "这是一个label控件,whiteSpace设置为normal,高度为60,为了演示这个是真的是normal的,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数", |
||||
whiteSpace: "normal", |
||||
height: 60 |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg5", |
||||
text: "这是一个label控件,whiteSpace设置为normal,textHeight控制text的lineHeight,这样可以实现换行效果,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数", |
||||
whiteSpace: "normal", |
||||
textHeight: 30, |
||||
height: 60 |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg1", |
||||
text: "这是一个label控件,whiteSpace设置为nowrap,textWidth控制text的width", |
||||
textWidth: 200, |
||||
height: 60 |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg8", |
||||
text: "这是一个label控件,whiteSpace设置为normal,textWidth控制text的width,这样可以实现换行效果,我凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数,凑点字数", |
||||
whiteSpace: "normal", |
||||
textWidth: 200, |
||||
height: 60 |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg7", |
||||
text: "whiteSpace为默认的nowrap,高度设置为60,宽度设置为300", |
||||
height: 60, |
||||
width: 300 |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg6", |
||||
text: "设置了宽度300,高度60,whiteSpace设置为normal", |
||||
whiteSpace: "normal", |
||||
width: 300, |
||||
height: 60 |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg8", |
||||
text: "textWidth设置为200,textHeight设置为30,width设置300,凑点字数看效果", |
||||
width: 300, |
||||
textWidth: 200, |
||||
textHeight: 30, |
||||
height: 60, |
||||
whiteSpace: "normal" |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg1", |
||||
text: "textWidth设置为200,width设置300,看下水平居左的换行效果", |
||||
textAlign: "left", |
||||
width: 300, |
||||
textWidth: 200, |
||||
textHeight: 30, |
||||
height: 60, |
||||
whiteSpace: "normal" |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg2", |
||||
text: "使用默认的nowrap,再去设置textHeight,只会有一行的效果", |
||||
textAlign: "left", |
||||
width: 300, |
||||
textWidth: 200, |
||||
textHeight: 30, |
||||
height: 60 |
||||
}, { |
||||
type: "bi.left", |
||||
items: [{ |
||||
type: "bi.label", |
||||
cls: "layout-bg3", |
||||
text: "在float布局中自适应的,不设高度和宽度,文字多长这个就有多长" |
||||
}], |
||||
height: 30 |
||||
}, { |
||||
type: "bi.left", |
||||
items: [{ |
||||
type: "bi.label", |
||||
cls: "layout-bg4", |
||||
text: "在float布局中自适应的,设置了宽度200,后面还有", |
||||
width: 200 |
||||
}], |
||||
height: 30 |
||||
}, { |
||||
type: "bi.left", |
||||
items: [{ |
||||
type: "bi.label", |
||||
text: "在float布局中自适应的,设置了高度,文字多长这个就有多长", |
||||
cls: "layout-bg5", |
||||
height: 30 |
||||
}], |
||||
height: 30 |
||||
}], |
||||
hgap: 300, |
||||
vgap: 20 |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.label", Demo.Label); |
@ -0,0 +1,23 @@
|
||||
Demo.Message = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-bubble" |
||||
}, |
||||
render: function () { |
||||
return { |
||||
type: "bi.center_adapt", |
||||
items : [ |
||||
{ |
||||
el : { |
||||
type : 'bi.button', |
||||
text : '点击我弹出一个消息框', |
||||
height : 30, |
||||
handler : function() { |
||||
BI.Msg.alert('测试消息框', '我是测试消息框的内容'); |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.message", Demo.Message); |
@ -0,0 +1,120 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
render: function () { |
||||
return { |
||||
type: "bi.vertical", |
||||
items: [{ |
||||
type: "bi.label", |
||||
height: 30, |
||||
text: "默认的分页" |
||||
}, { |
||||
type: "bi.pager", |
||||
height: 50, |
||||
pages: 18, |
||||
groups: 5, |
||||
curr: 6, |
||||
first: "首页", |
||||
last: "尾页" |
||||
}, { |
||||
type: "bi.label", |
||||
height: 30, |
||||
text: "显示上一页、下一页、首页、尾页" |
||||
}, { |
||||
type: "bi.pager", |
||||
dynamicShow: false, |
||||
height: 50, |
||||
pages: 18, |
||||
groups: 5, |
||||
curr: 1, |
||||
first: "首页>", |
||||
last: "<尾页" |
||||
}, { |
||||
type: "bi.label", |
||||
height: 30, |
||||
text: "显示上一页、下一页" |
||||
}, { |
||||
type: "bi.pager", |
||||
dynamicShow: false, |
||||
dynamicShowFirstLast: true, |
||||
height: 50, |
||||
pages: 18, |
||||
groups: 5, |
||||
curr: 1, |
||||
first: "首页>", |
||||
last: "<尾页" |
||||
}, { |
||||
type: "bi.label", |
||||
height: 30, |
||||
text: "自定义上一页、下一页" |
||||
}, { |
||||
type: "bi.pager", |
||||
dynamicShow: false, |
||||
height: 50, |
||||
pages: 18, |
||||
groups: 5, |
||||
curr: 6, |
||||
prev: { |
||||
type: "bi.button", |
||||
cls: "", |
||||
text: "上一页", |
||||
value: "prev", |
||||
once: false, |
||||
height: 30, |
||||
handler: function () { |
||||
|
||||
} |
||||
}, |
||||
next: { |
||||
type: "bi.button", |
||||
cls: "", |
||||
text: "下一页", |
||||
value: "next", |
||||
once: false, |
||||
handler: function () { |
||||
|
||||
} |
||||
} |
||||
}, { |
||||
type: "bi.label", |
||||
height: 30, |
||||
text: "不知道总页数的情况(测试条件 1<=page<=3)" |
||||
}, { |
||||
type: "bi.pager", |
||||
dynamicShow: false, |
||||
height: 50, |
||||
pages: false, |
||||
curr: 1, |
||||
prev: { |
||||
type: "bi.button", |
||||
cls: "", |
||||
text: "上一页", |
||||
value: "prev", |
||||
once: false, |
||||
height: 30, |
||||
handler: function () { |
||||
|
||||
} |
||||
}, |
||||
next: { |
||||
type: "bi.button", |
||||
cls: "", |
||||
text: "下一页", |
||||
value: "next", |
||||
once: false, |
||||
handler: function () { |
||||
|
||||
} |
||||
}, |
||||
hasPrev: function (v) { |
||||
return v > 1; |
||||
}, |
||||
hasNext: function (v) { |
||||
return v < 3; |
||||
} |
||||
}] |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.pager", Demo.Func); |
@ -0,0 +1,32 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
render: function () { |
||||
var svg = BI.createWidget({ |
||||
type: "bi.svg", |
||||
width: 500, |
||||
height: 600 |
||||
}); |
||||
|
||||
var circle = svg.circle(100, 100, 10); |
||||
circle.animate({fill: "#223fa3", stroke: "#000", "stroke-width": 80, "stroke-opacity": 0.5}, 2000); |
||||
|
||||
var el = svg.rect(10, 200, 300, 200); |
||||
el.transform("t100,100r45t-100,0"); |
||||
|
||||
svg.path("M10,10L50,50M50,10L10,50") |
||||
.attr({stroke: "red"}); |
||||
|
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: svg, |
||||
left: 100, |
||||
top: 50 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.svg", Demo.Func); |
@ -0,0 +1,33 @@
|
||||
Demo.CodeEditor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-editor" |
||||
}, |
||||
render: function () { |
||||
var editor = BI.createWidget({ |
||||
type: "bi.code_editor", |
||||
cls: "mvc-border", |
||||
width: 600, |
||||
height: 400 |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.vertical", |
||||
element: this, |
||||
hgap: 30, |
||||
vgap: 20, |
||||
items: [editor, { |
||||
type: "bi.button", |
||||
text: "getValue", |
||||
handler: function () { |
||||
BI.Msg.toast(JSON.stringify(editor.getValue())); |
||||
} |
||||
}, { |
||||
type: "bi.button", |
||||
text: "setValue", |
||||
handler: function () { |
||||
editor.setValue("测试数据"); |
||||
} |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.code_editor", Demo.CodeEditor); |
@ -0,0 +1,96 @@
|
||||
Demo.Editor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-editor" |
||||
}, |
||||
render: function () { |
||||
var editor1 = BI.createWidget({ |
||||
type: "bi.editor", |
||||
cls: "mvc-border", |
||||
watermark: "alert信息显示在下面", |
||||
errorText: "字段不可重名!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", |
||||
width: 200, |
||||
height: 30 |
||||
}); |
||||
editor1.on(BI.Editor.EVENT_ENTER, function () { |
||||
editor1.blur(); |
||||
}); |
||||
var editor2 = BI.createWidget({ |
||||
type: "bi.editor", |
||||
cls: "mvc-border", |
||||
watermark: "输入'a'会有错误信息", |
||||
disabled: true, |
||||
errorText: "字段不可重名", |
||||
validationChecker: function (v) { |
||||
if (v == "a") { |
||||
return false; |
||||
} |
||||
return true; |
||||
}, |
||||
allowBlank: true, |
||||
width: 200, |
||||
height: 30 |
||||
}); |
||||
var editor3 = BI.createWidget({ |
||||
type: "bi.editor", |
||||
cls: "mvc-border", |
||||
watermark: "输入'a'会有错误信息且回车键不能退出编辑", |
||||
errorText: "字段不可重名", |
||||
validationChecker: function (v) { |
||||
if (v == "a") { |
||||
return false; |
||||
} |
||||
return true; |
||||
}, |
||||
quitChecker: function (v) { |
||||
return false; |
||||
}, |
||||
allowBlank: true, |
||||
width: 300, |
||||
height: 30 |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: editor1, |
||||
left: 0, |
||||
top: 0 |
||||
}, { |
||||
el: editor2, |
||||
left: 250, |
||||
top: 30 |
||||
}, { |
||||
el: editor3, |
||||
left: 500, |
||||
top: 60 |
||||
}, { |
||||
el: { |
||||
type: "bi.button", |
||||
text: "disable", |
||||
handler: function () { |
||||
editor1.setEnable(false); |
||||
editor2.setEnable(false); |
||||
editor3.setEnable(false); |
||||
}, |
||||
height: 30 |
||||
}, |
||||
left: 100, |
||||
bottom: 60 |
||||
}, { |
||||
el: { |
||||
type: "bi.button", |
||||
text: "enable", |
||||
handler: function () { |
||||
editor1.setEnable(true); |
||||
editor2.setEnable(true); |
||||
editor3.setEnable(true); |
||||
}, |
||||
height: 30 |
||||
}, |
||||
left: 200, |
||||
bottom: 60 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.editor", Demo.Editor); |
@ -0,0 +1,21 @@
|
||||
Demo.CodeEditor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-editor" |
||||
}, |
||||
render: function () { |
||||
this.formula = BI.createWidget({ |
||||
type : 'bi.formula_editor', |
||||
width : 300, |
||||
height : 200, |
||||
value : 'SUM(C5, 16, 26)' |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.left", |
||||
element: this, |
||||
items: [this.formula], |
||||
hgap: 20, |
||||
vgap: 20 |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.formula_editor", Demo.CodeEditor); |
@ -0,0 +1,26 @@
|
||||
Demo.CodeEditor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-editor" |
||||
}, |
||||
render: function () { |
||||
return { |
||||
type: "bi.absolute", |
||||
items: [{ |
||||
el: { |
||||
type: "bi.adaptive", |
||||
cls: "layout-bg1", |
||||
items: [{ |
||||
type: "bi.multifile_editor", |
||||
width: 400, |
||||
height: 300 |
||||
}], |
||||
width: 400, |
||||
height: 300 |
||||
}, |
||||
top: 50, |
||||
left: 50 |
||||
}] |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.multifile_editor", Demo.CodeEditor); |
@ -0,0 +1,25 @@
|
||||
Demo.RichEditor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-rich-editor" |
||||
}, |
||||
render: function () { |
||||
this.editor = BI.createWidget({ |
||||
type: "bi.rich_editor", |
||||
cls: "mvc-border", |
||||
width: 600, |
||||
height: 400 |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.vertical", |
||||
element: this, |
||||
hgap: 30, |
||||
vgap: 50, |
||||
items: [this.editor] |
||||
}) |
||||
}, |
||||
|
||||
mounted: function(){ |
||||
this.editor.setValue('这是一条<font size="4" color="#009de3">测试</font>数据') |
||||
} |
||||
}); |
||||
BI.shortcut("demo.rich_editor", Demo.RichEditor); |
@ -0,0 +1,39 @@
|
||||
Demo.CodeEditor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-editor" |
||||
}, |
||||
render: function () { |
||||
var editor = BI.createWidget({ |
||||
type: "bi.textarea_editor", |
||||
cls: "mvc-border", |
||||
width: 600, |
||||
height: 400 |
||||
}); |
||||
editor.on(BI.TextAreaEditor.EVENT_FOCUS, function () { |
||||
BI.Msg.toast("Focus"); |
||||
}); |
||||
editor.on(BI.TextAreaEditor.EVENT_BLUR, function () { |
||||
BI.Msg.toast("Blur"); |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.vertical", |
||||
element: this, |
||||
hgap: 30, |
||||
vgap: 20, |
||||
items: [editor, { |
||||
type: "bi.button", |
||||
text: "getValue", |
||||
handler: function () { |
||||
BI.Msg.toast(JSON.stringify(editor.getValue())); |
||||
} |
||||
}, { |
||||
type: "bi.button", |
||||
text: "setValue", |
||||
handler: function () { |
||||
editor.setValue("测试数据"); |
||||
} |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.textarea_editor", Demo.CodeEditor); |
@ -0,0 +1,62 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
render: function () { |
||||
var items = [], header = [], columnSize = []; |
||||
|
||||
var rowCount = 100, columnCount = 100; |
||||
for (var i = 0; i < 1; i++) { |
||||
header[i] = []; |
||||
for (var j = 0; j < columnCount; j++) { |
||||
header[i][j] = { |
||||
type: "bi.label", |
||||
text: "表头" + i + "-" + j |
||||
} |
||||
columnSize[j] = 100; |
||||
} |
||||
} |
||||
for (var i = 0; i < rowCount; i++) { |
||||
items[i] = []; |
||||
for (var j = 0; j < columnCount; j++) { |
||||
items[i][j] = { |
||||
type: "bi.label", |
||||
text: (i < 3 ? 0 : i) + "-" + j |
||||
} |
||||
} |
||||
} |
||||
|
||||
var table = BI.createWidget({ |
||||
type: "bi.resizable_table", |
||||
el: { |
||||
type: "bi.collection_table" |
||||
}, |
||||
width: 600, |
||||
height: 500, |
||||
isResizeAdapt: true, |
||||
isNeedResize: true, |
||||
isNeedMerge: true, |
||||
mergeCols: [0, 1], |
||||
mergeRule: function (col1, col2) { |
||||
return BI.isEqual(col1, col2); |
||||
}, |
||||
isNeedFreeze: true, |
||||
freezeCols: [0, 1], |
||||
columnSize: columnSize, |
||||
items: items, |
||||
header: header |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: table, |
||||
left: 10, |
||||
right: 10, |
||||
top: 10, |
||||
bottom: 10 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.collection_table", Demo.Func); |
@ -0,0 +1,57 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
render: function () { |
||||
var items = [], header = [], columnSize = []; |
||||
|
||||
var rowCount = 100, columnCount = 100; |
||||
for (var i = 0; i < 1; i++) { |
||||
header[i] = []; |
||||
for (var j = 0; j < columnCount; j++) { |
||||
header[i][j] = { |
||||
type: "bi.label", |
||||
text: "表头" + i + "-" + j |
||||
} |
||||
columnSize[j] = 100; |
||||
} |
||||
} |
||||
for (var i = 0; i < rowCount; i++) { |
||||
items[i] = []; |
||||
for (var j = 0; j < columnCount; j++) { |
||||
items[i][j] = { |
||||
type: "bi.label", |
||||
text: (i < 3 ? 0 : i) + "-" + j |
||||
} |
||||
} |
||||
} |
||||
|
||||
var table = BI.createWidget({ |
||||
type: "bi.resizable_table", |
||||
el: { |
||||
type: "bi.grid_table", |
||||
}, |
||||
width: 600, |
||||
height: 500, |
||||
isResizeAdapt: true, |
||||
isNeedResize: true, |
||||
isNeedFreeze: true, |
||||
freezeCols: [0, 1], |
||||
columnSize: columnSize, |
||||
items: items, |
||||
header: header |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: table, |
||||
left: 10, |
||||
right: 10, |
||||
top: 10, |
||||
bottom: 10 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.grid_table", Demo.Func); |
@ -0,0 +1,57 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
render: function () { |
||||
var items = [], header = [], columnSize = []; |
||||
|
||||
var rowCount = 100, columnCount = 100; |
||||
for (var i = 0; i < 1; i++) { |
||||
header[i] = []; |
||||
for (var j = 0; j < columnCount; j++) { |
||||
header[i][j] = { |
||||
type: "bi.label", |
||||
text: "表头" + i + "-" + j |
||||
} |
||||
columnSize[j] = 100; |
||||
} |
||||
} |
||||
for (var i = 0; i < rowCount; i++) { |
||||
items[i] = []; |
||||
for (var j = 0; j < columnCount; j++) { |
||||
items[i][j] = { |
||||
type: "bi.label", |
||||
text: (i < 3 ? 0 : i) + "-" + j |
||||
} |
||||
} |
||||
} |
||||
|
||||
var table = BI.createWidget({ |
||||
type: "bi.resizable_table", |
||||
el: { |
||||
type: "bi.grid_table", |
||||
}, |
||||
width: 600, |
||||
height: 500, |
||||
isResizeAdapt: true, |
||||
isNeedResize: true, |
||||
isNeedFreeze: true, |
||||
freezeCols: [0, 1], |
||||
columnSize: columnSize, |
||||
items: items, |
||||
header: header |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: table, |
||||
left: 10, |
||||
right: 10, |
||||
top: 10, |
||||
bottom: 10 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.resizable_table", Demo.Func); |
@ -0,0 +1,367 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
render: function () { |
||||
var items = [[{ |
||||
text: "第一行第一列" |
||||
}, { |
||||
text: "第一行第一列" |
||||
}, { |
||||
text: "第一行第一列" |
||||
}], [{ |
||||
text: "第一行第一列" |
||||
}, { |
||||
text: "第一行第一列" |
||||
}, { |
||||
text: "第一行第一列" |
||||
}], [{ |
||||
text: "第三行第一列" |
||||
}, { |
||||
text: "第三行第二列" |
||||
}, { |
||||
text: "第三行第三列" |
||||
}], [{ |
||||
text: "第四行第一列" |
||||
}, { |
||||
text: "第四行第二列" |
||||
}, { |
||||
text: "第四行第三列" |
||||
}], [{ |
||||
text: "第五行第一列" |
||||
}, { |
||||
text: "第五行第二列" |
||||
}, { |
||||
text: "第五行第三列" |
||||
}], [{ |
||||
text: "第六行第一列" |
||||
}, { |
||||
text: "第六行第二列" |
||||
}, { |
||||
text: "第六行第三列" |
||||
}], [{ |
||||
text: "第七行第一列" |
||||
}, { |
||||
text: "第七行第二列" |
||||
}, { |
||||
text: "第七行第三列" |
||||
}], [{ |
||||
text: "第八行第一列" |
||||
}, { |
||||
text: "第八行第二列" |
||||
}, { |
||||
text: "第八行第三列" |
||||
}], [{ |
||||
text: "第九行第一列" |
||||
}, { |
||||
text: "第九行第二列" |
||||
}, { |
||||
text: "第九行第三列" |
||||
}], [{ |
||||
text: "第十行第一列" |
||||
}, { |
||||
text: "第十行第二列" |
||||
}, { |
||||
text: "第十行第三列" |
||||
}], [{ |
||||
text: "第十一行第一列" |
||||
}, { |
||||
text: "第十一行第二列" |
||||
}, { |
||||
text: "第十一行第三列" |
||||
}], [{ |
||||
text: "第十二行第一列" |
||||
}, { |
||||
text: "第十二行第二列" |
||||
}, { |
||||
text: "第十二行第三列" |
||||
}], [{ |
||||
text: "第十三行第一列" |
||||
}, { |
||||
text: "第十三行第二列" |
||||
}, { |
||||
text: "第十三行第三列" |
||||
}], [{ |
||||
text: "第十四行第一列" |
||||
}, { |
||||
text: "第十四行第二列" |
||||
}, { |
||||
text: "第十四行第三列" |
||||
}], [{ |
||||
text: "第十五行第一列" |
||||
}, { |
||||
text: "第十五行第二列" |
||||
}, { |
||||
text: "第十五行第三列" |
||||
}], [{ |
||||
text: "第十六行第一列" |
||||
}, { |
||||
text: "第十六行第二列" |
||||
}, { |
||||
text: "第十六行第三列" |
||||
}], [{ |
||||
text: "第十七行第一列" |
||||
}, { |
||||
text: "第十七行第二列" |
||||
}, { |
||||
text: "第十七行第三列" |
||||
}], [{ |
||||
text: "第十八行第一列" |
||||
}, { |
||||
text: "第十八行第二列" |
||||
}, { |
||||
text: "第十八行第三列" |
||||
}]]; |
||||
|
||||
|
||||
var items2 = [[{ |
||||
text: "第一行第一列" |
||||
}, { |
||||
text: "第一行第二列" |
||||
}, { |
||||
text: "第一行第三列" |
||||
}, { |
||||
text: "第一行第四列" |
||||
}, { |
||||
text: "第一行第五列" |
||||
}], [{ |
||||
text: "第二行第一列" |
||||
}, { |
||||
text: "第二行第二列" |
||||
}, { |
||||
text: "第二行第三列" |
||||
}, { |
||||
text: "第二行第四列" |
||||
}, { |
||||
text: "第二行第五列" |
||||
}], [{ |
||||
text: "第二行第一列" |
||||
}, { |
||||
text: "第二行第二列" |
||||
}, { |
||||
text: "第三行第三列" |
||||
}, { |
||||
text: "第三行第四列" |
||||
}, { |
||||
text: "第三行第五列" |
||||
}], [{ |
||||
text: "第二行第一列" |
||||
}, { |
||||
text: "第四行第二列" |
||||
}, { |
||||
text: "第四行第三列" |
||||
}, { |
||||
text: "第四行第四列" |
||||
}, { |
||||
text: "第四行第五列" |
||||
}] |
||||
|
||||
|
||||
, [{ |
||||
text: "第五行第一列" |
||||
}, { |
||||
text: "第五行第一列" |
||||
}, { |
||||
text: "第五行第三列" |
||||
}, { |
||||
text: "第五行第四列" |
||||
}, { |
||||
text: "第五行第五列" |
||||
}], [{ |
||||
text: "第六行第一列" |
||||
}, { |
||||
text: "第六行第一列" |
||||
}, { |
||||
text: "第六行第三列" |
||||
}, { |
||||
text: "第六行第四列" |
||||
}, { |
||||
text: "第六行第五列" |
||||
}], [{ |
||||
text: "第七行第一列" |
||||
}, { |
||||
text: "第七行第二列" |
||||
}, { |
||||
text: "第七行第三列" |
||||
}, { |
||||
text: "第七行第四列" |
||||
}, { |
||||
text: "第七行第五列" |
||||
}], [{ |
||||
text: "第八行第一列" |
||||
}, { |
||||
text: "第八行第二列" |
||||
}, { |
||||
text: "第八行第三列" |
||||
}, { |
||||
text: "第八行第四列" |
||||
}, { |
||||
text: "第八行第五列" |
||||
}], [{ |
||||
text: "第九行第一列" |
||||
}, { |
||||
text: "第九行第二列" |
||||
}, { |
||||
text: "第九行第三列" |
||||
}, { |
||||
text: "第九行第四列" |
||||
}, { |
||||
text: "第九行第五列" |
||||
}], [{ |
||||
text: "第十行第一列" |
||||
}, { |
||||
text: "第十行第二列" |
||||
}, { |
||||
text: "第十行第三列" |
||||
}, { |
||||
text: "第十行第四列" |
||||
}, { |
||||
text: "第十行第五列" |
||||
}], [{ |
||||
text: "第十一行第一列" |
||||
}, { |
||||
text: "第十一行第二列" |
||||
}, { |
||||
text: "第十一行第三列" |
||||
}, { |
||||
text: "第十一行第四列" |
||||
}, { |
||||
text: "第十一行第五列" |
||||
}], [{ |
||||
text: "第十二行第一列" |
||||
}, { |
||||
text: "第十二行第二列" |
||||
}, { |
||||
text: "第十二行第三列" |
||||
}, { |
||||
text: "第十二行第四列" |
||||
}, { |
||||
text: "第十二行第五列" |
||||
}], [{ |
||||
text: "第十三行第一列" |
||||
}, { |
||||
text: "第十三行第二列" |
||||
}, { |
||||
text: "第十三行第三列" |
||||
}, { |
||||
text: "第十三行第四列" |
||||
}, { |
||||
text: "第十三行第五列" |
||||
}], [{ |
||||
text: "第十四行第一列" |
||||
}, { |
||||
text: "第十四行第二列" |
||||
}, { |
||||
text: "第十四行第三列" |
||||
}, { |
||||
text: "第十四行第四列" |
||||
}, { |
||||
text: "第十四行第五列" |
||||
}]]; |
||||
|
||||
var header = [[{ |
||||
text: "表头1" |
||||
}, { |
||||
text: "表头2" |
||||
}, { |
||||
text: "表头3" |
||||
}]]; |
||||
|
||||
var header2 = [[{ |
||||
text: "表头1" |
||||
}, { |
||||
text: "表头2" |
||||
}, { |
||||
text: "表头3" |
||||
}, { |
||||
text: "表头4" |
||||
}, { |
||||
text: "表头5" |
||||
}]]; |
||||
|
||||
var table1 = BI.createWidget({ |
||||
type: "bi.table_view", |
||||
isNeedResize: true, |
||||
isNeedMerge: true, |
||||
mergeCols: [0, 1], |
||||
columnSize: [100, 200, 300], |
||||
items: items, |
||||
header: header |
||||
}); |
||||
var table2 = BI.createWidget({ |
||||
type: "bi.table_view", |
||||
isNeedMerge: true, |
||||
isNeedFreeze: true, |
||||
freezeCols: [0, 1], |
||||
mergeCols: [0, 1], |
||||
columnSize: [100, 200, 300, 400, 500], |
||||
items: items2, |
||||
header: header2 |
||||
}); |
||||
var table3 = BI.createWidget({ |
||||
type: "bi.table_view", |
||||
isNeedMerge: true, |
||||
isNeedFreeze: true, |
||||
freezeCols: [4], |
||||
mergeCols: [0, 1], |
||||
columnSize: [100, 200, 300, 400, 100], |
||||
items: items2, |
||||
header: header2 |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: { |
||||
type: "bi.grid", |
||||
columns: 2, |
||||
rows: 2, |
||||
items: [{ |
||||
column: 0, |
||||
row: 0, |
||||
el: table1 |
||||
}, { |
||||
column: 1, |
||||
row: 0, |
||||
el: table2 |
||||
}, { |
||||
column: 0, |
||||
row: 1, |
||||
el: table3 |
||||
}, { |
||||
column: 1, |
||||
row: 1, |
||||
el: { |
||||
type: "bi.vertical", |
||||
items: [{ |
||||
type: "bi.button", |
||||
text: "第一个表setColumnSize([300, 200, 100])", |
||||
handler: function () { |
||||
table1.setColumnSize([300, 200, 100]); |
||||
} |
||||
}, { |
||||
type: "bi.button", |
||||
text: "第二个表setColumnSize([50, 100, 150, 200, 250])", |
||||
handler: function () { |
||||
table2.setColumnSize([50, 100, 150, 200, 250]); |
||||
} |
||||
}, { |
||||
type: "bi.button", |
||||
text: "第三个表setColumnSize([50, 100, 150, 200, 50])", |
||||
handler: function () { |
||||
table3.setColumnSize([50, 100, 150, 200, 50]); |
||||
} |
||||
}], |
||||
vgap: 10 |
||||
} |
||||
}] |
||||
}, |
||||
left: 10, |
||||
right: 10, |
||||
top: 10, |
||||
bottom: 10 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.table_view", Demo.Func); |
@ -0,0 +1,58 @@
|
||||
Demo.Bubble = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-bubble" |
||||
}, |
||||
render: function () { |
||||
var btns = []; |
||||
var items = [ |
||||
{ |
||||
el: { |
||||
ref: function (_ref) { |
||||
btns.push(_ref); |
||||
}, |
||||
type: 'bi.button', |
||||
text: 'bubble测试', |
||||
height: 30, |
||||
handler: function () { |
||||
BI.Bubbles.show("singleBubble1", "bubble测试", this); |
||||
} |
||||
} |
||||
}, { |
||||
el: { |
||||
ref: function (_ref) { |
||||
btns.push(_ref); |
||||
}, |
||||
type: 'bi.button', |
||||
text: 'bubble测试(居中显示)', |
||||
height: 30, |
||||
handler: function () { |
||||
BI.Bubbles.show("singleBubble2", "bubble测试", this, { |
||||
offsetStyle: "center" |
||||
}); |
||||
} |
||||
} |
||||
}, { |
||||
el: { |
||||
ref: function (_ref) { |
||||
btns.push(_ref); |
||||
}, |
||||
type: 'bi.button', |
||||
text: 'bubble测试(右边显示)', |
||||
height: 30, |
||||
handler: function () { |
||||
BI.Bubbles.show("singleBubble3", "bubble测试", this, { |
||||
offsetStyle: "right" |
||||
}); |
||||
} |
||||
} |
||||
} |
||||
]; |
||||
return { |
||||
type: "bi.left", |
||||
vgap: 200, |
||||
hgap: 20, |
||||
items: items |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.bubble", Demo.Bubble); |
@ -0,0 +1,39 @@
|
||||
Demo.Title = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-title" |
||||
}, |
||||
render: function () { |
||||
return { |
||||
type: "bi.vertical", |
||||
items: [{ |
||||
type: "bi.label", |
||||
cls: "layout-bg1", |
||||
height: 50, |
||||
title: "title提示", |
||||
text: "移上去有title提示", |
||||
textAlign: "center" |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg6", |
||||
height: 50, |
||||
disabled: true, |
||||
warningTitle: "title错误提示", |
||||
text: "移上去有title错误提示", |
||||
textAlign: "center" |
||||
}, { |
||||
type: "bi.label", |
||||
cls: "layout-bg2", |
||||
height: 50, |
||||
disabled: true, |
||||
tipType: "success", |
||||
title: "自定义title提示效果", |
||||
warningTitle: "自定义title提示效果", |
||||
text: "自定义title提示效果", |
||||
textAlign: "center" |
||||
}], |
||||
hgap: 300, |
||||
vgap: 20 |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.title", Demo.Title); |
@ -0,0 +1,55 @@
|
||||
Demo.Toast = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-toast" |
||||
}, |
||||
render: function () { |
||||
var items = [ |
||||
{ |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '简单Toast测试', |
||||
height : 30, |
||||
handler: function(){ |
||||
BI.Msg.toast("这是一条简单的数据"); |
||||
} |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '很长的Toast测试', |
||||
height : 30, |
||||
handler: function(){ |
||||
BI.Msg.toast("这是一条很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长的数据") |
||||
} |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '非常长的Toast测试', |
||||
height : 30, |
||||
handler: function(){ |
||||
BI.Msg.toast("这是一条非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长非常长的数据") |
||||
} |
||||
} |
||||
}, { |
||||
el: { |
||||
type: 'bi.button', |
||||
text: '错误提示Toast测试', |
||||
level: "warning", |
||||
height : 30, |
||||
handler: function(){ |
||||
BI.Msg.toast("错误提示Toast测试", "warning"); |
||||
} |
||||
} |
||||
} |
||||
]; |
||||
BI.createWidget({ |
||||
type: "bi.left", |
||||
element: this, |
||||
vgap : 200, |
||||
hgap : 20, |
||||
items: items |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.toast", Demo.Toast); |
@ -0,0 +1,9 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
} |
||||
}); |
||||
BI.shortcut("demo.part_tree", Demo.Func); |
@ -0,0 +1,9 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
} |
||||
}); |
||||
BI.shortcut("demo.sync_tree", Demo.Func); |
@ -0,0 +1,52 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
_createDefaultTree: function(){ |
||||
var tree = BI.createWidget({ |
||||
type: "bi.tree_view" |
||||
}); |
||||
tree.initTree([ |
||||
{"id":1, "pId":0, "text":"test1", open:true}, |
||||
{"id":11, "pId":1, "text":"test11"}, |
||||
{"id":12, "pId":1, "text":"test12"}, |
||||
{"id":111, "pId":11, "text":"test111"}, |
||||
{"id":2, "pId":0, "text":"test2", open:true}, |
||||
{"id":21, "pId":2, "text":"test21"}, |
||||
{"id":22, "pId":2, "text":"test22"} |
||||
]) |
||||
return tree; |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this; |
||||
BI.createWidget({ |
||||
type: "bi.grid", |
||||
columns: 1, |
||||
rows: 1, |
||||
element: this, |
||||
items: [{ |
||||
column: 0, |
||||
row: 0, |
||||
el: { |
||||
type: "bi.vtape", |
||||
items: [ |
||||
{ |
||||
el: this._createDefaultTree() |
||||
}, |
||||
{ |
||||
el: { |
||||
type: "bi.label", |
||||
text: 'tree.initTree([{"id":1, "pId":0, "text":"test1", open:true},{"id":11, "pId":1, "text":"test11"},{"id":12, "pId":1, "text":"test12"},{"id":111, "pId":11, "text":"test111"}])', |
||||
whiteSpace: "normal" |
||||
}, |
||||
height: 50 |
||||
} |
||||
] |
||||
} |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.tree_view", Demo.Func); |
@ -0,0 +1,70 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this; |
||||
var combo1 = BI.createWidget({ |
||||
type: "bi.bubble_combo", |
||||
trigger: "click,hover", |
||||
el: { |
||||
type: "bi.button", |
||||
text: "测试", |
||||
height: 25 |
||||
}, |
||||
popup: { |
||||
el: { |
||||
type: "bi.button_group", |
||||
items: BI.makeArray(100, { |
||||
type: "bi.text_item", |
||||
height: 25, |
||||
text: "item" |
||||
}), |
||||
layouts: [{ |
||||
type: "bi.vertical" |
||||
}] |
||||
}, |
||||
maxHeight: 200 |
||||
} |
||||
}) |
||||
var combo2 = BI.createWidget({ |
||||
type: "bi.bubble_combo", |
||||
el: { |
||||
type: "bi.button", |
||||
text: "测试", |
||||
height: 25 |
||||
}, |
||||
popup: { |
||||
type: "bi.bubble_bar_popup_view", |
||||
el: { |
||||
type: "bi.button_group", |
||||
items: BI.makeArray(100, { |
||||
type: "bi.text_item", |
||||
height: 25, |
||||
text: "item" |
||||
}), |
||||
layouts: [{ |
||||
type: "bi.vertical" |
||||
}] |
||||
}, |
||||
maxHeight: 200, |
||||
minWidth: 600 |
||||
} |
||||
}) |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: combo1, |
||||
left: 100, |
||||
top: 100 |
||||
}, { |
||||
el: combo2, |
||||
left: 100, |
||||
bottom: 100 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.bubble_combo", Demo.Func); |
@ -0,0 +1,33 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/11. |
||||
*/ |
||||
Demo.TextValueCombo = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
render: function () { |
||||
|
||||
return { |
||||
type: "bi.horizontal_auto", |
||||
items: [{ |
||||
type: "bi.editor_icon_check_combo", |
||||
watermark: "默认值", |
||||
width: 200, |
||||
height: 30, |
||||
items: [{ |
||||
//text: "MVC-1",
|
||||
value: "1" |
||||
}, { |
||||
//text: "MVC-2",
|
||||
value: "2" |
||||
}, { |
||||
//text: "MVC-3",
|
||||
value: "3" |
||||
}] |
||||
}], |
||||
vgap: 20 |
||||
} |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.editor_icon_check_combo", Demo.TextValueCombo); |
@ -0,0 +1,38 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/12. |
||||
*/ |
||||
Demo.IconCombo = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
|
||||
render: function () { |
||||
|
||||
var self = this; |
||||
|
||||
|
||||
return { |
||||
type: "bi.horizontal_auto", |
||||
items: [{ |
||||
type: "bi.icon_combo", |
||||
ref:function(_ref){ |
||||
self.refs=_ref; |
||||
}, |
||||
iconClass: "search-font", |
||||
items: [{ |
||||
value: "第一项", |
||||
iconClass: "close-font" |
||||
}, { |
||||
value: "第二项", |
||||
iconClass: "search-font" |
||||
}, { |
||||
value: "第三项", |
||||
iconClass: "copy-font" |
||||
}] |
||||
}], |
||||
vgap: 20 |
||||
} |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.icon_combo", Demo.IconCombo); |
@ -0,0 +1,45 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/11. |
||||
*/ |
||||
Demo.StaticCombo = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
|
||||
|
||||
beforeMount: function () { |
||||
this.refs.setValue(2); |
||||
}, |
||||
|
||||
render: function () { |
||||
|
||||
var self = this; |
||||
|
||||
return { |
||||
type: "bi.horizontal_auto", |
||||
items: [{ |
||||
type: "bi.static_combo", |
||||
text: "Value 不变", |
||||
width: 300, |
||||
ref: function (_ref) { |
||||
self.refs = _ref; |
||||
}, |
||||
items: [ |
||||
{ |
||||
text: "MVC-1", |
||||
value: 1 |
||||
}, { |
||||
text: "MVC-2", |
||||
value: 2 |
||||
}, { |
||||
text: "MVC-3", |
||||
value: 3 |
||||
} |
||||
] |
||||
}], |
||||
vgap: 20 |
||||
} |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.static_combo", Demo.StaticCombo); |
@ -0,0 +1,32 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/11. |
||||
*/ |
||||
Demo.TextValueCombo = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
render: function () { |
||||
|
||||
return { |
||||
type: "bi.horizontal_auto", |
||||
items: [{ |
||||
type: "bi.text_value_combo", |
||||
text: "默认值", |
||||
width: 300, |
||||
items: [{ |
||||
text: "MVC-1", |
||||
value: 1 |
||||
}, { |
||||
text: "MVC-2", |
||||
value: 2 |
||||
}, { |
||||
text: "MVC-3", |
||||
value: 3 |
||||
}] |
||||
}], |
||||
vgap: 20 |
||||
} |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.text_value_combo", Demo.TextValueCombo); |
@ -0,0 +1,48 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/11. |
||||
*/ |
||||
Demo.TextValueDownListCombo = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this; |
||||
return { |
||||
type: "bi.horizontal_auto", |
||||
items: [{ |
||||
type: "bi.text_value_down_list_combo", |
||||
width: 300, |
||||
ref: function (_ref) { |
||||
self.refs = _ref; |
||||
}, |
||||
items: [ |
||||
[{ |
||||
el: { |
||||
text: "层级1", |
||||
value: 1 |
||||
}, |
||||
children: [{ |
||||
text: "层级1-1", |
||||
value: 11 |
||||
}] |
||||
}], |
||||
[{ |
||||
text: "层级2", |
||||
value: 2 |
||||
}, { |
||||
text: "层级3", |
||||
value: 3 |
||||
}] |
||||
] |
||||
}], |
||||
vgap: 20 |
||||
} |
||||
}, |
||||
|
||||
mounted: function () { |
||||
this.refs.setValue(2); |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.text_value_down_list_combo", Demo.TextValueDownListCombo); |
@ -0,0 +1,32 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/11. |
||||
*/ |
||||
Demo.TextValueCheckCombo = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
render: function () { |
||||
|
||||
return { |
||||
type: "bi.horizontal_auto", |
||||
items: [{ |
||||
type: "bi.text_value_check_combo", |
||||
text: "默认值", |
||||
width: 300, |
||||
items: [{ |
||||
text: "MVC-1", |
||||
value: 1 |
||||
}, { |
||||
text: "MVC-2", |
||||
value: 2 |
||||
}, { |
||||
text: "MVC-3", |
||||
value: 3 |
||||
}] |
||||
}], |
||||
vgap: 20 |
||||
} |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.text_value_check_combo", Demo.TextValueCheckCombo); |
@ -0,0 +1,32 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this; |
||||
var date = new Date(); |
||||
return { |
||||
type: "bi.calendar", |
||||
ref: function () { |
||||
self.calendar = this; |
||||
}, |
||||
logic: { |
||||
dynamic: false |
||||
}, |
||||
year: date.getFullYear(), |
||||
month: date.getMonth(), |
||||
day: date.getDate() |
||||
} |
||||
}, |
||||
|
||||
mounted: function () { |
||||
var date = new Date(); |
||||
this.calendar.setValue({ |
||||
year: date.getFullYear(), |
||||
month: date.getMonth(), |
||||
day: date.getDate() |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.calendar", Demo.Func); |
@ -0,0 +1,42 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var editor = BI.createWidget({ |
||||
type: "bi.text_editor", |
||||
width: 200, |
||||
height: 30, |
||||
value: "这是复制的内容" |
||||
}); |
||||
var clipboard = BI.createWidget({ |
||||
type: 'bi.clipboard', |
||||
width: 100, |
||||
height: 100, |
||||
cls: 'layout-bg1', |
||||
copy: function () { |
||||
return editor.getValue(); |
||||
}, |
||||
|
||||
afterCopy: function () { |
||||
BI.Msg.toast(editor.getValue()); |
||||
} |
||||
}); |
||||
|
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: editor, |
||||
left: 100, |
||||
top: 50, |
||||
}, { |
||||
el: clipboard, |
||||
left: 100, |
||||
top: 100 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.clipboard", Demo.Func); |
@ -0,0 +1,21 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
return { |
||||
type: "bi.absolute", |
||||
items: [{ |
||||
el: { |
||||
type: "bi.color_chooser", |
||||
width: 30, |
||||
height: 30 |
||||
}, |
||||
left: 100, |
||||
top: 250 |
||||
}] |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.color_chooser", Demo.Func); |
@ -0,0 +1,20 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
return { |
||||
type: "bi.absolute", |
||||
items: [{ |
||||
el: { |
||||
type: "bi.color_chooser_popup", |
||||
cls: "bi-card" |
||||
}, |
||||
left: 100, |
||||
top: 250 |
||||
}] |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.color_chooser_popup", Demo.Func); |
@ -0,0 +1,35 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var canvas = BI.createWidget({ |
||||
type: "bi.complex_canvas", |
||||
width: 500, |
||||
height: 600 |
||||
}); |
||||
canvas.branch(55, 100, 10, 10, 100, 10, 200, 10, { |
||||
offset: 20, |
||||
strokeStyle: "red", |
||||
lineWidth: 2 |
||||
}); |
||||
|
||||
canvas.branch(220, 155, 120, 110, 150, 200, { |
||||
offset: 40 |
||||
}); |
||||
|
||||
canvas.stroke(); |
||||
|
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: canvas, |
||||
left: 100, |
||||
top: 50 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.complex_canvas", Demo.Func); |
@ -0,0 +1,28 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
BI.createWidget({ |
||||
type: "bi.vertical", |
||||
element: this, |
||||
vgap: 20, |
||||
hgap: 30, |
||||
items: [{ |
||||
type: "bi.segment", |
||||
items: [{ |
||||
text: "1", |
||||
value: 1 |
||||
}, { |
||||
text: "2", |
||||
value: 2 |
||||
}, { |
||||
text: "3", |
||||
value: 3 |
||||
}] |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.segment", Demo.Func); |
@ -0,0 +1,22 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/11. |
||||
*/ |
||||
Demo.ClearEditor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
render: function () { |
||||
return { |
||||
type: "bi.horizontal_auto", |
||||
items: [{ |
||||
type: "bi.clear_editor", |
||||
cls: "bi-border", |
||||
width: 300, |
||||
watermark: "这个是带清除按钮的" |
||||
}], |
||||
vgap: 20 |
||||
} |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.clear_editor", Demo.ClearEditor); |
@ -0,0 +1,46 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/11. |
||||
*/ |
||||
Demo.ClearEditor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
render: function () { |
||||
var editor = BI.createWidget({ |
||||
type: "bi.shelter_editor", |
||||
cls: "bi-border", |
||||
validationChecker: function (v) { |
||||
return v != "a"; |
||||
}, |
||||
watermark: "可以设置标记的输入框", |
||||
text: "这是一个遮罩" |
||||
}) |
||||
BI.createWidget({ |
||||
type: "bi.vertical", |
||||
element: this, |
||||
hgap: 30, |
||||
vgap: 20, |
||||
bgap: 50, |
||||
items: [editor] |
||||
}) |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: { |
||||
type: "bi.button", |
||||
text: "focus", |
||||
height: 25, |
||||
handler: function () { |
||||
editor.focus(); |
||||
} |
||||
}, |
||||
right: 10, |
||||
left: 10, |
||||
bottom: 10 |
||||
}] |
||||
}) |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.shelter_editor", Demo.ClearEditor); |
@ -0,0 +1,29 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/14. |
||||
*/ |
||||
Demo.SignEditor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
render: function () { |
||||
var editor = BI.createWidget({ |
||||
type: "bi.sign_editor", |
||||
cls: "bi-border", |
||||
validationChecker: function (v) { |
||||
return v != "a"; |
||||
}, |
||||
watermark: "可以设置标记的输入框", |
||||
text: "这是一个标记,点击它即可进行输入" |
||||
}) |
||||
editor.setValue(2); |
||||
BI.createWidget({ |
||||
type: "bi.vertical", |
||||
element: this, |
||||
hgap: 30, |
||||
vgap: 20, |
||||
items: [editor] |
||||
}) |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.sign_editor", Demo.SignEditor); |
@ -0,0 +1,33 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/11. |
||||
*/ |
||||
Demo.SignInitialEditor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
mounted: function () { |
||||
this.editor.setValue({ |
||||
value: "123", |
||||
text: "sdga" |
||||
}) |
||||
}, |
||||
render: function () { |
||||
var self = this; |
||||
return { |
||||
type: "bi.horizontal_adapt", |
||||
items: [{ |
||||
type: "bi.sign_initial_editor", |
||||
ref: function () { |
||||
self.editor = this; |
||||
}, |
||||
cls: "layout-bg5", |
||||
text: "原始值", |
||||
width: 300 |
||||
}], |
||||
vgap: 20 |
||||
|
||||
} |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.sign_initial_editor", Demo.SignInitialEditor); |
@ -0,0 +1,33 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/11. |
||||
*/ |
||||
Demo.SimpleStateEditor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
render: function () { |
||||
var self = this; |
||||
return { |
||||
type: "bi.horizontal_adapt", |
||||
items: [{ |
||||
type: "bi.simple_state_editor", |
||||
ref: function () { |
||||
self.editor = this; |
||||
}, |
||||
cls: "bi-border", |
||||
width: 300 |
||||
}], |
||||
vgap: 20 |
||||
|
||||
} |
||||
}, |
||||
|
||||
mounted: function () { |
||||
var self = this; |
||||
setTimeout(function () { |
||||
self.editor.setState(["*", "*"]); |
||||
}, 1000) |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.simple_state_editor", Demo.SimpleStateEditor); |
@ -0,0 +1,34 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/11. |
||||
*/ |
||||
Demo.StateEditor = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "" |
||||
}, |
||||
render: function () { |
||||
var self = this; |
||||
return { |
||||
type: "bi.horizontal_adapt", |
||||
items: [{ |
||||
type: "bi.state_editor", |
||||
ref: function () { |
||||
self.editor = this; |
||||
}, |
||||
cls: "bi-border", |
||||
width: 300 |
||||
}], |
||||
vgap: 20 |
||||
|
||||
} |
||||
}, |
||||
|
||||
|
||||
mounted: function () { |
||||
var self = this; |
||||
setTimeout(function () { |
||||
self.editor.setState(["*", "*"]); |
||||
}, 1000) |
||||
} |
||||
}) |
||||
|
||||
BI.shortcut("demo.state_editor", Demo.StateEditor); |
@ -0,0 +1,22 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
|
||||
return { |
||||
type: "bi.vertical", |
||||
items: [{ |
||||
type: "bi.label", |
||||
height: 30, |
||||
text: "复选item" |
||||
}, { |
||||
type: "bi.multi_select_item", |
||||
text: "复选项" |
||||
}], |
||||
hgap: 300 |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.multi_select_item", Demo.Func); |
@ -0,0 +1,25 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/25. |
||||
*/ |
||||
|
||||
Demo.Items = BI.inherit(BI.Widget, { |
||||
|
||||
render: function () { |
||||
|
||||
return { |
||||
type: "bi.vertical", |
||||
items: [{ |
||||
type: "bi.label", |
||||
height: 30, |
||||
text: "单选item" |
||||
}, { |
||||
type: "bi.single_select_item", |
||||
text: "单选项" |
||||
}], |
||||
hgap: 300 |
||||
} |
||||
} |
||||
}); |
||||
|
||||
|
||||
BI.shortcut("demo.single_select_item", Demo.Items); |
@ -0,0 +1,25 @@
|
||||
/** |
||||
* Created by Dailer on 2017/7/25. |
||||
*/ |
||||
|
||||
Demo.Items = BI.inherit(BI.Widget, { |
||||
|
||||
render: function () { |
||||
|
||||
return { |
||||
type: "bi.vertical", |
||||
items: [{ |
||||
type: "bi.label", |
||||
height: 30, |
||||
text: "单选item" |
||||
}, { |
||||
type: "bi.single_select_radio_item", |
||||
text: "单选项" |
||||
}], |
||||
hgap: 300 |
||||
} |
||||
} |
||||
}); |
||||
|
||||
|
||||
BI.shortcut("demo.single_select_radio_item", Demo.Items); |
@ -0,0 +1,23 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this; |
||||
BI.createWidget({ |
||||
type: "bi.lazy_loader", |
||||
element: this, |
||||
el: { |
||||
layouts: [{ |
||||
type: "bi.left", |
||||
hgap: 5 |
||||
}] |
||||
}, |
||||
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), { |
||||
type: "bi.button" |
||||
}) |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.lazy_loader", Demo.Func); |
@ -0,0 +1,22 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this; |
||||
BI.createWidget({ |
||||
type: "bi.select_list", |
||||
element: this, |
||||
el: { |
||||
el: { |
||||
chooseType: BI.Selection.Multi |
||||
} |
||||
}, |
||||
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.SIMPLE_ITEMS), { |
||||
type: "bi.multi_select_item" |
||||
}) |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.select_list", Demo.Func); |
@ -0,0 +1,25 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
BI.createWidget({ |
||||
type: "bi.vertical", |
||||
hgap: 200, |
||||
vgap: 50, |
||||
element: this, |
||||
items: [{ |
||||
type: "bi.label", |
||||
height: 30, |
||||
text: " (测试条件:总页数为3)" |
||||
}, { |
||||
type: "bi.all_count_pager", |
||||
pages: 3, |
||||
curr: 1, |
||||
count: 1000 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.all_count_pager", Demo.Func); |
@ -0,0 +1,18 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
BI.createWidget({ |
||||
type: "bi.vertical", |
||||
hgap: 200, |
||||
vgap: 50, |
||||
element: this, |
||||
items: [{ |
||||
type: "bi.direction_pager", |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.direction_pager", Demo.Func); |
@ -0,0 +1,34 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this; |
||||
return { |
||||
type: "bi.list_pane", |
||||
ref: function () { |
||||
self.pane = this; |
||||
}, |
||||
itemsCreator: function (op, callback) { |
||||
setTimeout(function () { |
||||
callback(BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), { |
||||
type: "bi.multi_select_item", |
||||
height: 25 |
||||
})) |
||||
}, 2000) |
||||
}, |
||||
el: { |
||||
type: "bi.button_group", |
||||
layouts: [{ |
||||
type: "bi.vertical" |
||||
}] |
||||
} |
||||
} |
||||
}, |
||||
|
||||
mounted: function () { |
||||
this.pane.populate(); |
||||
} |
||||
}); |
||||
BI.shortcut("demo.list_pane", Demo.Func); |
@ -0,0 +1,39 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this; |
||||
return { |
||||
type: "bi.absolute", |
||||
items: [{ |
||||
el: { |
||||
type: "bi.combo", |
||||
width: 200, |
||||
height: 30, |
||||
el: { |
||||
type: "bi.text_button", |
||||
text: "点击", |
||||
cls: "bi-border", |
||||
height: 30 |
||||
}, |
||||
popup: { |
||||
type: "bi.multi_popup_view", |
||||
el: { |
||||
type: "bi.button_group", |
||||
layouts: [{ |
||||
type: "bi.vertical" |
||||
}], |
||||
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), { |
||||
type: "bi.multi_select_item", |
||||
height: 25 |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
}] |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.multi_popup_view", Demo.Func); |
@ -0,0 +1,28 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this; |
||||
return { |
||||
type: "bi.panel", |
||||
title: "title", |
||||
titleButtons: [{ |
||||
type: "bi.button", |
||||
text: "操作" |
||||
}], |
||||
el: { |
||||
type: "bi.button_group", |
||||
layouts: [{ |
||||
type: "bi.vertical" |
||||
}], |
||||
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), { |
||||
type: "bi.multi_select_item", |
||||
height: 25 |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.panel", Demo.Func); |
@ -0,0 +1,39 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this; |
||||
return { |
||||
type: "bi.absolute", |
||||
items: [{ |
||||
el: { |
||||
type: "bi.combo", |
||||
width: 200, |
||||
height: 30, |
||||
el: { |
||||
type: "bi.text_button", |
||||
text: "点击", |
||||
cls: "bi-border", |
||||
height: 30 |
||||
}, |
||||
popup: { |
||||
type: "bi.popup_panel", |
||||
el: { |
||||
type: "bi.button_group", |
||||
layouts: [{ |
||||
type: "bi.vertical" |
||||
}], |
||||
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), { |
||||
type: "bi.multi_select_item", |
||||
height: 25 |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
}] |
||||
} |
||||
} |
||||
}); |
||||
BI.shortcut("demo.popup_panel", Demo.Func); |
@ -0,0 +1,160 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var items = [[{ |
||||
text: "第一行第一列" |
||||
}, { |
||||
text: "第一行第一列" |
||||
}, { |
||||
text: "第一行第一列" |
||||
}], [{ |
||||
text: "第一行第一列" |
||||
}, { |
||||
text: "第一行第一列" |
||||
}, { |
||||
text: "第一行第一列" |
||||
}], [{ |
||||
text: "第三行第一列" |
||||
}, { |
||||
text: "第三行第二列" |
||||
}, { |
||||
text: "第三行第三列" |
||||
}], [{ |
||||
text: "第四行第一列" |
||||
}, { |
||||
text: "第四行第二列" |
||||
}, { |
||||
text: "第四行第三列" |
||||
}], [{ |
||||
text: "第五行第一列" |
||||
}, { |
||||
text: "第五行第二列" |
||||
}, { |
||||
text: "第五行第三列" |
||||
}], [{ |
||||
text: "第六行第一列" |
||||
}, { |
||||
text: "第六行第二列" |
||||
}, { |
||||
text: "第六行第三列" |
||||
}], [{ |
||||
text: "第七行第一列" |
||||
}, { |
||||
text: "第七行第二列" |
||||
}, { |
||||
text: "第七行第三列" |
||||
}], [{ |
||||
text: "第八行第一列" |
||||
}, { |
||||
text: "第八行第二列" |
||||
}, { |
||||
text: "第八行第三列" |
||||
}], [{ |
||||
text: "第九行第一列" |
||||
}, { |
||||
text: "第九行第二列" |
||||
}, { |
||||
text: "第九行第三列" |
||||
}], [{ |
||||
text: "第十行第一列" |
||||
}, { |
||||
text: "第十行第二列" |
||||
}, { |
||||
text: "第十行第三列" |
||||
}], [{ |
||||
text: "第十一行第一列" |
||||
}, { |
||||
text: "第十一行第二列" |
||||
}, { |
||||
text: "第十一行第三列" |
||||
}], [{ |
||||
text: "第十二行第一列" |
||||
}, { |
||||
text: "第十二行第二列" |
||||
}, { |
||||
text: "第十二行第三列" |
||||
}], [{ |
||||
text: "第十三行第一列" |
||||
}, { |
||||
text: "第十三行第二列" |
||||
}, { |
||||
text: "第十三行第三列" |
||||
}], [{ |
||||
text: "第十四行第一列" |
||||
}, { |
||||
text: "第十四行第二列" |
||||
}, { |
||||
text: "第十四行第三列" |
||||
}], [{ |
||||
text: "第十五行第一列" |
||||
}, { |
||||
text: "第十五行第二列" |
||||
}, { |
||||
text: "第十五行第三列" |
||||
}], [{ |
||||
text: "第十六行第一列" |
||||
}, { |
||||
text: "第十六行第二列" |
||||
}, { |
||||
text: "第十六行第三列" |
||||
}], [{ |
||||
text: "第十七行第一列" |
||||
}, { |
||||
text: "第十七行第二列" |
||||
}, { |
||||
text: "第十七行第三列" |
||||
}], [{ |
||||
text: "第十八行第一列" |
||||
}, { |
||||
text: "第十八行第二列" |
||||
}, { |
||||
text: "第十八行第三列" |
||||
}]]; |
||||
|
||||
var header = [[{ |
||||
text: "表头1" |
||||
}, { |
||||
text: "表头2" |
||||
}, { |
||||
text: "表头3" |
||||
}]]; |
||||
|
||||
var table = BI.createWidget({ |
||||
type: "bi.adaptive_table", |
||||
el: { |
||||
type: "bi.resizable_table", |
||||
el: { |
||||
type: "bi.grid_table", |
||||
} |
||||
}, |
||||
width: 600, |
||||
height: 400, |
||||
minColumnSize: [100, 100, 100], |
||||
columnSize: [100, 100, 100], |
||||
header: header, |
||||
items: items |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: { |
||||
type: "bi.grid", |
||||
columns: 1, |
||||
rows: 1, |
||||
items: [[{ |
||||
el: table |
||||
}]] |
||||
}, |
||||
left: 10, |
||||
right: 10, |
||||
top: 10, |
||||
bottom: 10 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.adaptive_table", Demo.Func); |
@ -0,0 +1,149 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var items = [{ |
||||
children: [{ |
||||
text: "节点1", |
||||
children: [{ |
||||
text: "子节点1", |
||||
children: [{ |
||||
text: "叶节点1", |
||||
values: [{text: 11}, {text: 12}, {text: 11}, {text: 12}, {text: 11}, {text: 12}, {text: 112}] |
||||
}, { |
||||
text: "叶节点2", |
||||
values: [{text: 21}, {text: 22}, {text: 21}, {text: 22}, {text: 21}, {text: 22}, {text: 122}] |
||||
}], |
||||
values: [{text: 101}, {text: 102}, {text: 101}, {text: 102}, {text: 101}, {text: 102}, {text: 1102}] |
||||
}, { |
||||
text: "子节点2", |
||||
children: [{ |
||||
text: "叶节点3", |
||||
values: [{text: 31}, {text: 32}, {text: 31}, {text: 32}, {text: 31}, {text: 32}, {text: 132}] |
||||
}, { |
||||
text: "叶节点4", |
||||
values: [{text: 41}, {text: 42}, {text: 41}, {text: 42}, {text: 41}, {text: 42}, {text: 142}] |
||||
}], |
||||
values: [{text: 201}, {text: 202}, {text: 201}, {text: 202}, {text: 201}, {text: 202}, {text: 1202}] |
||||
}, { |
||||
text: "子节点3", |
||||
children: [{ |
||||
text: "叶节点5", |
||||
values: [{text: 51}, {text: 52}, {text: 51}, {text: 52}, {text: 51}, {text: 52}, {text: 152}] |
||||
}], |
||||
values: [{text: 301}, {text: 302}, {text: 301}, {text: 302}, {text: 301}, {text: 302}, {text: 1302}] |
||||
}], |
||||
values: [{text: 1001}, {text: 1002}, {text: 1001}, {text: 1002}, {text: 1001}, {text: 1002}, {text: 11002}] |
||||
}, { |
||||
text: "节点2", |
||||
values: [{text: 2001}, {text: 2002}, {text: 2001}, {text: 2002}, {text: 2001}, {text: 2002}, {text: 12002}] |
||||
}], |
||||
values: [{text: 12001}, {text: 12002}, {text: 12001}, {text: 12002}, {text: 12001}, {text: 12002}, {text: 112002}] |
||||
}]; |
||||
|
||||
var header = [{ |
||||
text: "header1" |
||||
}, { |
||||
text: "header2" |
||||
}, { |
||||
text: "header3" |
||||
}, { |
||||
text: "金额", |
||||
tag: 1 |
||||
}, { |
||||
text: "金额", |
||||
tag: 2 |
||||
}, { |
||||
text: "金额", |
||||
tag: 3 |
||||
}, { |
||||
text: "金额", |
||||
tag: 4 |
||||
}, { |
||||
text: "金额", |
||||
tag: 5 |
||||
}, { |
||||
text: "金额", |
||||
tag: 6 |
||||
}, { |
||||
text: "金额", |
||||
tag: 7 |
||||
}]; |
||||
|
||||
var crossHeader = [{ |
||||
text: "cross1" |
||||
}, { |
||||
text: "cross2" |
||||
}]; |
||||
|
||||
var crossItems = [{ |
||||
children: [{ |
||||
text: "节点1", |
||||
children: [{ |
||||
text: "子节点1" |
||||
}, { |
||||
text: "子节点2" |
||||
}], |
||||
values: [0] |
||||
}, { |
||||
text: "节点2", |
||||
children: [{ |
||||
text: "子节点3" |
||||
}, { |
||||
text: "子节点4" |
||||
}], |
||||
values: [0] |
||||
}], |
||||
values: [0] |
||||
}]; |
||||
|
||||
var table = BI.createWidget({ |
||||
type: "bi.layer_tree_table", |
||||
el: { |
||||
type: "bi.adaptive_table", |
||||
el: { |
||||
type: "bi.resizable_table", |
||||
el: { |
||||
type: "bi.collection_table", |
||||
mergeRule: function (col1, col2) { |
||||
return BI.isEqual(col1, col2); |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
width: 600, |
||||
height: 400, |
||||
isNeedFreeze: true, |
||||
isNeedMerge: true, |
||||
freezeCols: [0, 1, 2], |
||||
mergeCols: [0, 1, 2], |
||||
minColumnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100], |
||||
columnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100], |
||||
header: header, |
||||
items: items, |
||||
crossHeader: crossHeader, |
||||
crossItems: crossItems |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: { |
||||
type: "bi.grid", |
||||
columns: 1, |
||||
rows: 1, |
||||
items: [[{ |
||||
el: table |
||||
}]] |
||||
}, |
||||
left: 10, |
||||
right: 10, |
||||
top: 10, |
||||
bottom: 10 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.layer_tree_table", Demo.Func); |
@ -0,0 +1,149 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var items = [{ |
||||
children: [{ |
||||
text: "节点1", |
||||
children: [{ |
||||
text: "子节点1", |
||||
children: [{ |
||||
text: "叶节点1", |
||||
values: [{text: 11}, {text: 12}, {text: 11}, {text: 12}, {text: 11}, {text: 12}, {text: 112}] |
||||
}, { |
||||
text: "叶节点2", |
||||
values: [{text: 21}, {text: 22}, {text: 21}, {text: 22}, {text: 21}, {text: 22}, {text: 122}] |
||||
}], |
||||
values: [{text: 101}, {text: 102}, {text: 101}, {text: 102}, {text: 101}, {text: 102}, {text: 1102}] |
||||
}, { |
||||
text: "子节点2", |
||||
children: [{ |
||||
text: "叶节点3", |
||||
values: [{text: 31}, {text: 32}, {text: 31}, {text: 32}, {text: 31}, {text: 32}, {text: 132}] |
||||
}, { |
||||
text: "叶节点4", |
||||
values: [{text: 41}, {text: 42}, {text: 41}, {text: 42}, {text: 41}, {text: 42}, {text: 142}] |
||||
}], |
||||
values: [{text: 201}, {text: 202}, {text: 201}, {text: 202}, {text: 201}, {text: 202}, {text: 1202}] |
||||
}, { |
||||
text: "子节点3", |
||||
children: [{ |
||||
text: "叶节点5", |
||||
values: [{text: 51}, {text: 52}, {text: 51}, {text: 52}, {text: 51}, {text: 52}, {text: 152}] |
||||
}], |
||||
values: [{text: 301}, {text: 302}, {text: 301}, {text: 302}, {text: 301}, {text: 302}, {text: 1302}] |
||||
}], |
||||
values: [{text: 1001}, {text: 1002}, {text: 1001}, {text: 1002}, {text: 1001}, {text: 1002}, {text: 11002}] |
||||
}, { |
||||
text: "节点2", |
||||
values: [{text: 2001}, {text: 2002}, {text: 2001}, {text: 2002}, {text: 2001}, {text: 2002}, {text: 12002}] |
||||
}], |
||||
values: [{text: 12001}, {text: 12002}, {text: 12001}, {text: 12002}, {text: 12001}, {text: 12002}, {text: 112002}] |
||||
}]; |
||||
|
||||
var header = [{ |
||||
text: "header1" |
||||
}, { |
||||
text: "header2" |
||||
}, { |
||||
text: "header3" |
||||
}, { |
||||
text: "金额", |
||||
tag: 1 |
||||
}, { |
||||
text: "金额", |
||||
tag: 2 |
||||
}, { |
||||
text: "金额", |
||||
tag: 3 |
||||
}, { |
||||
text: "金额", |
||||
tag: 4 |
||||
}, { |
||||
text: "金额", |
||||
tag: 5 |
||||
}, { |
||||
text: "金额", |
||||
tag: 6 |
||||
}, { |
||||
text: "金额", |
||||
tag: 7 |
||||
}]; |
||||
|
||||
var crossHeader = [{ |
||||
text: "cross1" |
||||
}, { |
||||
text: "cross2" |
||||
}]; |
||||
|
||||
var crossItems = [{ |
||||
children: [{ |
||||
text: "节点1", |
||||
children: [{ |
||||
text: "子节点1" |
||||
}, { |
||||
text: "子节点2" |
||||
}], |
||||
values: [0] |
||||
}, { |
||||
text: "节点2", |
||||
children: [{ |
||||
text: "子节点3" |
||||
}, { |
||||
text: "子节点4" |
||||
}], |
||||
values: [0] |
||||
}], |
||||
values: [0] |
||||
}]; |
||||
|
||||
var table = BI.createWidget({ |
||||
type: "bi.tree_table", |
||||
el: { |
||||
type: "bi.adaptive_table", |
||||
el: { |
||||
type: "bi.resizable_table", |
||||
el: { |
||||
type: "bi.collection_table", |
||||
mergeRule: function (col1, col2) { |
||||
return BI.isEqual(col1, col2); |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
width: 600, |
||||
height: 400, |
||||
isNeedFreeze: true, |
||||
isNeedMerge: true, |
||||
freezeCols: [0, 1, 2], |
||||
mergeCols: [0, 1, 2], |
||||
minColumnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100], |
||||
columnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100], |
||||
header: header, |
||||
items: items, |
||||
crossHeader: crossHeader, |
||||
crossItems: crossItems |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.absolute", |
||||
element: this, |
||||
items: [{ |
||||
el: { |
||||
type: "bi.grid", |
||||
columns: 1, |
||||
rows: 1, |
||||
items: [[{ |
||||
el: table |
||||
}]] |
||||
}, |
||||
left: 10, |
||||
right: 10, |
||||
top: 10, |
||||
bottom: 10 |
||||
}] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.tree_table", Demo.Func); |
@ -0,0 +1,149 @@
|
||||
Demo.Func = BI.inherit(BI.Widget, { |
||||
props: { |
||||
baseCls: "demo-func" |
||||
}, |
||||
|
||||
render: function () { |
||||
var relation = BI.createWidget({ |
||||
type: "bi.branch_relation", |
||||
items: [ |
||||
{ |
||||
id: -1, |
||||
value: "根目录", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 1, |
||||
pId: -1, |
||||
value: "第一级目录1", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 11, |
||||
pId: 1, |
||||
value: "第二级文件1", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 12, |
||||
pId: 1, |
||||
value: "第二级目录1", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 121, |
||||
pId: 12, |
||||
value: "第三级目录1", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 122, |
||||
pId: 12, |
||||
value: "第三级文件1", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 1211, |
||||
pId: 121, |
||||
value: "第四级目录", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 12111, |
||||
pId: 1211, |
||||
value: "第五级文件1", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 2, |
||||
pId: -1, |
||||
value: "第一级目录2", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 21, |
||||
pId: 2, |
||||
value: "第二级目录2", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 22, |
||||
pId: 2, |
||||
value: "第二级文件2", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 211, |
||||
pId: 21, |
||||
value: "第三级目录2", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 212, |
||||
pId: 21, |
||||
value: "第三级文件2", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
}, |
||||
{ |
||||
id: 2111, |
||||
pId: 211, |
||||
value: "第四级文件2", |
||||
type: "bi.text_button", |
||||
cls: "layout-bg2", |
||||
width: 180, |
||||
height: 100 |
||||
} |
||||
], |
||||
|
||||
direction: BI.Direction.Right, |
||||
align: BI.HorizontalAlign.Right, |
||||
|
||||
centerOffset: -50 |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.adaptive", |
||||
element: this, |
||||
items: [relation] |
||||
}) |
||||
} |
||||
}); |
||||
BI.shortcut("demo.branch_relation", Demo.Func); |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue