Merge branch 'Tencent:master' into master
This commit is contained in:
commit
1ddee5927b
|
@ -30,9 +30,10 @@ Or use script tag to ref it.
|
|||
```tsx
|
||||
{
|
||||
title?: string,
|
||||
hoverable?: string,
|
||||
extra?: string,
|
||||
actions?: any[],
|
||||
size?: 'medium' | 'small'
|
||||
size?: 'large' | 'medium' | 'small'
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -40,6 +41,6 @@ Or use script tag to ref it.
|
|||
|
||||
```tsx
|
||||
{
|
||||
size: '',
|
||||
size: 'large',
|
||||
}
|
||||
```
|
||||
|
|
|
@ -18,14 +18,16 @@
|
|||
|
||||
<script src="../../../common//src/index.js"></script>
|
||||
<script src="../../src/index.js"></script>
|
||||
<!-- 这里导入合适的OmiU-icon -->
|
||||
<!-- 这里导入需要的的OmiU-component -->
|
||||
<script src="https://unpkg.com/@omiu/icon@0.0.2/add-a-photo-rounded.js"></script>
|
||||
<script src="https://unpkg.com/@omiu/icon@0.0.2/add-comment-rounded.js"></script>
|
||||
<script src="https://unpkg.com/@omiu/icon@0.0.2/add-ic-call-rounded.js"></script>
|
||||
<script src="https://unpkg.com/@omiu/avatar"></script>
|
||||
<script src="https://unpkg.com/@omiu/image"></script>
|
||||
|
||||
<div style="display: flex; flex-direction: column; justify-content: space-around;">
|
||||
<div style="display: flex; margin: 2% 10%; justify-content: space-around; flex-wrap: wrap">
|
||||
|
||||
<o-card title="Default size card">
|
||||
<o-card title="Default size card" hoverable="true">
|
||||
<o-link underline='0' type="primary" target="_blank" href="https://tencent.github.io/omi/" slot="extra">More</o-link>
|
||||
<!-- <div slot="cover">
|
||||
<img alt="example" src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png" />
|
||||
|
@ -35,9 +37,11 @@
|
|||
<p>Card content</p>
|
||||
</o-card>
|
||||
|
||||
<o-card title="Small size card" size="small">
|
||||
<o-link underline='0' type="danger" target="_blank" href="https://tencent.github.io/omi/" slot="extra">More</o-link>
|
||||
<p>Card content</p>
|
||||
<o-card title="Simple Card" hoverable="true">
|
||||
<!-- slot="cover" 若不填充内容,则header栏不显示。-简洁卡片 -->
|
||||
<div slot="cover">
|
||||
</div>
|
||||
<p>Simple Card</p>
|
||||
<p>Card content</p>
|
||||
<p>Card content</p>
|
||||
</o-card>
|
||||
|
@ -50,11 +54,28 @@
|
|||
<p>Card content</p>
|
||||
</o-card>
|
||||
|
||||
<o-card title="Action card" id="myAction" actions="[{icon: 'add-a-photo-rounded'},{icon: 'add-ic-call-rounded'},{icon: 'add-comment-rounded'}]">
|
||||
<o-link underline='0' type="primary" target="_blank" href="https://tencent.github.io/omi/" slot="extra">More</o-link>
|
||||
<p>Card content</p>
|
||||
<p>Card content</p>
|
||||
<p>Card content</p>
|
||||
<o-card title="DNT's card" id="myAction" actions="[{icon: 'add-ic-call-rounded'}]" hoverable="true">
|
||||
<o-avatar slot="extra">DNT</o-avatar>
|
||||
<p>Tel:</p>
|
||||
<p>Company:</p>
|
||||
<p>...</p>
|
||||
</o-card>
|
||||
|
||||
<o-card title="Action card" size="medium" id="myAction" actions="[{icon: 'add-ic-call-rounded'},{icon: 'add-comment-rounded'}]">
|
||||
<o-image slot="cover" src="https://tencent.github.io/omi/packages/admin/dist/assets/logo.a690a1ac.svg"></o-image>
|
||||
<div style="float: left;">
|
||||
<o-avatar src="https://material-ui.com/static/images/avatar/1.jpg"></o-avatar>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<p>Card title</p>
|
||||
<p>This is the description</p>
|
||||
</div>
|
||||
</o-card>
|
||||
|
||||
<o-card hoverable="true">
|
||||
<o-image slot="cover" src="https://tencent.github.io/omi/packages/admin/dist/assets/logo.a690a1ac.svg"></o-image>
|
||||
<p>OMI Card</p>
|
||||
<p><o-link underline='0' type="primary" target="_blank" href="https://tencent.github.io/omi/" slot="extra">Welcome to OMI</o-link></p>
|
||||
</o-card>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,23 +1,27 @@
|
|||
import { WeElement } from 'omi';
|
||||
interface Props {
|
||||
title?: string;
|
||||
hoverable?: string;
|
||||
extra?: string;
|
||||
actions: any[];
|
||||
size?: 'medium' | 'small';
|
||||
}
|
||||
export default class Card extends WeElement<Props> {
|
||||
static css: any;
|
||||
css: any;
|
||||
static defaultProps: {
|
||||
title: string;
|
||||
hoverable: string;
|
||||
extra: string;
|
||||
};
|
||||
static propTypes: {
|
||||
title: StringConstructor;
|
||||
hoverable: StringConstructor;
|
||||
extra: StringConstructor;
|
||||
actions: ArrayConstructor;
|
||||
size: StringConstructor;
|
||||
};
|
||||
clickHandler: (item: any) => void;
|
||||
handleMousemove: (item: any) => void;
|
||||
_iconTag: any;
|
||||
render(props: any): JSX.Element;
|
||||
}
|
||||
|
|
|
@ -237,10 +237,14 @@ var Card = /** @class */ (function (_super) {
|
|||
__extends(Card, _super);
|
||||
function Card() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.css = css;
|
||||
_this.clickHandler = function (item) {
|
||||
_this.fire('change', item);
|
||||
_this.update(true);
|
||||
};
|
||||
_this.handleMousemove = function (item) {
|
||||
item && (_this.css = css + ".o-card:hover {\n display: flex;\n flex-direction: column;\n margin: 10px;\n width: 300px;\n box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;\n transition: all .3s;\n z-index: 1;\n }");
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
Card.prototype.render = function (props) {
|
||||
|
@ -248,7 +252,7 @@ var Card = /** @class */ (function (_super) {
|
|||
var _this = this;
|
||||
return (h("div", __assign({}, extractClass(props, 'o-card', (_a = {},
|
||||
_a['o-card-' + props.size] = props.size,
|
||||
_a))),
|
||||
_a)), { onMousemove: this.handleMousemove(props.hoverable === "true") }),
|
||||
h("slot", { name: "cover" },
|
||||
h("div", __assign({}, extractClass(props, 'o-card-header', (_b = {},
|
||||
_b['o-card-header-' + props.size] = props.size,
|
||||
|
@ -270,13 +274,14 @@ var Card = /** @class */ (function (_super) {
|
|||
h(_this._iconTag, { class: "icon" }));
|
||||
}))) : null));
|
||||
};
|
||||
Card.css = css;
|
||||
Card.defaultProps = {
|
||||
title: '',
|
||||
hoverable: '',
|
||||
extra: ''
|
||||
};
|
||||
Card.propTypes = {
|
||||
title: String,
|
||||
hoverable: String,
|
||||
extra: String,
|
||||
actions: Array,
|
||||
size: String
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -267,10 +267,14 @@ var Card = /** @class */ (function (_super) {
|
|||
__extends(Card, _super);
|
||||
function Card() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.css = css;
|
||||
_this.clickHandler = function (item) {
|
||||
_this.fire('change', item);
|
||||
_this.update(true);
|
||||
};
|
||||
_this.handleMousemove = function (item) {
|
||||
item && (_this.css = css + ".o-card:hover {\n display: flex;\n flex-direction: column;\n margin: 10px;\n width: 300px;\n box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;\n transition: all .3s;\n z-index: 1;\n }");
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
Card.prototype.render = function (props) {
|
||||
|
@ -278,7 +282,7 @@ var Card = /** @class */ (function (_super) {
|
|||
var _this = this;
|
||||
return (omi_1.h("div", __assign({}, omi_1.extractClass(props, 'o-card', (_a = {},
|
||||
_a['o-card-' + props.size] = props.size,
|
||||
_a))),
|
||||
_a)), { onMousemove: this.handleMousemove(props.hoverable === "true") }),
|
||||
omi_1.h("slot", { name: "cover" },
|
||||
omi_1.h("div", __assign({}, omi_1.extractClass(props, 'o-card-header', (_b = {},
|
||||
_b['o-card-header-' + props.size] = props.size,
|
||||
|
@ -300,13 +304,14 @@ var Card = /** @class */ (function (_super) {
|
|||
omi_1.h(_this._iconTag, { class: "icon" }));
|
||||
}))) : null));
|
||||
};
|
||||
Card.css = css;
|
||||
Card.defaultProps = {
|
||||
title: '',
|
||||
hoverable: '',
|
||||
extra: ''
|
||||
};
|
||||
Card.propTypes = {
|
||||
title: String,
|
||||
hoverable: String,
|
||||
extra: String,
|
||||
actions: Array,
|
||||
size: String
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@ import * as css from './index.scss'
|
|||
|
||||
interface Props {
|
||||
title?: string,
|
||||
hoverable?: string,
|
||||
extra?: string,
|
||||
actions: any[],
|
||||
size?: 'medium' | 'small'
|
||||
|
@ -10,15 +11,17 @@ interface Props {
|
|||
|
||||
@tag('o-card')
|
||||
export default class Card extends WeElement<Props> {
|
||||
static css = css
|
||||
css = css
|
||||
|
||||
static defaultProps = {
|
||||
title: '',
|
||||
hoverable: '',
|
||||
extra: ''
|
||||
}
|
||||
|
||||
static propTypes = {
|
||||
title: String,
|
||||
hoverable: String,
|
||||
extra: String,
|
||||
actions: Array,
|
||||
size: String
|
||||
|
@ -29,13 +32,25 @@ export default class Card extends WeElement<Props> {
|
|||
this.update(true)
|
||||
}
|
||||
|
||||
handleMousemove = (item) => {
|
||||
item && (this.css = css + `.o-card:hover {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 10px;
|
||||
width: 300px;
|
||||
box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;
|
||||
transition: all .3s;
|
||||
z-index: 1;
|
||||
}`)
|
||||
}
|
||||
|
||||
_iconTag
|
||||
|
||||
render(props) {
|
||||
return (
|
||||
<div {...extractClass(props, 'o-card', {
|
||||
['o-card-' + props.size]: props.size
|
||||
})}>
|
||||
})} onMousemove={this.handleMousemove(props.hoverable==="true")}>
|
||||
<slot name="cover">
|
||||
<div {...extractClass(props, 'o-card-header', {
|
||||
['o-card-header-' + props.size]: props.size
|
||||
|
|
|
@ -28,6 +28,10 @@ Or use script tag to ref it.
|
|||
interface CascaderOption {
|
||||
value: string
|
||||
label: string
|
||||
/**
|
||||
* 是否禁用
|
||||
*/
|
||||
disabled: boolean
|
||||
children?: CascaderOption[]
|
||||
}
|
||||
|
||||
|
@ -43,11 +47,15 @@ export interface CascaderProps {
|
|||
/**
|
||||
* 尺寸 Todo
|
||||
*/
|
||||
size?: 'medium' | 'small' | 'mini'
|
||||
size?: 'default' | 'medium' | 'small' | 'mini'
|
||||
/**
|
||||
* 是否禁用
|
||||
*/
|
||||
disabled?: boolean
|
||||
/**
|
||||
* 选项被点击后的回调函数
|
||||
*/
|
||||
onOptionClick?: (item, index, evt) => void
|
||||
onOptionClick?: (item: any, index: any, evt: any) => void
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -68,7 +76,7 @@ cd components/cascader
|
|||
yarn
|
||||
# 开发预览
|
||||
yarn dev
|
||||
# 构建
|
||||
# 构建(目录位于 dist)
|
||||
yarn build
|
||||
# 构建 demo
|
||||
yarn build:demo
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<style>
|
||||
.demo-container {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
height: 666px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
@ -24,11 +24,18 @@
|
|||
<div class="demo-container">
|
||||
<div class="label">Click 触发子菜单</div>
|
||||
<o-cascader options=""></o-cascader>
|
||||
<o-cascader value="['components', 'cascader']" options=""></o-cascader>
|
||||
<!-- <o-cascader disabled options=""></o-cascader> -->
|
||||
<!-- <o-cascader size="medium"></o-cascader>
|
||||
禁用
|
||||
<o-cascader
|
||||
disabled
|
||||
value="['components', 'basic', 'card']"
|
||||
options=""
|
||||
></o-cascader>
|
||||
Size: medium
|
||||
<o-cascader size="medium"></o-cascader>
|
||||
Size: small
|
||||
<o-cascader size="small"></o-cascader>
|
||||
<o-cascader size="mini"></o-cascader> -->
|
||||
Size: mini
|
||||
<o-cascader size="mini"></o-cascader>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
@ -94,6 +101,11 @@
|
|||
label: '云游君'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
value: 'disabled',
|
||||
label: '禁用',
|
||||
disabled: true
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@omiu/cascader",
|
||||
"version": "0.0.0",
|
||||
"version": "0.0.3",
|
||||
"main": "dist/index.es.js",
|
||||
"exports": {
|
||||
".": "./dist/index.es.js"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
.o-cascader {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
line-height: 40px;
|
||||
outline: 0;
|
||||
}
|
||||
.o-cascader-dropdown__wrap {
|
||||
|
@ -17,6 +16,7 @@
|
|||
.o-cascader-dropdown__item {
|
||||
position: relative;
|
||||
padding: 10px 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.o-cascader-dropdown__item.selected, .o-cascader-dropdown__item:hover {
|
||||
background: #f1fff8;
|
||||
|
@ -25,6 +25,10 @@
|
|||
position: absolute;
|
||||
right: 10px;
|
||||
}
|
||||
.o-cascader-dropdown__item.disabled {
|
||||
color: #c0c4cc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.o-cascader-dropdown-right__wrap {
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["index.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;;AAGE;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EAEE;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA","file":"index.css"}
|
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,6 @@
|
|||
.o-cascader {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
line-height: 40px;
|
||||
outline: 0;
|
||||
|
||||
&-dropdown {
|
||||
|
@ -20,6 +19,7 @@
|
|||
&__item {
|
||||
position: relative;
|
||||
padding: 10px 20px;
|
||||
cursor: pointer;
|
||||
|
||||
&.selected,
|
||||
&:hover {
|
||||
|
@ -30,6 +30,11 @@
|
|||
position: absolute;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: #c0c4cc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
&-right__wrap {
|
||||
|
|
|
@ -9,6 +9,10 @@ import * as css from './index.scss'
|
|||
interface CascaderOption {
|
||||
value: string
|
||||
label: string
|
||||
/**
|
||||
* 是否禁用
|
||||
*/
|
||||
disabled?: boolean
|
||||
children?: CascaderOption[]
|
||||
}
|
||||
|
||||
|
@ -24,7 +28,11 @@ export interface CascaderProps {
|
|||
/**
|
||||
* 尺寸 Todo
|
||||
*/
|
||||
size?: 'medium' | 'small' | 'mini'
|
||||
size?: 'default' | 'medium' | 'small' | 'mini'
|
||||
/**
|
||||
* 是否禁用
|
||||
*/
|
||||
disabled?: boolean
|
||||
/**
|
||||
* 选项被点击后的回调函数
|
||||
*/
|
||||
|
@ -36,10 +44,14 @@ export default class Cascader extends WeElement<CascaderProps> {
|
|||
static css = css.default ? css.default : css
|
||||
|
||||
static defaultProps = {
|
||||
value: []
|
||||
disabled: false,
|
||||
value: [],
|
||||
options: [],
|
||||
size: 'default'
|
||||
}
|
||||
|
||||
static propTypes = {
|
||||
disabled: Boolean,
|
||||
value: Array,
|
||||
options: Array,
|
||||
size: String
|
||||
|
@ -47,7 +59,8 @@ export default class Cascader extends WeElement<CascaderProps> {
|
|||
|
||||
installed() {
|
||||
window.addEventListener('click', (e) => {
|
||||
if (e.target.localName === 'o-cascader') return
|
||||
// admin 系统里 e.target.localName 直接输出 my-app 了
|
||||
// if (e.target.localName === 'o-cascader') return
|
||||
if (this.popoverRef.isShow) {
|
||||
this.popoverRef.isShow = false
|
||||
this.popoverRef.update()
|
||||
|
@ -74,12 +87,15 @@ export default class Cascader extends WeElement<CascaderProps> {
|
|||
return labels.join(' / ')
|
||||
}
|
||||
|
||||
popoverRef
|
||||
// 引用的元素
|
||||
popoverRef: HTMLElement | null = null
|
||||
inputRef: HTMLElement | null = null
|
||||
|
||||
render(props: CascaderProps) {
|
||||
const classes = [
|
||||
'o-cascader',
|
||||
props.size ? 'o-cascader-' + props.size : ''
|
||||
props.size ? 'o-cascader--' + props.size : '',
|
||||
props.disabled ? 'disabled' : ''
|
||||
].join(' ')
|
||||
|
||||
/**
|
||||
|
@ -111,13 +127,15 @@ export default class Cascader extends WeElement<CascaderProps> {
|
|||
<li
|
||||
class={[
|
||||
'o-cascader-dropdown__item',
|
||||
props.value[index] === item.value ? 'selected' : ''
|
||||
props.value[index] === item.value ? 'selected' : '',
|
||||
item.disabled ? 'disabled' : ''
|
||||
].join(' ')}
|
||||
onClick={(evt) => {
|
||||
if (item.disabled) return
|
||||
const temp = props.value.slice(0, index)
|
||||
temp.push(item.value),
|
||||
this.updateProps({ value: temp }),
|
||||
props.onOptionClick && props.onOptionClick(item, index, evt)
|
||||
temp.push(item.value)
|
||||
this.updateProps({ value: temp })
|
||||
props.onOptionClick && props.onOptionClick(item, index, evt)
|
||||
}}
|
||||
>
|
||||
<span>{item.label}</span>
|
||||
|
@ -129,32 +147,35 @@ export default class Cascader extends WeElement<CascaderProps> {
|
|||
}
|
||||
|
||||
return (
|
||||
<div class={classes}>
|
||||
<div class={classes} onclick={(e) => e.stopPropagation()}>
|
||||
<o-popover
|
||||
ref={(e) => (this.popoverRef = e)}
|
||||
trigger="manual"
|
||||
position="bottom"
|
||||
>
|
||||
<o-input
|
||||
class="o-cascader-input"
|
||||
ref={(e) => (this.inputRef = e)}
|
||||
value={this.getLabelsByValue(props.value)}
|
||||
suffix-icon="keyboard-arrow-down"
|
||||
disabled
|
||||
size={props.size}
|
||||
onClick={(e) => {
|
||||
if (props.disabled) return
|
||||
this.popoverRef.onEnter(e)
|
||||
}}
|
||||
style={{
|
||||
cursor: 'pointer',
|
||||
backgroundColor: 'white',
|
||||
borderColor: 'transparent',
|
||||
color: '#606266'
|
||||
cursor: props.disabled ? 'not-allowed' : 'pointer',
|
||||
color: props.disabled ? '' : '#606266',
|
||||
border: 'transparent',
|
||||
backgroundColor: props.disabled ? '' : 'white',
|
||||
borderRadius: 5
|
||||
}}
|
||||
></o-input>
|
||||
|
||||
<div slot="popover" class="o-cascader-dropdown__wrap">
|
||||
<ul class="o-cascader-dropdown__menu">
|
||||
{props.options.map((item) => {
|
||||
return CascaderOptionItem(item, 0)
|
||||
})}
|
||||
{props.options.map((item) => CascaderOptionItem(item, 0))}
|
||||
</ul>
|
||||
{showRightPanel(props.options, 0)}
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@omiu/popover",
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.12",
|
||||
"description": "Components that show popover.",
|
||||
"docsExtend": {
|
||||
"cnName": "弹出框",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @omiu/popover v0.0.11 http://omijs.org
|
||||
* @omiu/popover v0.0.12 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
@ -1933,7 +1933,7 @@ var createPopper = /*#__PURE__*/popperGenerator({
|
|||
}); // eslint-disable-next-line import/no-unused-modules
|
||||
|
||||
/**
|
||||
* @omiu/transition v0.0.12 http://omijs.org
|
||||
* @omiu/transition v0.0.11 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
@ -2081,16 +2081,28 @@ var domReady = _dready_0_0_1_dready || _domReady;
|
|||
return _this;
|
||||
}
|
||||
Transition.prototype.installed = function () {
|
||||
var _this = this;
|
||||
domReady(function () {
|
||||
if (_this.props.appear) {
|
||||
_this.enter();
|
||||
}
|
||||
if (_this.props.leavingTime) {
|
||||
setTimeout(function () {
|
||||
_this.leave();
|
||||
}, _this.props.leavingTime);
|
||||
}
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
domReady(function () {
|
||||
if (_this.props.appear) {
|
||||
_this.enter();
|
||||
}
|
||||
else {
|
||||
_this.children[0].style['transition-duration'] = '0s';
|
||||
_this.leave();
|
||||
setTimeout(function () {
|
||||
_this.children[0].style['transition-duration'] = null;
|
||||
}, 300);
|
||||
}
|
||||
if (_this.props.leavingTime) {
|
||||
setTimeout(function () {
|
||||
_this.leave();
|
||||
}, _this.props.leavingTime);
|
||||
}
|
||||
});
|
||||
return [2 /*return*/];
|
||||
});
|
||||
});
|
||||
};
|
||||
Transition.prototype.receiveProps = function () {
|
||||
|
@ -2328,5 +2340,5 @@ var Popover = /** @class */ (function (_super) {
|
|||
return Popover;
|
||||
}(WeElement));
|
||||
|
||||
export { Popover as default };
|
||||
export default Popover;
|
||||
//# sourceMappingURL=index.esm.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @omiu/popover v0.0.11 http://omijs.org
|
||||
* @omiu/popover v0.0.12 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
@ -1934,7 +1934,7 @@
|
|||
}); // eslint-disable-next-line import/no-unused-modules
|
||||
|
||||
/**
|
||||
* @omiu/transition v0.0.12 http://omijs.org
|
||||
* @omiu/transition v0.0.11 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
@ -2082,16 +2082,28 @@
|
|||
return _this;
|
||||
}
|
||||
Transition.prototype.installed = function () {
|
||||
var _this = this;
|
||||
domReady(function () {
|
||||
if (_this.props.appear) {
|
||||
_this.enter();
|
||||
}
|
||||
if (_this.props.leavingTime) {
|
||||
setTimeout(function () {
|
||||
_this.leave();
|
||||
}, _this.props.leavingTime);
|
||||
}
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var _this = this;
|
||||
return __generator(this, function (_a) {
|
||||
domReady(function () {
|
||||
if (_this.props.appear) {
|
||||
_this.enter();
|
||||
}
|
||||
else {
|
||||
_this.children[0].style['transition-duration'] = '0s';
|
||||
_this.leave();
|
||||
setTimeout(function () {
|
||||
_this.children[0].style['transition-duration'] = null;
|
||||
}, 300);
|
||||
}
|
||||
if (_this.props.leavingTime) {
|
||||
setTimeout(function () {
|
||||
_this.leave();
|
||||
}, _this.props.leavingTime);
|
||||
}
|
||||
});
|
||||
return [2 /*return*/];
|
||||
});
|
||||
});
|
||||
};
|
||||
Transition.prototype.receiveProps = function () {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -21,7 +21,7 @@ export default class extends WeElement<MyAppProps> {
|
|||
timer = setInterval(() => {
|
||||
percent += 10
|
||||
console.log(percent)
|
||||
if (percent > 200) {
|
||||
if (percent > 110) {
|
||||
percent = 0
|
||||
clearInterval(timer)
|
||||
timer = null
|
||||
|
@ -32,16 +32,32 @@ export default class extends WeElement<MyAppProps> {
|
|||
}
|
||||
return (
|
||||
<div class="app">
|
||||
<div>hello,here we will show you how to use "progress"!</div>
|
||||
<o-progress percent={percent} status="success"></o-progress>
|
||||
<o-progress percent="40" status="error"></o-progress>
|
||||
<o-progress percent = "100" status="success"></o-progress>
|
||||
<o-progress percent="50"></o-progress>
|
||||
<h1>Hello,here we will show you how to use "o-progress"!</h1><hr></hr>
|
||||
<div>We can set up a timer to achieve dynamic effects.</div>
|
||||
<o-progress percent={percent} status="success"></o-progress><hr></hr>
|
||||
<div>We can change the percentage by changing the "percent",the default percent is "30". </div>
|
||||
<o-progress></o-progress>
|
||||
<o-progress percent="40"></o-progress>
|
||||
<div>We can change the width by changing the "width",the default width is "300". </div>
|
||||
<o-progress percent="40"></o-progress>
|
||||
<o-progress percent="40" width={600}></o-progress>
|
||||
<div>We can change the height by changing the "strokeWidth",the default width is "8". </div>
|
||||
<o-progress percent="50" strokeWidth={8}></o-progress>
|
||||
<o-progress percent="50" strokeWidth={4}></o-progress>
|
||||
<o-progress percent="50" strokeWidth={16}></o-progress>
|
||||
<div>As you can see, instead of providing a fixed size, we choose to provide a custom width and height,
|
||||
and leave the decision to the user to achieve the desired effect.</div><hr></hr>
|
||||
<div>We can change the progress color by changing the "strokeColor". </div>
|
||||
<o-progress percent="60" strokeColor="lightseagreen"></o-progress>
|
||||
<o-progress percent="70" strokeColor="lightseagreen" trailColor="black"></o-progress>
|
||||
<o-progress percent="50" strokeWidth = "20"></o-progress>
|
||||
<o-progress percent="50" strokeWidth = "70"></o-progress>
|
||||
<o-progress percent="50" textColor = "#af0f8c"></o-progress>
|
||||
<div>We can change the progress trail color by changing the "trailColor". </div>
|
||||
<o-progress percent="60" trailColor="black"></o-progress>
|
||||
<div>We can change the progress text color by changing the "textColor". </div>
|
||||
<o-progress percent="60" textColor = "red"></o-progress><hr></hr>
|
||||
<div>We provide two status to achieve the default effect of success / failure, and icons can be introduced using icons in "@omiu-icon" . </div>
|
||||
<o-progress percent="70" status="error"></o-progress>
|
||||
<o-progress percent="80" status="error" strokeWidth={4}></o-progress>
|
||||
<o-progress percent="90" status="error" strokeWidth={16}></o-progress>
|
||||
<o-progress percent = "100" status="success"></o-progress>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
}
|
||||
.o-progress-text {
|
||||
display: inline-block;
|
||||
width: 1em;
|
||||
width: 2em;
|
||||
margin-left: 8px;
|
||||
color: #000000d9;
|
||||
font-size: 1em;
|
||||
|
|
|
@ -13,8 +13,8 @@ interface Props {
|
|||
trailColor?: string;
|
||||
textColor?:String,
|
||||
style?: string;
|
||||
size?: 'small';
|
||||
strokeWidth:number;
|
||||
width:number;
|
||||
}
|
||||
|
||||
const status2color = {
|
||||
|
@ -38,8 +38,8 @@ export default class extends WeElement<Props> {
|
|||
strokeColor: "#07c160",
|
||||
trailColor: "#f5f5f5",
|
||||
textColor:"black",
|
||||
size: 'small',
|
||||
strokeWidth:50
|
||||
strokeWidth:8,
|
||||
width:300,
|
||||
}
|
||||
|
||||
percentage:any
|
||||
|
@ -47,28 +47,39 @@ export default class extends WeElement<Props> {
|
|||
static propTypes = {
|
||||
type: String,
|
||||
percent: Number,
|
||||
status: String, // normal success error
|
||||
status: String,
|
||||
strokeColor: String,
|
||||
trailColor: String,
|
||||
textColor:String,
|
||||
size: String,
|
||||
strokeWidth:Number
|
||||
strokeWidth:Number,
|
||||
width:Number,
|
||||
}
|
||||
// install(){
|
||||
// this.percentage = state({
|
||||
// value: this.props.percent
|
||||
// }, this)
|
||||
// }
|
||||
|
||||
render(props) {
|
||||
const {
|
||||
type,
|
||||
percent,
|
||||
status,
|
||||
strokeColor,
|
||||
trailColor,
|
||||
textColor,
|
||||
strokeWidth,
|
||||
width,
|
||||
} = props
|
||||
return (
|
||||
<div >
|
||||
<div className="o-progress__outer" style={{width:`${props.strokeWidth}%`}}>
|
||||
<div className="o-progress__bar"style={{backgroundColor:props.trailColor}}>
|
||||
<div className="o-progress__inner-bar" style={{width:`${props.percent}%`,backgroundColor:props.status?status2color[props.status]:props.strokeColor}}></div>
|
||||
<div className="o-progress__outer" style={{width:width}}>
|
||||
<div className="o-progress__bar"style={{backgroundColor:trailColor}}>
|
||||
<div className="o-progress__inner-bar" style={{
|
||||
width:`${percent}%`,
|
||||
backgroundColor:status?status2color[status]:strokeColor,
|
||||
height:strokeWidth
|
||||
}}></div>
|
||||
</div>
|
||||
</div>
|
||||
<span className="o-progress-text" style={{color:props.status?status2color[props.status]:props.textColor}}>{props.status?status2icon[props.status]:`${props.percent}%`}</span>
|
||||
<span className="o-progress-text" style={{fontSize:strokeWidth*1.75,color:textColor}}>
|
||||
{status?<span style={{color:status?status2color[status]:strokeColor}}>{status2icon[status]}</span>
|
||||
:`${percent}%`}</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@omiu/select",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.8",
|
||||
"description": "Mobile pop-up options list",
|
||||
"docsExtend": {
|
||||
"cnName": "下拉菜单",
|
||||
|
@ -96,7 +96,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@omiu/common": "latest",
|
||||
"@omiu/popover": "^0.0.11",
|
||||
"@omiu/popover": "^0.0.12",
|
||||
"omi": "latest",
|
||||
"resize-observer-polyfill": "^1.5.1"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @omiu/select v0.0.7 http://omijs.org
|
||||
* @omiu/select v0.0.8 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@omiu/table",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.14",
|
||||
"description": "Components that show list data structures.",
|
||||
"docsExtend": {
|
||||
"cnName": "表格控件",
|
||||
|
|
|
@ -18,6 +18,7 @@ export default class Table extends WeElement {
|
|||
})[];
|
||||
columns: ({
|
||||
title: string;
|
||||
width: string;
|
||||
render: (item: any) => JSX.Element;
|
||||
key?: undefined;
|
||||
editable?: undefined;
|
||||
|
@ -25,13 +26,22 @@ export default class Table extends WeElement {
|
|||
} | {
|
||||
title: string;
|
||||
key: string;
|
||||
width: string;
|
||||
editable: boolean;
|
||||
render?: undefined;
|
||||
align?: undefined;
|
||||
} | {
|
||||
title: string;
|
||||
key: string;
|
||||
editable: boolean;
|
||||
width?: undefined;
|
||||
render?: undefined;
|
||||
align?: undefined;
|
||||
} | {
|
||||
title: string;
|
||||
align: string;
|
||||
render: (item: any) => JSX.Element;
|
||||
width?: undefined;
|
||||
key?: undefined;
|
||||
editable?: undefined;
|
||||
})[];
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -58,14 +58,17 @@ export default class Table extends WeElement {
|
|||
|
||||
columns = [{
|
||||
title: 'ID',
|
||||
width: '20px',
|
||||
render: item => (<strong>{item.id}</strong>),
|
||||
}, {
|
||||
title: 'Name',
|
||||
key: 'name',
|
||||
width: '130px',
|
||||
editable: true
|
||||
}, {
|
||||
title: 'Age',
|
||||
key: 'age',
|
||||
width: '70px',
|
||||
editable: true
|
||||
}, {
|
||||
title: 'Address',
|
||||
|
|
|
@ -32,12 +32,7 @@ th {
|
|||
|
||||
th,
|
||||
td {
|
||||
display: table-cell;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
max-width: 1px; }
|
||||
white-space: nowrap; }
|
||||
|
||||
th.sticky-top {
|
||||
position: sticky;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @omiu/table v0.0.13 http://omijs.org
|
||||
* @omiu/table v0.0.14 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
@ -995,12 +995,7 @@ th {
|
|||
|
||||
th,
|
||||
td {
|
||||
display: table-cell;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
max-width: 1px; }
|
||||
white-space: nowrap; }
|
||||
|
||||
th.sticky-top {
|
||||
position: sticky;
|
||||
|
@ -1280,5 +1275,5 @@ var Table = /** @class */ (function (_super) {
|
|||
return Table;
|
||||
}(WeElement));
|
||||
|
||||
export { Table as default };
|
||||
export default Table;
|
||||
//# sourceMappingURL=index.esm.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @omiu/table v0.0.13 http://omijs.org
|
||||
* @omiu/table v0.0.14 http://omijs.org
|
||||
* Front End Cross-Frameworks Framework.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/Tencent/omi
|
||||
|
@ -963,7 +963,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var css = ":host {\n display: block; }\n\n.o-table {\n overflow: auto; }\n\n.o-table-table {\n background: white;\n margin: auto;\n padding: 5px;\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n color: #606266;\n font-weight: 400; }\n\n.o-table-checkbox th:first-child,\n.o-table-checkbox td:first-child {\n padding: 2px 10px 2px; }\n\nth {\n border-bottom: 1px solid #E0E0E0;\n text-align: left;\n vertical-align: middle;\n padding: 10px 10px 10px;\n color: rgba(0, 0, 0, 0.54);\n font-size: 0.75rem;\n line-height: 1.3125rem;\n font-weight: 500;\n background: #fafafa;\n white-space: nowrap; }\n\nth,\ntd {\n display: table-cell;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n width: auto;\n max-width: 1px; }\n\nth.sticky-top {\n position: sticky;\n top: -1px;\n z-index: 1000; }\n\ntable thead th.sticky-left {\n position: sticky;\n left: -1px;\n z-index: 1001; }\n\ntable tbody td.sticky-left {\n position: sticky;\n left: -1px;\n z-index: 999; }\n\n.o-table-border td,\n.o-table-border th {\n border-right: 1px solid #ebeef5; }\n\n.o-table-border td:first-child,\n.o-table-border th:first-child {\n border-left: 1px solid #ebeef5; }\n\n.o-table-border th {\n border-top: 1px solid #ebeef5; }\n\ntr {\n border-bottom: 1px solid #E0E0E0; }\n\ntr:hover td {\n background: #f5f5f5; }\n\ntd {\n text-align: left;\n vertical-align: middle;\n font-size: 0.875rem;\n padding: 10px 10px 10px;\n background: white; }\n\ntd.compact,\nth.compact {\n padding: 4px 10px 4px; }\n\na {\n text-decoration: none; }\n\n.o-table-align-left {\n text-align: left; }\n\n.o-table-align-center {\n text-align: center; }\n\no-checkbox {\n height: 20px;\n vertical-align: middle; }\n\n.o-table-align-right {\n text-align: right; }\n\na,\na:link,\na:visited,\na:active {\n text-decoration: none;\n color: inherit; }\n\na:hover {\n color: #07c160;\n color: var(--o-primary, #07c160); }\n\no-checkbox {\n margin-right: 5px; }\n\n.o-table-stripe tr:nth-of-type(odd) {\n background: white; }\n\n.o-table-stripe tr:nth-of-type(even) {\n background: #fafafa; }\n\n.slide-fade-enter-active {\n transition: all .3s ease; }\n\n.slide-fade-leave-active {\n transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1); }\n\n.slide-fade-enter,\n.slide-fade-leave-to {\n transform: translateX(-40px);\n opacity: 0; }\n";
|
||||
var css = ":host {\n display: block; }\n\n.o-table {\n overflow: auto; }\n\n.o-table-table {\n background: white;\n margin: auto;\n padding: 5px;\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n color: #606266;\n font-weight: 400; }\n\n.o-table-checkbox th:first-child,\n.o-table-checkbox td:first-child {\n padding: 2px 10px 2px; }\n\nth {\n border-bottom: 1px solid #E0E0E0;\n text-align: left;\n vertical-align: middle;\n padding: 10px 10px 10px;\n color: rgba(0, 0, 0, 0.54);\n font-size: 0.75rem;\n line-height: 1.3125rem;\n font-weight: 500;\n background: #fafafa;\n white-space: nowrap; }\n\nth,\ntd {\n white-space: nowrap; }\n\nth.sticky-top {\n position: sticky;\n top: -1px;\n z-index: 1000; }\n\ntable thead th.sticky-left {\n position: sticky;\n left: -1px;\n z-index: 1001; }\n\ntable tbody td.sticky-left {\n position: sticky;\n left: -1px;\n z-index: 999; }\n\n.o-table-border td,\n.o-table-border th {\n border-right: 1px solid #ebeef5; }\n\n.o-table-border td:first-child,\n.o-table-border th:first-child {\n border-left: 1px solid #ebeef5; }\n\n.o-table-border th {\n border-top: 1px solid #ebeef5; }\n\ntr {\n border-bottom: 1px solid #E0E0E0; }\n\ntr:hover td {\n background: #f5f5f5; }\n\ntd {\n text-align: left;\n vertical-align: middle;\n font-size: 0.875rem;\n padding: 10px 10px 10px;\n background: white; }\n\ntd.compact,\nth.compact {\n padding: 4px 10px 4px; }\n\na {\n text-decoration: none; }\n\n.o-table-align-left {\n text-align: left; }\n\n.o-table-align-center {\n text-align: center; }\n\no-checkbox {\n height: 20px;\n vertical-align: middle; }\n\n.o-table-align-right {\n text-align: right; }\n\na,\na:link,\na:visited,\na:active {\n text-decoration: none;\n color: inherit; }\n\na:hover {\n color: #07c160;\n color: var(--o-primary, #07c160); }\n\no-checkbox {\n margin-right: 5px; }\n\n.o-table-stripe tr:nth-of-type(odd) {\n background: white; }\n\n.o-table-stripe tr:nth-of-type(even) {\n background: #fafafa; }\n\n.slide-fade-enter-active {\n transition: all .3s ease; }\n\n.slide-fade-leave-active {\n transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1); }\n\n.slide-fade-enter,\n.slide-fade-leave-to {\n transform: translateX(-40px);\n opacity: 0; }\n";
|
||||
|
||||
var Table = /** @class */ (function (_super) {
|
||||
__extends$2(Table, _super);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -40,12 +40,13 @@
|
|||
//https://stackoverflow.com/questions/4654481/lock-table-cells-to-their-default-size-regardless-of-content
|
||||
th,
|
||||
td {
|
||||
display: table-cell;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
max-width: 1px;
|
||||
// 下面这些样式会让冻结失效
|
||||
// display: table-cell;
|
||||
white-space: nowrap;
|
||||
// text-overflow: ellipsis;
|
||||
// overflow: hidden;
|
||||
// width: auto;
|
||||
// max-width: 1px;
|
||||
}
|
||||
|
||||
th.sticky-top {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
import{W as e,h as t,t as r,s as n,b as i}from"./vendor.cc7bcda2.js";var o=Object.defineProperty,s=Object.getOwnPropertyDescriptor;let a=class extends e{render(){return t("div",{class:r``},t("iframe",{height:window.innerHeight-90,style:"width: 100%;",scrolling:"yes",title:"OMIU Link",src:"https://tencent.github.io/omi/components/icon/demos/icon.html",frameborder:"no",loading:"lazy"}))}};a.css=n.target,a=((e,t,r,n)=>{for(var i,a=n>1?void 0:n?s(t,r):t,c=e.length-1;c>=0;c--)(i=e[c])&&(a=(n?i(t,r,a):i(a))||a);return n&&a&&o(t,r,a),a})([i("admin-icon")],a);export{a as default};
|
||||
import{W as e,h as t,t as r,s as n,b as i}from"./vendor.96b5cfd3.js";var o=Object.defineProperty,s=Object.getOwnPropertyDescriptor;let a=class extends e{render(){return t("div",{class:r``},t("iframe",{height:window.innerHeight-90,style:"width: 100%;",scrolling:"yes",title:"OMIU Link",src:"https://tencent.github.io/omi/components/icon/demos/icon.html",frameborder:"no",loading:"lazy"}))}};a.css=n.target,a=((e,t,r,n)=>{for(var i,a=n>1?void 0:n?s(t,r):t,c=e.length-1;c>=0;c--)(i=e[c])&&(a=(n?i(t,r,a):i(a))||a);return n&&a&&o(t,r,a),a})([i("admin-icon")],a);export{a as default};
|
|
@ -1 +1 @@
|
|||
import{k as getDefaultExportFromCjs,j as require$$0,f as commonjsGlobal}from"./vendor.cc7bcda2.js";var ballot$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s="./esm/ballot.js")}({"./esm/ballot.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h("path", {\n fillRule: "evenodd",\n d: "M13 9.5h5v-2h-5v2zm0 7h5v-2h-5v2zm6 4.5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2zM6 11h5V6H6v5zm1-4h3v3H7V7zM6 18h5v-5H6v5zm1-4h3v3H7v-3z"\n}), \'Ballot\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/ballot.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(ballot$2);var ballot=getDefaultExportFromCjs(ballot$2.exports),ballot$1=Object.freeze(Object.assign(Object.create(null),ballot$2.exports,{[Symbol.toStringTag]:"Module",default:ballot}));export{ballot$1 as b};
|
||||
import{k as getDefaultExportFromCjs,j as require$$0,f as commonjsGlobal}from"./vendor.96b5cfd3.js";var ballot$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s="./esm/ballot.js")}({"./esm/ballot.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h("path", {\n fillRule: "evenodd",\n d: "M13 9.5h5v-2h-5v2zm0 7h5v-2h-5v2zm6 4.5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2zM6 11h5V6H6v5zm1-4h3v3H7V7zM6 18h5v-5H6v5zm1-4h3v3H7v-3z"\n}), \'Ballot\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/ballot.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(ballot$2);var ballot=getDefaultExportFromCjs(ballot$2.exports),ballot$1=Object.freeze(Object.assign(Object.create(null),ballot$2.exports,{[Symbol.toStringTag]:"Module",default:ballot}));export{ballot$1 as b};
|
|
@ -1 +1 @@
|
|||
import{W as e,h as t,t as s,s as a,b as c}from"./vendor.cc7bcda2.js";import"./index.esm.55ef59c7.js";var i=Object.defineProperty,r=Object.getOwnPropertyDescriptor;let d=class extends e{constructor(){super(...arguments),this.dataSource=[],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,onClick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.onClick=e=>{this.deleteItemById(Number(e.currentTarget.dataset.itemId))}}async install(){this.dataSource=await async function(){return[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"}]}(),this.update()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&(this.dataSource.splice(t,1),this.update())}render(){return t("div",{class:s`pl-0.5`},t("div",{class:s`px-2`},t("h4",{class:s`py-2 text-sm`},"基础表格"),t("o-table",{checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex flex-row`},t("div",{class:s` px-2`},t("h4",{class:s`py-2 text-sm`},"冻结行列"),t("o-table",{checkbox:!0,stripe:!0,width:"200px",height:"250px",stickyTop:!0,stickyLeftCount:2,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"带边框"),t("o-table",{checkbox:!0,stripe:!0,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))),t("div",{class:s`flex flex-row`},t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"压缩高度"),t("o-table",{checkbox:!1,stripe:!0,border:!1,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"无隔行变色"),t("o-table",{checkbox:!0,stripe:!1,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))))}};d.css=a.target,d=((e,t,s,a)=>{for(var c,d=a>1?void 0:a?r(t,s):t,o=e.length-1;o>=0;o--)(c=e[o])&&(d=(a?c(t,s,d):c(d))||d);return a&&d&&i(t,s,d),d})([c("basic-table")],d);export{d as default};
|
||||
import{W as e,h as t,t as s,s as a,b as c}from"./vendor.96b5cfd3.js";import"./index.esm.f7964e0d.js";var d=Object.defineProperty,i=Object.getOwnPropertyDescriptor;let r=class extends e{constructor(){super(...arguments),this.dataSource=[],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,onClick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.onClick=e=>{this.deleteItemById(Number(e.currentTarget.dataset.itemId))}}async install(){this.dataSource=await async function(){return[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"}]}(),this.update()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&(this.dataSource.splice(t,1),this.update())}render(){return t("div",{class:s`pl-0.5`},t("div",{class:s`px-2`},t("h4",{class:s`py-2 text-sm`},"基础表格"),t("o-table",{checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex flex-row`},t("div",{class:s` px-2`},t("h4",{class:s`py-2 text-sm`},"冻结行列"),t("o-table",{checkbox:!0,stripe:!0,width:"200px",height:"250px",stickyTop:!0,stickyLeftCount:2,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"带边框"),t("o-table",{checkbox:!0,stripe:!0,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))),t("div",{class:s`flex flex-row`},t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"压缩高度"),t("o-table",{checkbox:!1,stripe:!0,border:!1,compact:!0,columns:this.columns,dataSource:this.dataSource})),t("div",{class:s`flex-1 px-2`},t("h4",{class:s`py-2 text-sm`},"无隔行变色"),t("o-table",{checkbox:!0,stripe:!1,border:!0,compact:!0,columns:this.columns,dataSource:this.dataSource}))))}};r.css=a.target,r=((e,t,s,a)=>{for(var c,r=a>1?void 0:a?i(t,s):t,o=e.length-1;o>=0;o--)(c=e[o])&&(r=(a?c(t,s,r):c(r))||r);return a&&r&&d(t,s,r),r})([c("basic-table")],r);export{r as default};
|
|
@ -1 +1 @@
|
|||
import{k as getDefaultExportFromCjs,j as require$$0,f as commonjsGlobal}from"./vendor.cc7bcda2.js";var emojiPeople$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=n,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)o.d(t,r,function(n){return e[n]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s="./esm/emoji-people.js")}({"./esm/emoji-people.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h(omi_1.h.f, null, omi_1.h("circle", {\n cx: "12",\n cy: "4",\n r: "2"\n}), omi_1.h("path", {\n d: "M15.89 8.11C15.5 7.72 14.83 7 13.53 7h-2.54C8.24 6.99 6 4.75 6 2H4c0 3.16 2.11 5.84 5 6.71V22h2v-6h2v6h2V10.05L18.95 14l1.41-1.41-4.47-4.48z"\n})), \'EmojiPeople\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/emoji-people.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(emojiPeople$2);var emojiPeople=getDefaultExportFromCjs(emojiPeople$2.exports),emojiPeople$1=Object.freeze(Object.assign(Object.create(null),emojiPeople$2.exports,{[Symbol.toStringTag]:"Module",default:emojiPeople}));export{emojiPeople$1 as e};
|
||||
import{k as getDefaultExportFromCjs,j as require$$0,f as commonjsGlobal}from"./vendor.96b5cfd3.js";var emojiPeople$2={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(e){var n={};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=n,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)o.d(t,r,function(n){return e[n]}.bind(null,r));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s="./esm/emoji-people.js")}({"./esm/emoji-people.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h(omi_1.h.f, null, omi_1.h("circle", {\n cx: "12",\n cy: "4",\n r: "2"\n}), omi_1.h("path", {\n d: "M15.89 8.11C15.5 7.72 14.83 7 13.53 7h-2.54C8.24 6.99 6 4.75 6 2H4c0 3.16 2.11 5.84 5 6.71V22h2v-6h2v6h2V10.05L18.95 14l1.41-1.41-4.47-4.48z"\n})), \'EmojiPeople\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/emoji-people.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(emojiPeople$2);var emojiPeople=getDefaultExportFromCjs(emojiPeople$2.exports),emojiPeople$1=Object.freeze(Object.assign(Object.create(null),emojiPeople$2.exports,{[Symbol.toStringTag]:"Module",default:emojiPeople}));export{emojiPeople$1 as e};
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
import{h as n,e as o,b as e,W as t}from"./vendor.cc7bcda2.js";
|
||||
import{h as n,e as o,b as e,W as t}from"./vendor.96b5cfd3.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
var t=Object.defineProperty,e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,i=(t,i)=>{for(var c in i||(i={}))n.call(i,c)&&o(t,c,i[c]);if(e)for(var c of e(i))r.call(i,c)&&o(t,c,i[c]);return t},c=(t,e,n)=>(o(t,"symbol"!=typeof e?e+"":e,n),n);import{h as p,e as a,b as s,W as l}from"./vendor.cc7bcda2.js";
|
||||
var t=Object.defineProperty,e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,i=(t,i)=>{for(var c in i||(i={}))n.call(i,c)&&o(t,c,i[c]);if(e)for(var c of e(i))r.call(i,c)&&o(t,c,i[c]);return t},c=(t,e,n)=>(o(t,"symbol"!=typeof e?e+"":e,n),n);import{h as p,e as a,b as s,W as l}from"./vendor.96b5cfd3.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
import{W as e,h as t,t as a,s as i,b as n}from"./vendor.cc7bcda2.js";import"./index.esm.55ef59c7.js";import"./index.esm.68d4d7d2.js";var d=Object.defineProperty,s=Object.getOwnPropertyDescriptor;let r=class extends e{constructor(){super(...arguments),this.dataSource=[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"},{id:9,name:"xwang",age:18,address:"Tencent"},{id:10,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:11,name:"lucy",age:12,address:"Tencent"},{id:12,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:13,name:"tim",age:12,address:"Tencent"},{id:14,name:"tim",age:12,address:"Tencent"},{id:15,name:"tim",age:12,address:"Tencent"},{id:16,name:"tim",age:12,address:"Tencent"}],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",key:"name",editable:!0},{title:"Age",key:"age",editable:!0},{title:"Address",key:"address",editable:!0},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,_onclick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.paging=!0,this.pageSize=5,this.pageIndex=0,this.filterData=[],this.change=e=>{this.pageIndex=e.detail,this.renderTable()},this.onClick=e=>{this.table.deleteRowById(e.currentTarget.dataset.itemId)}}renderTable(){this.filterData=this.dataSource.slice(this.pageIndex*this.pageSize,this.pageIndex*this.pageSize+this.pageSize),this.update()}installed(){this.renderTable()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&this.dataSource.splice(t,1),this.update()}render(){return t("div",{class:a`pl-0.5`},t("div",{class:a`px-2`},t("o-table",{ref:e=>this.table=e,checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.filterData}),t("div",{class:a`mt-3 text-right`},t("o-pagination",{total:this.dataSource.length,"current-page":this.pageIndex,"page-size":this.pageSize,onchange:this.change}))))}};r.css=i.target,r=((e,t,a,i)=>{for(var n,r=i>1?void 0:i?s(t,a):t,c=e.length-1;c>=0;c--)(n=e[c])&&(r=(i?n(t,a,r):n(r))||r);return i&&r&&d(t,a,r),r})([n("inline-editing")],r);export{r as default};
|
|
@ -0,0 +1 @@
|
|||
import{W as e,h as t,t as a,s as i,b as n}from"./vendor.96b5cfd3.js";import"./index.esm.f7964e0d.js";import"./index.esm.730c928b.js";var d=Object.defineProperty,s=Object.getOwnPropertyDescriptor;let r=class extends e{constructor(){super(...arguments),this.dataSource=[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"},{id:9,name:"xwang",age:18,address:"Tencent"},{id:10,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:11,name:"lucy",age:12,address:"Tencent"},{id:12,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:13,name:"tim",age:12,address:"Tencent"},{id:14,name:"tim",age:12,address:"Tencent"},{id:15,name:"tim",age:12,address:"Tencent"},{id:16,name:"tim",age:12,address:"Tencent"}],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",width:120,key:"name",editable:!0},{title:"Age",width:90,key:"age",editable:!0},{title:"Address",width:290,key:"address",editable:!0},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,_onclick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.paging=!0,this.pageSize=5,this.pageIndex=0,this.filterData=[],this.change=e=>{this.pageIndex=e.detail,this.renderTable()},this.onClick=e=>{this.table.deleteRowById(e.currentTarget.dataset.itemId)}}renderTable(){this.filterData=this.dataSource.slice(this.pageIndex*this.pageSize,this.pageIndex*this.pageSize+this.pageSize),this.update()}installed(){this.renderTable()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&this.dataSource.splice(t,1),this.update()}render(){return t("div",{class:a`pl-0.5`},t("div",{class:a`px-2`},t("o-table",{ref:e=>this.table=e,checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.filterData}),t("div",{class:a`mt-3 text-right`},t("o-pagination",{total:this.dataSource.length,"current-page":this.pageIndex,"page-size":this.pageSize,onchange:this.change}))))}};r.css=i.target,r=((e,t,a,i)=>{for(var n,r=i>1?void 0:i?s(t,a):t,c=e.length-1;c>=0;c--)(n=e[c])&&(r=(i?n(t,a,r):n(r))||r);return i&&r&&d(t,a,r),r})([n("inline-editing")],r);export{r as default};
|
|
@ -1,4 +1,4 @@
|
|||
import{h as o,b as n,W as e,t as r,s as i}from"./vendor.cc7bcda2.js";import"./admin-docs.3203a2e0.js";
|
||||
import{h as o,b as n,W as e,t as r,s as i}from"./vendor.96b5cfd3.js";import"./admin-docs.d368f597.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
import{W as e,h as t,t as a,s as i,b as n}from"./vendor.cc7bcda2.js";import"./index.esm.55ef59c7.js";import"./index.esm.68d4d7d2.js";var s=Object.defineProperty,d=Object.getOwnPropertyDescriptor;let r=class extends e{constructor(){super(...arguments),this.dataSource=[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"},{id:9,name:"xwang",age:18,address:"Tencent"},{id:10,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:11,name:"lucy",age:12,address:"Tencent"},{id:12,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:13,name:"tim",age:12,address:"Tencent"},{id:14,name:"tim",age:12,address:"Tencent"},{id:15,name:"tim",age:12,address:"Tencent"},{id:16,name:"tim",age:12,address:"Tencent"}],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,_onclick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.paging=!0,this.pageSize=5,this.pageIndex=0,this.filterData=[],this.change=e=>{this.pageIndex=e.detail,this.renderTable()},this.onClick=e=>{this.table.deleteRowById(e.currentTarget.dataset.itemId)}}renderTable(){this.filterData=this.dataSource.slice(this.pageIndex*this.pageSize,this.pageIndex*this.pageSize+this.pageSize),this.update()}installed(){this.renderTable()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&this.dataSource.splice(t,1),this.update()}render(){return t("div",{class:a`pl-0.5`},t("div",{class:a`px-2`},t("o-table",{ref:e=>this.table=e,checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.filterData}),t("div",{class:a`mt-3 text-right`},t("o-pagination",{total:this.dataSource.length,"current-page":this.pageIndex,"page-size":this.pageSize,onchange:this.change}))))}};r.css=i.target,r=((e,t,a,i)=>{for(var n,r=i>1?void 0:i?d(t,a):t,c=e.length-1;c>=0;c--)(n=e[c])&&(r=(i?n(t,a,r):n(r))||r);return i&&r&&s(t,a,r),r})([n("pagination-table")],r);export{r as default};
|
||||
import{W as e,h as t,t as a,s as i,b as n}from"./vendor.96b5cfd3.js";import"./index.esm.f7964e0d.js";import"./index.esm.730c928b.js";var s=Object.defineProperty,d=Object.getOwnPropertyDescriptor;let r=class extends e{constructor(){super(...arguments),this.dataSource=[{id:1,name:"xwang",age:18,address:"Tencent"},{id:2,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:3,name:"lucy",age:12,address:"Tencent"},{id:4,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:5,name:"tim",age:12,address:"Tencent"},{id:6,name:"tim",age:12,address:"Tencent"},{id:7,name:"tim",age:12,address:"Tencent"},{id:8,name:"tim",age:12,address:"Tencent"},{id:9,name:"xwang",age:18,address:"Tencent"},{id:10,name:"dntzhang",age:12,address:"Tencent",$config:{bgColor:"rgb(247 176 176 / 32%)"}},{id:11,name:"lucy",age:12,address:"Tencent"},{id:12,name:"john",age:12,address:"Tencent",$config:{bgColor:"rgb(230 162 60 / 34%)"}},{id:13,name:"tim",age:12,address:"Tencent"},{id:14,name:"tim",age:12,address:"Tencent"},{id:15,name:"tim",age:12,address:"Tencent"},{id:16,name:"tim",age:12,address:"Tencent"}],this.columns=[{title:"ID",render:e=>t("strong",null,e.id)},{title:"Name",key:"name"},{title:"Age",key:"age"},{title:"Address",key:"address"},{title:"操作",align:"right",render:e=>t("o-tooltip",{content:"删除"+e.name},t("o-icon-delete",{"data-item-id":e.id,_onclick:this.onClick,style:"cursor:pointer;font-size:20px;"}))}],this.paging=!0,this.pageSize=5,this.pageIndex=0,this.filterData=[],this.change=e=>{this.pageIndex=e.detail,this.renderTable()},this.onClick=e=>{this.table.deleteRowById(e.currentTarget.dataset.itemId)}}renderTable(){this.filterData=this.dataSource.slice(this.pageIndex*this.pageSize,this.pageIndex*this.pageSize+this.pageSize),this.update()}installed(){this.renderTable()}deleteItemById(e){const t=this.dataSource.indexOf(this.dataSource.find((t=>t.id===e)));-1!==t&&this.dataSource.splice(t,1),this.update()}render(){return t("div",{class:a`pl-0.5`},t("div",{class:a`px-2`},t("o-table",{ref:e=>this.table=e,checkbox:!1,stripe:!1,border:!1,compact:!1,columns:this.columns,dataSource:this.filterData}),t("div",{class:a`mt-3 text-right`},t("o-pagination",{total:this.dataSource.length,"current-page":this.pageIndex,"page-size":this.pageSize,onchange:this.change}))))}};r.css=i.target,r=((e,t,a,i)=>{for(var n,r=i>1?void 0:i?d(t,a):t,c=e.length-1;c>=0;c--)(n=e[c])&&(r=(i?n(t,a,r):n(r))||r);return i&&r&&s(t,a,r),r})([n("pagination-table")],r);export{r as default};
|
|
@ -0,0 +1 @@
|
|||
import{W as r,h as e,t,s,b as a}from"./vendor.96b5cfd3.js";var o=Object.defineProperty,d=Object.getOwnPropertyDescriptor;let n=class extends r{render(){return e("div",{class:t``},"Admin Error Page")}};n.css=s.target,n=((r,e,t,s)=>{for(var a,n=s>1?void 0:s?d(e,t):e,c=r.length-1;c>=0;c--)(a=r[c])&&(n=(s?a(e,t,n):a(n))||n);return s&&n&&o(e,t,n),n})([a("status-error")],n);export{n as default};
|
|
@ -1 +0,0 @@
|
|||
import{W as r,h as e,t,s,b as a}from"./vendor.cc7bcda2.js";var o=Object.defineProperty,c=Object.getOwnPropertyDescriptor;let d=class extends r{render(){return e("div",{class:t``},"Admin Error Page")}};d.css=s.target,d=((r,e,t,s)=>{for(var a,d=s>1?void 0:s?c(e,t):e,n=r.length-1;n>=0;n--)(a=r[n])&&(d=(s?a(e,t,d):a(d))||d);return s&&d&&o(e,t,d),d})([a("status-error")],d);export{d as default};
|
|
@ -0,0 +1 @@
|
|||
import{W as r,h as e,t,s,b as a}from"./vendor.96b5cfd3.js";var n=Object.defineProperty,d=Object.getOwnPropertyDescriptor;let o=class extends r{render(){return e("div",{class:t``},"Admin Warning Page")}};o.css=s.target,o=((r,e,t,s)=>{for(var a,o=s>1?void 0:s?d(e,t):e,i=r.length-1;i>=0;i--)(a=r[i])&&(o=(s?a(e,t,o):a(o))||o);return s&&o&&n(e,t,o),o})([a("status-warning")],o);export{o as default};
|
|
@ -1 +0,0 @@
|
|||
import{W as r,h as e,t,s,b as a}from"./vendor.cc7bcda2.js";var n=Object.defineProperty,c=Object.getOwnPropertyDescriptor;let d=class extends r{render(){return e("div",{class:t``},"Admin Warning Page")}};d.css=s.target,d=((r,e,t,s)=>{for(var a,d=s>1?void 0:s?c(e,t):e,o=r.length-1;o>=0;o--)(a=r[o])&&(d=(s?a(e,t,d):a(d))||d);return s&&d&&n(e,t,d),d})([a("status-warning")],d);export{d as default};
|
|
@ -1,4 +1,4 @@
|
|||
import{h as e,e as t,b as n,W as o,t as r,s as i}from"./vendor.cc7bcda2.js";import"./admin-docs.3203a2e0.js";
|
||||
import{h as e,e as t,b as n,W as o,t as r,s as i}from"./vendor.96b5cfd3.js";import"./admin-docs.d368f597.js";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
File diff suppressed because one or more lines are too long
|
@ -7,8 +7,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>OMI ADMIN</title>
|
||||
|
||||
<script type="module" crossorigin src="./assets/index.9f9d1115.js"></script>
|
||||
<link rel="modulepreload" href="./assets/vendor.cc7bcda2.js">
|
||||
<script type="module" crossorigin src="./assets/index.5794434c.js"></script>
|
||||
<link rel="modulepreload" href="./assets/vendor.96b5cfd3.js">
|
||||
<link rel="stylesheet" href="./assets/index.e4c38a11.css">
|
||||
</head>
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
"dependencies": {
|
||||
"@omiu/avatar": "^0.0.1",
|
||||
"@omiu/button": "^0.0.9",
|
||||
"@omiu/cascader": "^0.0.3",
|
||||
"@omiu/checkbox": "^0.0.11",
|
||||
"@omiu/color-picker": "^0.0.4",
|
||||
"@omiu/common": "^0.0.9",
|
||||
|
@ -26,10 +27,11 @@
|
|||
"@omiu/loading": "0.0.2",
|
||||
"@omiu/pagination": "^0.0.5",
|
||||
"@omiu/popconfirm": "^0.0.2",
|
||||
"@omiu/popover": "^0.0.12",
|
||||
"@omiu/radio": "^0.0.6",
|
||||
"@omiu/select": "^0.0.7",
|
||||
"@omiu/select": "^0.0.8",
|
||||
"@omiu/switch": "^0.0.2",
|
||||
"@omiu/table": "^0.0.13",
|
||||
"@omiu/table": "^0.0.14",
|
||||
"@omiu/tabs": "^0.0.19",
|
||||
"@omiu/toast": "^0.0.8",
|
||||
"@omiu/tooltip": "0.0.1",
|
||||
|
|
|
@ -6,6 +6,7 @@ import '@omiu/switch'
|
|||
import '@omiu/radio'
|
||||
import '@omiu/checkbox'
|
||||
import '@omiu/date-picker'
|
||||
import '@omiu/cascader'
|
||||
|
||||
interface Props { }
|
||||
|
||||
|
@ -80,6 +81,76 @@ export default class extends WeElement<Props> {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class={formItemClass}>
|
||||
<label class={lableClass} >级联选择</label>
|
||||
<div class={tw`leading-8 ml-10`}>
|
||||
<o-cascader options={[
|
||||
{
|
||||
value: 'components',
|
||||
label: '组件',
|
||||
children: [
|
||||
{
|
||||
value: 'basic',
|
||||
label: '基础',
|
||||
children: [
|
||||
{
|
||||
value: 'input',
|
||||
label: '输入框'
|
||||
},
|
||||
{
|
||||
value: 'button',
|
||||
label: '按钮'
|
||||
},
|
||||
{
|
||||
value: 'card',
|
||||
label: '卡片'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
value: 'form',
|
||||
label: '表单',
|
||||
children: [
|
||||
{
|
||||
value: 'select',
|
||||
label: '选择器'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
value: 'advanced',
|
||||
label: '高级',
|
||||
children: [
|
||||
{
|
||||
value: 'tree',
|
||||
label: '树'
|
||||
},
|
||||
{
|
||||
value: 'cascader',
|
||||
label: '级联选择器'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
value: 'author',
|
||||
label: '作者',
|
||||
children: [
|
||||
{
|
||||
value: 'dntzhang',
|
||||
label: '当耐特'
|
||||
},
|
||||
{
|
||||
value: 'YunYouJun',
|
||||
label: '云游君'
|
||||
}
|
||||
]
|
||||
}
|
||||
]}> </o-cascader>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class={formItemClass}>
|
||||
<label class={lableClass} >喜爱水果</label>
|
||||
<div class={tw`leading-8 ml-10`}>
|
||||
|
|
|
@ -138,16 +138,19 @@ export default class extends WeElement<Props> {
|
|||
},
|
||||
{
|
||||
title: 'Name',
|
||||
width: 120,
|
||||
key: 'name',
|
||||
editable: true
|
||||
},
|
||||
{
|
||||
title: 'Age',
|
||||
width: 90,
|
||||
key: 'age',
|
||||
editable: true
|
||||
},
|
||||
{
|
||||
title: 'Address',
|
||||
width: 290,
|
||||
key: 'address',
|
||||
editable: true
|
||||
},
|
||||
|
|
|
@ -2,6 +2,8 @@ import { WeElement, render, h, tag } from 'omi'
|
|||
|
||||
import { route } from 'omi-router'
|
||||
|
||||
//提前使用最新版本注册组件
|
||||
import '@omiu/popover'
|
||||
import '@omiu/icon/delete'
|
||||
import '@omiu/icon/insert-link'
|
||||
import '@omiu/icon/error'
|
||||
|
|
Loading…
Reference in New Issue