mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
chore(): update e2e tests
* chore(): update e2e tests * chore(): back to ion-page * fix(): generate component def * chore(): fix missed tests * fix(): indent * fix(): indent * fix(): indent * fix(): indent * fix(): add closing icon tag
This commit is contained in:
@ -30,6 +30,7 @@
|
||||
<ion-button expand="block" id="cssClass" onclick="presentWithCssClass()">Custom CSS Class</ion-button>
|
||||
|
||||
</ion-content>
|
||||
|
||||
</ion-page>
|
||||
</ion-app>
|
||||
|
||||
|
@ -40,13 +40,13 @@
|
||||
<ion-col col-4><f class="orange"></f></ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</ion-content>
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
</ion-app>
|
||||
|
||||
<script>
|
||||
|
||||
function presentBasic() {
|
||||
async function presentBasic() {
|
||||
var mode = Ionic.mode;
|
||||
|
||||
const actionSheetController = document.querySelector('ion-action-sheet-controller');
|
||||
|
@ -358,4 +358,4 @@
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -154,7 +154,6 @@ sub {
|
||||
ion-app,
|
||||
ion-nav,
|
||||
ion-tabs,
|
||||
ion-page,
|
||||
.ion-page {
|
||||
@include position(0, null, null, 0);
|
||||
|
||||
@ -170,7 +169,6 @@ ion-page,
|
||||
// Page Container Structure
|
||||
// --------------------------------------------------
|
||||
|
||||
ion-page,
|
||||
.ion-page,
|
||||
.page-inner {
|
||||
display: flex;
|
||||
|
@ -11,38 +11,38 @@
|
||||
<body>
|
||||
<ion-app>
|
||||
<ion-page>
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>Badge - Basic</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>Badge - Basic</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-badge slot="start" color="primary">11</ion-badge>
|
||||
<ion-label>Primary</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-badge slot="start" color="secondary">22</ion-badge>
|
||||
<ion-label>Secondary</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-badge slot="start" color="danger">33</ion-badge>
|
||||
<ion-label>Danger</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-badge slot="start" color="light">44</ion-badge>
|
||||
<ion-label>Light</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-badge slot="start" color="dark">55</ion-badge>
|
||||
<ion-label>Dark</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-badge slot="start" color="primary">11</ion-badge>
|
||||
<ion-label>Primary</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-badge slot="start" color="secondary">22</ion-badge>
|
||||
<ion-label>Secondary</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-badge slot="start" color="danger">33</ion-badge>
|
||||
<ion-label>Danger</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-badge slot="start" color="light">44</ion-badge>
|
||||
<ion-label>Light</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-badge slot="start" color="dark">55</ion-badge>
|
||||
<ion-label>Dark</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
<ion-button onclick="toggleColors()">Toggle Colors</ion-button>
|
||||
</ion-content>
|
||||
<ion-button onclick="toggleColors()">Toggle Colors</ion-button>
|
||||
</ion-content>
|
||||
|
||||
</ion-page>
|
||||
</ion-app>
|
||||
|
@ -44,12 +44,12 @@
|
||||
<f></f>
|
||||
</ion-content>
|
||||
<ion-content padding style="display: none" id="content3">
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
</ion-content>
|
||||
</div>
|
||||
|
||||
|
@ -148,4 +148,4 @@
|
||||
</style>
|
||||
</ion-app>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -1,11 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html dir="ltr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Icon - Basic</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<script src="/dist/ionic.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ion-app>
|
||||
<ion-page>
|
||||
@ -19,15 +21,31 @@
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
|
||||
<ion-col><ion-icon name="logo-ionic" color="primary"></ion-icon></ion-col>
|
||||
<ion-col><ion-icon name="logo-ionitron" color="primary"></ion-icon></ion-col>
|
||||
<ion-col><ion-icon name="heart" color="secondary"></ion-icon></ion-col>
|
||||
<ion-col><ion-icon name="logo-angular" color="danger"></ion-icon></ion-col>
|
||||
<ion-col>
|
||||
<ion-icon name="logo-ionic" color="primary"></ion-icon>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-icon name="logo-ionitron" color="primary"></ion-icon>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-icon name="heart" color="secondary"></ion-icon>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-icon name="logo-angular" color="danger"></ion-icon>
|
||||
</ion-col>
|
||||
|
||||
<ion-col><ion-icon name="happy"></ion-icon></ion-col>
|
||||
<ion-col><ion-icon name="people"></ion-icon></ion-col>
|
||||
<ion-col><ion-icon name="lock"></ion-icon></ion-col>
|
||||
<ion-col><ion-icon name="key"></ion-icon></ion-col>
|
||||
<ion-col>
|
||||
<ion-icon name="happy"></ion-icon>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-icon name="people"></ion-icon>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-icon name="lock"></ion-icon>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<ion-icon name="key"></ion-icon>
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
@ -62,5 +80,5 @@
|
||||
</style>
|
||||
</ion-app>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html dir="ltr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Icon - Items</title>
|
||||
@ -11,6 +12,7 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<ion-app>
|
||||
@ -145,7 +147,7 @@
|
||||
|
||||
dynamicColor.setAttribute('color', 'danger');
|
||||
|
||||
let interval = setInterval(function () {
|
||||
let interval = setInterval(function() {
|
||||
if (dynamicProp.name === 'home') {
|
||||
dynamicProp.name = 'ios-home';
|
||||
dynamicAttr.setAttribute('name', 'ios-home');
|
||||
@ -158,7 +160,7 @@
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
setTimeout(function () {
|
||||
setTimeout(function() {
|
||||
clearInterval(interval);
|
||||
}, 4000);
|
||||
</script>
|
||||
@ -167,4 +169,5 @@
|
||||
</ion-page>
|
||||
</ion-app>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<body>
|
||||
<ion-app>
|
||||
<ion-page main>
|
||||
<ion-page>
|
||||
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<ion-title>Input - Basic</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
|
@ -68,27 +68,27 @@
|
||||
<ion-item-group>
|
||||
<ion-item-divider color="light">Divider</ion-item-divider>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Item Large Button</ion-label>
|
||||
<ion-button large slot="start"><ion-icon name="star" slot="end"></ion-icon>Start Button</ion-button>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Item Large Button</ion-label>
|
||||
<ion-button large slot="start"><ion-icon name="star" slot="end"></ion-icon>Start Button</ion-button>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Item Large Button</ion-label>
|
||||
<ion-button large slot="end">End Button<ion-icon name="star" slot="start"></ion-icon></ion-button>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Item Large Button</ion-label>
|
||||
<ion-button large slot="end">End Button<ion-icon name="star" slot="start"></ion-icon></ion-button>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Item Small Button</ion-label>
|
||||
<ion-button small slot="start"><ion-icon name="star" slot="end"></ion-icon>Start Button</ion-button>
|
||||
<ion-button small slot="end">End Button<ion-icon name="star" slot="start"></ion-icon></ion-button>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Item Small Button</ion-label>
|
||||
<ion-button small slot="start"><ion-icon name="star" slot="end"></ion-icon>Start Button</ion-button>
|
||||
<ion-button small slot="end">End Button<ion-icon name="star" slot="start"></ion-icon></ion-button>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Item Default Button</ion-label>
|
||||
<ion-button default slot="start"><ion-icon name="star" slot="end"></ion-icon>Start Button</ion-button>
|
||||
<ion-button default slot="end">End Button<ion-icon name="star" slot="start"></ion-icon></ion-button>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>Item Default Button</ion-label>
|
||||
<ion-button default slot="start"><ion-icon name="star" slot="end"></ion-icon>Start Button</ion-button>
|
||||
<ion-button default slot="end">End Button<ion-icon name="star" slot="start"></ion-icon></ion-button>
|
||||
</ion-item>
|
||||
</ion-item-group>
|
||||
</ion-content>
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
</ion-content>
|
||||
</ion-menu>
|
||||
|
||||
<ion-page main class="show-page">
|
||||
<ion-page main>
|
||||
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
|
@ -12,17 +12,17 @@
|
||||
<ion-app>
|
||||
<ion-page>
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>Modal - Basic</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>Modal - Basic</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
<ion-modal-controller></ion-modal-controller>
|
||||
<p>
|
||||
<ion-button class="e2ePresentModal" onclick="presentModal()">Present modal</ion-button>
|
||||
</p>
|
||||
</ion-content>
|
||||
<ion-content padding>
|
||||
<ion-modal-controller></ion-modal-controller>
|
||||
<p>
|
||||
<ion-button class="e2ePresentModal" onclick="presentModal()">Present modal</ion-button>
|
||||
</p>
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
</ion-app>
|
||||
|
||||
|
@ -108,4 +108,4 @@
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -5,6 +5,14 @@ import { Component } from '@stencil/core';
|
||||
tag: 'ion-page',
|
||||
})
|
||||
export class Page {
|
||||
|
||||
hostData() {
|
||||
return {
|
||||
class: {
|
||||
'ion-page': true
|
||||
}
|
||||
};
|
||||
}
|
||||
render() {
|
||||
return <slot></slot>;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<body>
|
||||
<ion-app>
|
||||
<ion-page class="ion-page">
|
||||
<ion-page>
|
||||
<ion-header>
|
||||
<ion-toolbar color="primary">
|
||||
<ion-buttons slot="start">
|
||||
|
@ -14,6 +14,7 @@
|
||||
<ion-title>Radio - Basic</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="radio-test outer-content">
|
||||
<ion-list>
|
||||
<ion-radio-group id="fruitRadio">
|
||||
|
@ -16,6 +16,7 @@
|
||||
<ion-title>Range - Basic</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-list-header>
|
||||
|
@ -46,17 +46,23 @@
|
||||
|
||||
<ion-item>
|
||||
Item 5 (custom ion-reorder)
|
||||
<ion-reorder slot="end"><ion-icon name="pizza"></ion-reorder>
|
||||
<ion-reorder slot="end">
|
||||
<ion-icon name="pizza"></ion-icon>
|
||||
</ion-reorder>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
Item 6 (custom ion-reorder)
|
||||
<ion-reorder slot="end"><ion-icon name="pizza"></ion-reorder>
|
||||
<ion-reorder slot="end">
|
||||
<ion-icon name="pizza"></ion-icon>
|
||||
</ion-reorder>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
Item 7 (custom ion-reorder slot="start")
|
||||
<ion-reorder slot="start"><ion-icon name="pizza"></ion-reorder>
|
||||
<ion-reorder slot="start">
|
||||
<ion-icon name="pizza"></ion-icon>
|
||||
</ion-reorder>
|
||||
</ion-item>
|
||||
|
||||
<ion-reorder class="no-hide">
|
||||
|
@ -1,14 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html dir="ltr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Searchbar - Basic</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<script src="/dist/ionic.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ion-app>
|
||||
<ion-page class="ion-page">
|
||||
<ion-page>
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>Searchbar - Basic</ion-title>
|
||||
@ -17,97 +19,50 @@
|
||||
|
||||
<ion-content>
|
||||
<h5 padding-left padding-top> Search - Default </h5>
|
||||
<ion-searchbar
|
||||
value="test"
|
||||
type="tel"
|
||||
show-cancel-button
|
||||
debounce="500">
|
||||
<ion-searchbar value="test" type="tel" show-cancel-button debounce="500">
|
||||
</ion-searchbar>
|
||||
|
||||
<h5 padding-left padding-top> Search - Animated </h5>
|
||||
<ion-searchbar
|
||||
animated="true"
|
||||
show-cancel-button
|
||||
debounce="500">
|
||||
<ion-searchbar animated="true" show-cancel-button debounce="500">
|
||||
</ion-searchbar>
|
||||
|
||||
<h5 padding-left padding-top> Search - Custom Placeholder </h5>
|
||||
<ion-searchbar
|
||||
id="dynamicProp"
|
||||
value="33"
|
||||
autocorrect="on"
|
||||
show-cancel-button="true"
|
||||
autocomplete="on"
|
||||
spellcheck="false"
|
||||
type="number"
|
||||
placeholder="Filter Schedules">
|
||||
<ion-searchbar id="dynamicProp" value="33" autocorrect="on" show-cancel-button="true" autocomplete="on" spellcheck="false" type="number" placeholder="Filter Schedules">
|
||||
</ion-searchbar>
|
||||
|
||||
<h5 padding-left padding-top> Search - No Cancel Button </h5>
|
||||
<ion-searchbar
|
||||
value="after view"
|
||||
autocorrect="off"
|
||||
autocomplete="off"
|
||||
spellcheck="true"
|
||||
type="text"
|
||||
show-cancel-button="false">
|
||||
<ion-searchbar value="after view" autocorrect="off" autocomplete="off" spellcheck="true" type="text" show-cancel-button="false">
|
||||
</ion-searchbar>
|
||||
|
||||
<h5 padding-left padding-top> Search - Custom Cancel Button Danger </h5>
|
||||
<ion-searchbar
|
||||
show-cancel-button
|
||||
cancel-button-text="Really Long Cancel"
|
||||
color="danger">
|
||||
<ion-searchbar show-cancel-button cancel-button-text="Really Long Cancel" color="danger">
|
||||
</ion-searchbar>
|
||||
|
||||
<h5 padding-left padding-top> Search - Value passed </h5>
|
||||
<ion-searchbar
|
||||
value="mysearch"
|
||||
cancel-button-text="Really Long Cancel"
|
||||
color="dark"
|
||||
show-cancel-button>
|
||||
<ion-searchbar value="mysearch" cancel-button-text="Really Long Cancel" color="dark" show-cancel-button>
|
||||
</ion-searchbar>
|
||||
|
||||
<h5 padding-left padding-top> Search - Mode iOS</h5>
|
||||
<ion-searchbar
|
||||
mode="ios"
|
||||
animated="true"
|
||||
show-cancel-button
|
||||
placeholder="Search">
|
||||
<ion-searchbar mode="ios" animated="true" show-cancel-button placeholder="Search">
|
||||
</ion-searchbar>
|
||||
|
||||
<h5 padding-left padding-top> Search - Mode MD</h5>
|
||||
<ion-searchbar
|
||||
mode="md"
|
||||
animated="true"
|
||||
show-cancel-button
|
||||
placeholder="Search">
|
||||
<ion-searchbar mode="md" animated="true" show-cancel-button placeholder="Search">
|
||||
</ion-searchbar>
|
||||
|
||||
<h5 padding-left padding-top> Search - DebounceTime </h5>
|
||||
<ion-searchbar
|
||||
autocorrect="on"
|
||||
show-cancel-button="true"
|
||||
autocomplete="on"
|
||||
spellcheck="true"
|
||||
type="text"
|
||||
debounce="5000"
|
||||
placeholder="Check the log">
|
||||
<ion-searchbar autocorrect="on" show-cancel-button="true" autocomplete="on" spellcheck="true" type="text" debounce="5000" placeholder="Check the log">
|
||||
</ion-searchbar>
|
||||
|
||||
<h5 padding-left padding-top> Search - Animated and No Cancel</h5>
|
||||
<ion-searchbar
|
||||
id="dynamicAttr"
|
||||
placeholder="Search"
|
||||
animated="true"
|
||||
show-cancel-button="false">
|
||||
<ion-searchbar id="dynamicAttr" placeholder="Search" animated="true" show-cancel-button="false">
|
||||
</ion-searchbar>
|
||||
|
||||
<p padding>
|
||||
<ion-button expand="block" (click)="changeValue()">Change Value</ion-button>
|
||||
</p>
|
||||
|
||||
<div padding-horizontal>
|
||||
<div padding-horizontal>
|
||||
<ion-button expand="block" onClick="toggleProp()">Toggle Property</ion-button>
|
||||
</div>
|
||||
<div padding>
|
||||
@ -149,8 +104,8 @@
|
||||
}
|
||||
|
||||
const searchbars = document.querySelectorAll('ion-searchbar')
|
||||
for(let i=0; i <searchbars.length; i++){
|
||||
searchbars[i].addEventListener('ionInput', (ev)=>{
|
||||
for (let i = 0; i < searchbars.length; i++) {
|
||||
searchbars[i].addEventListener('ionInput', (ev) => {
|
||||
console.log(ev);
|
||||
})
|
||||
}
|
||||
@ -159,4 +114,5 @@
|
||||
</ion-page>
|
||||
</ion-app>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1,11 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html dir="ltr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Segment - Basic</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<script src="/dist/ionic.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ion-app>
|
||||
<ion-page>
|
||||
@ -87,31 +89,32 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var dynamicAttrDisable = document.getElementById('dynamicAttrDisable');
|
||||
var dynamicPropDisable = document.getElementById('dynamicPropDisable');
|
||||
var dynamicAttrDisable = document.getElementById('dynamicAttrDisable');
|
||||
var dynamicPropDisable = document.getElementById('dynamicPropDisable');
|
||||
|
||||
function toggleDisabled() {
|
||||
const attrIsDisabled = dynamicAttrDisable.getAttribute('disabled') === 'true' ? false : true;
|
||||
const propIsDisabled = dynamicPropDisable.disabled === true ? false : true;
|
||||
dynamicAttrDisable.setAttribute('disabled', attrIsDisabled);
|
||||
dynamicPropDisable.disabled = propIsDisabled;
|
||||
}
|
||||
|
||||
function toggleValue() {
|
||||
var dynamicAttrElem = document.getElementById('dynamicAttrElem');
|
||||
var dynamicAttrValue = dynamicAttrElem.getAttribute('value');
|
||||
|
||||
if (dynamicAttrValue === 'active') {
|
||||
dynamicAttrElem.setAttribute('value', 'inactive');
|
||||
} else if (dynamicAttrValue === 'inactive') {
|
||||
dynamicAttrElem.setAttribute('value', 'disabled');
|
||||
} else {
|
||||
dynamicAttrElem.setAttribute('value', 'active');
|
||||
}
|
||||
function toggleDisabled() {
|
||||
const attrIsDisabled = dynamicAttrDisable.getAttribute('disabled') === 'true' ? false : true;
|
||||
const propIsDisabled = dynamicPropDisable.disabled === true ? false : true;
|
||||
dynamicAttrDisable.setAttribute('disabled', attrIsDisabled);
|
||||
dynamicPropDisable.disabled = propIsDisabled;
|
||||
}
|
||||
|
||||
function toggleValue() {
|
||||
var dynamicAttrElem = document.getElementById('dynamicAttrElem');
|
||||
var dynamicAttrValue = dynamicAttrElem.getAttribute('value');
|
||||
|
||||
if (dynamicAttrValue === 'active') {
|
||||
dynamicAttrElem.setAttribute('value', 'inactive');
|
||||
} else if (dynamicAttrValue === 'inactive') {
|
||||
dynamicAttrElem.setAttribute('value', 'disabled');
|
||||
} else {
|
||||
dynamicAttrElem.setAttribute('value', 'active');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
</ion-app>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<ion-title>Input - Textarea</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
<ion-list>
|
||||
|
@ -70,7 +70,7 @@ export class Toast {
|
||||
@Prop() position: string;
|
||||
@Prop() translucent: boolean = false;
|
||||
@Prop() toastId: string;
|
||||
@Prop() animate: boolean;
|
||||
@Prop() animate: boolean = true;
|
||||
|
||||
@Prop() enterAnimation: AnimationBuilder;
|
||||
@Prop() leaveAnimation: AnimationBuilder;
|
||||
@ -87,7 +87,7 @@ export class Toast {
|
||||
const animationBuilder = this.enterAnimation || this.config.get('toastEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
||||
|
||||
// build the animation and kick it off
|
||||
return this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||
return this.animationCtrl.create(animationBuilder, this.el, this.position).then(animation => {
|
||||
this.animation = animation;
|
||||
if (!this.animate) {
|
||||
// if the duration is 0, it won't actually animate I don't think
|
||||
@ -115,7 +115,7 @@ export class Toast {
|
||||
|
||||
const animationBuilder = this.leaveAnimation || this.config.get('toastLeave', this.mode === 'ios' ? iosLeaveAnimation : mdLeaveAnimation);
|
||||
|
||||
return this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||
return this.animationCtrl.create(animationBuilder, this.el, this.position).then(animation => {
|
||||
this.animation = animation;
|
||||
return playAnimationAsync(animation);
|
||||
}).then((animation) => {
|
||||
|
@ -14,6 +14,7 @@
|
||||
<ion-title>Toggle - Basic</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
<ion-list>
|
||||
|
Reference in New Issue
Block a user