Open xgqfrms opened 5 years ago
let new_outputs =
[
{
"title": "",
"tab_values": {
"TradingDay": "日期",
"ListedSector": "板块",
"ClosePrice": "收价",
"NoChangeCount": "暂无注释",
},
"tab_keys": [
"TradingDay",
"ListedSector",
"ClosePrice",
"NoChangeCount",
]
}
];
let outputs =
[
{
"tab_name": "smart.dailychecked.industry",
"tab_datas": [
{
"key": "RT_key 00001",
"TRADINGDAY": "2018-12-21",
"CLOSEPRICE": "7.0",
"NOCHANGECOUNT": "0.0"
},
{
"key": "RT_key 00002",
"TRADINGDAY": "2018-12-21",
"CLOSEPRICE": "5.1",
"NOCHANGECOUNT": "0.0"
},
{
"key": "RT_key 00003",
"TRADINGDAY": "2018-12-21",
"CLOSEPRICE": "23.6",
"NOCHANGECOUNT": "0.0"
},
]
}
];
let tab_datas = [
{
"key": "RT_key 00001",
"TRADINGDAY": "2018-12-21",
"CLOSEPRICE": "7.0",
"NOCHANGECOUNT": "0.0",
},
{
"key": "RT_key 00002",
"TRADINGDAY": "2018-12-21",
"CLOSEPRICE": "5.1",
"NOCHANGECOUNT": "0.0",
},
{
"key": "RT_key 00003",
"TRADINGDAY": "2018-12-21",
"CLOSEPRICE": "23.6",
"NOCHANGECOUNT": "0.0",
},
];
let tab_keys = [
"TradingDay",
"ListedSector",
"ClosePrice",
"NoChangeCount",
];
ChangeObjectKeys(tab_datas, tab_keys);
shapeArrayTabs(new_outputs, outputs);
how to add
tooltip
for table'stitle
?
https://stackoverflow.com/questions/13845003/tooltips-for-cells-in-html-table-no-javascript https://jsfiddle.net/BioData41/yxr64euy/
https://tooltips.org/add-tooltips-for-table/
new version is OK, old version is Error
https://codesandbox.io/s/1yxxoqxq1l
new version is OK, old version is Error
// testing
tabs_cols.forEach(
(obj, i) => {
let {
title,
key,
dataIndex,
} = obj;
let temp = {
"key": key,
"dataIndex": dataIndex,
// "title": `${title}`,
// "title": `${title}\n(${key})`,
// "data-tooltips": `${title} (${key})`,
// new version is OK, old version is Error
// title: () => {
// console.log(`title =`, title);
// console.log(`key =`, key);
// return (
// <Tooltip title="xxx">title</Tooltip>
// );
// },
// title: () => {
// console.log(`title =`, title);
// console.log(`key =`, key);
// return (
// <Tooltip title={key}>{title}</Tooltip>
// );
// },
"className": "test-result",
// "title": `<span>${title}(${key})</span>`,
// "title": () => <Tooltip title={key}>{title}</Tooltip>,
// title: () => <Tooltip title={key}>{title}</Tooltip>,
// title: this.render(() => <Tooltip title={key}>{title}</Tooltip>),
};
// console.log(`temp =\n`, temp);
// return temp;
new_table_cols.push(temp);
// multi cols bug!
keys.push(key);
titles.push(title);
// keys.add(key);
// titles.add(title);
}
);
event.persist()
event.persist()
https://reactjs.org/docs/events.html#event-pooling
https://codesandbox.io/dashboard https://codesandbox.io/dashboard/recent
https://codesandbox.io/s/vue https://codesandbox.io/s/github/nuxt/codesandbox-nuxt
https://codesandbox.io/s/new https://codesandbox.io/s/github/zeit/next.js/tree/master/examples/hello-world
https://codesandbox.io/s/moy0qloymj https://codesandbox.io/s/nrjvy2844m
https://www.npmjs.com/package/h_ui_beta https://www.npmjs.com/package/h_ui
https://github.com/hundsun-ui/h_ui
天下文章一大抄
https://github.com/hs-web/hsweb-ui-vue
https://github.com/hs-web https://github.com/orgs/hs-web/people
https://www.npmjs.com/package/h-ui https://github.com/hudk114/h-ui
http://www.h-ui.net/aboutHui.shtml https://github.com/jackying/h-ui
global add & add -D
https://yarnpkg.com/zh-Hans/docs/cli/add#toc-commands
$ yarn global add <package...>
$ yarn add <package...> [--dev/-D]
placeholder
placeholder | 非范围选择时的占位内容 | string | — |
---|---|---|---|
placeholder | placeholder of date input | string|RangePicker[] |
https://ant.design/components/date-picker/
https://codesandbox.io/s/92yzp7028o
https://element.eleme.io/#/zh-CN/component/date-picker
placeholder | 非范围选择时的占位内容 | string | — | — |
---|---|---|---|---|
start-placeholder | 范围选择时开始日期的占位内容 | string | — | — |
end-placeholder | 范围选择时结束日期的占位内容 | string | — | — |
change object keys & UpperCase & LowerCase