omi v1.6.1 - support ::data-* to pass data to child component

This commit is contained in:
dntzhang 2017-05-09 11:56:22 +08:00
parent f897d6b7eb
commit aa90279313
8 changed files with 50 additions and 38 deletions

View File

@ -65,12 +65,12 @@ $ npm install omi
## CDN
* [https://unpkg.com/omi@1.6.0/dist/omi.min.js](https://unpkg.com/omi@1.6.0/dist/omi.min.js)
* [https://unpkg.com/omi@1.6.0/dist/omi.js](https://unpkg.com/omi@1.6.0/dist/omi.js)
* [https://unpkg.com/omi@1.6.0/dist/omi.lite.min.js](https://unpkg.com/omi@1.6.0/dist/omi.lite.min.js)
* [https://unpkg.com/omi@1.6.0/dist/omi.lite.js](https://unpkg.com/omi@1.6.0/dist/omi.lite.js)
* [https://unpkg.com/omi@1.6.0/dist/omi.mustache.min.js](https://unpkg.com/omi@1.6.0/dist/omi.mustache.min.js)
* [https://unpkg.com/omi@1.6.0/dist/omi.mustache.js](https://unpkg.com/omi@1.6.0/dist/omi.mustache.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.min.js](https://unpkg.com/omi@1.6.1/dist/omi.min.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.js](https://unpkg.com/omi@1.6.1/dist/omi.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.lite.min.js](https://unpkg.com/omi@1.6.1/dist/omi.lite.min.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.lite.js](https://unpkg.com/omi@1.6.1/dist/omi.lite.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.mustache.min.js](https://unpkg.com/omi@1.6.1/dist/omi.mustache.min.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.mustache.js](https://unpkg.com/omi@1.6.1/dist/omi.mustache.js)
## 感谢
@ -134,12 +134,12 @@ if using 'omi.lite.js' (without [mustache.js](https://github.com/janl/mustache.j
## CDN
* [https://unpkg.com/omi@1.6.0/dist/omi.min.js](https://unpkg.com/omi@1.6.0/dist/omi.min.js)
* [https://unpkg.com/omi@1.6.0/dist/omi.js](https://unpkg.com/omi@1.6.0/dist/omi.js)
* [https://unpkg.com/omi@1.6.0/dist/omi.lite.min.js](https://unpkg.com/omi@1.6.0/dist/omi.lite.min.js)
* [https://unpkg.com/omi@1.6.0/dist/omi.lite.js](https://unpkg.com/omi@1.6.0/dist/omi.lite.js)
* [https://unpkg.com/omi@1.6.0/dist/omi.mustache.min.js](https://unpkg.com/omi@1.6.0/dist/omi.mustache.min.js)
* [https://unpkg.com/omi@1.6.0/dist/omi.mustache.js](https://unpkg.com/omi@1.6.0/dist/omi.mustache.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.min.js](https://unpkg.com/omi@1.6.1/dist/omi.min.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.js](https://unpkg.com/omi@1.6.1/dist/omi.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.lite.min.js](https://unpkg.com/omi@1.6.1/dist/omi.lite.min.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.lite.js](https://unpkg.com/omi@1.6.1/dist/omi.lite.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.mustache.min.js](https://unpkg.com/omi@1.6.1/dist/omi.mustache.min.js)
* [https://unpkg.com/omi@1.6.1/dist/omi.mustache.js](https://unpkg.com/omi@1.6.1/dist/omi.mustache.js)
## Thanks

14
dist/omi.js vendored
View File

@ -1,5 +1,5 @@
/*!
* Omi v1.6.0 By dntzhang
* Omi v1.6.1 By dntzhang
* Github: https://github.com/AlloyTeam/omi
* MIT Licensed.
*/
@ -1703,10 +1703,12 @@ return /******/ (function(modules) { // webpackBootstrap
_this12._dataset[_this12._capitalize(key.replace('data-', ''))] = value;
} else if (key.indexOf(':data-') === 0) {
_this12._dataset[_this12._capitalize(key.replace(':data-', ''))] = eval('(' + value + ')');
} else if (key === ':data') {
_this12._dataset = eval('(' + value + ')');
} else if (key.indexOf('::data-') === 0) {
_this12._dataset[_this12._capitalize(key.replace('::data-', ''))] = _this12._extractPropertyFromString(value, _this12.parent);
} else if (key === 'data') {
_this12._dataset = _this12._extractPropertyFromString(value, _this12.parent);
} else if (key === ':data') {
_this12._dataset = eval('(' + value + ')');
} else if (key === 'group-data') {
_this12._dataset = _this12._extractPropertyFromString(value, _this12.parent)[_this12._omi_groupDataIndex];
}
@ -1801,10 +1803,12 @@ return /******/ (function(modules) { // webpackBootstrap
dataset[_this13._capitalize(key.replace('data-', ''))] = value;
} else if (key.indexOf(':data-') === 0) {
dataset[_this13._capitalize(key.replace(':data-', ''))] = eval('(' + value + ')');
} else if (key === ':data') {
dataset = eval('(' + value + ')');
} else if (key.indexOf('::data-') === 0) {
dataset[_this13._capitalize(key.replace('::data-', ''))] = _this13._extractPropertyFromString(value, child);
} else if (key === 'data') {
dataset = _this13._extractPropertyFromString(value, child);
} else if (key === ':data') {
dataset = eval('(' + value + ')');
} else if (key === 'preventSelfUpdate' || key === 'psu') {
_omi_option.preventSelfUpdate = true;
} else if (key === 'selfDataFirst' || key === 'sdf') {

14
dist/omi.lite.js vendored
View File

@ -1,5 +1,5 @@
/*!
* Omi v1.6.0 By dntzhang
* Omi v1.6.1 By dntzhang
* Github: https://github.com/AlloyTeam/omi
* MIT Licensed.
*/
@ -1007,10 +1007,12 @@ return /******/ (function(modules) { // webpackBootstrap
_this12._dataset[_this12._capitalize(key.replace('data-', ''))] = value;
} else if (key.indexOf(':data-') === 0) {
_this12._dataset[_this12._capitalize(key.replace(':data-', ''))] = eval('(' + value + ')');
} else if (key === ':data') {
_this12._dataset = eval('(' + value + ')');
} else if (key.indexOf('::data-') === 0) {
_this12._dataset[_this12._capitalize(key.replace('::data-', ''))] = _this12._extractPropertyFromString(value, _this12.parent);
} else if (key === 'data') {
_this12._dataset = _this12._extractPropertyFromString(value, _this12.parent);
} else if (key === ':data') {
_this12._dataset = eval('(' + value + ')');
} else if (key === 'group-data') {
_this12._dataset = _this12._extractPropertyFromString(value, _this12.parent)[_this12._omi_groupDataIndex];
}
@ -1105,10 +1107,12 @@ return /******/ (function(modules) { // webpackBootstrap
dataset[_this13._capitalize(key.replace('data-', ''))] = value;
} else if (key.indexOf(':data-') === 0) {
dataset[_this13._capitalize(key.replace(':data-', ''))] = eval('(' + value + ')');
} else if (key === ':data') {
dataset = eval('(' + value + ')');
} else if (key.indexOf('::data-') === 0) {
dataset[_this13._capitalize(key.replace('::data-', ''))] = _this13._extractPropertyFromString(value, child);
} else if (key === 'data') {
dataset = _this13._extractPropertyFromString(value, child);
} else if (key === ':data') {
dataset = eval('(' + value + ')');
} else if (key === 'preventSelfUpdate' || key === 'psu') {
_omi_option.preventSelfUpdate = true;
} else if (key === 'selfDataFirst' || key === 'sdf') {

File diff suppressed because one or more lines are too long

6
dist/omi.min.js vendored

File diff suppressed because one or more lines are too long

14
dist/omi.mustache.js vendored
View File

@ -1,5 +1,5 @@
/*!
* Omi v1.6.0 By dntzhang
* Omi v1.6.1 By dntzhang
* Github: https://github.com/AlloyTeam/omi
* MIT Licensed.
*/
@ -1008,10 +1008,12 @@ return /******/ (function(modules) { // webpackBootstrap
_this12._dataset[_this12._capitalize(key.replace('data-', ''))] = value;
} else if (key.indexOf(':data-') === 0) {
_this12._dataset[_this12._capitalize(key.replace(':data-', ''))] = eval('(' + value + ')');
} else if (key === ':data') {
_this12._dataset = eval('(' + value + ')');
} else if (key.indexOf('::data-') === 0) {
_this12._dataset[_this12._capitalize(key.replace('::data-', ''))] = _this12._extractPropertyFromString(value, _this12.parent);
} else if (key === 'data') {
_this12._dataset = _this12._extractPropertyFromString(value, _this12.parent);
} else if (key === ':data') {
_this12._dataset = eval('(' + value + ')');
} else if (key === 'group-data') {
_this12._dataset = _this12._extractPropertyFromString(value, _this12.parent)[_this12._omi_groupDataIndex];
}
@ -1106,10 +1108,12 @@ return /******/ (function(modules) { // webpackBootstrap
dataset[_this13._capitalize(key.replace('data-', ''))] = value;
} else if (key.indexOf(':data-') === 0) {
dataset[_this13._capitalize(key.replace(':data-', ''))] = eval('(' + value + ')');
} else if (key === ':data') {
dataset = eval('(' + value + ')');
} else if (key.indexOf('::data-') === 0) {
dataset[_this13._capitalize(key.replace('::data-', ''))] = _this13._extractPropertyFromString(value, child);
} else if (key === 'data') {
dataset = _this13._extractPropertyFromString(value, child);
} else if (key === ':data') {
dataset = eval('(' + value + ')');
} else if (key === 'preventSelfUpdate' || key === 'psu') {
_omi_option.preventSelfUpdate = true;
} else if (key === 'selfDataFirst' || key === 'sdf') {

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "omi",
"version": "1.6.0",
"version": "1.6.1",
"description": "Open and modern framework for building user interfaces.",
"main": "dist/omi.js",
"types": "index.d.ts",