UNPKG

@ohu-mobile/core

Version:
177 lines (176 loc) 4.94 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.UseName = exports.Sticky = exports.Gesture = exports.Basic = void 0; var _FireFilled2 = _interopRequireDefault(require("@ohu-mobile/icons/lib/FireFilled")); var _RocketFilled2 = _interopRequireDefault(require("@ohu-mobile/icons/lib/RocketFilled")); var _StarFilled2 = _interopRequireDefault(require("@ohu-mobile/icons/lib/StarFilled")); var _vue = _interopRequireDefault(require("vue")); var _index = _interopRequireDefault(require("./index")); require("./style"); var _Tab = _interopRequireDefault(require("../Tab")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _default = exports.default = { title: 'Components/Navigation/Tabs', parameters: { component: _index.default, options: { showPanel: true } } }; var Basic = exports.Basic = function Basic() { return _vue.default.extend({ render: function render() { var h = arguments[0]; return h("div", [h(_index.default, { "attrs": { "value": 1, "border": false }, "style": "height: 100vh;" }, [h(_Tab.default, { "attrs": { "title": "关注", "icon": _StarFilled2.default } }, [h("p", { "style": "width: 100%; height: 200vh; background: red; margin: 0; padding: 0;" })]), h(_Tab.default, { "attrs": { "title": "推荐", "icon": _RocketFilled2.default } }, ["f2"]), h(_Tab.default, { "attrs": { "title": "热榜", "icon": _FireFilled2.default } }, ["f3"])])]); } }); }; var UseName = exports.UseName = function UseName() { return _vue.default.extend({ data: function data() { return { value: 'gz' }; }, render: function render() { var _this = this; var h = arguments[0]; return h("div", [h(_index.default, { "attrs": { "border": false }, "style": "height: 100vh;", "model": { value: _this.value, callback: function callback($$v) { _this.value = $$v; } } }, [h(_Tab.default, { "attrs": { "name": "gz", "title": "关注", "icon": _StarFilled2.default } }, [h("p", { "style": "width: 100%; height: 200vh; background: red; margin: 0; padding: 0;" })]), h(_Tab.default, { "attrs": { "name": "tj", "title": "推荐", "icon": _RocketFilled2.default } }, ["f2"]), h(_Tab.default, { "attrs": { "name": "rb", "title": "热榜", "icon": _FireFilled2.default } }, ["f3"])])]); } }); }; var Sticky = exports.Sticky = function Sticky() { return _vue.default.extend({ render: function render() { var h = arguments[0]; return h("div", [h("p", { "style": "height: 50vh;" }), h(_index.default, { "attrs": { "value": 1, "sticky": true, "border": false } }, [h(_Tab.default, { "attrs": { "title": "关注", "icon": _StarFilled2.default } }, [h("p", { "style": "width: 100%; height: 200vh; background: red; margin: 0; padding: 0;" })]), h(_Tab.default, { "attrs": { "title": "推荐", "icon": _RocketFilled2.default } }, ["f2"]), h(_Tab.default, { "attrs": { "title": "热榜", "icon": _FireFilled2.default } }, ["f3"])])]); } }); }; var Gesture = exports.Gesture = function Gesture() { return _vue.default.extend({ data: function data() { return { index: 0, count: 0 }; }, render: function render() { var _this2 = this; var h = arguments[0]; return h("div", [h(_index.default, { "attrs": { "canSwipe": true, "border": true, "indicatorWidth": 40 }, "style": "height: 100vh;", "model": { value: _this2.index, callback: function callback($$v) { _this2.index = $$v; } } }, [h(_Tab.default, { "attrs": { "title": "关注" }, "style": "height: calc(100vh - 49px); overflow: scroll;" }, [h("p", { "style": "width: 100%; height: 200vh; background: red; margin: 0; padding: 0;" })]), h(_Tab.default, { "attrs": { "title": "推荐" }, "style": "height: calc(100vh - 49px); overflow: scroll;" }, [this.index]), h(_Tab.default, { "attrs": { "title": "热榜" }, "style": "height: calc(100vh - 49px); overflow: scroll;" }, ["\u70ED\u699C"])])]); } }); };