Tag: semantic ui

Semantic-UI选项卡式布局中的laravel视图

我有一个非常基本的AJAX问题。 我希望使用带有AJAX加载内容的标签式布局。 http://semantic-ui.com/modules/tab.html#/examples 请参阅“ 重新访问远程内容”部分。 我的问题:我不知道如何替换模型AJAX mockResponse : function(settings) { var response = { first : ‘AJAX Tab One’, second : ‘AJAX Tab Two’, third : ‘AJAX Tab Three’ }; 在我的控制器中定义的视图。 我可以请别人给我看一个有效的例子。 先感谢您。

如何将Javascript中的JQuery函数值转换为ScalaJS(scalajs-jquery)

在我的ScalaJS项目中,我使用了Scala-js-jquery的 Semantic-UI 我用这个来修补JQuery: // Monkey patching JQuery @js.native trait SemanticJQuery extends JQuery { def dropdown(params: js.Any*): SemanticJQuery = js.native def popup(params: js.Any*): SemanticJQuery = js.native // and more } // Monkey patching JQuery with implicit conversion implicit def jq2semantic(jq: JQuery): SemanticJQuery = jq.asInstanceOf[SemanticJQuery] 例如$(‘select.dropdown’).dropdown(); 转换为jQuery(“.ui.dropdown”).dropdown(js.Dynamic.literal(on = “hover”)) 。 我现在的问题是如何翻译这个: // custom form validation rule $.fn.form.settings.rules.adminLevel […]

使用Angular2的语义UI – 如何在组件中设置jQuery的侧栏设置?

我有一个Angular2应用程序,我想使用Semantic UI 。 但是,有一些jQuery配置如下所示我必须在加载组件后运行: $(‘#app .ui.sidebar’) .sidebar({context:$(‘#app’)}) .sidebar(‘setting’, ‘transition’, ‘overlay’) 它无法通过在index.html的head导入js文件或将其写入组件模板内的标记来实现。 是否有“ typescript方式”来做到这一点或如何在组件内使用js文件?

语义UI模态组件onClose与React

我需要一种方法来定义语义模式上的行为,它在关闭时执行。 我现在正在做的是使用“门户”,但我认为“onClick”事件不起作用,因为这些html元素不在反应之中。 我有: componentDidMount() { console.log(‘mounting modal’, this); this.node = React.findDOMNode(this); this.$modal = $(this.node); this.$icon = $(“”); this.$header = $(“”).html(this.props.header); this.$content = $(“”); this.$modal.append(this.$header); this.$modal.append(this.$icon); this.$modal.append(this.$content); this.renderDialogContent(this.props); } componentWillReceiveProps(newProps) { this.renderDialogContent(newProps); } renderDialogContent(props) { props = props || this.props; React.render({props.children}, this.$content[0]); if (props.isOpen) { this.$modal .modal(‘setting’, ‘closable’, false) .modal(‘show’); } else { this.$modal.modal(‘hide modal’); } […]

hover时的语义Ui下拉列表

我希望我的语义ui下拉菜单在hover时触发而不是单击,它可以单击,但不会hover。 使用Javascript: $(‘.ui.dropdown’).dropdown({on:’hover’}); HTML: Members Players Staff

如何使用semantic-ui与webpack做出反应?

我想使用CommonJS在我的react jsx文件中包含semantic-ui。 我在bower上安装了semantic-ui,并且正确配置了webpack以包含bower_components目录。 但是,当我在jsx文件中使用require(‘semantic-ui/dist/semantic-ui.js’)时,控制台总是会抛出一个错误“Uncaught ReferenceError:jQuery is not defined”,即使我放了一个语句var jQuery = require(‘jquery/dist/jquery.js’) 。 另一个相关的事情是,为了使语义ui工作,还应该包括semantic.css。 我也想知道如何在jsx文件中包含semantic.css。